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. /// not be able to load this method if it was changed manually.
/// </summary> /// </summary>
private void InitializeComponent() { private void InitializeComponent() {
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutForm));
this.lblTitle = new System.Windows.Forms.Label(); this.lblTitle = new System.Windows.Forms.Label();
this.lblLicense = new System.Windows.Forms.Label(); this.lblLicense = new GreenshotPlugin.Controls.GreenshotLabel();
this.lblHost = new System.Windows.Forms.Label(); this.lblHost = new GreenshotPlugin.Controls.GreenshotLabel();
this.linkLblLicense = new System.Windows.Forms.LinkLabel(); this.linkLblLicense = new System.Windows.Forms.LinkLabel();
this.linkLblHost = new System.Windows.Forms.LinkLabel(); this.linkLblHost = new System.Windows.Forms.LinkLabel();
this.linkLblBugs = 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.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.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.linkLabel1 = new System.Windows.Forms.LinkLabel();
this.pictureBox1 = new System.Windows.Forms.PictureBox(); 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(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
// //
@ -76,19 +77,21 @@ namespace Greenshot {
// //
// lblLicense // lblLicense
// //
this.lblLicense.LanguageKey = "about_license";
this.lblLicense.Location = new System.Drawing.Point(109, 34); this.lblLicense.Location = new System.Drawing.Point(109, 34);
this.lblLicense.Name = "lblLicense"; this.lblLicense.Name = "lblLicense";
this.lblLicense.Size = new System.Drawing.Size(369, 68); this.lblLicense.Size = new System.Drawing.Size(369, 68);
this.lblLicense.TabIndex = 3; this.lblLicense.TabIndex = 3;
this.lblLicense.Text = "Copyright (C) 2007 Thomas Braun, Jens Klingen, Robin Krom"; this.lblLicense.Text = resources.GetString("lblLicense.Text");
// //
// lblHost // lblHost
// //
this.lblHost.LanguageKey = "about_host";
this.lblHost.Location = new System.Drawing.Point(12, 109); this.lblHost.Location = new System.Drawing.Point(12, 109);
this.lblHost.Name = "lblHost"; this.lblHost.Name = "lblHost";
this.lblHost.Size = new System.Drawing.Size(466, 23); this.lblHost.Size = new System.Drawing.Size(466, 23);
this.lblHost.TabIndex = 4; 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 // linkLblLicense
// //
@ -122,11 +125,12 @@ namespace Greenshot {
// //
// lblBugs // lblBugs
// //
this.lblBugs.LanguageKey = "about_bugs";
this.lblBugs.Location = new System.Drawing.Point(12, 147); this.lblBugs.Location = new System.Drawing.Point(12, 147);
this.lblBugs.Name = "lblBugs"; this.lblBugs.Name = "lblBugs";
this.lblBugs.Size = new System.Drawing.Size(466, 23); this.lblBugs.Size = new System.Drawing.Size(466, 23);
this.lblBugs.TabIndex = 7; this.lblBugs.TabIndex = 7;
this.lblBugs.Text = "Please report bugs to"; this.lblBugs.Text = "Bitte melden Sie Fehler unter";
// //
// linkLblDonations // linkLblDonations
// //
@ -140,11 +144,12 @@ namespace Greenshot {
// //
// lblDonations // lblDonations
// //
this.lblDonations.LanguageKey = "about_donations";
this.lblDonations.Location = new System.Drawing.Point(12, 186); this.lblDonations.Location = new System.Drawing.Point(12, 186);
this.lblDonations.Name = "lblDonations"; this.lblDonations.Name = "lblDonations";
this.lblDonations.Size = new System.Drawing.Size(466, 23); this.lblDonations.Size = new System.Drawing.Size(466, 23);
this.lblDonations.TabIndex = 9; 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 // linkLblIcons
// //
@ -158,11 +163,13 @@ namespace Greenshot {
// //
// lblIcons // lblIcons
// //
this.lblIcons.LanguageKey = "about_icons";
this.lblIcons.Location = new System.Drawing.Point(12, 224); this.lblIcons.Location = new System.Drawing.Point(12, 224);
this.lblIcons.Name = "lblIcons"; this.lblIcons.Name = "lblIcons";
this.lblIcons.Size = new System.Drawing.Size(466, 23); this.lblIcons.Size = new System.Drawing.Size(466, 23);
this.lblIcons.TabIndex = 11; 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 // linkLabel1
// //
@ -177,7 +184,7 @@ namespace Greenshot {
// //
// pictureBox1 // 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.Location = new System.Drawing.Point(12, 12);
this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(90, 90); this.pictureBox1.Size = new System.Drawing.Size(90, 90);
@ -187,11 +194,11 @@ namespace Greenshot {
// //
// lblTranslation // lblTranslation
// //
this.lblTranslation.LanguageKey = "about_translation";
this.lblTranslation.Location = new System.Drawing.Point(12, 262); this.lblTranslation.Location = new System.Drawing.Point(12, 262);
this.lblTranslation.Name = "lblTranslation"; this.lblTranslation.Name = "lblTranslation";
this.lblTranslation.Size = new System.Drawing.Size(466, 23); this.lblTranslation.Size = new System.Drawing.Size(466, 23);
this.lblTranslation.TabIndex = 15; this.lblTranslation.TabIndex = 15;
this.lblTranslation.Text = "English translation by YOUR_NAME";
// //
// AboutForm // AboutForm
// //
@ -213,28 +220,30 @@ namespace Greenshot {
this.Controls.Add(this.lblLicense); this.Controls.Add(this.lblLicense);
this.Controls.Add(this.lblTitle); this.Controls.Add(this.lblTitle);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.LanguageKey = "about_title";
this.MaximizeBox = false; this.MaximizeBox = false;
this.MinimizeBox = false; this.MinimizeBox = false;
this.Name = "AboutForm"; this.Name = "AboutForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "AboutForm"; this.Text = "Über Greenshot";
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
} }
private System.Windows.Forms.Label lblTranslation;
private System.Windows.Forms.LinkLabel linkLabel1; private System.Windows.Forms.LinkLabel linkLabel1;
private System.Windows.Forms.Label lblHost;
private System.Windows.Forms.LinkLabel linkLblHost; private System.Windows.Forms.LinkLabel linkLblHost;
private System.Windows.Forms.Label lblDonations;
private System.Windows.Forms.LinkLabel linkLblDonations; private System.Windows.Forms.LinkLabel linkLblDonations;
private System.Windows.Forms.Label lblBugs;
private System.Windows.Forms.LinkLabel linkLblBugs; private System.Windows.Forms.LinkLabel linkLblBugs;
private System.Windows.Forms.LinkLabel linkLblLicense; private System.Windows.Forms.LinkLabel linkLblLicense;
private System.Windows.Forms.LinkLabel linkLblIcons; 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.Label lblTitle;
private System.Windows.Forms.PictureBox pictureBox1; 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> /// <summary>
/// Description of AboutForm. /// Description of AboutForm.
/// </summary> /// </summary>
public partial class AboutForm : Form { public partial class AboutForm : BaseForm {
public AboutForm() { public AboutForm() {
// //
// The InitializeComponent() call is required for Windows Forms designer support. // The InitializeComponent() call is required for Windows Forms designer support.
@ -43,17 +43,6 @@ namespace Greenshot {
Version v = Assembly.GetExecutingAssembly().GetName().Version; Version v = Assembly.GetExecutingAssembly().GetName().Version;
// Format is like this: AssemblyVersion("Major.Minor.Build.Revision")] // 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)"); 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) { 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,25 +46,27 @@ namespace Greenshot.Forms {
/// </summary> /// </summary>
private void InitializeComponent() 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.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.linkLblBugs = new System.Windows.Forms.LinkLabel();
this.SuspendLayout(); this.SuspendLayout();
// //
// labelBugReportInfo // labelBugReportInfo
// //
this.labelBugReportInfo.LanguageKey = "bugreport_info";
this.labelBugReportInfo.Location = new System.Drawing.Point(12, 9); this.labelBugReportInfo.Location = new System.Drawing.Point(12, 9);
this.labelBugReportInfo.Name = "labelBugReportInfo"; this.labelBugReportInfo.Name = "labelBugReportInfo";
this.labelBugReportInfo.Size = new System.Drawing.Size(481, 141); this.labelBugReportInfo.Size = new System.Drawing.Size(481, 141);
this.labelBugReportInfo.TabIndex = 0; this.labelBugReportInfo.TabIndex = 0;
this.labelBugReportInfo.Text = "Sorry, an unexpected error occured."; this.labelBugReportInfo.Text = resources.GetString("labelBugReportInfo.Text");
// //
// textBoxDescription // textBoxDescription
// //
this.textBoxDescription.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.textBoxDescription.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.textBoxDescription.Location = new System.Drawing.Point(12, 179); this.textBoxDescription.Location = new System.Drawing.Point(12, 179);
this.textBoxDescription.Multiline = true; this.textBoxDescription.Multiline = true;
this.textBoxDescription.Name = "textBoxDescription"; this.textBoxDescription.Name = "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.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.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnClose.LanguageKey = "bugreport_cancel";
this.btnClose.Location = new System.Drawing.Point(377, 417); this.btnClose.Location = new System.Drawing.Point(377, 417);
this.btnClose.Name = "btnClose"; this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(139, 23); 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.btnClose);
this.Controls.Add(this.textBoxDescription); this.Controls.Add(this.textBoxDescription);
this.Controls.Add(this.labelBugReportInfo); this.Controls.Add(this.labelBugReportInfo);
this.LanguageKey = "bugreport_title";
this.Name = "BugReportForm"; this.Name = "BugReportForm";
this.Text = "Error"; this.Text = "Error";
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
} }
private System.Windows.Forms.LinkLabel linkLblBugs; 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.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; using GreenshotPlugin.Core;
namespace Greenshot.Forms { namespace Greenshot.Forms {
public partial class BugReportForm : Form { public partial class BugReportForm : BaseForm {
private BugReportForm() { private BugReportForm() {
// //
// 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();
UpdateUI();
WindowDetails.ToForeground(this.Handle); WindowDetails.ToForeground(this.Handle);
} }
public BugReportForm(string bugText) : this() { public BugReportForm(string bugText) : this() {
this.textBoxDescription.Text = bugText; 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) { void LinkLblBugsLinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e) {
openLink((LinkLabel)sender); openLink((LinkLabel)sender);
} }

View file

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

View file

@ -32,13 +32,13 @@ namespace Greenshot {
/// <summary> /// <summary>
/// Description of ColorDialog. /// Description of ColorDialog.
/// </summary> /// </summary>
public partial class ColorDialog { public partial class ColorDialog : BaseForm {
private static ColorDialog uniqueInstance; private static ColorDialog uniqueInstance;
private static EditorConfiguration editorConfiguration = IniConfig.GetIniSection<EditorConfiguration>(); private static EditorConfiguration editorConfiguration = IniConfig.GetIniSection<EditorConfiguration>();
private ColorDialog() { private ColorDialog() {
this.SuspendLayout(); this.SuspendLayout();
InitializeComponent(); InitializeComponent();
updateUI();
this.SuspendLayout(); this.SuspendLayout();
this.createColorPalette(5,5,15,15); this.createColorPalette(5,5,15,15);
this.createLastUsedColorButtonRow(5,190,15,15); this.createLastUsedColorButtonRow(5,190,15,15);
@ -63,18 +63,6 @@ namespace Greenshot {
set {previewColor(value,this);} 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 #region user interface generation
private void createColorPalette(int x, int y, int w, int h) { private void createColorPalette(int x, int y, int w, int h) {
this.createColorButtonColumn(255,0,0, x, y, w, h, 11); this.createColorButtonColumn(255,0,0, x, y, w, h, 11);

View file

@ -48,15 +48,15 @@ namespace Greenshot.Forms
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.checkbox_dontaskagain = new System.Windows.Forms.CheckBox(); this.checkbox_dontaskagain = new GreenshotPlugin.Controls.GreenshotCheckBox();
this.checkboxAllowShrink = new System.Windows.Forms.CheckBox(); this.checkboxAllowShrink = new GreenshotPlugin.Controls.GreenshotCheckBox();
this.checkboxAllowEnlarge = new System.Windows.Forms.CheckBox(); this.checkboxAllowEnlarge = new GreenshotPlugin.Controls.GreenshotCheckBox();
this.checkboxAllowCenter = new System.Windows.Forms.CheckBox(); this.checkboxAllowCenter = new GreenshotPlugin.Controls.GreenshotCheckBox();
this.checkboxAllowRotate = new System.Windows.Forms.CheckBox(); this.checkboxAllowRotate = new GreenshotPlugin.Controls.GreenshotCheckBox();
this.button_ok = new System.Windows.Forms.Button(); this.button_ok = new GreenshotPlugin.Controls.GreenshotButton();
this.checkboxDateTime = new System.Windows.Forms.CheckBox(); this.checkboxDateTime = new GreenshotPlugin.Controls.GreenshotCheckBox();
this.button_cancel = new System.Windows.Forms.Button(); this.button_cancel = new GreenshotPlugin.Controls.GreenshotButton();
this.checkboxPrintInverted = new System.Windows.Forms.CheckBox(); this.checkboxPrintInverted = new GreenshotPlugin.Controls.GreenshotCheckBox();
this.SuspendLayout(); this.SuspendLayout();
// //
// checkbox_dontaskagain // checkbox_dontaskagain
@ -64,11 +64,12 @@ namespace Greenshot.Forms
this.checkbox_dontaskagain.AutoSize = true; this.checkbox_dontaskagain.AutoSize = true;
this.checkbox_dontaskagain.CheckAlign = System.Drawing.ContentAlignment.TopLeft; this.checkbox_dontaskagain.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkbox_dontaskagain.ImageAlign = 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.Location = new System.Drawing.Point(12, 152);
this.checkbox_dontaskagain.Name = "checkbox_dontaskagain"; 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.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.TextAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkbox_dontaskagain.UseVisualStyleBackColor = true; this.checkbox_dontaskagain.UseVisualStyleBackColor = true;
// //
@ -77,11 +78,13 @@ namespace Greenshot.Forms
this.checkboxAllowShrink.AutoSize = true; this.checkboxAllowShrink.AutoSize = true;
this.checkboxAllowShrink.CheckAlign = System.Drawing.ContentAlignment.TopLeft; this.checkboxAllowShrink.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxAllowShrink.ImageAlign = 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.Location = new System.Drawing.Point(12, 20);
this.checkboxAllowShrink.Name = "checkboxAllowShrink"; 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.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.TextAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxAllowShrink.UseVisualStyleBackColor = true; this.checkboxAllowShrink.UseVisualStyleBackColor = true;
// //
@ -90,11 +93,13 @@ namespace Greenshot.Forms
this.checkboxAllowEnlarge.AutoSize = true; this.checkboxAllowEnlarge.AutoSize = true;
this.checkboxAllowEnlarge.CheckAlign = System.Drawing.ContentAlignment.TopLeft; this.checkboxAllowEnlarge.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxAllowEnlarge.ImageAlign = 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.Location = new System.Drawing.Point(12, 43);
this.checkboxAllowEnlarge.Name = "checkboxAllowEnlarge"; 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.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.TextAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxAllowEnlarge.UseVisualStyleBackColor = true; this.checkboxAllowEnlarge.UseVisualStyleBackColor = true;
// //
@ -103,11 +108,13 @@ namespace Greenshot.Forms
this.checkboxAllowCenter.AutoSize = true; this.checkboxAllowCenter.AutoSize = true;
this.checkboxAllowCenter.CheckAlign = System.Drawing.ContentAlignment.TopLeft; this.checkboxAllowCenter.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxAllowCenter.ImageAlign = 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.Location = new System.Drawing.Point(12, 89);
this.checkboxAllowCenter.Name = "checkboxAllowCenter"; 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.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.TextAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxAllowCenter.UseVisualStyleBackColor = true; this.checkboxAllowCenter.UseVisualStyleBackColor = true;
// //
@ -116,11 +123,13 @@ namespace Greenshot.Forms
this.checkboxAllowRotate.AutoSize = true; this.checkboxAllowRotate.AutoSize = true;
this.checkboxAllowRotate.CheckAlign = System.Drawing.ContentAlignment.TopLeft; this.checkboxAllowRotate.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxAllowRotate.ImageAlign = 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.Location = new System.Drawing.Point(12, 66);
this.checkboxAllowRotate.Name = "checkboxAllowRotate"; 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.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.TextAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxAllowRotate.UseVisualStyleBackColor = true; this.checkboxAllowRotate.UseVisualStyleBackColor = true;
// //
@ -140,8 +149,10 @@ namespace Greenshot.Forms
this.checkboxDateTime.AutoSize = true; this.checkboxDateTime.AutoSize = true;
this.checkboxDateTime.CheckAlign = System.Drawing.ContentAlignment.TopLeft; this.checkboxDateTime.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxDateTime.ImageAlign = 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.Location = new System.Drawing.Point(12, 112);
this.checkboxDateTime.Name = "checkboxDateTime"; this.checkboxDateTime.Name = "checkboxDateTime";
this.checkboxDateTime.PropertyName = "OutputPrintFooter";
this.checkboxDateTime.Size = new System.Drawing.Size(187, 17); this.checkboxDateTime.Size = new System.Drawing.Size(187, 17);
this.checkboxDateTime.TabIndex = 26; this.checkboxDateTime.TabIndex = 26;
this.checkboxDateTime.Text = "Print date / time at bottom of page"; 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.Text = "Cancel";
this.button_cancel.UseVisualStyleBackColor = true; this.button_cancel.UseVisualStyleBackColor = true;
// //
// checkBox1 // checkboxPrintInverted
// //
this.checkboxPrintInverted.AutoSize = true; this.checkboxPrintInverted.AutoSize = true;
this.checkboxPrintInverted.CheckAlign = System.Drawing.ContentAlignment.TopLeft; this.checkboxPrintInverted.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxPrintInverted.ImageAlign = 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.Location = new System.Drawing.Point(12, 132);
this.checkboxPrintInverted.Name = "checkBox1"; this.checkboxPrintInverted.Name = "checkboxPrintInverted";
this.checkboxPrintInverted.Size = new System.Drawing.Size(88, 17); this.checkboxPrintInverted.PropertyName = "OutputPrintInverted";
this.checkboxPrintInverted.Size = new System.Drawing.Size(141, 17);
this.checkboxPrintInverted.TabIndex = 28; 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.TextAlign = System.Drawing.ContentAlignment.TopLeft;
this.checkboxPrintInverted.UseVisualStyleBackColor = true; this.checkboxPrintInverted.UseVisualStyleBackColor = true;
// //
@ -185,22 +198,24 @@ namespace Greenshot.Forms
this.Controls.Add(this.checkboxAllowRotate); this.Controls.Add(this.checkboxAllowRotate);
this.Controls.Add(this.checkboxAllowEnlarge); this.Controls.Add(this.checkboxAllowEnlarge);
this.Controls.Add(this.checkboxAllowShrink); this.Controls.Add(this.checkboxAllowShrink);
this.LanguageKey = "printoptions_title";
this.MaximizeBox = false; this.MaximizeBox = false;
this.MinimizeBox = false; this.MinimizeBox = false;
this.Name = "PrintOptionsDialog"; this.Name = "PrintOptionsDialog";
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.Text = "PrintOptionsDialog"; this.Text = "Greenshot print options";
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
} }
private System.Windows.Forms.CheckBox checkboxPrintInverted; private GreenshotPlugin.Controls.GreenshotCheckBox checkboxPrintInverted;
private System.Windows.Forms.Button button_cancel; private GreenshotPlugin.Controls.GreenshotButton button_cancel;
private System.Windows.Forms.CheckBox checkboxDateTime; private GreenshotPlugin.Controls.GreenshotCheckBox checkboxDateTime;
private System.Windows.Forms.Button button_ok; private GreenshotPlugin.Controls.GreenshotButton button_ok;
private System.Windows.Forms.CheckBox checkboxAllowRotate; private GreenshotPlugin.Controls.GreenshotCheckBox checkboxAllowRotate;
private System.Windows.Forms.CheckBox checkboxAllowCenter; private GreenshotPlugin.Controls.GreenshotCheckBox checkboxAllowCenter;
private System.Windows.Forms.CheckBox checkboxAllowEnlarge; private GreenshotPlugin.Controls.GreenshotCheckBox checkboxAllowEnlarge;
private System.Windows.Forms.CheckBox checkboxAllowShrink; private GreenshotPlugin.Controls.GreenshotCheckBox checkboxAllowShrink;
private System.Windows.Forms.CheckBox checkbox_dontaskagain; private GreenshotPlugin.Controls.GreenshotCheckBox checkbox_dontaskagain;
} }
} }

View file

@ -28,7 +28,7 @@ namespace Greenshot.Forms {
/// <summary> /// <summary>
/// Description of PrintOptionsDialog. /// Description of PrintOptionsDialog.
/// </summary> /// </summary>
public partial class PrintOptionsDialog : Form { public partial class PrintOptionsDialog : BaseForm {
private static CoreConfiguration conf = IniConfig.GetIniSection<CoreConfiguration>(); private static CoreConfiguration conf = IniConfig.GetIniSection<CoreConfiguration>();
public bool AllowPrintCenter; public bool AllowPrintCenter;
@ -44,46 +44,15 @@ namespace Greenshot.Forms {
// //
InitializeComponent(); InitializeComponent();
this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon(); 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; 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) { 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 // 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; conf.OutputPrintPromptOptions = !this.checkbox_dontaskagain.Checked;
IniConfig.Save(); IniConfig.Save();
DialogResult = DialogResult.OK;
} }
} }
} }

View file

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