-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
60 lines (55 loc) · 2.03 KB
/
Copy pathProgram.cs
File metadata and controls
60 lines (55 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
using System;
using System.Globalization;
using System.Threading;
using System.Windows.Forms;
using RustWorkshopUploader.Localization;
using RustWorkshopUploader.Properties;
using Steamworks;
namespace RustWorkshopUploader
{
internal static class Program
{
public static AppId RustAppId = 252490;
public static AppId SdkAppId = 391750;
/// <summary>
/// Главная точка входа для приложения.
/// </summary>
[STAThread]
private static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.CurrentCulture = Settings.Default.Culture;
CultureInfo.DefaultThreadCurrentCulture = Settings.Default.Culture;
CultureInfo.DefaultThreadCurrentUICulture = Settings.Default.Culture;
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(Settings.Default.Culture.Name);
Thread.CurrentThread.CurrentUICulture = CultureInfo.CreateSpecificCulture(Settings.Default.Culture.Name);
DialogResult result;
do
{
try
{
SteamClient.Init(SdkAppId);
result = DialogResult.OK;
}
catch (Exception)
{
result = MessageBox.Show(strings.SteamNotFound, strings.Message_Error,
MessageBoxButtons.RetryCancel,
MessageBoxIcon.Error);
if (result == DialogResult.Cancel)
return;
}
} while (result == DialogResult.Retry);
try
{
Application.Run(new FrmMain());
}
catch (Exception e)
{
MessageBox.Show(string.Format(strings.AppError, e), strings.Message_Error, MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
}
}
}