mirror of
https://github.com/LorenzCK/OnTopReplica.git
synced 2024-06-03 19:14:36 +12:00
Improved panel localization outside of designer generated code.
This commit is contained in:
parent
42608bddc2
commit
818bc4c300
|
@ -7,7 +7,7 @@ using System.Text;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using OnTopReplica.Update;
|
using OnTopReplica.Update;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using VistaControls.TaskDialog;
|
using WindowsFormsAero.TaskDialog;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
||||||
namespace OnTopReplica.SidePanels {
|
namespace OnTopReplica.SidePanels {
|
||||||
|
@ -18,7 +18,10 @@ namespace OnTopReplica.SidePanels {
|
||||||
public AboutPanelContents() {
|
public AboutPanelContents() {
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
//Localized strings
|
LocalizePanel();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LocalizePanel() {
|
||||||
lblSlogan.Text = Strings.AboutSlogan;
|
lblSlogan.Text = Strings.AboutSlogan;
|
||||||
linkAuthor.Internationalize(Strings.AboutAuthor, Strings.AboutAuthorContent);
|
linkAuthor.Internationalize(Strings.AboutAuthor, Strings.AboutAuthorContent);
|
||||||
labeledDivider1.Text = Strings.AboutDividerUpdates;
|
labeledDivider1.Text = Strings.AboutDividerUpdates;
|
||||||
|
|
|
@ -8,6 +8,14 @@ namespace OnTopReplica.SidePanels {
|
||||||
partial class GroupSwitchPanel : SidePanel {
|
partial class GroupSwitchPanel : SidePanel {
|
||||||
public GroupSwitchPanel() {
|
public GroupSwitchPanel() {
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
|
LocalizePanel();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LocalizePanel() {
|
||||||
|
groupBox1.Text = Strings.GroupSwitchModeTitle;
|
||||||
|
buttonEnable.Text = Strings.GroupSwitchModeEnableButton;
|
||||||
|
buttonCancel.Text = Strings.GroupSwitchModeDisableButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string Title {
|
public override string Title {
|
||||||
|
|
14
OnTopReplica/SidePanels/OptionsPanel.Designer.cs
generated
14
OnTopReplica/SidePanels/OptionsPanel.Designer.cs
generated
|
@ -77,17 +77,17 @@
|
||||||
this.groupHotkeys.Size = new System.Drawing.Size(252, 113);
|
this.groupHotkeys.Size = new System.Drawing.Size(252, 113);
|
||||||
this.groupHotkeys.TabIndex = 1;
|
this.groupHotkeys.TabIndex = 1;
|
||||||
this.groupHotkeys.TabStop = false;
|
this.groupHotkeys.TabStop = false;
|
||||||
this.groupHotkeys.Text = Strings.SettingsHotKeyTitle;
|
this.groupHotkeys.Text = "Hot keys:";
|
||||||
//
|
//
|
||||||
// label1
|
// label1
|
||||||
//
|
//
|
||||||
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.label1.Location = new System.Drawing.Point(6, 68);
|
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.Size = new System.Drawing.Size(156, 43);
|
||||||
this.label1.TabIndex = 4;
|
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
|
// lblHotKeyShowHide
|
||||||
//
|
//
|
||||||
|
@ -96,7 +96,7 @@
|
||||||
this.lblHotKeyShowHide.Name = "lblHotKeyShowHide";
|
this.lblHotKeyShowHide.Name = "lblHotKeyShowHide";
|
||||||
this.lblHotKeyShowHide.Size = new System.Drawing.Size(78, 17);
|
this.lblHotKeyShowHide.Size = new System.Drawing.Size(78, 17);
|
||||||
this.lblHotKeyShowHide.TabIndex = 3;
|
this.lblHotKeyShowHide.TabIndex = 3;
|
||||||
this.lblHotKeyShowHide.Text = Strings.SettingsHotKeyShowHide;
|
this.lblHotKeyShowHide.Text = "Show/Hide";
|
||||||
//
|
//
|
||||||
// txtHotKeyShowHide
|
// txtHotKeyShowHide
|
||||||
//
|
//
|
||||||
|
@ -115,7 +115,7 @@
|
||||||
this.lblHotKeyClone.Name = "lblHotKeyClone";
|
this.lblHotKeyClone.Name = "lblHotKeyClone";
|
||||||
this.lblHotKeyClone.Size = new System.Drawing.Size(78, 29);
|
this.lblHotKeyClone.Size = new System.Drawing.Size(78, 29);
|
||||||
this.lblHotKeyClone.TabIndex = 1;
|
this.lblHotKeyClone.TabIndex = 1;
|
||||||
this.lblHotKeyClone.Text = Strings.SettingsHotKeyClone;
|
this.lblHotKeyClone.Text = "Clone current window";
|
||||||
//
|
//
|
||||||
// txtHotKeyClone
|
// txtHotKeyClone
|
||||||
//
|
//
|
||||||
|
@ -138,7 +138,7 @@
|
||||||
this.groupLanguage.Size = new System.Drawing.Size(252, 68);
|
this.groupLanguage.Size = new System.Drawing.Size(252, 68);
|
||||||
this.groupLanguage.TabIndex = 0;
|
this.groupLanguage.TabIndex = 0;
|
||||||
this.groupLanguage.TabStop = false;
|
this.groupLanguage.TabStop = false;
|
||||||
this.groupLanguage.Text = Strings.SettingsLanguageTitle;
|
this.groupLanguage.Text = "Language:";
|
||||||
//
|
//
|
||||||
// comboLanguage
|
// comboLanguage
|
||||||
//
|
//
|
||||||
|
@ -162,7 +162,7 @@
|
||||||
this.lblLanguage.Name = "lblLanguage";
|
this.lblLanguage.Name = "lblLanguage";
|
||||||
this.lblLanguage.Size = new System.Drawing.Size(240, 22);
|
this.lblLanguage.Size = new System.Drawing.Size(240, 22);
|
||||||
this.lblLanguage.TabIndex = 1;
|
this.lblLanguage.TabIndex = 1;
|
||||||
this.lblLanguage.Text = Strings.SettingsRestartRequired;
|
this.lblLanguage.Text = "Requires a restart.";
|
||||||
//
|
//
|
||||||
// OptionsPanel
|
// OptionsPanel
|
||||||
//
|
//
|
||||||
|
|
|
@ -13,6 +13,20 @@ namespace OnTopReplica.SidePanels {
|
||||||
|
|
||||||
public OptionsPanel() {
|
public OptionsPanel() {
|
||||||
InitializeComponent();
|
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) {
|
public override void OnFirstShown(MainForm form) {
|
||||||
|
|
12
OnTopReplica/SidePanels/RegionPanel.Designer.cs
generated
12
OnTopReplica/SidePanels/RegionPanel.Designer.cs
generated
|
@ -39,7 +39,7 @@
|
||||||
this.labelCurrentRegion = new System.Windows.Forms.Label();
|
this.labelCurrentRegion = new System.Windows.Forms.Label();
|
||||||
this.buttonDelete = new System.Windows.Forms.Button();
|
this.buttonDelete = new System.Windows.Forms.Button();
|
||||||
this.buttonSave = 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.toolTip = new System.Windows.Forms.ToolTip(this.components);
|
||||||
this.groupRegions.SuspendLayout();
|
this.groupRegions.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.numH)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.numH)).BeginInit();
|
||||||
|
@ -90,7 +90,7 @@
|
||||||
// numH
|
// numH
|
||||||
//
|
//
|
||||||
this.numH.Enabled = false;
|
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[] {
|
this.numH.Maximum = new decimal(new int[] {
|
||||||
100000,
|
100000,
|
||||||
0,
|
0,
|
||||||
|
@ -109,7 +109,7 @@
|
||||||
// numW
|
// numW
|
||||||
//
|
//
|
||||||
this.numW.Enabled = false;
|
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[] {
|
this.numW.Maximum = new decimal(new int[] {
|
||||||
100000,
|
100000,
|
||||||
0,
|
0,
|
||||||
|
@ -193,7 +193,7 @@
|
||||||
this.labelHeight.ForeColor = System.Drawing.SystemColors.ControlDark;
|
this.labelHeight.ForeColor = System.Drawing.SystemColors.ControlDark;
|
||||||
this.labelHeight.Location = new System.Drawing.Point(81, 96);
|
this.labelHeight.Location = new System.Drawing.Point(81, 96);
|
||||||
this.labelHeight.Name = "labelHeight";
|
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.TabIndex = 9;
|
||||||
this.labelHeight.Text = "Height";
|
this.labelHeight.Text = "Height";
|
||||||
this.labelHeight.TextAlign = System.Drawing.ContentAlignment.TopRight;
|
this.labelHeight.TextAlign = System.Drawing.ContentAlignment.TopRight;
|
||||||
|
@ -203,7 +203,7 @@
|
||||||
this.labelWidth.ForeColor = System.Drawing.SystemColors.ControlDark;
|
this.labelWidth.ForeColor = System.Drawing.SystemColors.ControlDark;
|
||||||
this.labelWidth.Location = new System.Drawing.Point(81, 70);
|
this.labelWidth.Location = new System.Drawing.Point(81, 70);
|
||||||
this.labelWidth.Name = "labelWidth";
|
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.TabIndex = 8;
|
||||||
this.labelWidth.Text = "Width";
|
this.labelWidth.Text = "Width";
|
||||||
this.labelWidth.TextAlign = System.Drawing.ContentAlignment.TopRight;
|
this.labelWidth.TextAlign = System.Drawing.ContentAlignment.TopRight;
|
||||||
|
@ -300,7 +300,7 @@
|
||||||
private System.Windows.Forms.GroupBox groupRegions;
|
private System.Windows.Forms.GroupBox groupRegions;
|
||||||
private System.Windows.Forms.Button buttonDelete;
|
private System.Windows.Forms.Button buttonDelete;
|
||||||
private System.Windows.Forms.Button buttonSave;
|
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 buttonDone;
|
||||||
private System.Windows.Forms.Button buttonReset;
|
private System.Windows.Forms.Button buttonReset;
|
||||||
private System.Windows.Forms.Label labelHeight;
|
private System.Windows.Forms.Label labelHeight;
|
||||||
|
|
|
@ -4,7 +4,7 @@ using System.IO;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Cache;
|
using System.Net.Cache;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using VistaControls.TaskDialog;
|
using WindowsFormsAero.TaskDialog;
|
||||||
|
|
||||||
namespace OnTopReplica.Update {
|
namespace OnTopReplica.Update {
|
||||||
|
|
||||||
|
@ -239,7 +239,7 @@ namespace OnTopReplica.Update {
|
||||||
if (_updateDialog == null)
|
if (_updateDialog == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_updateDialog.ProgressBarState = VistaControls.ProgressBar.States.Error;
|
_updateDialog.ProgressBarState = WindowsFormsAero.ProgressBar.States.Error;
|
||||||
_updateDialog.Content = msg;
|
_updateDialog.Content = msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue