mirror of
https://github.com/greenshot/greenshot
synced 2025-08-19 21:13:23 -07:00
added GreenshotRadioButton
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2498 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
b3ea27ef6e
commit
ebad49261d
3 changed files with 72 additions and 0 deletions
|
@ -422,6 +422,12 @@ namespace GreenshotPlugin.Controls {
|
||||||
checkBox.Enabled = !iniValue.IsFixed;
|
checkBox.Enabled = !iniValue.IsFixed;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
RadioButton radíoButton = controlObject as RadioButton;
|
||||||
|
if (radíoButton != null) {
|
||||||
|
radíoButton.Checked = (bool)iniValue.Value;
|
||||||
|
radíoButton.Enabled = !iniValue.IsFixed;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
TextBox textBox = controlObject as TextBox;
|
TextBox textBox = controlObject as TextBox;
|
||||||
if (textBox != null) {
|
if (textBox != null) {
|
||||||
|
@ -449,8 +455,12 @@ namespace GreenshotPlugin.Controls {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
OnFieldsFilled();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected virtual void OnFieldsFilled() {
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Store all GreenshotControl values to the configuration
|
/// Store all GreenshotControl values to the configuration
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -479,6 +489,12 @@ namespace GreenshotPlugin.Controls {
|
||||||
iniDirty = true;
|
iniDirty = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
RadioButton radioButton = controlObject as RadioButton;
|
||||||
|
if (radioButton != null) {
|
||||||
|
iniValue.Value = radioButton.Checked;
|
||||||
|
iniDirty = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
TextBox textBox = controlObject as TextBox;
|
TextBox textBox = controlObject as TextBox;
|
||||||
if (textBox != null) {
|
if (textBox != null) {
|
||||||
HotkeyControl hotkeyControl = controlObject as HotkeyControl;
|
HotkeyControl hotkeyControl = controlObject as HotkeyControl;
|
||||||
|
|
53
GreenshotPlugin/Controls/GreenshotRadioButton.cs
Normal file
53
GreenshotPlugin/Controls/GreenshotRadioButton.cs
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
/*
|
||||||
|
* Greenshot - a free and open source screenshot tool
|
||||||
|
* Copyright (C) 2007-2013 Thomas Braun, Jens Klingen, Robin Krom
|
||||||
|
*
|
||||||
|
* 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 System;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace GreenshotPlugin.Controls {
|
||||||
|
/// <summary>
|
||||||
|
/// Description of GreenshotCheckbox.
|
||||||
|
/// </summary>
|
||||||
|
public class GreenshotRadioButton : RadioButton, IGreenshotLanguageBindable, IGreenshotConfigBindable {
|
||||||
|
[Category("Greenshot"), DefaultValue(null), Description("Specifies key of the language file to use when displaying the text.")]
|
||||||
|
public string LanguageKey {
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
|
||||||
|
private string sectionName = "Core";
|
||||||
|
[Category("Greenshot"), DefaultValue("Core"), Description("Specifies the Ini-Section to map this control with.")]
|
||||||
|
public string SectionName {
|
||||||
|
get {
|
||||||
|
return sectionName;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
sectionName = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Category("Greenshot"), DefaultValue(null), Description("Specifies the property name to map the configuration.")]
|
||||||
|
public string PropertyName {
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -31,6 +31,9 @@
|
||||||
<Compile Include="Controls\AnimatingForm.cs">
|
<Compile Include="Controls\AnimatingForm.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Controls\GreenshotRadioButton.cs">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Core\FastBitmap.cs" />
|
<Compile Include="Core\FastBitmap.cs" />
|
||||||
<Compile Include="IEInterop\IHTMLBodyElement.cs" />
|
<Compile Include="IEInterop\IHTMLBodyElement.cs" />
|
||||||
<Compile Include="IEInterop\IHTMLCurrentStyle.cs" />
|
<Compile Include="IEInterop\IHTMLCurrentStyle.cs" />
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue