mirror of
https://github.com/greenshot/greenshot
synced 2025-08-21 14:03:23 -07:00
Fixed issue with hotkey, still having some issues with the translations...
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1925 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
93bb5d992f
commit
7e27765314
2 changed files with 25 additions and 8 deletions
|
@ -16,6 +16,7 @@ namespace GreenshotPlugin.Controls {
|
|||
private IComponentChangeService m_changeService;
|
||||
private bool isDesignModeLanguageSet = false;
|
||||
private bool applyLanguageManually = false;
|
||||
private bool storeFieldsManually = false;
|
||||
private IDictionary<string, Control> designTimeControls;
|
||||
private IDictionary<string, ToolStripItem> designTimeToolStripItems;
|
||||
|
||||
|
@ -34,6 +35,15 @@ namespace GreenshotPlugin.Controls {
|
|||
}
|
||||
}
|
||||
|
||||
protected bool ManualStoreFields {
|
||||
get {
|
||||
return storeFieldsManually;
|
||||
}
|
||||
set {
|
||||
storeFieldsManually = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Code to initialize the language etc during design time
|
||||
/// </summary>
|
||||
|
@ -101,7 +111,7 @@ namespace GreenshotPlugin.Controls {
|
|||
/// </summary>
|
||||
/// <param name="e"></param>
|
||||
protected override void OnClosed(EventArgs e) {
|
||||
if (!this.DesignMode) {
|
||||
if (!this.DesignMode && !storeFieldsManually) {
|
||||
if (DialogResult == DialogResult.OK) {
|
||||
LOG.Info("Form was closed with OK: storing field values.");
|
||||
StoreFields();
|
||||
|
@ -438,6 +448,13 @@ namespace GreenshotPlugin.Controls {
|
|||
}
|
||||
TextBox textBox = controlObject as TextBox;
|
||||
if (textBox != null) {
|
||||
HotkeyControl hotkeyControl = textBox as HotkeyControl;
|
||||
if (hotkeyControl != null) {
|
||||
string hotkeyString = hotkeyControl.ToString();
|
||||
iniValue.Value = hotkeyString;
|
||||
iniDirty = true;
|
||||
continue;
|
||||
}
|
||||
iniValue.UseValueOrDefault(textBox.Text);
|
||||
iniDirty = true;
|
||||
continue;
|
||||
|
@ -448,12 +465,6 @@ namespace GreenshotPlugin.Controls {
|
|||
iniDirty = true;
|
||||
continue;
|
||||
}
|
||||
HotkeyControl hotkeyControl = controlObject as HotkeyControl;
|
||||
if (hotkeyControl != null) {
|
||||
iniValue.Value = hotkeyControl.ToString();
|
||||
iniDirty = true;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue