Improved panel localization outside of designer generated code.

This commit is contained in:
Lorenz Cuno Klopfenstein 2011-06-07 01:02:24 +02:00
parent 42608bddc2
commit 818bc4c300
6 changed files with 42 additions and 17 deletions

View file

@ -7,7 +7,7 @@ using System.Text;
using System.Windows.Forms;
using OnTopReplica.Update;
using System.Diagnostics;
using VistaControls.TaskDialog;
using WindowsFormsAero.TaskDialog;
using System.IO;
namespace OnTopReplica.SidePanels {
@ -18,7 +18,10 @@ namespace OnTopReplica.SidePanels {
public AboutPanelContents() {
InitializeComponent();
//Localized strings
LocalizePanel();
}
private void LocalizePanel() {
lblSlogan.Text = Strings.AboutSlogan;
linkAuthor.Internationalize(Strings.AboutAuthor, Strings.AboutAuthorContent);
labeledDivider1.Text = Strings.AboutDividerUpdates;

View file

@ -8,6 +8,14 @@ namespace OnTopReplica.SidePanels {
partial class GroupSwitchPanel : SidePanel {
public GroupSwitchPanel() {
InitializeComponent();
LocalizePanel();
}
private void LocalizePanel() {
groupBox1.Text = Strings.GroupSwitchModeTitle;
buttonEnable.Text = Strings.GroupSwitchModeEnableButton;
buttonCancel.Text = Strings.GroupSwitchModeDisableButton;
}
public override string Title {

View file

@ -77,17 +77,17 @@
this.groupHotkeys.Size = new System.Drawing.Size(252, 113);
this.groupHotkeys.TabIndex = 1;
this.groupHotkeys.TabStop = false;
this.groupHotkeys.Text = Strings.SettingsHotKeyTitle;
this.groupHotkeys.Text = "Hot keys:";
//
// label1
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.label1.Location = new System.Drawing.Point(6, 68);
this.label1.Name = "lblHotkeyDescription";
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(156, 43);
this.label1.TabIndex = 4;
this.label1.Text = Strings.SettingsHotKeyDescription;
this.label1.Text = "These system-wide shortcuts can also be used when OnTopReplica is not in focus.";
//
// lblHotKeyShowHide
//
@ -96,7 +96,7 @@
this.lblHotKeyShowHide.Name = "lblHotKeyShowHide";
this.lblHotKeyShowHide.Size = new System.Drawing.Size(78, 17);
this.lblHotKeyShowHide.TabIndex = 3;
this.lblHotKeyShowHide.Text = Strings.SettingsHotKeyShowHide;
this.lblHotKeyShowHide.Text = "Show/Hide";
//
// txtHotKeyShowHide
//
@ -115,7 +115,7 @@
this.lblHotKeyClone.Name = "lblHotKeyClone";
this.lblHotKeyClone.Size = new System.Drawing.Size(78, 29);
this.lblHotKeyClone.TabIndex = 1;
this.lblHotKeyClone.Text = Strings.SettingsHotKeyClone;
this.lblHotKeyClone.Text = "Clone current window";
//
// txtHotKeyClone
//
@ -138,7 +138,7 @@
this.groupLanguage.Size = new System.Drawing.Size(252, 68);
this.groupLanguage.TabIndex = 0;
this.groupLanguage.TabStop = false;
this.groupLanguage.Text = Strings.SettingsLanguageTitle;
this.groupLanguage.Text = "Language:";
//
// comboLanguage
//
@ -162,7 +162,7 @@
this.lblLanguage.Name = "lblLanguage";
this.lblLanguage.Size = new System.Drawing.Size(240, 22);
this.lblLanguage.TabIndex = 1;
this.lblLanguage.Text = Strings.SettingsRestartRequired;
this.lblLanguage.Text = "Requires a restart.";
//
// OptionsPanel
//

View file

@ -13,6 +13,20 @@ namespace OnTopReplica.SidePanels {
public OptionsPanel() {
InitializeComponent();
LocalizePanel();
}
private void LocalizePanel() {
groupLanguage.Text = Strings.SettingsLanguageTitle;
lblLanguage.Text = Strings.SettingsRestartRequired;
groupHotkeys.Text = Strings.SettingsHotKeyTitle;
lblHotKeyShowHide.Text = Strings.SettingsHotKeyShowHide;
lblHotKeyClone.Text = Strings.SettingsHotKeyClone;
label1.Text = Strings.SettingsHotKeyDescription;
btnClose.Text = Strings.MenuClose;
}
public override void OnFirstShown(MainForm form) {

View file

@ -39,7 +39,7 @@
this.labelCurrentRegion = new System.Windows.Forms.Label();
this.buttonDelete = new System.Windows.Forms.Button();
this.buttonSave = new System.Windows.Forms.Button();
this.comboRegions = new VistaControls.ComboBox();
this.comboRegions = new WindowsFormsAero.ComboBox();
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
this.groupRegions.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numH)).BeginInit();
@ -90,7 +90,7 @@
// numH
//
this.numH.Enabled = false;
this.numH.Location = new System.Drawing.Point(140, 93);
this.numH.Location = new System.Drawing.Point(150, 93);
this.numH.Maximum = new decimal(new int[] {
100000,
0,
@ -109,7 +109,7 @@
// numW
//
this.numW.Enabled = false;
this.numW.Location = new System.Drawing.Point(140, 67);
this.numW.Location = new System.Drawing.Point(150, 67);
this.numW.Maximum = new decimal(new int[] {
100000,
0,
@ -193,7 +193,7 @@
this.labelHeight.ForeColor = System.Drawing.SystemColors.ControlDark;
this.labelHeight.Location = new System.Drawing.Point(81, 96);
this.labelHeight.Name = "labelHeight";
this.labelHeight.Size = new System.Drawing.Size(53, 17);
this.labelHeight.Size = new System.Drawing.Size(63, 17);
this.labelHeight.TabIndex = 9;
this.labelHeight.Text = "Height";
this.labelHeight.TextAlign = System.Drawing.ContentAlignment.TopRight;
@ -203,7 +203,7 @@
this.labelWidth.ForeColor = System.Drawing.SystemColors.ControlDark;
this.labelWidth.Location = new System.Drawing.Point(81, 70);
this.labelWidth.Name = "labelWidth";
this.labelWidth.Size = new System.Drawing.Size(53, 17);
this.labelWidth.Size = new System.Drawing.Size(63, 17);
this.labelWidth.TabIndex = 8;
this.labelWidth.Text = "Width";
this.labelWidth.TextAlign = System.Drawing.ContentAlignment.TopRight;
@ -300,7 +300,7 @@
private System.Windows.Forms.GroupBox groupRegions;
private System.Windows.Forms.Button buttonDelete;
private System.Windows.Forms.Button buttonSave;
private VistaControls.ComboBox comboRegions;
private WindowsFormsAero.ComboBox comboRegions;
private System.Windows.Forms.Button buttonDone;
private System.Windows.Forms.Button buttonReset;
private System.Windows.Forms.Label labelHeight;

View file

@ -4,7 +4,7 @@ using System.IO;
using System.Net;
using System.Net.Cache;
using System.Windows.Forms;
using VistaControls.TaskDialog;
using WindowsFormsAero.TaskDialog;
namespace OnTopReplica.Update {
@ -239,7 +239,7 @@ namespace OnTopReplica.Update {
if (_updateDialog == null)
return;
_updateDialog.ProgressBarState = VistaControls.ProgressBar.States.Error;
_updateDialog.ProgressBarState = WindowsFormsAero.ProgressBar.States.Error;
_updateDialog.Content = msg;
}