Beispiel #1
0
 public static void Show(Version currentVersion, Version latestVersion, bool alwaysAsk)
 {
     if (alwaysAsk || Settings.DontCareAboutVersion < latestVersion)
     {
         using (var dialog = new NewVersionDialog())
         {
             dialog.m_yourVersionLabel.Text    = currentVersion.ToString().Trim('0', '.');
             dialog.m_latestVersionLabel.Text  = latestVersion.ToString().Trim('0', '.');
             dialog.m_dontCareCheckBox.Visible = !alwaysAsk;
             if (dialog.ShowDialog() == DialogResult.OK)
             {
                 try
                 {
                     Process.Start("http://trizbort.genstein.net/?getlatest");
                 }
                 catch (Exception)
                 {
                     CannotLaunchWebSite();
                 }
             }
             else if (!alwaysAsk && dialog.m_dontCareCheckBox.Checked)
             {
                 Settings.DontCareAboutVersion = latestVersion;
             }
         }
     }
 }
Beispiel #2
0
 private void HelpAndSupportMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         Process.Start("http://trizbort.genstein.net/?help");
     }
     catch (Exception)
     {
         NewVersionDialog.CannotLaunchWebSite();
     }
 }
Beispiel #3
0
 private void HelpAndSupportMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         Process.Start("http://www.trizbort.com/Docs/index.shtml");
     }
     catch (Exception)
     {
         NewVersionDialog.CannotLaunchWebSite();
     }
 }
Beispiel #4
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            Canvas.MinimapVisible = Settings.ShowMiniMap;

            var args = Environment.GetCommandLineArgs();

            if (args.Length > 1 && File.Exists(args[1]))
            {
                try
                {
                    BeginInvoke((MethodInvoker) delegate { OpenProject(args[1]); });
                }
                catch (Exception)
                {
                }
            }
            NewVersionDialog.CheckForUpdatesAsync(this, false);
        }
Beispiel #5
0
 private void CheckForUpdatesMenuItem_Click(object sender, EventArgs e)
 {
     NewVersionDialog.CheckForUpdatesAsync(this, true);
 }
Beispiel #6
0
 public static void Show(Version currentVersion, Version latestVersion, bool alwaysAsk)
 {
     if (alwaysAsk || Settings.DontCareAboutVersion < latestVersion)
     {
         using (var dialog = new NewVersionDialog())
         {
             dialog.m_yourVersionLabel.Text = currentVersion.ToString().Trim('0', '.');
             dialog.m_latestVersionLabel.Text = latestVersion.ToString().Trim('0', '.');
             dialog.m_dontCareCheckBox.Visible = !alwaysAsk;
             if (dialog.ShowDialog() == DialogResult.OK)
             {
                 try
                 {
                     Process.Start("http://trizbort.genstein.net/?getlatest");
                 }
                 catch (Exception)
                 {
                     CannotLaunchWebSite();
                 }
             }
             else if (!alwaysAsk && dialog.m_dontCareCheckBox.Checked)
             {
                 Settings.DontCareAboutVersion = latestVersion;
             }
         }
     }
 }