Preparations for the language changes

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1785 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-04-17 15:54:33 +00:00
commit 75b0204c57
10 changed files with 161 additions and 154 deletions

View file

@ -48,20 +48,21 @@ namespace Greenshot {
/// not be able to load this method if it was changed manually.
/// </summary>
private void InitializeComponent() {
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutForm));
this.lblTitle = new System.Windows.Forms.Label();
this.lblLicense = new System.Windows.Forms.Label();
this.lblHost = new System.Windows.Forms.Label();
this.lblLicense = new GreenshotPlugin.Controls.GreenshotLabel();
this.lblHost = new GreenshotPlugin.Controls.GreenshotLabel();
this.linkLblLicense = new System.Windows.Forms.LinkLabel();
this.linkLblHost = new System.Windows.Forms.LinkLabel();
this.linkLblBugs = new System.Windows.Forms.LinkLabel();
this.lblBugs = new System.Windows.Forms.Label();
this.lblBugs = new GreenshotPlugin.Controls.GreenshotLabel();
this.linkLblDonations = new System.Windows.Forms.LinkLabel();
this.lblDonations = new System.Windows.Forms.Label();
this.lblDonations = new GreenshotPlugin.Controls.GreenshotLabel();
this.linkLblIcons = new System.Windows.Forms.LinkLabel();
this.lblIcons = new System.Windows.Forms.Label();
this.lblIcons = new GreenshotPlugin.Controls.GreenshotLabel();
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.lblTranslation = new System.Windows.Forms.Label();
this.lblTranslation = new GreenshotPlugin.Controls.GreenshotLabel();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
@ -76,19 +77,21 @@ namespace Greenshot {
//
// lblLicense
//
this.lblLicense.LanguageKey = "about_license";
this.lblLicense.Location = new System.Drawing.Point(109, 34);
this.lblLicense.Name = "lblLicense";
this.lblLicense.Size = new System.Drawing.Size(369, 68);
this.lblLicense.TabIndex = 3;
this.lblLicense.Text = "Copyright (C) 2007 Thomas Braun, Jens Klingen, Robin Krom";
this.lblLicense.Text = resources.GetString("lblLicense.Text");
//
// lblHost
//
this.lblHost.LanguageKey = "about_host";
this.lblHost.Location = new System.Drawing.Point(12, 109);
this.lblHost.Name = "lblHost";
this.lblHost.Size = new System.Drawing.Size(466, 23);
this.lblHost.TabIndex = 4;
this.lblHost.Text = "Greenshot is hosted by sourceforge.net at";
this.lblHost.Text = "Greenshot wird von sourceforge.net gehostet unter";
//
// linkLblLicense
//
@ -122,11 +125,12 @@ namespace Greenshot {
//
// lblBugs
//
this.lblBugs.LanguageKey = "about_bugs";
this.lblBugs.Location = new System.Drawing.Point(12, 147);
this.lblBugs.Name = "lblBugs";
this.lblBugs.Size = new System.Drawing.Size(466, 23);
this.lblBugs.TabIndex = 7;
this.lblBugs.Text = "Please report bugs to";
this.lblBugs.Text = "Bitte melden Sie Fehler unter";
//
// linkLblDonations
//
@ -140,11 +144,12 @@ namespace Greenshot {
//
// lblDonations
//
this.lblDonations.LanguageKey = "about_donations";
this.lblDonations.Location = new System.Drawing.Point(12, 186);
this.lblDonations.Name = "lblDonations";
this.lblDonations.Size = new System.Drawing.Size(466, 23);
this.lblDonations.TabIndex = 9;
this.lblDonations.Text = "If you like Greenshot, you might consider donating a dime or two at";
this.lblDonations.Text = "Wenn Sie Greenshot mögen, können Sie uns gerne unterstützen:";
//
// linkLblIcons
//
@ -158,11 +163,13 @@ namespace Greenshot {
//
// lblIcons
//
this.lblIcons.LanguageKey = "about_icons";
this.lblIcons.Location = new System.Drawing.Point(12, 224);
this.lblIcons.Name = "lblIcons";
this.lblIcons.Size = new System.Drawing.Size(466, 23);
this.lblIcons.TabIndex = 11;
this.lblIcons.Text = "Greenshot uses icons from / derived from Mark James\' splendid Silk Icon Set on";
this.lblIcons.Text = "Icons aus Yusuke Kamiyamane\'s Fugue icon set (Creative Commons Attribution 3.0 li" +
"cense)";
//
// linkLabel1
//
@ -177,7 +184,7 @@ namespace Greenshot {
//
// pictureBox1
//
this.pictureBox1.Image = GreenshotPlugin.Core.GreenshotResources.getGreenshotImage();
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(12, 12);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(90, 90);
@ -187,11 +194,11 @@ namespace Greenshot {
//
// lblTranslation
//
this.lblTranslation.LanguageKey = "about_translation";
this.lblTranslation.Location = new System.Drawing.Point(12, 262);
this.lblTranslation.Name = "lblTranslation";
this.lblTranslation.Size = new System.Drawing.Size(466, 23);
this.lblTranslation.TabIndex = 15;
this.lblTranslation.Text = "English translation by YOUR_NAME";
//
// AboutForm
//
@ -213,28 +220,30 @@ namespace Greenshot {
this.Controls.Add(this.lblLicense);
this.Controls.Add(this.lblTitle);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.LanguageKey = "about_title";
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "AboutForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "AboutForm";
this.Text = "Über Greenshot";
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
private System.Windows.Forms.Label lblTranslation;
private System.Windows.Forms.LinkLabel linkLabel1;
private System.Windows.Forms.Label lblHost;
private System.Windows.Forms.LinkLabel linkLblHost;
private System.Windows.Forms.Label lblDonations;
private System.Windows.Forms.LinkLabel linkLblDonations;
private System.Windows.Forms.Label lblBugs;
private System.Windows.Forms.LinkLabel linkLblBugs;
private System.Windows.Forms.LinkLabel linkLblLicense;
private System.Windows.Forms.LinkLabel linkLblIcons;
private System.Windows.Forms.Label lblIcons;
private System.Windows.Forms.Label lblLicense;
private System.Windows.Forms.Label lblTitle;
private System.Windows.Forms.PictureBox pictureBox1;
private GreenshotPlugin.Controls.GreenshotLabel lblTranslation;
private GreenshotPlugin.Controls.GreenshotLabel lblHost;
private GreenshotPlugin.Controls.GreenshotLabel lblDonations;
private GreenshotPlugin.Controls.GreenshotLabel lblBugs;
private GreenshotPlugin.Controls.GreenshotLabel lblIcons;
private GreenshotPlugin.Controls.GreenshotLabel lblLicense;
}
}

View file

@ -32,7 +32,7 @@ namespace Greenshot {
/// <summary>
/// Description of AboutForm.
/// </summary>
public partial class AboutForm : Form {
public partial class AboutForm : BaseForm {
public AboutForm() {
//
// The InitializeComponent() call is required for Windows Forms designer support.
@ -43,17 +43,6 @@ namespace Greenshot {
Version v = Assembly.GetExecutingAssembly().GetName().Version;
// Format is like this: AssemblyVersion("Major.Minor.Build.Revision")]
lblTitle.Text = "Greenshot " + v.Major + "." + v.Minor + "." + v.Build + " Build " + v.Revision + (IniConfig.IsPortable?" Portable":"") + (" (" + OSInfo.Bits +" bit)");
updateUI();
}
void updateUI() {
this.Text = Language.GetString(LangKey.about_title);
this.lblLicense.Text = Language.GetString(LangKey.about_license);
this.lblHost.Text = Language.GetString(LangKey.about_host);
this.lblBugs.Text = Language.GetString(LangKey.about_bugs);
this.lblDonations.Text = Language.GetString(LangKey.about_donations);
this.lblIcons.Text = Language.GetString(LangKey.about_icons);
this.lblTranslation.Text = Language.GetString(LangKey.about_translation);
}
void LinkLabelClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e) {

View file

@ -0,0 +1,27 @@
/*
* Greenshot - a free and open source screenshot tool
* Copyright (C) 2007-2012 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 GreenshotPlugin.Controls;
namespace Greenshot {
public class BaseForm : GreenshotForm {
}
}

View file

@ -46,19 +46,21 @@ namespace Greenshot.Forms {
/// </summary>
private void InitializeComponent()
{
this.labelBugReportInfo = new System.Windows.Forms.Label();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BugReportForm));
this.labelBugReportInfo = new GreenshotPlugin.Controls.GreenshotLabel();
this.textBoxDescription = new System.Windows.Forms.TextBox();
this.btnClose = new System.Windows.Forms.Button();
this.btnClose = new GreenshotPlugin.Controls.GreenshotButton();
this.linkLblBugs = new System.Windows.Forms.LinkLabel();
this.SuspendLayout();
//
// labelBugReportInfo
//
this.labelBugReportInfo.LanguageKey = "bugreport_info";
this.labelBugReportInfo.Location = new System.Drawing.Point(12, 9);
this.labelBugReportInfo.Name = "labelBugReportInfo";
this.labelBugReportInfo.Size = new System.Drawing.Size(481, 141);
this.labelBugReportInfo.TabIndex = 0;
this.labelBugReportInfo.Text = "Sorry, an unexpected error occured.";
this.labelBugReportInfo.Text = resources.GetString("labelBugReportInfo.Text");
//
// textBoxDescription
//
@ -76,6 +78,7 @@ namespace Greenshot.Forms {
//
this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnClose.LanguageKey = "bugreport_cancel";
this.btnClose.Location = new System.Drawing.Point(377, 417);
this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(139, 23);
@ -103,14 +106,16 @@ namespace Greenshot.Forms {
this.Controls.Add(this.btnClose);
this.Controls.Add(this.textBoxDescription);
this.Controls.Add(this.labelBugReportInfo);
this.LanguageKey = "bugreport_title";
this.Name = "BugReportForm";
this.Text = "Error";
this.ResumeLayout(false);
this.PerformLayout();
}
private System.Windows.Forms.LinkLabel linkLblBugs;
private System.Windows.Forms.Button btnClose;
private GreenshotPlugin.Controls.GreenshotButton btnClose;
private System.Windows.Forms.TextBox textBoxDescription;
private System.Windows.Forms.Label labelBugReportInfo;
private GreenshotPlugin.Controls.GreenshotLabel labelBugReportInfo;
}
}

View file

@ -25,28 +25,20 @@ using Greenshot.Helpers;
using GreenshotPlugin.Core;
namespace Greenshot.Forms {
public partial class BugReportForm : Form {
public partial class BugReportForm : BaseForm {
private BugReportForm() {
//
// The InitializeComponent() call is required for Windows Forms designer support.
//
InitializeComponent();
this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon();
UpdateUI();
WindowDetails.ToForeground(this.Handle);
}
public BugReportForm(string bugText) : this() {
this.textBoxDescription.Text = bugText;
}
void UpdateUI() {
this.Text = Language.GetString(LangKey.bugreport_title);
this.labelBugReportInfo.Text = Language.GetString(LangKey.bugreport_info);
this.btnClose.Text = Language.GetString(LangKey.bugreport_cancel);
}
void LinkLblBugsLinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e) {
openLink((LinkLabel)sender);
}

View file

@ -19,7 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
namespace Greenshot {
partial class ColorDialog : System.Windows.Forms.Form {
public partial class ColorDialog {
/// <summary>
/// Designer variable used to keep track of non-visual components.
/// </summary>
@ -47,26 +47,27 @@ namespace Greenshot {
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ColorDialog));
this.SuspendLayout();
this.btnTransparent = new System.Windows.Forms.Button();
this.btnTransparent = new GreenshotPlugin.Controls.GreenshotButton();
this.colorPanel = new System.Windows.Forms.Panel();
this.labelHtmlColor = new System.Windows.Forms.Label();
this.labelHtmlColor = new GreenshotPlugin.Controls.GreenshotLabel();
this.textBoxHtmlColor = new System.Windows.Forms.TextBox();
this.labelRed = new System.Windows.Forms.Label();
this.labelGreen = new System.Windows.Forms.Label();
this.labelBlue = new System.Windows.Forms.Label();
this.labelRed = new GreenshotPlugin.Controls.GreenshotLabel();
this.labelGreen = new GreenshotPlugin.Controls.GreenshotLabel();
this.labelBlue = new GreenshotPlugin.Controls.GreenshotLabel();
this.textBoxRed = new System.Windows.Forms.TextBox();
this.textBoxGreen = new System.Windows.Forms.TextBox();
this.textBoxBlue = new System.Windows.Forms.TextBox();
this.labelRecentColors = new System.Windows.Forms.Label();
this.labelRecentColors = new GreenshotPlugin.Controls.GreenshotLabel();
this.textBoxAlpha = new System.Windows.Forms.TextBox();
this.labelAlpha = new System.Windows.Forms.Label();
this.btnApply = new System.Windows.Forms.Button();
this.labelAlpha = new GreenshotPlugin.Controls.GreenshotLabel();
this.btnApply = new GreenshotPlugin.Controls.GreenshotButton();
this.pipette = new Greenshot.Controls.Pipette();
this.SuspendLayout();
//
// btnTransparent
//
this.btnTransparent.BackColor = System.Drawing.Color.Transparent;
this.btnTransparent.LanguageKey = "colorpicker_transparent";
this.btnTransparent.Location = new System.Drawing.Point(210, 4);
this.btnTransparent.Name = "btnTransparent";
this.btnTransparent.Size = new System.Drawing.Size(78, 23);
@ -87,6 +88,7 @@ namespace Greenshot {
// labelHtmlColor
//
this.labelHtmlColor.Font = new System.Drawing.Font("Tahoma", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World);
this.labelHtmlColor.LanguageKey = "colorpicker_htmlcolor";
this.labelHtmlColor.Location = new System.Drawing.Point(210, 57);
this.labelHtmlColor.Name = "labelHtmlColor";
this.labelHtmlColor.Size = new System.Drawing.Size(78, 17);
@ -100,13 +102,14 @@ namespace Greenshot {
this.textBoxHtmlColor.Size = new System.Drawing.Size(78, 20);
this.textBoxHtmlColor.TabIndex = 1;
this.textBoxHtmlColor.Click += new System.EventHandler(this.TextBoxGotFocus);
this.textBoxHtmlColor.GotFocus += new System.EventHandler(this.TextBoxGotFocus);
this.textBoxHtmlColor.TextChanged += new System.EventHandler(this.TextBoxHexadecimalTextChanged);
this.textBoxHtmlColor.GotFocus += new System.EventHandler(this.TextBoxGotFocus);
this.textBoxHtmlColor.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TextBoxKeyDown);
//
// labelRed
//
this.labelRed.Font = new System.Drawing.Font("Tahoma", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World);
this.labelRed.LanguageKey = "colorpicker_red";
this.labelRed.Location = new System.Drawing.Point(210, 98);
this.labelRed.Name = "labelRed";
this.labelRed.Size = new System.Drawing.Size(78, 18);
@ -116,6 +119,7 @@ namespace Greenshot {
// labelGreen
//
this.labelGreen.Font = new System.Drawing.Font("Tahoma", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World);
this.labelGreen.LanguageKey = "colorpicker_green";
this.labelGreen.Location = new System.Drawing.Point(210, 122);
this.labelGreen.Name = "labelGreen";
this.labelGreen.Size = new System.Drawing.Size(78, 18);
@ -125,6 +129,7 @@ namespace Greenshot {
// labelBlue
//
this.labelBlue.Font = new System.Drawing.Font("Tahoma", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World);
this.labelBlue.LanguageKey = "colorpicker_blue";
this.labelBlue.Location = new System.Drawing.Point(210, 146);
this.labelBlue.Name = "labelBlue";
this.labelBlue.Size = new System.Drawing.Size(78, 18);
@ -139,8 +144,8 @@ namespace Greenshot {
this.textBoxRed.TabIndex = 2;
this.textBoxRed.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
this.textBoxRed.Click += new System.EventHandler(this.TextBoxGotFocus);
this.textBoxRed.GotFocus += new System.EventHandler(this.TextBoxGotFocus);
this.textBoxRed.TextChanged += new System.EventHandler(this.TextBoxRGBTextChanged);
this.textBoxRed.GotFocus += new System.EventHandler(this.TextBoxGotFocus);
this.textBoxRed.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TextBoxKeyDown);
//
// textBoxGreen
@ -151,8 +156,8 @@ namespace Greenshot {
this.textBoxGreen.TabIndex = 3;
this.textBoxGreen.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
this.textBoxGreen.Click += new System.EventHandler(this.TextBoxGotFocus);
this.textBoxGreen.GotFocus += new System.EventHandler(this.TextBoxGotFocus);
this.textBoxGreen.TextChanged += new System.EventHandler(this.TextBoxRGBTextChanged);
this.textBoxGreen.GotFocus += new System.EventHandler(this.TextBoxGotFocus);
this.textBoxGreen.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TextBoxKeyDown);
//
// textBoxBlue
@ -163,12 +168,13 @@ namespace Greenshot {
this.textBoxBlue.TabIndex = 4;
this.textBoxBlue.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
this.textBoxBlue.Click += new System.EventHandler(this.TextBoxGotFocus);
this.textBoxBlue.GotFocus += new System.EventHandler(this.TextBoxGotFocus);
this.textBoxBlue.TextChanged += new System.EventHandler(this.TextBoxRGBTextChanged);
this.textBoxBlue.GotFocus += new System.EventHandler(this.TextBoxGotFocus);
this.textBoxBlue.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TextBoxKeyDown);
//
// labelRecentColors
//
this.labelRecentColors.LanguageKey = "colorpicker_recentcolors";
this.labelRecentColors.Location = new System.Drawing.Point(3, 175);
this.labelRecentColors.Name = "labelRecentColors";
this.labelRecentColors.Size = new System.Drawing.Size(148, 13);
@ -183,13 +189,14 @@ namespace Greenshot {
this.textBoxAlpha.TabIndex = 5;
this.textBoxAlpha.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
this.textBoxAlpha.Click += new System.EventHandler(this.TextBoxGotFocus);
this.textBoxAlpha.GotFocus += new System.EventHandler(this.TextBoxGotFocus);
this.textBoxAlpha.TextChanged += new System.EventHandler(this.TextBoxRGBTextChanged);
this.textBoxAlpha.GotFocus += new System.EventHandler(this.TextBoxGotFocus);
this.textBoxAlpha.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TextBoxKeyDown);
//
// labelAlpha
//
this.labelAlpha.Font = new System.Drawing.Font("Tahoma", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World);
this.labelAlpha.LanguageKey = "colorpicker_alpha";
this.labelAlpha.Location = new System.Drawing.Point(210, 170);
this.labelAlpha.Name = "labelAlpha";
this.labelAlpha.Size = new System.Drawing.Size(78, 18);
@ -199,6 +206,7 @@ namespace Greenshot {
// btnApply
//
this.btnApply.BackColor = System.Drawing.Color.Transparent;
this.btnApply.LanguageKey = "colorpicker_apply";
this.btnApply.Location = new System.Drawing.Point(210, 191);
this.btnApply.Name = "btnApply";
this.btnApply.Size = new System.Drawing.Size(78, 23);
@ -212,6 +220,7 @@ namespace Greenshot {
//
this.pipette.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.pipette.Cursor = System.Windows.Forms.Cursors.Arrow;
this.pipette.Image = ((System.Drawing.Image)(resources.GetObject("pipette.Image")));
this.pipette.Location = new System.Drawing.Point(255, 30);
this.pipette.Name = "pipette";
this.pipette.Size = new System.Drawing.Size(33, 23);
@ -239,31 +248,32 @@ namespace Greenshot {
this.Controls.Add(this.colorPanel);
this.Controls.Add(this.btnTransparent);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.LanguageKey = "colorpicker_title";
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "ColorDialog";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.Text = "TestProject";
this.Text = "Color picker";
this.ResumeLayout(false);
this.PerformLayout();
}
private System.Windows.Forms.Label labelRed;
private System.Windows.Forms.Label labelGreen;
private System.Windows.Forms.Label labelBlue;
private GreenshotPlugin.Controls.GreenshotLabel labelRed;
private GreenshotPlugin.Controls.GreenshotLabel labelGreen;
private GreenshotPlugin.Controls.GreenshotLabel labelBlue;
private System.Windows.Forms.TextBox textBoxHtmlColor;
private System.Windows.Forms.Label labelRecentColors;
private System.Windows.Forms.Label labelAlpha;
private System.Windows.Forms.Label labelHtmlColor;
private System.Windows.Forms.Button btnApply;
private GreenshotPlugin.Controls.GreenshotLabel labelRecentColors;
private GreenshotPlugin.Controls.GreenshotLabel labelAlpha;
private GreenshotPlugin.Controls.GreenshotLabel labelHtmlColor;
private GreenshotPlugin.Controls.GreenshotButton btnApply;
private System.Windows.Forms.TextBox textBoxAlpha;
private System.Windows.Forms.TextBox textBoxRed;
private System.Windows.Forms.TextBox textBoxGreen;
private System.Windows.Forms.TextBox textBoxBlue;
private System.Windows.Forms.Panel colorPanel;
private System.Windows.Forms.Button btnTransparent;
private GreenshotPlugin.Controls.GreenshotButton btnTransparent;
private Greenshot.Controls.Pipette pipette;

View file

@ -32,13 +32,13 @@ namespace Greenshot {
/// <summary>
/// Description of ColorDialog.
/// </summary>
public partial class ColorDialog {
public partial class ColorDialog : BaseForm {
private static ColorDialog uniqueInstance;
private static EditorConfiguration editorConfiguration = IniConfig.GetIniSection<EditorConfiguration>();
private ColorDialog() {
this.SuspendLayout();
InitializeComponent();
updateUI();
this.SuspendLayout();
this.createColorPalette(5,5,15,15);
this.createLastUsedColorButtonRow(5,190,15,15);
@ -63,18 +63,6 @@ namespace Greenshot {
set {previewColor(value,this);}
}
private void updateUI() {
this.Text = Language.GetString(LangKey.colorpicker_title);
this.btnApply.Text = Language.GetString(LangKey.colorpicker_apply);
this.btnTransparent.Text = Language.GetString(LangKey.colorpicker_transparent);
this.labelHtmlColor.Text = Language.GetString(LangKey.colorpicker_htmlcolor);
this.labelRed.Text = Language.GetString(LangKey.colorpicker_red);
this.labelGreen.Text = Language.GetString(LangKey.colorpicker_green);
this.labelBlue.Text = Language.GetString(LangKey.colorpicker_blue);
this.labelAlpha.Text = Language.GetString(LangKey.colorpicker_alpha);
this.labelRecentColors.Text = Language.GetString(LangKey.colorpicker_recentcolors);
}
#region user interface generation
private void createColorPalette(int x, int y, int w, int h) {
this.createColorButtonColumn(255,0,0, x, y, w, h, 11);

View file

@ -48,15 +48,15 @@ namespace Greenshot.Forms
/// </summary>
private void InitializeComponent()
{
this.checkbox_dontaskagain = new System.Windows.Forms.CheckBox();
this.checkboxAllowShrink = new System.Windows.Forms.CheckBox();
this.checkboxAllowEnlarge = new System.Windows.Forms.CheckBox();
this.checkboxAllowCenter = new System.Windows.Forms.CheckBox();
this.checkboxAllowRotate = new System.Windows.Forms.CheckBox();
this.button_ok = new System.Windows.Forms.Button();
this.checkboxDateTime = new System.Windows.Forms.CheckBox();
this.button_cancel = new System.Windows.Forms.Button();
this.checkboxPrintInverted = new System.Windows.Forms.CheckBox();
this.checkbox_dontaskagain = new GreenshotPlugin.Controls.GreenshotCheckBox();
this.checkboxAllowShrink = new GreenshotPlugin.Controls.GreenshotCheckBox();
this.checkboxAllowEnlarge = new GreenshotPlugin.Controls.GreenshotCheckBox();
this.checkboxAllowCenter = new GreenshotPlugin.Controls.GreenshotCheckBox();
this.checkboxAllowRotate = new GreenshotPlugin.Controls.GreenshotCheckBox();
this.button_ok = new GreenshotPlugin.Controls.GreenshotButton();
this.checkboxDateTime = new GreenshotPlugin.Controls.GreenshotCheckBox();
this.button_cancel = new GreenshotPlugin.Controls.GreenshotButton();
this.checkboxPrintInverted = new GreenshotPlugin.Controls.GreenshotCheckBox();
this.SuspendLayout();
//
// checkbox_dontaskagain
@ -64,11 +64,12 @@ namespace Greenshot.Forms
this.checkbox_dontaskagain.AutoSize = true;
this.checkbox_dontaskagain.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkbox_dontaskagain.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkbox_dontaskagain.LanguageKey = "printoptions_dontaskagain";
this.checkbox_dontaskagain.Location = new System.Drawing.Point(12, 152);
this.checkbox_dontaskagain.Name = "checkbox_dontaskagain";
this.checkbox_dontaskagain.Size = new System.Drawing.Size(206, 17);
this.checkbox_dontaskagain.Size = new System.Drawing.Size(240, 17);
this.checkbox_dontaskagain.TabIndex = 19;
this.checkbox_dontaskagain.Text = "Save as default and do not ask again.";
this.checkbox_dontaskagain.Text = "Save options as default and do not ask again";
this.checkbox_dontaskagain.TextAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkbox_dontaskagain.UseVisualStyleBackColor = true;
//
@ -77,11 +78,13 @@ namespace Greenshot.Forms
this.checkboxAllowShrink.AutoSize = true;
this.checkboxAllowShrink.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxAllowShrink.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxAllowShrink.LanguageKey = "printoptions_allowshrink";
this.checkboxAllowShrink.Location = new System.Drawing.Point(12, 20);
this.checkboxAllowShrink.Name = "checkboxAllowShrink";
this.checkboxAllowShrink.Size = new System.Drawing.Size(191, 17);
this.checkboxAllowShrink.PropertyName = "OutputPrintAllowShrink";
this.checkboxAllowShrink.Size = new System.Drawing.Size(168, 17);
this.checkboxAllowShrink.TabIndex = 21;
this.checkboxAllowShrink.Text = "Shrink large printouts to paper size.";
this.checkboxAllowShrink.Text = "Shrink printout to fit paper size";
this.checkboxAllowShrink.TextAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxAllowShrink.UseVisualStyleBackColor = true;
//
@ -90,11 +93,13 @@ namespace Greenshot.Forms
this.checkboxAllowEnlarge.AutoSize = true;
this.checkboxAllowEnlarge.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxAllowEnlarge.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxAllowEnlarge.LanguageKey = "printoptions_allowenlarge";
this.checkboxAllowEnlarge.Location = new System.Drawing.Point(12, 43);
this.checkboxAllowEnlarge.Name = "checkboxAllowEnlarge";
this.checkboxAllowEnlarge.Size = new System.Drawing.Size(197, 17);
this.checkboxAllowEnlarge.PropertyName = "OutputPrintAllowEnlarge";
this.checkboxAllowEnlarge.Size = new System.Drawing.Size(174, 17);
this.checkboxAllowEnlarge.TabIndex = 22;
this.checkboxAllowEnlarge.Text = "Enlarge small printouts to paper size.";
this.checkboxAllowEnlarge.Text = "Enlarge printout to fit paper size";
this.checkboxAllowEnlarge.TextAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxAllowEnlarge.UseVisualStyleBackColor = true;
//
@ -103,11 +108,13 @@ namespace Greenshot.Forms
this.checkboxAllowCenter.AutoSize = true;
this.checkboxAllowCenter.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxAllowCenter.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxAllowCenter.LanguageKey = "printoptions_allowcenter";
this.checkboxAllowCenter.Location = new System.Drawing.Point(12, 89);
this.checkboxAllowCenter.Name = "checkboxAllowCenter";
this.checkboxAllowCenter.Size = new System.Drawing.Size(200, 17);
this.checkboxAllowCenter.PropertyName = "OutputPrintCenter";
this.checkboxAllowCenter.Size = new System.Drawing.Size(137, 17);
this.checkboxAllowCenter.TabIndex = 24;
this.checkboxAllowCenter.Text = "Align printouts centered on the page.";
this.checkboxAllowCenter.Text = "Center printout on page";
this.checkboxAllowCenter.TextAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxAllowCenter.UseVisualStyleBackColor = true;
//
@ -116,11 +123,13 @@ namespace Greenshot.Forms
this.checkboxAllowRotate.AutoSize = true;
this.checkboxAllowRotate.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxAllowRotate.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxAllowRotate.LanguageKey = "printoptions_allowrotate";
this.checkboxAllowRotate.Location = new System.Drawing.Point(12, 66);
this.checkboxAllowRotate.Name = "checkboxAllowRotate";
this.checkboxAllowRotate.Size = new System.Drawing.Size(195, 17);
this.checkboxAllowRotate.PropertyName = "OutputPrintAllowRotate";
this.checkboxAllowRotate.Size = new System.Drawing.Size(187, 17);
this.checkboxAllowRotate.TabIndex = 23;
this.checkboxAllowRotate.Text = "Rotate printouts to page orientation.";
this.checkboxAllowRotate.Text = "Rotate printout to page orientation";
this.checkboxAllowRotate.TextAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxAllowRotate.UseVisualStyleBackColor = true;
//
@ -140,8 +149,10 @@ namespace Greenshot.Forms
this.checkboxDateTime.AutoSize = true;
this.checkboxDateTime.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxDateTime.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxDateTime.LanguageKey = "printoptions_timestamp";
this.checkboxDateTime.Location = new System.Drawing.Point(12, 112);
this.checkboxDateTime.Name = "checkboxDateTime";
this.checkboxDateTime.PropertyName = "OutputPrintFooter";
this.checkboxDateTime.Size = new System.Drawing.Size(187, 17);
this.checkboxDateTime.TabIndex = 26;
this.checkboxDateTime.Text = "Print date / time at bottom of page";
@ -158,16 +169,18 @@ namespace Greenshot.Forms
this.button_cancel.Text = "Cancel";
this.button_cancel.UseVisualStyleBackColor = true;
//
// checkBox1
// checkboxPrintInverted
//
this.checkboxPrintInverted.AutoSize = true;
this.checkboxPrintInverted.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxPrintInverted.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxPrintInverted.LanguageKey = "printoptions_inverted";
this.checkboxPrintInverted.Location = new System.Drawing.Point(12, 132);
this.checkboxPrintInverted.Name = "checkBox1";
this.checkboxPrintInverted.Size = new System.Drawing.Size(88, 17);
this.checkboxPrintInverted.Name = "checkboxPrintInverted";
this.checkboxPrintInverted.PropertyName = "OutputPrintInverted";
this.checkboxPrintInverted.Size = new System.Drawing.Size(141, 17);
this.checkboxPrintInverted.TabIndex = 28;
this.checkboxPrintInverted.Text = "Print inverted";
this.checkboxPrintInverted.Text = "Print with inverted colors";
this.checkboxPrintInverted.TextAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxPrintInverted.UseVisualStyleBackColor = true;
//
@ -185,22 +198,24 @@ namespace Greenshot.Forms
this.Controls.Add(this.checkboxAllowRotate);
this.Controls.Add(this.checkboxAllowEnlarge);
this.Controls.Add(this.checkboxAllowShrink);
this.LanguageKey = "printoptions_title";
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "PrintOptionsDialog";
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.Text = "PrintOptionsDialog";
this.Text = "Greenshot print options";
this.ResumeLayout(false);
this.PerformLayout();
}
private System.Windows.Forms.CheckBox checkboxPrintInverted;
private System.Windows.Forms.Button button_cancel;
private System.Windows.Forms.CheckBox checkboxDateTime;
private System.Windows.Forms.Button button_ok;
private System.Windows.Forms.CheckBox checkboxAllowRotate;
private System.Windows.Forms.CheckBox checkboxAllowCenter;
private System.Windows.Forms.CheckBox checkboxAllowEnlarge;
private System.Windows.Forms.CheckBox checkboxAllowShrink;
private System.Windows.Forms.CheckBox checkbox_dontaskagain;
private GreenshotPlugin.Controls.GreenshotCheckBox checkboxPrintInverted;
private GreenshotPlugin.Controls.GreenshotButton button_cancel;
private GreenshotPlugin.Controls.GreenshotCheckBox checkboxDateTime;
private GreenshotPlugin.Controls.GreenshotButton button_ok;
private GreenshotPlugin.Controls.GreenshotCheckBox checkboxAllowRotate;
private GreenshotPlugin.Controls.GreenshotCheckBox checkboxAllowCenter;
private GreenshotPlugin.Controls.GreenshotCheckBox checkboxAllowEnlarge;
private GreenshotPlugin.Controls.GreenshotCheckBox checkboxAllowShrink;
private GreenshotPlugin.Controls.GreenshotCheckBox checkbox_dontaskagain;
}
}

View file

@ -28,7 +28,7 @@ namespace Greenshot.Forms {
/// <summary>
/// Description of PrintOptionsDialog.
/// </summary>
public partial class PrintOptionsDialog : Form {
public partial class PrintOptionsDialog : BaseForm {
private static CoreConfiguration conf = IniConfig.GetIniSection<CoreConfiguration>();
public bool AllowPrintCenter;
@ -44,46 +44,15 @@ namespace Greenshot.Forms {
//
InitializeComponent();
this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon();
this.AllowPrintCenter = this.checkboxAllowCenter.Checked = conf.OutputPrintCenter;
this.AllowPrintEnlarge = this.checkboxAllowEnlarge.Checked = conf.OutputPrintAllowEnlarge;
this.AllowPrintRotate = this.checkboxAllowRotate.Checked = conf.OutputPrintAllowRotate;
this.AllowPrintShrink = this.checkboxAllowShrink.Checked = conf.OutputPrintAllowShrink;
this.PrintInverted = this.checkboxPrintInverted.Checked = conf.OutputPrintInverted;
this.PrintDateTime = this.checkboxDateTime.Checked = conf.OutputPrintFooter;
this.checkbox_dontaskagain.Checked = false;
UpdateUI();
}
void UpdateUI() {
this.Text = Language.GetString(LangKey.printoptions_title);
this.checkboxAllowCenter.Text = Language.GetString(LangKey.printoptions_allowcenter);
this.checkboxAllowEnlarge.Text = Language.GetString(LangKey.printoptions_allowenlarge);
this.checkboxAllowRotate.Text = Language.GetString(LangKey.printoptions_allowrotate);
this.checkboxAllowShrink.Text = Language.GetString(LangKey.printoptions_allowshrink);
this.checkbox_dontaskagain.Text = Language.GetString(LangKey.printoptions_dontaskagain);
this.checkboxDateTime.Text = Language.GetString(LangKey.printoptions_timestamp);
this.checkboxPrintInverted.Text = Language.GetString(LangKey.printoptions_inverted);
}
void Button_okClick(object sender, EventArgs e) {
this.AllowPrintCenter = this.checkboxAllowCenter.Checked;
this.AllowPrintEnlarge = this.checkboxAllowEnlarge.Checked;
this.AllowPrintRotate = this.checkboxAllowRotate.Checked;
this.AllowPrintShrink = this.checkboxAllowShrink.Checked;
this.PrintDateTime = this.checkboxDateTime.Checked;
this.PrintInverted = this.checkboxPrintInverted.Checked;
// update config
conf.OutputPrintCenter = this.AllowPrintCenter;
conf.OutputPrintAllowEnlarge = this.AllowPrintEnlarge;
conf.OutputPrintAllowRotate = this.AllowPrintRotate;
conf.OutputPrintAllowShrink = this.AllowPrintShrink;
conf.OutputPrintFooter = this.PrintDateTime;
conf.OutputPrintInverted = this.PrintInverted;
conf.OutputPrintPromptOptions = !this.checkbox_dontaskagain.Checked;
IniConfig.Save();
DialogResult = DialogResult.OK;
}
}
}

View file

@ -151,6 +151,9 @@
<Compile Include="Forms\AboutForm.Designer.cs">
<DependentUpon>AboutForm.cs</DependentUpon>
</Compile>
<Compile Include="Forms\BaseForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\CaptureForm.cs">
<SubType>Form</SubType>
</Compile>