Esempio n. 1
0
        private void updateButton_Click(object sender, EventArgs e)
        {
            Form1 form = (Form1)Owner;

            String errorMessage;

            statusLabel.Text = LanguageUtil.GetCurrentLanguageString("statusLabelUpdater", Name); //"Checking for new updater..."
            Refresh();

            if (!VersionCheckManager.UpdaterCheck(out errorMessage))
            {
                warningPictureBox.Visible = true;
                statusLabel.Text          = errorMessage;
                return;
            }

            statusLabel.Text = LanguageUtil.GetCurrentLanguageString("statusLabelClosing", Name); //"Closing open tabs..."
            Refresh();

            TabManager.CloseAllPages(form);
            ProcessStartInfo processInfo = new ProcessStartInfo("DtPadUpdater.exe", "-nocheck");

            OtherManager.StartProcessInfo(this, processInfo);
            Application.Exit();
        }
Esempio n. 2
0
 public static VersionCheckManager GetInstance()
 {
     if (!instance)
     {
         instance = GameObject.FindObjectOfType <VersionCheckManager>();
         if (!instance)
         {
             Debug.Log("There needs to be one active VersionCheckManager script on a VersionCheckManager in your scene.");
         }
     }
     return(instance);
 }
Esempio n. 3
0
        private void CheckVersion()
        {
            WebException exception;
            bool         isDtPadUpdated = VersionCheckManager.IsDtPadUpdated(out exception);

            if (isDtPadUpdated || exception != null)
            {
                return;
            }

            if (!aboutClosed)
            {
                Invoke(new ThreadCallBack(ShowMessage));
            }
        }