Beispiel #1
0
        private void Init()
        {
            LanguageControl.LoadLanguage();

            if (!CheckDotNetVersion())
            {
                MessageBox.Show("Please install the latest version of .Net Framework \n請先安裝最新版本的 .Net Framework");
                Process.Start("https://www.microsoft.com/en-us/download/details.aspx?id=48137");
                App.Current.Shutdown();
                return;
            }

            SettingsSaver.CheckSettings();
            Environment.CurrentDirectory = System.IO.Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory);
            WriteBasicInfoIntoLog();
            BRapi.Service.LaunchService.Launch();
            AnalyzeCommandArgs();
            DetectDuplicateExecute();
            ExternalLinkControl.CheckRegistrySettings();
            CheckNecessaryDirs();
            GameDatabase.Instance.InitDatabases();
            if (NormalStart)
            {
                StartupUri = new Uri(Utilities.AppUri + "MainWindow.xaml");
            }
            else
            {
                App.Current.Shutdown();
            }
        }
Beispiel #2
0
        public static void UpdateSoftware()
        {
            var dp = new DownloadProgress(@"http://ahri.tw/BaronReplays/BaronReplays_Auto.exe", "BaronReplays_Auto.exe");

            dp.Owner = MainWindow.Instance;
            dp.ShowDialog();
            if (dp.IsSuccess.HasValue)
            {
                if (dp.IsSuccess.Value)
                {
                    SettingsSaver.SaveSettings();
                    System.Diagnostics.Process.Start(AppDomain.CurrentDomain.BaseDirectory + @"\BaronReplays_AutoUpdate.exe");
                }
            }
        }