mirror of
https://github.com/greenshot/greenshot
synced 2025-07-16 10:03:44 -07:00
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:
parent
5cd6afad74
commit
036aec55f5
25 changed files with 119 additions and 180 deletions
11
GreenshotBoxPlugin/Forms/SettingsForm.Designer.cs
generated
11
GreenshotBoxPlugin/Forms/SettingsForm.Designer.cs
generated
|
@ -57,29 +57,29 @@ 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
|
||||||
//
|
//
|
||||||
this.combobox_uploadimageformat.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
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.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
this.combobox_uploadimageformat.FormattingEnabled = true;
|
this.combobox_uploadimageformat.FormattingEnabled = true;
|
||||||
this.combobox_uploadimageformat.Location = new System.Drawing.Point(208, 12);
|
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.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;
|
||||||
|
|
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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.
|
||||||
|
@ -31,34 +31,31 @@ namespace ExternalCommand {
|
||||||
public partial class SettingsForm : ExternalCommandForm {
|
public partial class SettingsForm : ExternalCommandForm {
|
||||||
private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(SettingsForm));
|
private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(SettingsForm));
|
||||||
private static ExternalCommandConfiguration config = IniConfig.GetIniSection<ExternalCommandConfiguration>();
|
private static ExternalCommandConfiguration config = IniConfig.GetIniSection<ExternalCommandConfiguration>();
|
||||||
|
|
||||||
public SettingsForm() {
|
public SettingsForm() {
|
||||||
//
|
//
|
||||||
// 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();
|
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) {
|
||||||
SettingsFormDetail form = new SettingsFormDetail(null);
|
SettingsFormDetail form = new SettingsFormDetail(null);
|
||||||
form.ShowDialog();
|
form.ShowDialog();
|
||||||
|
|
||||||
UpdateView();
|
UpdateView();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ButtonDeleteClick(object sender, EventArgs e) {
|
void ButtonDeleteClick(object sender, EventArgs e) {
|
||||||
foreach ( ListViewItem item in listView1.SelectedItems ) {
|
foreach(ListViewItem item in listView1.SelectedItems) {
|
||||||
string commando = item.Tag as string;
|
string commando = item.Tag as string;
|
||||||
config.commands.Remove(commando);
|
config.commands.Remove(commando);
|
||||||
config.commandlines.Remove(commando);
|
config.commandlines.Remove(commando);
|
||||||
|
@ -69,15 +66,15 @@ namespace ExternalCommand {
|
||||||
|
|
||||||
void UpdateView() {
|
void UpdateView() {
|
||||||
listView1.Items.Clear();
|
listView1.Items.Clear();
|
||||||
if (config.commands != null) {
|
if(config.commands != null) {
|
||||||
listView1.ListViewItemSorter = new ListviewComparer();
|
listView1.ListViewItemSorter = new ListviewComparer();
|
||||||
ImageList imageList = new ImageList();
|
ImageList imageList = new ImageList();
|
||||||
listView1.SmallImageList = imageList;
|
listView1.SmallImageList = imageList;
|
||||||
int imageNr = 0;
|
int imageNr = 0;
|
||||||
foreach (string commando in config.commands) {
|
foreach(string commando in config.commands) {
|
||||||
ListViewItem item = null;
|
ListViewItem item = null;
|
||||||
Image iconForExe = IconCache.IconForCommand(commando);
|
Image iconForExe = IconCache.IconForCommand(commando);
|
||||||
if (iconForExe != null) {
|
if(iconForExe != null) {
|
||||||
imageList.Images.Add(iconForExe);
|
imageList.Images.Add(iconForExe);
|
||||||
item = new ListViewItem(commando, imageNr++);
|
item = new ListViewItem(commando, imageNr++);
|
||||||
} else {
|
} else {
|
||||||
|
@ -94,39 +91,39 @@ namespace ExternalCommand {
|
||||||
void ListView1ItemSelectionChanged(object sender, EventArgs e) {
|
void ListView1ItemSelectionChanged(object sender, EventArgs e) {
|
||||||
button_edit.Enabled = listView1.SelectedItems.Count > 0;
|
button_edit.Enabled = listView1.SelectedItems.Count > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ButtonEditClick(object sender, EventArgs e) {
|
void ButtonEditClick(object sender, EventArgs e) {
|
||||||
ListView1DoubleClick(sender, e);
|
ListView1DoubleClick(sender, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ListView1DoubleClick(object sender, EventArgs e) {
|
void ListView1DoubleClick(object sender, EventArgs e) {
|
||||||
// Safety check for bug #1484
|
// Safety check for bug #1484
|
||||||
bool selectionActive = listView1.SelectedItems.Count > 0;
|
bool selectionActive = listView1.SelectedItems.Count > 0;
|
||||||
if (!selectionActive) {
|
if(!selectionActive) {
|
||||||
button_edit.Enabled = false;
|
button_edit.Enabled = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
string commando = listView1.SelectedItems[0].Tag as string;
|
string commando = listView1.SelectedItems[0].Tag as string;
|
||||||
|
|
||||||
SettingsFormDetail form = new SettingsFormDetail(commando);
|
SettingsFormDetail form = new SettingsFormDetail(commando);
|
||||||
form.ShowDialog();
|
form.ShowDialog();
|
||||||
|
|
||||||
UpdateView();
|
UpdateView();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ListviewComparer : System.Collections.IComparer {
|
public class ListviewComparer : System.Collections.IComparer {
|
||||||
public int Compare(object x, object y) {
|
public int Compare(object x, object y) {
|
||||||
if (!(x is ListViewItem)) {
|
if(!(x is ListViewItem)) {
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
if (!(y is ListViewItem)) {
|
if(!(y is ListViewItem)) {
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
ListViewItem l1 = (ListViewItem)x;
|
ListViewItem l1 = (ListViewItem)x;
|
||||||
ListViewItem l2 = (ListViewItem)y;
|
ListViewItem l2 = (ListViewItem)y;
|
||||||
if (l2 == null) {
|
if(l2 == null) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return l1.Text.CompareTo(l2.Text);
|
return l1.Text.CompareTo(l2.Text);
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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.
|
||||||
|
@ -20,17 +32,18 @@ namespace ExternalCommand {
|
||||||
public partial class SettingsFormDetail : ExternalCommandForm {
|
public partial class SettingsFormDetail : ExternalCommandForm {
|
||||||
private string commando;
|
private string commando;
|
||||||
private int commandIndex;
|
private int commandIndex;
|
||||||
|
|
||||||
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) {
|
||||||
textBox_name.Text = commando;
|
textBox_name.Text = commando;
|
||||||
textBox_commandline.Text = config.commandlines[commando];
|
textBox_commandline.Text = config.commandlines[commando];
|
||||||
textBox_arguments.Text = config.arguments[commando];
|
textBox_arguments.Text = config.arguments[commando];
|
||||||
|
@ -40,13 +53,12 @@ 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;
|
||||||
if (commando != null) {
|
if(commando != null) {
|
||||||
config.commands[commandIndex] = commandName;
|
config.commands[commandIndex] = commandName;
|
||||||
config.commandlines.Remove(commando);
|
config.commandlines.Remove(commando);
|
||||||
config.commandlines.Add(commandName, commandLine);
|
config.commandlines.Add(commandName, commandLine);
|
||||||
|
@ -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;
|
||||||
|
@ -76,15 +80,15 @@ namespace ExternalCommand {
|
||||||
string initialPath = null;
|
string initialPath = null;
|
||||||
try {
|
try {
|
||||||
initialPath = Path.GetDirectoryName(textBox_commandline.Text);
|
initialPath = Path.GetDirectoryName(textBox_commandline.Text);
|
||||||
} catch {}
|
} catch { }
|
||||||
if (initialPath != null && Directory.Exists(initialPath)) {
|
if(initialPath != null && Directory.Exists(initialPath)) {
|
||||||
openFileDialog.InitialDirectory = initialPath;
|
openFileDialog.InitialDirectory = initialPath;
|
||||||
} else {
|
} else {
|
||||||
initialPath = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
|
initialPath = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
|
||||||
openFileDialog.InitialDirectory = initialPath;
|
openFileDialog.InitialDirectory = initialPath;
|
||||||
}
|
}
|
||||||
LOG.DebugFormat("Starting OpenFileDialog at {0}", initialPath);
|
LOG.DebugFormat("Starting OpenFileDialog at {0}", initialPath);
|
||||||
if (openFileDialog.ShowDialog() == DialogResult.OK) {
|
if(openFileDialog.ShowDialog() == DialogResult.OK) {
|
||||||
textBox_commandline.Text = openFileDialog.FileName;
|
textBox_commandline.Text = openFileDialog.FileName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -95,20 +99,20 @@ namespace ExternalCommand {
|
||||||
textBox_name.BackColor = Color.White;
|
textBox_name.BackColor = Color.White;
|
||||||
textBox_commandline.BackColor = Color.White;
|
textBox_commandline.BackColor = Color.White;
|
||||||
// Is there a text in the name field
|
// Is there a text in the name field
|
||||||
if (string.IsNullOrEmpty(textBox_name.Text)) {
|
if(string.IsNullOrEmpty(textBox_name.Text)) {
|
||||||
buttonOk.Enabled = false;
|
buttonOk.Enabled = false;
|
||||||
}
|
}
|
||||||
// Check if commandname is unique
|
// 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;
|
buttonOk.Enabled = false;
|
||||||
textBox_name.BackColor = Color.Red;
|
textBox_name.BackColor = Color.Red;
|
||||||
}
|
}
|
||||||
// Is there a text in the commandline field
|
// Is there a text in the commandline field
|
||||||
if (string.IsNullOrEmpty(textBox_commandline.Text)) {
|
if(string.IsNullOrEmpty(textBox_commandline.Text)) {
|
||||||
buttonOk.Enabled = false;
|
buttonOk.Enabled = false;
|
||||||
}
|
}
|
||||||
// Is the command available?
|
// 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;
|
buttonOk.Enabled = false;
|
||||||
textBox_commandline.BackColor = Color.Red;
|
textBox_commandline.BackColor = Color.Red;
|
||||||
}
|
}
|
||||||
|
|
13
GreenshotFlickrPlugin/Forms/SettingsForm.Designer.cs
generated
13
GreenshotFlickrPlugin/Forms/SettingsForm.Designer.cs
generated
|
@ -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;
|
||||||
|
|
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
//
|
//
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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();
|
||||||
|
@ -43,14 +45,6 @@ namespace GreenshotImgurPlugin {
|
||||||
historyButton.Enabled = false;
|
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) {
|
void ButtonHistoryClick(object sender, EventArgs e) {
|
||||||
ImgurHistory.ShowHistory();
|
ImgurHistory.ShowHistory();
|
||||||
|
|
5
GreenshotJiraPlugin/Forms/JiraForm.Designer.cs
generated
5
GreenshotJiraPlugin/Forms/JiraForm.Designer.cs
generated
|
@ -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;
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
4
GreenshotOCRPlugin/SettingsForm.Designer.cs
generated
4
GreenshotOCRPlugin/SettingsForm.Designer.cs
generated
|
@ -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;
|
||||||
|
|
|
@ -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();
|
||||||
|
@ -54,18 +56,12 @@ namespace GreenshotOCR {
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
//
|
//
|
||||||
|
|
|
@ -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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
10
GreenshotPicasaPlugin/Forms/SettingsForm.Designer.cs
generated
10
GreenshotPicasaPlugin/Forms/SettingsForm.Designer.cs
generated
|
@ -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;
|
||||||
|
|
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue