From 1259aa2f3ba5e768b80448dc56cf22c8ee499cf6 Mon Sep 17 00:00:00 2001 From: niksedk Date: Sun, 22 Jun 2014 16:14:06 +0200 Subject: [PATCH] Renamed button --- src/Forms/CheckForUpdates.Designer.cs | 24 ++++++++++++------------ src/Forms/CheckForUpdates.cs | 21 ++++++++++----------- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/src/Forms/CheckForUpdates.Designer.cs b/src/Forms/CheckForUpdates.Designer.cs index 780f00947..5c5a1d02c 100644 --- a/src/Forms/CheckForUpdates.Designer.cs +++ b/src/Forms/CheckForUpdates.Designer.cs @@ -31,7 +31,7 @@ this.components = new System.ComponentModel.Container(); this.labelStatus = new System.Windows.Forms.Label(); this.textBoxChangeLog = new System.Windows.Forms.TextBox(); - this.buttonCancel = new System.Windows.Forms.Button(); + this.buttonOK = new System.Windows.Forms.Button(); this.buttonDownloadAndInstall = new System.Windows.Forms.Button(); this.timerCheckForUpdates = new System.Windows.Forms.Timer(this.components); this.buttonDontCheckUpdates = new System.Windows.Forms.Button(); @@ -61,15 +61,15 @@ // // buttonCancel // - this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.buttonCancel.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.buttonCancel.Location = new System.Drawing.Point(556, 90); - this.buttonCancel.Name = "buttonCancel"; - this.buttonCancel.Size = new System.Drawing.Size(75, 21); - this.buttonCancel.TabIndex = 2; - this.buttonCancel.Text = "C&ancel"; - this.buttonCancel.UseVisualStyleBackColor = true; + this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.buttonOK.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.buttonOK.Location = new System.Drawing.Point(556, 90); + this.buttonOK.Name = "buttonCancel"; + this.buttonOK.Size = new System.Drawing.Size(75, 21); + this.buttonOK.TabIndex = 2; + this.buttonOK.Text = "C&ancel"; + this.buttonOK.UseVisualStyleBackColor = true; // // buttonDownloadAndInstall // @@ -105,7 +105,7 @@ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(643, 123); this.Controls.Add(this.buttonDontCheckUpdates); - this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.buttonOK); this.Controls.Add(this.buttonDownloadAndInstall); this.Controls.Add(this.textBoxChangeLog); this.Controls.Add(this.labelStatus); @@ -126,7 +126,7 @@ private System.Windows.Forms.Label labelStatus; private System.Windows.Forms.TextBox textBoxChangeLog; - private System.Windows.Forms.Button buttonCancel; + private System.Windows.Forms.Button buttonOK; private System.Windows.Forms.Button buttonDownloadAndInstall; private System.Windows.Forms.Timer timerCheckForUpdates; private System.Windows.Forms.Button buttonDontCheckUpdates; diff --git a/src/Forms/CheckForUpdates.cs b/src/Forms/CheckForUpdates.cs index 37e2e38f1..7afdee093 100644 --- a/src/Forms/CheckForUpdates.cs +++ b/src/Forms/CheckForUpdates.cs @@ -27,8 +27,8 @@ namespace Nikse.SubtitleEdit.Forms buttonDownloadAndInstall.Text = Configuration.Settings.Language.CheckForUpdates.InstallUpdate; buttonDownloadAndInstall.Visible = false; textBoxChangeLog.Visible = false; - buttonCancel.Text = Configuration.Settings.Language.General.OK; - buttonCancel.Visible = false; + buttonOK.Text = Configuration.Settings.Language.General.OK; + buttonOK.Visible = false; buttonDontCheckUpdates.Text = Configuration.Settings.Language.CheckForUpdates.NoUpdates; buttonDontCheckUpdates.Visible = false; @@ -63,7 +63,7 @@ namespace Nikse.SubtitleEdit.Forms _updatesHelper.CheckForUpdates(); timerCheckForUpdates.Start(); - buttonCancel.Focus(); + buttonOK.Focus(); } private void timerCheckForUpdates_Tick(object sender, EventArgs e) @@ -72,13 +72,13 @@ namespace Nikse.SubtitleEdit.Forms { timerCheckForUpdates.Stop(); labelStatus.Text = string.Format(Configuration.Settings.Language.CheckForUpdates.CheckingForUpdatesFailedX, "Time out"); - buttonCancel.Visible = true; + buttonOK.Visible = true; } else if (_updatesHelper.Error != null) { timerCheckForUpdates.Stop(); labelStatus.Text = string.Format(Configuration.Settings.Language.CheckForUpdates.CheckingForUpdatesFailedX, _updatesHelper.Error); - buttonCancel.Visible = true; + buttonOK.Visible = true; } else if (_updatesHelper.Done) { @@ -93,15 +93,15 @@ namespace Nikse.SubtitleEdit.Forms Height = 600; textBoxChangeLog.Text = _updatesHelper.LatestChangeLog; textBoxChangeLog.Visible = true; - buttonCancel.Visible = true; + buttonOK.Visible = true; } } _seconds += timerCheckForUpdates.Interval / 1000.0; if (buttonDownloadAndInstall.Visible) buttonDownloadAndInstall.Focus(); - else if (buttonCancel.Visible) - buttonCancel.Focus(); + else if (buttonOK.Visible) + buttonOK.Focus(); } private void ShowAvailableUpdate(bool fromAutoCheck) @@ -111,8 +111,7 @@ namespace Nikse.SubtitleEdit.Forms textBoxChangeLog.Visible = true; labelStatus.Text = Configuration.Settings.Language.CheckForUpdates.CheckingForUpdatesNewVersion; buttonDownloadAndInstall.Visible = true; - buttonCancel.Text = Configuration.Settings.Language.General.Cancel; - buttonCancel.Visible = true; + buttonOK.Visible = true; if (Configuration.Settings.General.CheckForUpdates && fromAutoCheck) { buttonDontCheckUpdates.Visible = true; @@ -120,7 +119,7 @@ namespace Nikse.SubtitleEdit.Forms else { buttonDontCheckUpdates.Visible = false; - buttonDownloadAndInstall.Left = buttonCancel.Left - 6 - buttonDownloadAndInstall.Width; + buttonDownloadAndInstall.Left = buttonOK.Left - 6 - buttonDownloadAndInstall.Width; } }