Esempio n. 1
0
        private async void MainPage_Loaded(object sender, RoutedEventArgs e)
        {
            var isCanUpdate = await AutoUpdate.CheckUpdate();

            if (isCanUpdate)
            {
                var x = new UpdateDialog();
                await x.ShowAsync();
            }
        }
Esempio n. 2
0
 public override void Load()
 {
     log = Log;
     log.LogMessage("Loading...");
     if (!AutoUpdate.CheckUpdate())
     {
         log.LogError("Not Loaded... old version and not have update");
         return;
     }
     ClassInjector.RegisterTypeInIl2Cpp <MyClass>();
     MyOptions.CustomGameOptions = new MyOptions();
     ClientSocket.BuildUri("");
     _harmony.PatchAll();
     log.LogMessage("Loaded...");
 }
Esempio n. 3
0
        public void CheckUpdate()
        {
            AutoUpdate autoUpdateService = new AutoUpdate();

            var checkUpdate = autoUpdateService.CheckUpdate();

            if (checkUpdate.IsUpdateAvailable)
            {
                var updateMessage = string.Format("Update available for Traydio!{0}You are on version {1}; the latest version is {2}.{3}{4}Do you want to download the latest version?",
                                                  Environment.NewLine, checkUpdate.CurrentVersion, checkUpdate.NewVersion, Environment.NewLine, Environment.NewLine);

                if (MessageBox.Show(updateMessage, "Update Traydio", MessageBoxButtons.YesNo, MessageBoxIcon.Asterisk) == DialogResult.Yes)
                {
                    _utilities.OpenWebsite(checkUpdate.Url);
                }
            }
        }