Exemplo n.º 1
0
        public static void InitGlobal(bool IsUpdated)
        {
            if (!Directory.Exists(ResourcePath))
            {
                Directory.CreateDirectory(ResourcePath);
            }
            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls
                                                   | SecurityProtocolType.Tls11
                                                   | SecurityProtocolType.Tls12
                                                   | SecurityProtocolType.Ssl3;
            Code         = new string[24];
            hotkeyList   = new HotkeyList();
            commandList  = new CommandList();
            saveFilePath = new SaveFilePath();
            UserState    = CommandTag.None;
            Version ver = System.Reflection.Assembly.GetEntryAssembly().GetName().Version;

            version = new int[2] {
                ver.Major, ver.Minor
            };
            saveFilePath.Read();
            Category    = new string[3];
            Category[0] = Settings.MapType;
            Category[1] = Settings.HeroType;
            isOnline    = false;
            isUpdated   = IsUpdated;
            Theme.LoadTheme();
            ExceptionSender.Init();
            Application.ThreadException += new ThreadExceptionEventHandler(ExceptionSender.Application_ThreadException);
            Thread.GetDomain().UnhandledException += new UnhandledExceptionEventHandler(ExceptionSender.Application_UnhandledException);
        }
Exemplo n.º 2
0
        public static void InitGlobal(bool IsUpdated)
        {
            Code         = new string[24];
            hotkeyList   = new HotkeyList();
            commandList  = new CommandList();
            saveFilePath = new SaveFilePath();
            UserState    = CommandTag.None;
            Version ver = System.Reflection.Assembly.GetEntryAssembly().GetName().Version;

            version = new int[4] {
                ver.Major, ver.Minor, ver.Build, ver.Revision
            };
            saveFilePath.Read();
            Category    = new string[3];
            Category[0] = Settings.MapType;
            Category[1] = Settings.HeroType;
            isOnline    = false;
            isUpdated   = IsUpdated;
            Theme.LoadTheme();
            ExceptionSender.Init();
            Application.ThreadException += new ThreadExceptionEventHandler(ExceptionSender.Application_ThreadException);
            Thread.GetDomain().UnhandledException += new UnhandledExceptionEventHandler(ExceptionSender.Application_UnhandledException);
        }