diff --git a/GreenshotBoxPlugin/Forms/SettingsForm.Designer.cs b/GreenshotBoxPlugin/Forms/SettingsForm.Designer.cs index eeafaeac9..6fb473423 100644 --- a/GreenshotBoxPlugin/Forms/SettingsForm.Designer.cs +++ b/GreenshotBoxPlugin/Forms/SettingsForm.Designer.cs @@ -57,29 +57,29 @@ namespace GreenshotBoxPlugin { // buttonOK // this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK; this.buttonOK.LanguageKey = "OK"; this.buttonOK.Location = new System.Drawing.Point(267, 72); this.buttonOK.Name = "buttonOK"; this.buttonOK.Size = new System.Drawing.Size(75, 23); this.buttonOK.TabIndex = 12; this.buttonOK.UseVisualStyleBackColor = true; - this.buttonOK.Click += new System.EventHandler(this.ButtonOKClick); // // 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.LanguageKey = "CANCEL"; this.buttonCancel.Location = new System.Drawing.Point(348, 72); this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.Size = new System.Drawing.Size(75, 23); this.buttonCancel.TabIndex = 13; this.buttonCancel.UseVisualStyleBackColor = true; - this.buttonCancel.Click += new System.EventHandler(this.ButtonCancelClick); // // combobox_uploadimageformat // this.combobox_uploadimageformat.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); + | System.Windows.Forms.AnchorStyles.Right))); this.combobox_uploadimageformat.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.combobox_uploadimageformat.FormattingEnabled = true; this.combobox_uploadimageformat.Location = new System.Drawing.Point(208, 12); @@ -111,11 +111,11 @@ namespace GreenshotBoxPlugin { this.checkboxAfterUploadLinkToClipBoard.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.checkboxAfterUploadLinkToClipBoard.AutoSize = true; this.checkboxAfterUploadLinkToClipBoard.LanguageKey = "box.label_AfterUploadLinkToClipBoard"; - this.checkboxAfterUploadLinkToClipBoard.Location = new System.Drawing.Point(208, 48); + this.checkboxAfterUploadLinkToClipBoard.Location = new System.Drawing.Point(208, 45); this.checkboxAfterUploadLinkToClipBoard.Name = "checkboxAfterUploadLinkToClipBoard"; this.checkboxAfterUploadLinkToClipBoard.PropertyName = "AfterUploadLinkToClipBoard"; this.checkboxAfterUploadLinkToClipBoard.SectionName = "Box"; - this.checkboxAfterUploadLinkToClipBoard.Size = new System.Drawing.Size(15, 14); + this.checkboxAfterUploadLinkToClipBoard.Size = new System.Drawing.Size(104, 17); this.checkboxAfterUploadLinkToClipBoard.TabIndex = 10; this.checkboxAfterUploadLinkToClipBoard.UseVisualStyleBackColor = true; // @@ -137,6 +137,7 @@ namespace GreenshotBoxPlugin { this.Name = "SettingsForm"; this.ResumeLayout(false); this.PerformLayout(); + } private GreenshotPlugin.Controls.GreenshotComboBox combobox_uploadimageformat; private GreenshotPlugin.Controls.GreenshotLabel label_upload_format; diff --git a/GreenshotBoxPlugin/Forms/SettingsForm.cs b/GreenshotBoxPlugin/Forms/SettingsForm.cs index c51820839..f47a6764c 100644 --- a/GreenshotBoxPlugin/Forms/SettingsForm.cs +++ b/GreenshotBoxPlugin/Forms/SettingsForm.cs @@ -37,16 +37,10 @@ namespace GreenshotBoxPlugin { // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); + AcceptButton = buttonOK; + CancelButton = buttonCancel; this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon(); } - - void ButtonOKClick(object sender, EventArgs e) { - this.DialogResult = DialogResult.OK; - } - - void ButtonCancelClick(object sender, System.EventArgs e) { - this.DialogResult = DialogResult.Cancel; - } } } diff --git a/GreenshotDropboxPlugin/Forms/SettingsForm.Designer.cs b/GreenshotDropboxPlugin/Forms/SettingsForm.Designer.cs index 01c7f26f0..2549c2018 100644 --- a/GreenshotDropboxPlugin/Forms/SettingsForm.Designer.cs +++ b/GreenshotDropboxPlugin/Forms/SettingsForm.Designer.cs @@ -56,25 +56,24 @@ namespace GreenshotDropboxPlugin { // buttonOK // this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK; this.buttonOK.LanguageKey = "OK"; this.buttonOK.Location = new System.Drawing.Point(267, 64); this.buttonOK.Name = "buttonOK"; this.buttonOK.Size = new System.Drawing.Size(75, 23); this.buttonOK.TabIndex = 10; this.buttonOK.UseVisualStyleBackColor = true; - this.buttonOK.Click += new System.EventHandler(this.ButtonOKClick); // // 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.LanguageKey = "CANCEL"; this.buttonCancel.Location = new System.Drawing.Point(348, 64); this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.Size = new System.Drawing.Size(75, 23); this.buttonCancel.TabIndex = 11; - this.buttonCancel.Text = "Cancel"; this.buttonCancel.UseVisualStyleBackColor = true; - this.buttonCancel.Click += new System.EventHandler(this.ButtonCancelClick); // // combobox_uploadimageformat // @@ -96,7 +95,6 @@ namespace GreenshotDropboxPlugin { this.label_upload_format.Name = "label_upload_format"; this.label_upload_format.Size = new System.Drawing.Size(84, 20); this.label_upload_format.TabIndex = 9; - this.label_upload_format.Text = "Image format"; // // label_AfterUpload // @@ -105,7 +103,6 @@ namespace GreenshotDropboxPlugin { this.label_AfterUpload.Name = "label_AfterUpload"; this.label_AfterUpload.Size = new System.Drawing.Size(84, 21); this.label_AfterUpload.TabIndex = 22; - this.label_AfterUpload.Text = "After upload"; // // checkboxAfterUploadLinkToClipBoard // @@ -117,7 +114,6 @@ namespace GreenshotDropboxPlugin { this.checkboxAfterUploadLinkToClipBoard.SectionName = "Dropbox"; this.checkboxAfterUploadLinkToClipBoard.Size = new System.Drawing.Size(104, 17); this.checkboxAfterUploadLinkToClipBoard.TabIndex = 2; - this.checkboxAfterUploadLinkToClipBoard.Text = "Link to clipboard"; this.checkboxAfterUploadLinkToClipBoard.UseVisualStyleBackColor = true; // // SettingsForm @@ -136,7 +132,6 @@ namespace GreenshotDropboxPlugin { this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "SettingsForm"; - this.Text = "Dropbox settings"; this.ResumeLayout(false); this.PerformLayout(); diff --git a/GreenshotDropboxPlugin/Forms/SettingsForm.cs b/GreenshotDropboxPlugin/Forms/SettingsForm.cs index 0ea5f3c74..a522101a2 100644 --- a/GreenshotDropboxPlugin/Forms/SettingsForm.cs +++ b/GreenshotDropboxPlugin/Forms/SettingsForm.cs @@ -37,15 +37,10 @@ namespace GreenshotDropboxPlugin { // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); + AcceptButton = buttonOK; + CancelButton = buttonCancel; this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon(); } - - void ButtonOKClick(object sender, EventArgs e) { - this.DialogResult = DialogResult.OK; - } - - void ButtonCancelClick(object sender, System.EventArgs e) { - this.DialogResult = DialogResult.Cancel; - } + } } diff --git a/GreenshotExternalCommandPlugin/ExternalCommandPlugin.cs b/GreenshotExternalCommandPlugin/ExternalCommandPlugin.cs index 669131d33..6e7d6cb05 100644 --- a/GreenshotExternalCommandPlugin/ExternalCommandPlugin.cs +++ b/GreenshotExternalCommandPlugin/ExternalCommandPlugin.cs @@ -18,13 +18,14 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + +using Greenshot.IniFile; +using Greenshot.Plugin; +using GreenshotPlugin.Core; using System; using System.Collections.Generic; using System.IO; using System.Windows.Forms; -using Greenshot.IniFile; -using Greenshot.Plugin; -using GreenshotPlugin.Core; namespace ExternalCommand { /// diff --git a/GreenshotExternalCommandPlugin/SettingsForm.Designer.cs b/GreenshotExternalCommandPlugin/SettingsForm.Designer.cs index 1a463068d..d8e9608d4 100644 --- a/GreenshotExternalCommandPlugin/SettingsForm.Designer.cs +++ b/GreenshotExternalCommandPlugin/SettingsForm.Designer.cs @@ -63,10 +63,10 @@ namespace ExternalCommand { this.buttonCancel.Size = new System.Drawing.Size(75, 23); this.buttonCancel.TabIndex = 11; this.buttonCancel.UseVisualStyleBackColor = true; - this.buttonCancel.Click += new System.EventHandler(this.ButtonCancelClick); // // buttonOk // + this.buttonOk.DialogResult = System.Windows.Forms.DialogResult.OK; this.buttonOk.LanguageKey = "OK"; this.buttonOk.Location = new System.Drawing.Point(275, 173); this.buttonOk.Name = "buttonOk"; @@ -144,6 +144,7 @@ namespace ExternalCommand { this.LanguageKey = "externalcommand.settings_title"; this.Name = "SettingsForm"; this.ResumeLayout(false); + } private GreenshotPlugin.Controls.GreenshotButton button_edit; private GreenshotPlugin.Controls.GreenshotButton button_delete; diff --git a/GreenshotExternalCommandPlugin/SettingsForm.cs b/GreenshotExternalCommandPlugin/SettingsForm.cs index 2671887ee..fbef838cf 100644 --- a/GreenshotExternalCommandPlugin/SettingsForm.cs +++ b/GreenshotExternalCommandPlugin/SettingsForm.cs @@ -18,12 +18,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + +using Greenshot.IniFile; using System; using System.Drawing; using System.Windows.Forms; -using Greenshot.IniFile; - namespace ExternalCommand { /// /// Description of SettingsForm. @@ -31,34 +31,31 @@ namespace ExternalCommand { public partial class SettingsForm : ExternalCommandForm { private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(SettingsForm)); private static ExternalCommandConfiguration config = IniConfig.GetIniSection(); - + public SettingsForm() { // // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon(); + AcceptButton = buttonOk; + CancelButton = buttonCancel; UpdateView(); } - + void ButtonOkClick(object sender, EventArgs e) { IniConfig.Save(); - DialogResult = DialogResult.OK; - } - - void ButtonCancelClick(object sender, EventArgs e) { - DialogResult = DialogResult.Cancel; } void ButtonAddClick(object sender, EventArgs e) { SettingsFormDetail form = new SettingsFormDetail(null); form.ShowDialog(); - + UpdateView(); } void ButtonDeleteClick(object sender, EventArgs e) { - foreach ( ListViewItem item in listView1.SelectedItems ) { + foreach(ListViewItem item in listView1.SelectedItems) { string commando = item.Tag as string; config.commands.Remove(commando); config.commandlines.Remove(commando); @@ -69,15 +66,15 @@ namespace ExternalCommand { void UpdateView() { listView1.Items.Clear(); - if (config.commands != null) { + if(config.commands != null) { listView1.ListViewItemSorter = new ListviewComparer(); ImageList imageList = new ImageList(); listView1.SmallImageList = imageList; int imageNr = 0; - foreach (string commando in config.commands) { + foreach(string commando in config.commands) { ListViewItem item = null; Image iconForExe = IconCache.IconForCommand(commando); - if (iconForExe != null) { + if(iconForExe != null) { imageList.Images.Add(iconForExe); item = new ListViewItem(commando, imageNr++); } else { @@ -94,39 +91,39 @@ namespace ExternalCommand { void ListView1ItemSelectionChanged(object sender, EventArgs e) { button_edit.Enabled = listView1.SelectedItems.Count > 0; } - + void ButtonEditClick(object sender, EventArgs e) { ListView1DoubleClick(sender, e); } - + void ListView1DoubleClick(object sender, EventArgs e) { // Safety check for bug #1484 bool selectionActive = listView1.SelectedItems.Count > 0; - if (!selectionActive) { + if(!selectionActive) { button_edit.Enabled = false; return; } string commando = listView1.SelectedItems[0].Tag as string; - + SettingsFormDetail form = new SettingsFormDetail(commando); form.ShowDialog(); - + UpdateView(); } } public class ListviewComparer : System.Collections.IComparer { public int Compare(object x, object y) { - if (!(x is ListViewItem)) { + if(!(x is ListViewItem)) { return (0); } - if (!(y is ListViewItem)) { + if(!(y is ListViewItem)) { return (0); } ListViewItem l1 = (ListViewItem)x; ListViewItem l2 = (ListViewItem)y; - if (l2 == null) { + if(l2 == null) { return 1; } return l1.Text.CompareTo(l2.Text); diff --git a/GreenshotExternalCommandPlugin/SettingsFormDetail.Designer.cs b/GreenshotExternalCommandPlugin/SettingsFormDetail.Designer.cs index abc55c8e8..bb091a711 100644 --- a/GreenshotExternalCommandPlugin/SettingsFormDetail.Designer.cs +++ b/GreenshotExternalCommandPlugin/SettingsFormDetail.Designer.cs @@ -62,6 +62,7 @@ namespace ExternalCommand { // // buttonOk // + this.buttonOk.DialogResult = System.Windows.Forms.DialogResult.OK; this.buttonOk.Enabled = false; this.buttonOk.LanguageKey = "OK"; this.buttonOk.Location = new System.Drawing.Point(273, 140); @@ -80,7 +81,6 @@ namespace ExternalCommand { this.buttonCancel.Size = new System.Drawing.Size(75, 23); this.buttonCancel.TabIndex = 11; this.buttonCancel.UseVisualStyleBackColor = true; - this.buttonCancel.Click += new System.EventHandler(this.ButtonCancelClick); // // groupBox1 // @@ -178,7 +178,6 @@ namespace ExternalCommand { this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.LanguageKey = "externalcommand.settings_detail_title"; this.Name = "SettingsFormDetail"; - this.Text = "Configure command"; this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); this.ResumeLayout(false); diff --git a/GreenshotExternalCommandPlugin/SettingsFormDetail.cs b/GreenshotExternalCommandPlugin/SettingsFormDetail.cs index 400839b80..dc53bf5d7 100644 --- a/GreenshotExternalCommandPlugin/SettingsFormDetail.cs +++ b/GreenshotExternalCommandPlugin/SettingsFormDetail.cs @@ -1,18 +1,30 @@ /* - * Created by SharpDevelop. - * User: 05018038 - * Date: 04.04.2012 - * Time: 10:50 + * Greenshot - a free and open source screenshot tool + * Copyright (C) 2007-2014 Thomas Braun, Jens Klingen, Robin Krom * - * To change this template use Tools | Options | Coding | Edit Standard Headers. + * For more information see: http://getgreenshot.org/ + * The Greenshot project is hosted on Sourceforge: http://sourceforge.net/projects/greenshot/ + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 1 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ + +using Greenshot.IniFile; using System; using System.Drawing; using System.IO; using System.Windows.Forms; -using Greenshot.IniFile; - namespace ExternalCommand { /// /// Description of SettingsFormDetail. @@ -20,17 +32,18 @@ namespace ExternalCommand { public partial class SettingsFormDetail : ExternalCommandForm { private string commando; private int commandIndex; - + private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(SettingsFormDetail)); private static ExternalCommandConfiguration config = IniConfig.GetIniSection(); - - public SettingsFormDetail(string commando) - { + + public SettingsFormDetail(string commando) { InitializeComponent(); this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon(); + AcceptButton = buttonOk; + CancelButton = buttonCancel; this.commando = commando; - - if (commando != null) { + + if(commando != null) { textBox_name.Text = commando; textBox_commandline.Text = config.commandlines[commando]; textBox_arguments.Text = config.arguments[commando]; @@ -40,13 +53,12 @@ namespace ExternalCommand { } OKButtonState(); } - - void ButtonOkClick(object sender, EventArgs e) - { + + void ButtonOkClick(object sender, EventArgs e) { string commandName = textBox_name.Text; string commandLine = textBox_commandline.Text; string arguments = textBox_arguments.Text; - if (commando != null) { + if(commando != null) { config.commands[commandIndex] = commandName; config.commandlines.Remove(commando); config.commandlines.Add(commandName, commandLine); @@ -57,17 +69,9 @@ namespace ExternalCommand { config.commandlines.Add(commandName, commandLine); config.arguments.Add(commandName, arguments); } - - Close(); } - - void ButtonCancelClick(object sender, EventArgs e) - { - Close(); - } - - void Button3Click(object sender, EventArgs e) - { + + void Button3Click(object sender, EventArgs e) { OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.Filter = "Executables (*.exe, *.bat, *.com)|*.exe; *.bat; *.com|All files (*)|*"; openFileDialog.FilterIndex = 1; @@ -76,15 +80,15 @@ namespace ExternalCommand { string initialPath = null; try { initialPath = Path.GetDirectoryName(textBox_commandline.Text); - } catch {} - if (initialPath != null && Directory.Exists(initialPath)) { - openFileDialog.InitialDirectory = initialPath; + } catch { } + if(initialPath != null && Directory.Exists(initialPath)) { + openFileDialog.InitialDirectory = initialPath; } else { initialPath = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles); openFileDialog.InitialDirectory = initialPath; } LOG.DebugFormat("Starting OpenFileDialog at {0}", initialPath); - if (openFileDialog.ShowDialog() == DialogResult.OK) { + if(openFileDialog.ShowDialog() == DialogResult.OK) { textBox_commandline.Text = openFileDialog.FileName; } } @@ -95,20 +99,20 @@ namespace ExternalCommand { textBox_name.BackColor = Color.White; textBox_commandline.BackColor = Color.White; // Is there a text in the name field - if (string.IsNullOrEmpty(textBox_name.Text)) { + if(string.IsNullOrEmpty(textBox_name.Text)) { buttonOk.Enabled = false; } // Check if commandname is unique - if (commando == null && !string.IsNullOrEmpty(textBox_name.Text) && config.commands.Contains(textBox_name.Text)) { + if(commando == null && !string.IsNullOrEmpty(textBox_name.Text) && config.commands.Contains(textBox_name.Text)) { buttonOk.Enabled = false; textBox_name.BackColor = Color.Red; } // Is there a text in the commandline field - if (string.IsNullOrEmpty(textBox_commandline.Text)) { + if(string.IsNullOrEmpty(textBox_commandline.Text)) { buttonOk.Enabled = false; } // Is the command available? - if (!string.IsNullOrEmpty(textBox_commandline.Text) && !File.Exists(textBox_commandline.Text)) { + if(!string.IsNullOrEmpty(textBox_commandline.Text) && !File.Exists(textBox_commandline.Text)) { buttonOk.Enabled = false; textBox_commandline.BackColor = Color.Red; } diff --git a/GreenshotFlickrPlugin/Forms/SettingsForm.Designer.cs b/GreenshotFlickrPlugin/Forms/SettingsForm.Designer.cs index 2bd40eb51..2da0918ca 100644 --- a/GreenshotFlickrPlugin/Forms/SettingsForm.Designer.cs +++ b/GreenshotFlickrPlugin/Forms/SettingsForm.Designer.cs @@ -63,25 +63,24 @@ namespace GreenshotFlickrPlugin { // buttonOK // this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK; this.buttonOK.LanguageKey = "OK"; this.buttonOK.Location = new System.Drawing.Point(270, 151); this.buttonOK.Name = "buttonOK"; this.buttonOK.Size = new System.Drawing.Size(75, 23); this.buttonOK.TabIndex = 10; this.buttonOK.UseVisualStyleBackColor = true; - this.buttonOK.Click += new System.EventHandler(this.ButtonOKClick); // // 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.LanguageKey = "CANCEL"; this.buttonCancel.Location = new System.Drawing.Point(351, 151); this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.Size = new System.Drawing.Size(75, 23); this.buttonCancel.TabIndex = 11; - this.buttonCancel.Text = "Cancel"; this.buttonCancel.UseVisualStyleBackColor = true; - this.buttonCancel.Click += new System.EventHandler(this.ButtonCancelClick); // // combobox_uploadimageformat // @@ -103,7 +102,6 @@ namespace GreenshotFlickrPlugin { this.label_upload_format.Name = "label_upload_format"; this.label_upload_format.Size = new System.Drawing.Size(157, 20); this.label_upload_format.TabIndex = 3; - this.label_upload_format.Text = "Image format"; // // checkBoxPublic // @@ -115,7 +113,6 @@ namespace GreenshotFlickrPlugin { this.checkBoxPublic.SectionName = "Flickr"; this.checkBoxPublic.Size = new System.Drawing.Size(55, 17); this.checkBoxPublic.TabIndex = 4; - this.checkBoxPublic.Text = "Public"; this.checkBoxPublic.UseVisualStyleBackColor = true; // // checkBoxFamily @@ -128,7 +125,6 @@ namespace GreenshotFlickrPlugin { this.checkBoxFamily.SectionName = "Flickr"; this.checkBoxFamily.Size = new System.Drawing.Size(55, 17); this.checkBoxFamily.TabIndex = 5; - this.checkBoxFamily.Text = "Family"; this.checkBoxFamily.UseVisualStyleBackColor = true; // // checkBoxFriend @@ -150,7 +146,6 @@ namespace GreenshotFlickrPlugin { this.label_SafetyLevel.Name = "label_SafetyLevel"; this.label_SafetyLevel.Size = new System.Drawing.Size(157, 21); this.label_SafetyLevel.TabIndex = 7; - this.label_SafetyLevel.Text = "Safety level"; // // combobox_safetyLevel // @@ -172,7 +167,6 @@ namespace GreenshotFlickrPlugin { this.label_AfterUpload.Name = "label_AfterUpload"; this.label_AfterUpload.Size = new System.Drawing.Size(155, 21); this.label_AfterUpload.TabIndex = 14; - this.label_AfterUpload.Text = "After upload"; // // checkboxAfterUploadLinkToClipBoard // @@ -184,7 +178,6 @@ namespace GreenshotFlickrPlugin { this.checkboxAfterUploadLinkToClipBoard.SectionName = "Flickr"; this.checkboxAfterUploadLinkToClipBoard.Size = new System.Drawing.Size(104, 17); this.checkboxAfterUploadLinkToClipBoard.TabIndex = 7; - this.checkboxAfterUploadLinkToClipBoard.Text = "Link to clipboard"; this.checkboxAfterUploadLinkToClipBoard.UseVisualStyleBackColor = true; // // checkBox_hiddenfromsearch @@ -221,9 +214,9 @@ namespace GreenshotFlickrPlugin { this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "SettingsForm"; - this.Text = "Flickr settings"; this.ResumeLayout(false); this.PerformLayout(); + } private GreenshotPlugin.Controls.GreenshotCheckBox checkBox_hiddenfromsearch; private GreenshotPlugin.Controls.GreenshotComboBox combobox_uploadimageformat; diff --git a/GreenshotFlickrPlugin/Forms/SettingsForm.cs b/GreenshotFlickrPlugin/Forms/SettingsForm.cs index b20083182..9b2243a32 100644 --- a/GreenshotFlickrPlugin/Forms/SettingsForm.cs +++ b/GreenshotFlickrPlugin/Forms/SettingsForm.cs @@ -38,14 +38,9 @@ namespace GreenshotFlickrPlugin { // InitializeComponent(); Icon = GreenshotResources.getGreenshotIcon(); + CancelButton = buttonCancel; + AcceptButton = buttonOK; } - - void ButtonOKClick(object sender, EventArgs e) { - DialogResult = DialogResult.OK; - } - - void ButtonCancelClick(object sender, EventArgs e) { - DialogResult = DialogResult.Cancel; - } + } } diff --git a/GreenshotImgurPlugin/Forms/ImgurHistory.Designer.cs b/GreenshotImgurPlugin/Forms/ImgurHistory.Designer.cs index 4a30d5f70..0637db88d 100644 --- a/GreenshotImgurPlugin/Forms/ImgurHistory.Designer.cs +++ b/GreenshotImgurPlugin/Forms/ImgurHistory.Designer.cs @@ -117,7 +117,6 @@ namespace GreenshotImgurPlugin this.finishedButton.TabIndex = 11; this.finishedButton.Text = "Finished"; this.finishedButton.UseVisualStyleBackColor = true; - this.finishedButton.Click += new System.EventHandler(this.FinishedButtonClick); // // clipboardButton // diff --git a/GreenshotImgurPlugin/Forms/ImgurHistory.cs b/GreenshotImgurPlugin/Forms/ImgurHistory.cs index 608d79193..561b54d17 100644 --- a/GreenshotImgurPlugin/Forms/ImgurHistory.cs +++ b/GreenshotImgurPlugin/Forms/ImgurHistory.cs @@ -54,7 +54,8 @@ namespace GreenshotImgurPlugin { // InitializeComponent(); this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon(); - + AcceptButton = finishedButton; + CancelButton = finishedButton; // Init sorting columnSorter = new GreenshotColumnSorter(); this.listview_imgur_uploads.ListViewItemSorter = columnSorter; @@ -157,10 +158,6 @@ namespace GreenshotImgurPlugin { ClipboardHelper.SetClipboardData(links.ToString()); } - private void FinishedButtonClick(object sender, EventArgs e) { - this.Close(); - } - private void ClearHistoryButtonClick(object sender, EventArgs e) { DialogResult result = MessageBox.Show(Language.GetString("imgur", LangKey.clear_question), "Imgur", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (result == DialogResult.Yes) { diff --git a/GreenshotImgurPlugin/Forms/SettingsForm.Designer.cs b/GreenshotImgurPlugin/Forms/SettingsForm.Designer.cs index f795fb97d..f72b39fb2 100644 --- a/GreenshotImgurPlugin/Forms/SettingsForm.Designer.cs +++ b/GreenshotImgurPlugin/Forms/SettingsForm.Designer.cs @@ -58,24 +58,24 @@ namespace GreenshotImgurPlugin { // buttonOK // this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK; this.buttonOK.LanguageKey = "imgur.OK"; this.buttonOK.Location = new System.Drawing.Point(222, 88); this.buttonOK.Name = "buttonOK"; this.buttonOK.Size = new System.Drawing.Size(75, 23); this.buttonOK.TabIndex = 10; this.buttonOK.UseVisualStyleBackColor = true; - this.buttonOK.Click += new System.EventHandler(this.ButtonOKClick); // // 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.LanguageKey = "imgur.CANCEL"; this.buttonCancel.Location = new System.Drawing.Point(303, 88); this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.Size = new System.Drawing.Size(75, 23); this.buttonCancel.TabIndex = 11; this.buttonCancel.UseVisualStyleBackColor = true; - this.buttonCancel.Click += new System.EventHandler(this.ButtonCancelClick); // // combobox_uploadimageformat // @@ -150,6 +150,7 @@ namespace GreenshotImgurPlugin { this.Name = "SettingsForm"; this.ResumeLayout(false); this.PerformLayout(); + } private GreenshotPlugin.Controls.GreenshotButton historyButton; private GreenshotPlugin.Controls.GreenshotComboBox combobox_uploadimageformat; diff --git a/GreenshotImgurPlugin/Forms/SettingsForm.cs b/GreenshotImgurPlugin/Forms/SettingsForm.cs index 3e6f57ab8..91464b623 100644 --- a/GreenshotImgurPlugin/Forms/SettingsForm.cs +++ b/GreenshotImgurPlugin/Forms/SettingsForm.cs @@ -33,6 +33,8 @@ namespace GreenshotImgurPlugin { // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); + CancelButton = buttonCancel; + AcceptButton = buttonOK; this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon(); ImgurUtils.LoadHistory(); @@ -43,14 +45,6 @@ namespace GreenshotImgurPlugin { historyButton.Enabled = false; } } - - void ButtonOKClick(object sender, EventArgs e) { - this.DialogResult = DialogResult.OK; - } - - void ButtonCancelClick(object sender, System.EventArgs e) { - this.DialogResult = DialogResult.Cancel; - } void ButtonHistoryClick(object sender, EventArgs e) { ImgurHistory.ShowHistory(); diff --git a/GreenshotJiraPlugin/Forms/JiraForm.Designer.cs b/GreenshotJiraPlugin/Forms/JiraForm.Designer.cs index f84bcf45a..ad6643dc4 100644 --- a/GreenshotJiraPlugin/Forms/JiraForm.Designer.cs +++ b/GreenshotJiraPlugin/Forms/JiraForm.Designer.cs @@ -90,6 +90,7 @@ namespace GreenshotJiraPlugin { // uploadButton // this.uploadButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.uploadButton.DialogResult = System.Windows.Forms.DialogResult.OK; this.uploadButton.Enabled = false; this.uploadButton.Location = new System.Drawing.Point(550, 281); this.uploadButton.Name = "uploadButton"; @@ -97,7 +98,6 @@ namespace GreenshotJiraPlugin { this.uploadButton.TabIndex = 10; this.uploadButton.Text = "Upload"; this.uploadButton.UseVisualStyleBackColor = true; - this.uploadButton.Click += new System.EventHandler(this.uploadButton_Click); // // jiraListView // @@ -156,13 +156,13 @@ namespace GreenshotJiraPlugin { // cancelButton // this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.cancelButton.Location = new System.Drawing.Point(631, 281); this.cancelButton.Name = "cancelButton"; this.cancelButton.Size = new System.Drawing.Size(75, 23); this.cancelButton.TabIndex = 11; this.cancelButton.Text = "Cancel"; this.cancelButton.UseVisualStyleBackColor = true; - this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click); // // label1 // @@ -206,6 +206,7 @@ namespace GreenshotJiraPlugin { this.TopMost = true; this.ResumeLayout(false); this.PerformLayout(); + } private System.Windows.Forms.TextBox jiraKey; private System.Windows.Forms.Label label1; diff --git a/GreenshotJiraPlugin/Forms/JiraForm.cs b/GreenshotJiraPlugin/Forms/JiraForm.cs index de4b924e0..b2d5fa498 100644 --- a/GreenshotJiraPlugin/Forms/JiraForm.cs +++ b/GreenshotJiraPlugin/Forms/JiraForm.cs @@ -37,6 +37,9 @@ namespace GreenshotJiraPlugin { public JiraForm(JiraConnector jiraConnector) { InitializeComponent(); this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon(); + AcceptButton = uploadButton; + CancelButton = cancelButton; + initializeComponentText(); this.columnSorter = new GreenshotColumnSorter(); @@ -169,14 +172,6 @@ namespace GreenshotJiraPlugin { } } - private void uploadButton_Click(object sender, EventArgs e) { - this.DialogResult = DialogResult.OK; - } - - private void cancelButton_Click(object sender, EventArgs e) { - this.DialogResult = DialogResult.Cancel; - } - private void jiraListView_ColumnClick(object sender, ColumnClickEventArgs e) { // Determine if clicked column is already the column that is being sorted. if (e.Column == columnSorter.SortColumn) { diff --git a/GreenshotJiraPlugin/Forms/SettingsForm.Designer.cs b/GreenshotJiraPlugin/Forms/SettingsForm.Designer.cs index 81fb6cdce..4007cbc6e 100644 --- a/GreenshotJiraPlugin/Forms/SettingsForm.Designer.cs +++ b/GreenshotJiraPlugin/Forms/SettingsForm.Designer.cs @@ -57,17 +57,18 @@ namespace GreenshotJiraPlugin { // buttonOK // this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK; this.buttonOK.LanguageKey = "OK"; this.buttonOK.Location = new System.Drawing.Point(222, 84); this.buttonOK.Name = "buttonOK"; this.buttonOK.Size = new System.Drawing.Size(75, 23); this.buttonOK.TabIndex = 10; this.buttonOK.UseVisualStyleBackColor = true; - this.buttonOK.Click += new System.EventHandler(this.ButtonOKClick); // // 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.LanguageKey = "CANCEL"; this.buttonCancel.Location = new System.Drawing.Point(303, 84); this.buttonCancel.Name = "buttonCancel"; @@ -75,7 +76,6 @@ namespace GreenshotJiraPlugin { this.buttonCancel.TabIndex = 11; this.buttonCancel.Text = "Cancel"; this.buttonCancel.UseVisualStyleBackColor = true; - this.buttonCancel.Click += new System.EventHandler(this.ButtonCancelClick); // // label_url // @@ -134,6 +134,7 @@ namespace GreenshotJiraPlugin { this.Name = "SettingsForm"; this.ResumeLayout(false); this.PerformLayout(); + } private GreenshotPlugin.Controls.GreenshotComboBox combobox_uploadimageformat; private GreenshotPlugin.Controls.GreenshotLabel label_upload_format; diff --git a/GreenshotJiraPlugin/Forms/SettingsForm.cs b/GreenshotJiraPlugin/Forms/SettingsForm.cs index 2aa30090d..a80238f18 100644 --- a/GreenshotJiraPlugin/Forms/SettingsForm.cs +++ b/GreenshotJiraPlugin/Forms/SettingsForm.cs @@ -32,15 +32,9 @@ namespace GreenshotJiraPlugin { // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); - this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon(); - } - - void ButtonOKClick(object sender, EventArgs e) { - this.DialogResult = DialogResult.OK; - } - - void ButtonCancelClick(object sender, System.EventArgs e) { - this.DialogResult = DialogResult.Cancel; + AcceptButton = buttonOK; + CancelButton = buttonCancel; + Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon(); } } } diff --git a/GreenshotOCRPlugin/SettingsForm.Designer.cs b/GreenshotOCRPlugin/SettingsForm.Designer.cs index feaf6a9d1..36c66bea4 100644 --- a/GreenshotOCRPlugin/SettingsForm.Designer.cs +++ b/GreenshotOCRPlugin/SettingsForm.Designer.cs @@ -100,6 +100,7 @@ namespace GreenshotOCR // buttonOK // this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK; this.buttonOK.LanguageKey = "OK"; this.buttonOK.Location = new System.Drawing.Point(12, 98); this.buttonOK.Name = "buttonOK"; @@ -111,13 +112,13 @@ namespace GreenshotOCR // 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.LanguageKey = "CANCEL"; this.buttonCancel.Location = new System.Drawing.Point(128, 98); this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.Size = new System.Drawing.Size(104, 23); this.buttonCancel.TabIndex = 5; this.buttonCancel.UseVisualStyleBackColor = true; - this.buttonCancel.Click += new System.EventHandler(this.ButtonCancelClick); // // SettingsForm // @@ -133,6 +134,7 @@ namespace GreenshotOCR this.LanguageKey = "settings_title"; this.Name = "SettingsForm"; this.ResumeLayout(false); + } private GreenshotPlugin.Controls.GreenshotLabel label_language; private GreenshotPlugin.Controls.GreenshotButton buttonCancel; diff --git a/GreenshotOCRPlugin/SettingsForm.cs b/GreenshotOCRPlugin/SettingsForm.cs index 48049e7ae..16b1da337 100644 --- a/GreenshotOCRPlugin/SettingsForm.cs +++ b/GreenshotOCRPlugin/SettingsForm.cs @@ -35,6 +35,8 @@ namespace GreenshotOCR { // this.config = config; InitializeComponent(); + AcceptButton = buttonOK; + CancelButton = buttonCancel; this.Icon = GreenshotResources.getGreenshotIcon(); comboBox_languages.Items.Clear(); @@ -54,18 +56,12 @@ namespace GreenshotOCR { index++; } } - - void ButtonCancelClick(object sender, EventArgs e) { - DialogResult = DialogResult.Cancel; - } void ButtonOKClick(object sender, EventArgs e) { string selectedString = (string) comboBox_languages.SelectedItem; if (selectedString != null) { config.Language = selectedString.ToUpper(); } - - DialogResult = DialogResult.OK; } } } diff --git a/GreenshotPhotobucketPlugin/Forms/SettingsForm.Designer.cs b/GreenshotPhotobucketPlugin/Forms/SettingsForm.Designer.cs index affdbad82..6aa2824af 100644 --- a/GreenshotPhotobucketPlugin/Forms/SettingsForm.Designer.cs +++ b/GreenshotPhotobucketPlugin/Forms/SettingsForm.Designer.cs @@ -56,24 +56,24 @@ namespace GreenshotPhotobucketPlugin { // buttonOK // this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK; this.buttonOK.LanguageKey = "OK"; this.buttonOK.Location = new System.Drawing.Point(222, 70); this.buttonOK.Name = "buttonOK"; this.buttonOK.Size = new System.Drawing.Size(75, 23); this.buttonOK.TabIndex = 3; this.buttonOK.UseVisualStyleBackColor = true; - this.buttonOK.Click += new System.EventHandler(this.ButtonOKClick); // // 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.LanguageKey = "CANCEL"; this.buttonCancel.Location = new System.Drawing.Point(303, 70); this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.Size = new System.Drawing.Size(75, 23); this.buttonCancel.TabIndex = 4; this.buttonCancel.UseVisualStyleBackColor = true; - this.buttonCancel.Click += new System.EventHandler(this.ButtonCancelClick); // // combobox_uploadimageformat // diff --git a/GreenshotPhotobucketPlugin/Forms/SettingsForm.cs b/GreenshotPhotobucketPlugin/Forms/SettingsForm.cs index 655f9eebd..2336560f7 100644 --- a/GreenshotPhotobucketPlugin/Forms/SettingsForm.cs +++ b/GreenshotPhotobucketPlugin/Forms/SettingsForm.cs @@ -33,15 +33,9 @@ namespace GreenshotPhotobucketPlugin { // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); - this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon(); - } - - void ButtonOKClick(object sender, EventArgs e) { - this.DialogResult = DialogResult.OK; - } - - void ButtonCancelClick(object sender, System.EventArgs e) { - this.DialogResult = DialogResult.Cancel; + AcceptButton = buttonOK; + CancelButton = buttonCancel; + Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon(); } } } diff --git a/GreenshotPicasaPlugin/Forms/SettingsForm.Designer.cs b/GreenshotPicasaPlugin/Forms/SettingsForm.Designer.cs index 60eb2699b..41cb346f9 100644 --- a/GreenshotPicasaPlugin/Forms/SettingsForm.Designer.cs +++ b/GreenshotPicasaPlugin/Forms/SettingsForm.Designer.cs @@ -56,25 +56,24 @@ namespace GreenshotPicasaPlugin { // buttonOK // this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK; this.buttonOK.LanguageKey = "OK"; this.buttonOK.Location = new System.Drawing.Point(267, 78); this.buttonOK.Name = "buttonOK"; this.buttonOK.Size = new System.Drawing.Size(75, 23); this.buttonOK.TabIndex = 10; this.buttonOK.UseVisualStyleBackColor = true; - this.buttonOK.Click += new System.EventHandler(this.ButtonOKClick); // // 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.LanguageKey = "CANCEL"; this.buttonCancel.Location = new System.Drawing.Point(348, 78); this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.Size = new System.Drawing.Size(75, 23); this.buttonCancel.TabIndex = 11; - this.buttonCancel.Text = "Cancel"; this.buttonCancel.UseVisualStyleBackColor = true; - this.buttonCancel.Click += new System.EventHandler(this.ButtonCancelClick); // // combobox_uploadimageformat // @@ -96,7 +95,6 @@ namespace GreenshotPicasaPlugin { this.label_upload_format.Name = "label_upload_format"; this.label_upload_format.Size = new System.Drawing.Size(181, 33); this.label_upload_format.TabIndex = 4; - this.label_upload_format.Text = "Image format"; // // label_AfterUpload // @@ -106,7 +104,6 @@ namespace GreenshotPicasaPlugin { this.label_AfterUpload.Name = "label_AfterUpload"; this.label_AfterUpload.Size = new System.Drawing.Size(181, 29); this.label_AfterUpload.TabIndex = 8; - this.label_AfterUpload.Text = "After upload"; // // checkboxAfterUploadLinkToClipBoard // @@ -119,7 +116,6 @@ namespace GreenshotPicasaPlugin { this.checkboxAfterUploadLinkToClipBoard.SectionName = "Picasa"; this.checkboxAfterUploadLinkToClipBoard.Size = new System.Drawing.Size(104, 17); this.checkboxAfterUploadLinkToClipBoard.TabIndex = 2; - this.checkboxAfterUploadLinkToClipBoard.Text = "Link to clipboard"; this.checkboxAfterUploadLinkToClipBoard.UseVisualStyleBackColor = true; // // SettingsForm @@ -138,9 +134,9 @@ namespace GreenshotPicasaPlugin { this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "SettingsForm"; - this.Text = "Picasa settings"; this.ResumeLayout(false); this.PerformLayout(); + } private GreenshotPlugin.Controls.GreenshotComboBox combobox_uploadimageformat; private GreenshotPlugin.Controls.GreenshotLabel label_upload_format; diff --git a/GreenshotPicasaPlugin/Forms/SettingsForm.cs b/GreenshotPicasaPlugin/Forms/SettingsForm.cs index d696b45c9..2916a5630 100644 --- a/GreenshotPicasaPlugin/Forms/SettingsForm.cs +++ b/GreenshotPicasaPlugin/Forms/SettingsForm.cs @@ -30,22 +30,16 @@ namespace GreenshotPicasaPlugin { /// Description of PasswordRequestForm. /// public partial class SettingsForm : PicasaForm { - private string PicasaFrob = string.Empty; public SettingsForm(PicasaConfiguration config) : base() { // // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); - this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon(); + CancelButton = buttonCancel; + AcceptButton = buttonOK; + Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon(); } - void ButtonOKClick(object sender, EventArgs e) { - this.DialogResult = DialogResult.OK; - } - - void ButtonCancelClick(object sender, System.EventArgs e) { - this.DialogResult = DialogResult.Cancel; - } } }