BUG-1653: Accessibility improvements, adding accept/cancel buttons to some of the forms. This way one can e.g. ESC out of a form.

This commit is contained in:
RKrom 2014-07-18 13:56:55 +02:00
parent 5cd6afad74
commit 036aec55f5
25 changed files with 119 additions and 180 deletions

View file

@ -57,24 +57,24 @@ namespace GreenshotBoxPlugin {
// buttonOK // buttonOK
// //
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 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.LanguageKey = "OK";
this.buttonOK.Location = new System.Drawing.Point(267, 72); this.buttonOK.Location = new System.Drawing.Point(267, 72);
this.buttonOK.Name = "buttonOK"; this.buttonOK.Name = "buttonOK";
this.buttonOK.Size = new System.Drawing.Size(75, 23); this.buttonOK.Size = new System.Drawing.Size(75, 23);
this.buttonOK.TabIndex = 12; this.buttonOK.TabIndex = 12;
this.buttonOK.UseVisualStyleBackColor = true; this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.ButtonOKClick);
// //
// buttonCancel // buttonCancel
// //
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 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.LanguageKey = "CANCEL";
this.buttonCancel.Location = new System.Drawing.Point(348, 72); this.buttonCancel.Location = new System.Drawing.Point(348, 72);
this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(75, 23); this.buttonCancel.Size = new System.Drawing.Size(75, 23);
this.buttonCancel.TabIndex = 13; this.buttonCancel.TabIndex = 13;
this.buttonCancel.UseVisualStyleBackColor = true; this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.ButtonCancelClick);
// //
// combobox_uploadimageformat // combobox_uploadimageformat
// //
@ -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.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.checkboxAfterUploadLinkToClipBoard.AutoSize = true; this.checkboxAfterUploadLinkToClipBoard.AutoSize = true;
this.checkboxAfterUploadLinkToClipBoard.LanguageKey = "box.label_AfterUploadLinkToClipBoard"; 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.Name = "checkboxAfterUploadLinkToClipBoard";
this.checkboxAfterUploadLinkToClipBoard.PropertyName = "AfterUploadLinkToClipBoard"; this.checkboxAfterUploadLinkToClipBoard.PropertyName = "AfterUploadLinkToClipBoard";
this.checkboxAfterUploadLinkToClipBoard.SectionName = "Box"; 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.TabIndex = 10;
this.checkboxAfterUploadLinkToClipBoard.UseVisualStyleBackColor = true; this.checkboxAfterUploadLinkToClipBoard.UseVisualStyleBackColor = true;
// //
@ -137,6 +137,7 @@ namespace GreenshotBoxPlugin {
this.Name = "SettingsForm"; this.Name = "SettingsForm";
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
} }
private GreenshotPlugin.Controls.GreenshotComboBox combobox_uploadimageformat; private GreenshotPlugin.Controls.GreenshotComboBox combobox_uploadimageformat;
private GreenshotPlugin.Controls.GreenshotLabel label_upload_format; private GreenshotPlugin.Controls.GreenshotLabel label_upload_format;

View file

@ -37,16 +37,10 @@ namespace GreenshotBoxPlugin {
// The InitializeComponent() call is required for Windows Forms designer support. // The InitializeComponent() call is required for Windows Forms designer support.
// //
InitializeComponent(); InitializeComponent();
AcceptButton = buttonOK;
CancelButton = buttonCancel;
this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon(); 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;
}
} }
} }

View file

@ -56,25 +56,24 @@ namespace GreenshotDropboxPlugin {
// buttonOK // buttonOK
// //
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 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.LanguageKey = "OK";
this.buttonOK.Location = new System.Drawing.Point(267, 64); this.buttonOK.Location = new System.Drawing.Point(267, 64);
this.buttonOK.Name = "buttonOK"; this.buttonOK.Name = "buttonOK";
this.buttonOK.Size = new System.Drawing.Size(75, 23); this.buttonOK.Size = new System.Drawing.Size(75, 23);
this.buttonOK.TabIndex = 10; this.buttonOK.TabIndex = 10;
this.buttonOK.UseVisualStyleBackColor = true; this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.ButtonOKClick);
// //
// buttonCancel // buttonCancel
// //
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 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.LanguageKey = "CANCEL";
this.buttonCancel.Location = new System.Drawing.Point(348, 64); this.buttonCancel.Location = new System.Drawing.Point(348, 64);
this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(75, 23); this.buttonCancel.Size = new System.Drawing.Size(75, 23);
this.buttonCancel.TabIndex = 11; this.buttonCancel.TabIndex = 11;
this.buttonCancel.Text = "Cancel";
this.buttonCancel.UseVisualStyleBackColor = true; this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.ButtonCancelClick);
// //
// combobox_uploadimageformat // combobox_uploadimageformat
// //
@ -96,7 +95,6 @@ namespace GreenshotDropboxPlugin {
this.label_upload_format.Name = "label_upload_format"; this.label_upload_format.Name = "label_upload_format";
this.label_upload_format.Size = new System.Drawing.Size(84, 20); this.label_upload_format.Size = new System.Drawing.Size(84, 20);
this.label_upload_format.TabIndex = 9; this.label_upload_format.TabIndex = 9;
this.label_upload_format.Text = "Image format";
// //
// label_AfterUpload // label_AfterUpload
// //
@ -105,7 +103,6 @@ namespace GreenshotDropboxPlugin {
this.label_AfterUpload.Name = "label_AfterUpload"; this.label_AfterUpload.Name = "label_AfterUpload";
this.label_AfterUpload.Size = new System.Drawing.Size(84, 21); this.label_AfterUpload.Size = new System.Drawing.Size(84, 21);
this.label_AfterUpload.TabIndex = 22; this.label_AfterUpload.TabIndex = 22;
this.label_AfterUpload.Text = "After upload";
// //
// checkboxAfterUploadLinkToClipBoard // checkboxAfterUploadLinkToClipBoard
// //
@ -117,7 +114,6 @@ namespace GreenshotDropboxPlugin {
this.checkboxAfterUploadLinkToClipBoard.SectionName = "Dropbox"; this.checkboxAfterUploadLinkToClipBoard.SectionName = "Dropbox";
this.checkboxAfterUploadLinkToClipBoard.Size = new System.Drawing.Size(104, 17); this.checkboxAfterUploadLinkToClipBoard.Size = new System.Drawing.Size(104, 17);
this.checkboxAfterUploadLinkToClipBoard.TabIndex = 2; this.checkboxAfterUploadLinkToClipBoard.TabIndex = 2;
this.checkboxAfterUploadLinkToClipBoard.Text = "Link to clipboard";
this.checkboxAfterUploadLinkToClipBoard.UseVisualStyleBackColor = true; this.checkboxAfterUploadLinkToClipBoard.UseVisualStyleBackColor = true;
// //
// SettingsForm // SettingsForm
@ -136,7 +132,6 @@ namespace GreenshotDropboxPlugin {
this.MaximizeBox = false; this.MaximizeBox = false;
this.MinimizeBox = false; this.MinimizeBox = false;
this.Name = "SettingsForm"; this.Name = "SettingsForm";
this.Text = "Dropbox settings";
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();

View file

@ -37,15 +37,10 @@ namespace GreenshotDropboxPlugin {
// The InitializeComponent() call is required for Windows Forms designer support. // The InitializeComponent() call is required for Windows Forms designer support.
// //
InitializeComponent(); InitializeComponent();
AcceptButton = buttonOK;
CancelButton = buttonCancel;
this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon(); 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;
}
} }
} }

View file

@ -18,13 +18,14 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
using Greenshot.IniFile;
using Greenshot.Plugin;
using GreenshotPlugin.Core;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Windows.Forms; using System.Windows.Forms;
using Greenshot.IniFile;
using Greenshot.Plugin;
using GreenshotPlugin.Core;
namespace ExternalCommand { namespace ExternalCommand {
/// <summary> /// <summary>

View file

@ -63,10 +63,10 @@ namespace ExternalCommand {
this.buttonCancel.Size = new System.Drawing.Size(75, 23); this.buttonCancel.Size = new System.Drawing.Size(75, 23);
this.buttonCancel.TabIndex = 11; this.buttonCancel.TabIndex = 11;
this.buttonCancel.UseVisualStyleBackColor = true; this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.ButtonCancelClick);
// //
// buttonOk // buttonOk
// //
this.buttonOk.DialogResult = System.Windows.Forms.DialogResult.OK;
this.buttonOk.LanguageKey = "OK"; this.buttonOk.LanguageKey = "OK";
this.buttonOk.Location = new System.Drawing.Point(275, 173); this.buttonOk.Location = new System.Drawing.Point(275, 173);
this.buttonOk.Name = "buttonOk"; this.buttonOk.Name = "buttonOk";
@ -144,6 +144,7 @@ namespace ExternalCommand {
this.LanguageKey = "externalcommand.settings_title"; this.LanguageKey = "externalcommand.settings_title";
this.Name = "SettingsForm"; this.Name = "SettingsForm";
this.ResumeLayout(false); this.ResumeLayout(false);
} }
private GreenshotPlugin.Controls.GreenshotButton button_edit; private GreenshotPlugin.Controls.GreenshotButton button_edit;
private GreenshotPlugin.Controls.GreenshotButton button_delete; private GreenshotPlugin.Controls.GreenshotButton button_delete;

View file

@ -18,12 +18,12 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
using Greenshot.IniFile;
using System; using System;
using System.Drawing; using System.Drawing;
using System.Windows.Forms; using System.Windows.Forms;
using Greenshot.IniFile;
namespace ExternalCommand { namespace ExternalCommand {
/// <summary> /// <summary>
/// Description of SettingsForm. /// Description of SettingsForm.
@ -38,16 +38,13 @@ namespace ExternalCommand {
// //
InitializeComponent(); InitializeComponent();
this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon(); this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon();
AcceptButton = buttonOk;
CancelButton = buttonCancel;
UpdateView(); UpdateView();
} }
void ButtonOkClick(object sender, EventArgs e) { void ButtonOkClick(object sender, EventArgs e) {
IniConfig.Save(); IniConfig.Save();
DialogResult = DialogResult.OK;
}
void ButtonCancelClick(object sender, EventArgs e) {
DialogResult = DialogResult.Cancel;
} }
void ButtonAddClick(object sender, EventArgs e) { void ButtonAddClick(object sender, EventArgs e) {

View file

@ -62,6 +62,7 @@ namespace ExternalCommand {
// //
// buttonOk // buttonOk
// //
this.buttonOk.DialogResult = System.Windows.Forms.DialogResult.OK;
this.buttonOk.Enabled = false; this.buttonOk.Enabled = false;
this.buttonOk.LanguageKey = "OK"; this.buttonOk.LanguageKey = "OK";
this.buttonOk.Location = new System.Drawing.Point(273, 140); 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.Size = new System.Drawing.Size(75, 23);
this.buttonCancel.TabIndex = 11; this.buttonCancel.TabIndex = 11;
this.buttonCancel.UseVisualStyleBackColor = true; this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.ButtonCancelClick);
// //
// groupBox1 // groupBox1
// //
@ -178,7 +178,6 @@ namespace ExternalCommand {
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.LanguageKey = "externalcommand.settings_detail_title"; this.LanguageKey = "externalcommand.settings_detail_title";
this.Name = "SettingsFormDetail"; this.Name = "SettingsFormDetail";
this.Text = "Configure command";
this.groupBox1.ResumeLayout(false); this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout(); this.groupBox1.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);

View file

@ -1,18 +1,30 @@
/* /*
* Created by SharpDevelop. * Greenshot - a free and open source screenshot tool
* User: 05018038 * Copyright (C) 2007-2014 Thomas Braun, Jens Klingen, Robin Krom
* Date: 04.04.2012
* Time: 10:50
* *
* 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 <http://www.gnu.org/licenses/>.
*/ */
using Greenshot.IniFile;
using System; using System;
using System.Drawing; using System.Drawing;
using System.IO; using System.IO;
using System.Windows.Forms; using System.Windows.Forms;
using Greenshot.IniFile;
namespace ExternalCommand { namespace ExternalCommand {
/// <summary> /// <summary>
/// Description of SettingsFormDetail. /// Description of SettingsFormDetail.
@ -24,10 +36,11 @@ namespace ExternalCommand {
private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(SettingsFormDetail)); private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(SettingsFormDetail));
private static ExternalCommandConfiguration config = IniConfig.GetIniSection<ExternalCommandConfiguration>(); private static ExternalCommandConfiguration config = IniConfig.GetIniSection<ExternalCommandConfiguration>();
public SettingsFormDetail(string commando) public SettingsFormDetail(string commando) {
{
InitializeComponent(); InitializeComponent();
this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon(); this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon();
AcceptButton = buttonOk;
CancelButton = buttonCancel;
this.commando = commando; this.commando = commando;
if(commando != null) { if(commando != null) {
@ -41,8 +54,7 @@ namespace ExternalCommand {
OKButtonState(); OKButtonState();
} }
void ButtonOkClick(object sender, EventArgs e) void ButtonOkClick(object sender, EventArgs e) {
{
string commandName = textBox_name.Text; string commandName = textBox_name.Text;
string commandLine = textBox_commandline.Text; string commandLine = textBox_commandline.Text;
string arguments = textBox_arguments.Text; string arguments = textBox_arguments.Text;
@ -57,17 +69,9 @@ namespace ExternalCommand {
config.commandlines.Add(commandName, commandLine); config.commandlines.Add(commandName, commandLine);
config.arguments.Add(commandName, arguments); config.arguments.Add(commandName, arguments);
} }
Close();
} }
void ButtonCancelClick(object sender, EventArgs e) void Button3Click(object sender, EventArgs e) {
{
Close();
}
void Button3Click(object sender, EventArgs e)
{
OpenFileDialog openFileDialog = new OpenFileDialog(); OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.Filter = "Executables (*.exe, *.bat, *.com)|*.exe; *.bat; *.com|All files (*)|*"; openFileDialog.Filter = "Executables (*.exe, *.bat, *.com)|*.exe; *.bat; *.com|All files (*)|*";
openFileDialog.FilterIndex = 1; openFileDialog.FilterIndex = 1;

View file

@ -63,25 +63,24 @@ namespace GreenshotFlickrPlugin {
// buttonOK // buttonOK
// //
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 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.LanguageKey = "OK";
this.buttonOK.Location = new System.Drawing.Point(270, 151); this.buttonOK.Location = new System.Drawing.Point(270, 151);
this.buttonOK.Name = "buttonOK"; this.buttonOK.Name = "buttonOK";
this.buttonOK.Size = new System.Drawing.Size(75, 23); this.buttonOK.Size = new System.Drawing.Size(75, 23);
this.buttonOK.TabIndex = 10; this.buttonOK.TabIndex = 10;
this.buttonOK.UseVisualStyleBackColor = true; this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.ButtonOKClick);
// //
// buttonCancel // buttonCancel
// //
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 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.LanguageKey = "CANCEL";
this.buttonCancel.Location = new System.Drawing.Point(351, 151); this.buttonCancel.Location = new System.Drawing.Point(351, 151);
this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(75, 23); this.buttonCancel.Size = new System.Drawing.Size(75, 23);
this.buttonCancel.TabIndex = 11; this.buttonCancel.TabIndex = 11;
this.buttonCancel.Text = "Cancel";
this.buttonCancel.UseVisualStyleBackColor = true; this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.ButtonCancelClick);
// //
// combobox_uploadimageformat // combobox_uploadimageformat
// //
@ -103,7 +102,6 @@ namespace GreenshotFlickrPlugin {
this.label_upload_format.Name = "label_upload_format"; this.label_upload_format.Name = "label_upload_format";
this.label_upload_format.Size = new System.Drawing.Size(157, 20); this.label_upload_format.Size = new System.Drawing.Size(157, 20);
this.label_upload_format.TabIndex = 3; this.label_upload_format.TabIndex = 3;
this.label_upload_format.Text = "Image format";
// //
// checkBoxPublic // checkBoxPublic
// //
@ -115,7 +113,6 @@ namespace GreenshotFlickrPlugin {
this.checkBoxPublic.SectionName = "Flickr"; this.checkBoxPublic.SectionName = "Flickr";
this.checkBoxPublic.Size = new System.Drawing.Size(55, 17); this.checkBoxPublic.Size = new System.Drawing.Size(55, 17);
this.checkBoxPublic.TabIndex = 4; this.checkBoxPublic.TabIndex = 4;
this.checkBoxPublic.Text = "Public";
this.checkBoxPublic.UseVisualStyleBackColor = true; this.checkBoxPublic.UseVisualStyleBackColor = true;
// //
// checkBoxFamily // checkBoxFamily
@ -128,7 +125,6 @@ namespace GreenshotFlickrPlugin {
this.checkBoxFamily.SectionName = "Flickr"; this.checkBoxFamily.SectionName = "Flickr";
this.checkBoxFamily.Size = new System.Drawing.Size(55, 17); this.checkBoxFamily.Size = new System.Drawing.Size(55, 17);
this.checkBoxFamily.TabIndex = 5; this.checkBoxFamily.TabIndex = 5;
this.checkBoxFamily.Text = "Family";
this.checkBoxFamily.UseVisualStyleBackColor = true; this.checkBoxFamily.UseVisualStyleBackColor = true;
// //
// checkBoxFriend // checkBoxFriend
@ -150,7 +146,6 @@ namespace GreenshotFlickrPlugin {
this.label_SafetyLevel.Name = "label_SafetyLevel"; this.label_SafetyLevel.Name = "label_SafetyLevel";
this.label_SafetyLevel.Size = new System.Drawing.Size(157, 21); this.label_SafetyLevel.Size = new System.Drawing.Size(157, 21);
this.label_SafetyLevel.TabIndex = 7; this.label_SafetyLevel.TabIndex = 7;
this.label_SafetyLevel.Text = "Safety level";
// //
// combobox_safetyLevel // combobox_safetyLevel
// //
@ -172,7 +167,6 @@ namespace GreenshotFlickrPlugin {
this.label_AfterUpload.Name = "label_AfterUpload"; this.label_AfterUpload.Name = "label_AfterUpload";
this.label_AfterUpload.Size = new System.Drawing.Size(155, 21); this.label_AfterUpload.Size = new System.Drawing.Size(155, 21);
this.label_AfterUpload.TabIndex = 14; this.label_AfterUpload.TabIndex = 14;
this.label_AfterUpload.Text = "After upload";
// //
// checkboxAfterUploadLinkToClipBoard // checkboxAfterUploadLinkToClipBoard
// //
@ -184,7 +178,6 @@ namespace GreenshotFlickrPlugin {
this.checkboxAfterUploadLinkToClipBoard.SectionName = "Flickr"; this.checkboxAfterUploadLinkToClipBoard.SectionName = "Flickr";
this.checkboxAfterUploadLinkToClipBoard.Size = new System.Drawing.Size(104, 17); this.checkboxAfterUploadLinkToClipBoard.Size = new System.Drawing.Size(104, 17);
this.checkboxAfterUploadLinkToClipBoard.TabIndex = 7; this.checkboxAfterUploadLinkToClipBoard.TabIndex = 7;
this.checkboxAfterUploadLinkToClipBoard.Text = "Link to clipboard";
this.checkboxAfterUploadLinkToClipBoard.UseVisualStyleBackColor = true; this.checkboxAfterUploadLinkToClipBoard.UseVisualStyleBackColor = true;
// //
// checkBox_hiddenfromsearch // checkBox_hiddenfromsearch
@ -221,9 +214,9 @@ namespace GreenshotFlickrPlugin {
this.MaximizeBox = false; this.MaximizeBox = false;
this.MinimizeBox = false; this.MinimizeBox = false;
this.Name = "SettingsForm"; this.Name = "SettingsForm";
this.Text = "Flickr settings";
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
} }
private GreenshotPlugin.Controls.GreenshotCheckBox checkBox_hiddenfromsearch; private GreenshotPlugin.Controls.GreenshotCheckBox checkBox_hiddenfromsearch;
private GreenshotPlugin.Controls.GreenshotComboBox combobox_uploadimageformat; private GreenshotPlugin.Controls.GreenshotComboBox combobox_uploadimageformat;

View file

@ -38,14 +38,9 @@ namespace GreenshotFlickrPlugin {
// //
InitializeComponent(); InitializeComponent();
Icon = GreenshotResources.getGreenshotIcon(); 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;
}
} }
} }

View file

@ -117,7 +117,6 @@ namespace GreenshotImgurPlugin
this.finishedButton.TabIndex = 11; this.finishedButton.TabIndex = 11;
this.finishedButton.Text = "Finished"; this.finishedButton.Text = "Finished";
this.finishedButton.UseVisualStyleBackColor = true; this.finishedButton.UseVisualStyleBackColor = true;
this.finishedButton.Click += new System.EventHandler(this.FinishedButtonClick);
// //
// clipboardButton // clipboardButton
// //

View file

@ -54,7 +54,8 @@ namespace GreenshotImgurPlugin {
// //
InitializeComponent(); InitializeComponent();
this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon(); this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon();
AcceptButton = finishedButton;
CancelButton = finishedButton;
// Init sorting // Init sorting
columnSorter = new GreenshotColumnSorter(); columnSorter = new GreenshotColumnSorter();
this.listview_imgur_uploads.ListViewItemSorter = columnSorter; this.listview_imgur_uploads.ListViewItemSorter = columnSorter;
@ -157,10 +158,6 @@ namespace GreenshotImgurPlugin {
ClipboardHelper.SetClipboardData(links.ToString()); ClipboardHelper.SetClipboardData(links.ToString());
} }
private void FinishedButtonClick(object sender, EventArgs e) {
this.Close();
}
private void ClearHistoryButtonClick(object sender, EventArgs e) { private void ClearHistoryButtonClick(object sender, EventArgs e) {
DialogResult result = MessageBox.Show(Language.GetString("imgur", LangKey.clear_question), "Imgur", MessageBoxButtons.YesNo, MessageBoxIcon.Question); DialogResult result = MessageBox.Show(Language.GetString("imgur", LangKey.clear_question), "Imgur", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (result == DialogResult.Yes) { if (result == DialogResult.Yes) {

View file

@ -58,24 +58,24 @@ namespace GreenshotImgurPlugin {
// buttonOK // buttonOK
// //
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 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.LanguageKey = "imgur.OK";
this.buttonOK.Location = new System.Drawing.Point(222, 88); this.buttonOK.Location = new System.Drawing.Point(222, 88);
this.buttonOK.Name = "buttonOK"; this.buttonOK.Name = "buttonOK";
this.buttonOK.Size = new System.Drawing.Size(75, 23); this.buttonOK.Size = new System.Drawing.Size(75, 23);
this.buttonOK.TabIndex = 10; this.buttonOK.TabIndex = 10;
this.buttonOK.UseVisualStyleBackColor = true; this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.ButtonOKClick);
// //
// buttonCancel // buttonCancel
// //
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 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.LanguageKey = "imgur.CANCEL";
this.buttonCancel.Location = new System.Drawing.Point(303, 88); this.buttonCancel.Location = new System.Drawing.Point(303, 88);
this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(75, 23); this.buttonCancel.Size = new System.Drawing.Size(75, 23);
this.buttonCancel.TabIndex = 11; this.buttonCancel.TabIndex = 11;
this.buttonCancel.UseVisualStyleBackColor = true; this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.ButtonCancelClick);
// //
// combobox_uploadimageformat // combobox_uploadimageformat
// //
@ -150,6 +150,7 @@ namespace GreenshotImgurPlugin {
this.Name = "SettingsForm"; this.Name = "SettingsForm";
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
} }
private GreenshotPlugin.Controls.GreenshotButton historyButton; private GreenshotPlugin.Controls.GreenshotButton historyButton;
private GreenshotPlugin.Controls.GreenshotComboBox combobox_uploadimageformat; private GreenshotPlugin.Controls.GreenshotComboBox combobox_uploadimageformat;

View file

@ -33,6 +33,8 @@ namespace GreenshotImgurPlugin {
// The InitializeComponent() call is required for Windows Forms designer support. // The InitializeComponent() call is required for Windows Forms designer support.
// //
InitializeComponent(); InitializeComponent();
CancelButton = buttonCancel;
AcceptButton = buttonOK;
this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon(); this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon();
ImgurUtils.LoadHistory(); ImgurUtils.LoadHistory();
@ -44,14 +46,6 @@ namespace GreenshotImgurPlugin {
} }
} }
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) { void ButtonHistoryClick(object sender, EventArgs e) {
ImgurHistory.ShowHistory(); ImgurHistory.ShowHistory();
} }

View file

@ -90,6 +90,7 @@ namespace GreenshotJiraPlugin {
// uploadButton // uploadButton
// //
this.uploadButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 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.Enabled = false;
this.uploadButton.Location = new System.Drawing.Point(550, 281); this.uploadButton.Location = new System.Drawing.Point(550, 281);
this.uploadButton.Name = "uploadButton"; this.uploadButton.Name = "uploadButton";
@ -97,7 +98,6 @@ namespace GreenshotJiraPlugin {
this.uploadButton.TabIndex = 10; this.uploadButton.TabIndex = 10;
this.uploadButton.Text = "Upload"; this.uploadButton.Text = "Upload";
this.uploadButton.UseVisualStyleBackColor = true; this.uploadButton.UseVisualStyleBackColor = true;
this.uploadButton.Click += new System.EventHandler(this.uploadButton_Click);
// //
// jiraListView // jiraListView
// //
@ -156,13 +156,13 @@ namespace GreenshotJiraPlugin {
// cancelButton // cancelButton
// //
this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 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.Location = new System.Drawing.Point(631, 281);
this.cancelButton.Name = "cancelButton"; this.cancelButton.Name = "cancelButton";
this.cancelButton.Size = new System.Drawing.Size(75, 23); this.cancelButton.Size = new System.Drawing.Size(75, 23);
this.cancelButton.TabIndex = 11; this.cancelButton.TabIndex = 11;
this.cancelButton.Text = "Cancel"; this.cancelButton.Text = "Cancel";
this.cancelButton.UseVisualStyleBackColor = true; this.cancelButton.UseVisualStyleBackColor = true;
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
// //
// label1 // label1
// //
@ -206,6 +206,7 @@ namespace GreenshotJiraPlugin {
this.TopMost = true; this.TopMost = true;
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
} }
private System.Windows.Forms.TextBox jiraKey; private System.Windows.Forms.TextBox jiraKey;
private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label1;

View file

@ -37,6 +37,9 @@ namespace GreenshotJiraPlugin {
public JiraForm(JiraConnector jiraConnector) { public JiraForm(JiraConnector jiraConnector) {
InitializeComponent(); InitializeComponent();
this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon(); this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon();
AcceptButton = uploadButton;
CancelButton = cancelButton;
initializeComponentText(); initializeComponentText();
this.columnSorter = new GreenshotColumnSorter(); 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) { private void jiraListView_ColumnClick(object sender, ColumnClickEventArgs e) {
// Determine if clicked column is already the column that is being sorted. // Determine if clicked column is already the column that is being sorted.
if (e.Column == columnSorter.SortColumn) { if (e.Column == columnSorter.SortColumn) {

View file

@ -57,17 +57,18 @@ namespace GreenshotJiraPlugin {
// buttonOK // buttonOK
// //
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 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.LanguageKey = "OK";
this.buttonOK.Location = new System.Drawing.Point(222, 84); this.buttonOK.Location = new System.Drawing.Point(222, 84);
this.buttonOK.Name = "buttonOK"; this.buttonOK.Name = "buttonOK";
this.buttonOK.Size = new System.Drawing.Size(75, 23); this.buttonOK.Size = new System.Drawing.Size(75, 23);
this.buttonOK.TabIndex = 10; this.buttonOK.TabIndex = 10;
this.buttonOK.UseVisualStyleBackColor = true; this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.ButtonOKClick);
// //
// buttonCancel // buttonCancel
// //
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 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.LanguageKey = "CANCEL";
this.buttonCancel.Location = new System.Drawing.Point(303, 84); this.buttonCancel.Location = new System.Drawing.Point(303, 84);
this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.Name = "buttonCancel";
@ -75,7 +76,6 @@ namespace GreenshotJiraPlugin {
this.buttonCancel.TabIndex = 11; this.buttonCancel.TabIndex = 11;
this.buttonCancel.Text = "Cancel"; this.buttonCancel.Text = "Cancel";
this.buttonCancel.UseVisualStyleBackColor = true; this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.ButtonCancelClick);
// //
// label_url // label_url
// //
@ -134,6 +134,7 @@ namespace GreenshotJiraPlugin {
this.Name = "SettingsForm"; this.Name = "SettingsForm";
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
} }
private GreenshotPlugin.Controls.GreenshotComboBox combobox_uploadimageformat; private GreenshotPlugin.Controls.GreenshotComboBox combobox_uploadimageformat;
private GreenshotPlugin.Controls.GreenshotLabel label_upload_format; private GreenshotPlugin.Controls.GreenshotLabel label_upload_format;

View file

@ -32,15 +32,9 @@ namespace GreenshotJiraPlugin {
// The InitializeComponent() call is required for Windows Forms designer support. // The InitializeComponent() call is required for Windows Forms designer support.
// //
InitializeComponent(); InitializeComponent();
this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon(); AcceptButton = buttonOK;
} CancelButton = buttonCancel;
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;
} }
} }
} }

View file

@ -100,6 +100,7 @@ namespace GreenshotOCR
// buttonOK // buttonOK
// //
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 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.LanguageKey = "OK";
this.buttonOK.Location = new System.Drawing.Point(12, 98); this.buttonOK.Location = new System.Drawing.Point(12, 98);
this.buttonOK.Name = "buttonOK"; this.buttonOK.Name = "buttonOK";
@ -111,13 +112,13 @@ namespace GreenshotOCR
// buttonCancel // buttonCancel
// //
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 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.LanguageKey = "CANCEL";
this.buttonCancel.Location = new System.Drawing.Point(128, 98); this.buttonCancel.Location = new System.Drawing.Point(128, 98);
this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(104, 23); this.buttonCancel.Size = new System.Drawing.Size(104, 23);
this.buttonCancel.TabIndex = 5; this.buttonCancel.TabIndex = 5;
this.buttonCancel.UseVisualStyleBackColor = true; this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.ButtonCancelClick);
// //
// SettingsForm // SettingsForm
// //
@ -133,6 +134,7 @@ namespace GreenshotOCR
this.LanguageKey = "settings_title"; this.LanguageKey = "settings_title";
this.Name = "SettingsForm"; this.Name = "SettingsForm";
this.ResumeLayout(false); this.ResumeLayout(false);
} }
private GreenshotPlugin.Controls.GreenshotLabel label_language; private GreenshotPlugin.Controls.GreenshotLabel label_language;
private GreenshotPlugin.Controls.GreenshotButton buttonCancel; private GreenshotPlugin.Controls.GreenshotButton buttonCancel;

View file

@ -35,6 +35,8 @@ namespace GreenshotOCR {
// //
this.config = config; this.config = config;
InitializeComponent(); InitializeComponent();
AcceptButton = buttonOK;
CancelButton = buttonCancel;
this.Icon = GreenshotResources.getGreenshotIcon(); this.Icon = GreenshotResources.getGreenshotIcon();
comboBox_languages.Items.Clear(); comboBox_languages.Items.Clear();
@ -55,17 +57,11 @@ namespace GreenshotOCR {
} }
} }
void ButtonCancelClick(object sender, EventArgs e) {
DialogResult = DialogResult.Cancel;
}
void ButtonOKClick(object sender, EventArgs e) { void ButtonOKClick(object sender, EventArgs e) {
string selectedString = (string) comboBox_languages.SelectedItem; string selectedString = (string) comboBox_languages.SelectedItem;
if (selectedString != null) { if (selectedString != null) {
config.Language = selectedString.ToUpper(); config.Language = selectedString.ToUpper();
} }
DialogResult = DialogResult.OK;
} }
} }
} }

View file

@ -56,24 +56,24 @@ namespace GreenshotPhotobucketPlugin {
// buttonOK // buttonOK
// //
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 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.LanguageKey = "OK";
this.buttonOK.Location = new System.Drawing.Point(222, 70); this.buttonOK.Location = new System.Drawing.Point(222, 70);
this.buttonOK.Name = "buttonOK"; this.buttonOK.Name = "buttonOK";
this.buttonOK.Size = new System.Drawing.Size(75, 23); this.buttonOK.Size = new System.Drawing.Size(75, 23);
this.buttonOK.TabIndex = 3; this.buttonOK.TabIndex = 3;
this.buttonOK.UseVisualStyleBackColor = true; this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.ButtonOKClick);
// //
// buttonCancel // buttonCancel
// //
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 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.LanguageKey = "CANCEL";
this.buttonCancel.Location = new System.Drawing.Point(303, 70); this.buttonCancel.Location = new System.Drawing.Point(303, 70);
this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(75, 23); this.buttonCancel.Size = new System.Drawing.Size(75, 23);
this.buttonCancel.TabIndex = 4; this.buttonCancel.TabIndex = 4;
this.buttonCancel.UseVisualStyleBackColor = true; this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.ButtonCancelClick);
// //
// combobox_uploadimageformat // combobox_uploadimageformat
// //

View file

@ -33,15 +33,9 @@ namespace GreenshotPhotobucketPlugin {
// The InitializeComponent() call is required for Windows Forms designer support. // The InitializeComponent() call is required for Windows Forms designer support.
// //
InitializeComponent(); InitializeComponent();
this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon(); AcceptButton = buttonOK;
} CancelButton = buttonCancel;
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;
} }
} }
} }

View file

@ -56,25 +56,24 @@ namespace GreenshotPicasaPlugin {
// buttonOK // buttonOK
// //
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 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.LanguageKey = "OK";
this.buttonOK.Location = new System.Drawing.Point(267, 78); this.buttonOK.Location = new System.Drawing.Point(267, 78);
this.buttonOK.Name = "buttonOK"; this.buttonOK.Name = "buttonOK";
this.buttonOK.Size = new System.Drawing.Size(75, 23); this.buttonOK.Size = new System.Drawing.Size(75, 23);
this.buttonOK.TabIndex = 10; this.buttonOK.TabIndex = 10;
this.buttonOK.UseVisualStyleBackColor = true; this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.ButtonOKClick);
// //
// buttonCancel // buttonCancel
// //
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 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.LanguageKey = "CANCEL";
this.buttonCancel.Location = new System.Drawing.Point(348, 78); this.buttonCancel.Location = new System.Drawing.Point(348, 78);
this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(75, 23); this.buttonCancel.Size = new System.Drawing.Size(75, 23);
this.buttonCancel.TabIndex = 11; this.buttonCancel.TabIndex = 11;
this.buttonCancel.Text = "Cancel";
this.buttonCancel.UseVisualStyleBackColor = true; this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.ButtonCancelClick);
// //
// combobox_uploadimageformat // combobox_uploadimageformat
// //
@ -96,7 +95,6 @@ namespace GreenshotPicasaPlugin {
this.label_upload_format.Name = "label_upload_format"; this.label_upload_format.Name = "label_upload_format";
this.label_upload_format.Size = new System.Drawing.Size(181, 33); this.label_upload_format.Size = new System.Drawing.Size(181, 33);
this.label_upload_format.TabIndex = 4; this.label_upload_format.TabIndex = 4;
this.label_upload_format.Text = "Image format";
// //
// label_AfterUpload // label_AfterUpload
// //
@ -106,7 +104,6 @@ namespace GreenshotPicasaPlugin {
this.label_AfterUpload.Name = "label_AfterUpload"; this.label_AfterUpload.Name = "label_AfterUpload";
this.label_AfterUpload.Size = new System.Drawing.Size(181, 29); this.label_AfterUpload.Size = new System.Drawing.Size(181, 29);
this.label_AfterUpload.TabIndex = 8; this.label_AfterUpload.TabIndex = 8;
this.label_AfterUpload.Text = "After upload";
// //
// checkboxAfterUploadLinkToClipBoard // checkboxAfterUploadLinkToClipBoard
// //
@ -119,7 +116,6 @@ namespace GreenshotPicasaPlugin {
this.checkboxAfterUploadLinkToClipBoard.SectionName = "Picasa"; this.checkboxAfterUploadLinkToClipBoard.SectionName = "Picasa";
this.checkboxAfterUploadLinkToClipBoard.Size = new System.Drawing.Size(104, 17); this.checkboxAfterUploadLinkToClipBoard.Size = new System.Drawing.Size(104, 17);
this.checkboxAfterUploadLinkToClipBoard.TabIndex = 2; this.checkboxAfterUploadLinkToClipBoard.TabIndex = 2;
this.checkboxAfterUploadLinkToClipBoard.Text = "Link to clipboard";
this.checkboxAfterUploadLinkToClipBoard.UseVisualStyleBackColor = true; this.checkboxAfterUploadLinkToClipBoard.UseVisualStyleBackColor = true;
// //
// SettingsForm // SettingsForm
@ -138,9 +134,9 @@ namespace GreenshotPicasaPlugin {
this.MaximizeBox = false; this.MaximizeBox = false;
this.MinimizeBox = false; this.MinimizeBox = false;
this.Name = "SettingsForm"; this.Name = "SettingsForm";
this.Text = "Picasa settings";
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
} }
private GreenshotPlugin.Controls.GreenshotComboBox combobox_uploadimageformat; private GreenshotPlugin.Controls.GreenshotComboBox combobox_uploadimageformat;
private GreenshotPlugin.Controls.GreenshotLabel label_upload_format; private GreenshotPlugin.Controls.GreenshotLabel label_upload_format;

View file

@ -30,22 +30,16 @@ namespace GreenshotPicasaPlugin {
/// Description of PasswordRequestForm. /// Description of PasswordRequestForm.
/// </summary> /// </summary>
public partial class SettingsForm : PicasaForm { public partial class SettingsForm : PicasaForm {
private string PicasaFrob = string.Empty;
public SettingsForm(PicasaConfiguration config) : base() { public SettingsForm(PicasaConfiguration config) : base() {
// //
// The InitializeComponent() call is required for Windows Forms designer support. // The InitializeComponent() call is required for Windows Forms designer support.
// //
InitializeComponent(); 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;
}
} }
} }