From df2a6f5e7ac9d1ce435097b3ded1bc09217ff3dd Mon Sep 17 00:00:00 2001 From: "kenneth.skovhede@gmail.com" Date: Thu, 21 Oct 2010 16:28:45 +0000 Subject: [PATCH] Made "MainForm" localizable, so the menus can be translated as well. git-svn-id: https://duplicati.googlecode.com/svn/trunk@553 59da171f-624f-0410-aa54-27559c288bec --- Duplicati/GUI/MainForm.Designer.cs | 137 +++++++--------- Duplicati/GUI/MainForm.resx | 250 +++++++++++++++++++++++++++++ 2 files changed, 308 insertions(+), 79 deletions(-) diff --git a/Duplicati/GUI/MainForm.Designer.cs b/Duplicati/GUI/MainForm.Designer.cs index acc299893..ce097e6de 100644 --- a/Duplicati/GUI/MainForm.Designer.cs +++ b/Duplicati/GUI/MainForm.Designer.cs @@ -31,7 +31,6 @@ this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); this.TrayIcon = new System.Windows.Forms.NotifyIcon(this.components); - this.label1 = new System.Windows.Forms.Label(); this.TrayMenu = new System.Windows.Forms.ContextMenuStrip(this.components); this.statusToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.wizardToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -39,35 +38,27 @@ this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); this.controlToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.quitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); this.pauseToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.pausePeriodToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.stopToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.throttleOptionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.DelayDuration05Menu = new System.Windows.Forms.ToolStripMenuItem(); this.DelayDuration15Menu = new System.Windows.Forms.ToolStripMenuItem(); this.DelayDuration30Menu = new System.Windows.Forms.ToolStripMenuItem(); this.DelayDuration60Menu = new System.Windows.Forms.ToolStripMenuItem(); + this.stopToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.throttleOptionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); + this.quitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.label1 = new System.Windows.Forms.Label(); this.TrayMenu.SuspendLayout(); this.SuspendLayout(); // // TrayIcon // this.TrayIcon.ContextMenuStrip = this.TrayMenu; - this.TrayIcon.Icon = ((System.Drawing.Icon)(resources.GetObject("TrayIcon.Icon"))); + resources.ApplyResources(this.TrayIcon, "TrayIcon"); this.TrayIcon.MouseClick += new System.Windows.Forms.MouseEventHandler(this.TrayIcon_MouseClick); this.TrayIcon.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.TrayIcon_MouseDoubleClick); // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(8, 8); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(123, 13); - this.label1.TabIndex = 0; - this.label1.Text = "Duplicati dummy window"; - // // TrayMenu // this.TrayMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -80,42 +71,38 @@ this.toolStripSeparator3, this.quitToolStripMenuItem}); this.TrayMenu.Name = "TrayMenu"; - this.TrayMenu.Size = new System.Drawing.Size(126, 132); + resources.ApplyResources(this.TrayMenu, "TrayMenu"); // // statusToolStripMenuItem // - this.statusToolStripMenuItem.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + resources.ApplyResources(this.statusToolStripMenuItem, "statusToolStripMenuItem"); this.statusToolStripMenuItem.Image = global::Duplicati.GUI.Properties.Resources.StatusMenuIcon; this.statusToolStripMenuItem.Name = "statusToolStripMenuItem"; - this.statusToolStripMenuItem.Size = new System.Drawing.Size(125, 22); - this.statusToolStripMenuItem.Text = "Status"; this.statusToolStripMenuItem.Click += new System.EventHandler(this.statusToolStripMenuItem_Click); // // wizardToolStripMenuItem // this.wizardToolStripMenuItem.Image = global::Duplicati.GUI.Properties.Resources.WizardMenuIcon; this.wizardToolStripMenuItem.Name = "wizardToolStripMenuItem"; - this.wizardToolStripMenuItem.Size = new System.Drawing.Size(125, 22); - this.wizardToolStripMenuItem.Text = "Wizard..."; + resources.ApplyResources(this.wizardToolStripMenuItem, "wizardToolStripMenuItem"); this.wizardToolStripMenuItem.Click += new System.EventHandler(this.wizardToolStripMenuItem_Click); // // toolStripSeparator1 // this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new System.Drawing.Size(122, 6); + resources.ApplyResources(this.toolStripSeparator1, "toolStripSeparator1"); // // optionsToolStripMenuItem // this.optionsToolStripMenuItem.Image = global::Duplicati.GUI.Properties.Resources.SettingsMenuIcon; this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem"; - this.optionsToolStripMenuItem.Size = new System.Drawing.Size(125, 22); - this.optionsToolStripMenuItem.Text = "Options..."; + resources.ApplyResources(this.optionsToolStripMenuItem, "optionsToolStripMenuItem"); this.optionsToolStripMenuItem.Click += new System.EventHandler(this.optionsToolStripMenuItem_Click); // // toolStripSeparator2 // this.toolStripSeparator2.Name = "toolStripSeparator2"; - this.toolStripSeparator2.Size = new System.Drawing.Size(122, 6); + resources.ApplyResources(this.toolStripSeparator2, "toolStripSeparator2"); // // controlToolStripMenuItem // @@ -125,28 +112,13 @@ this.stopToolStripMenuItem, this.throttleOptionsToolStripMenuItem}); this.controlToolStripMenuItem.Name = "controlToolStripMenuItem"; - this.controlToolStripMenuItem.Size = new System.Drawing.Size(125, 22); - this.controlToolStripMenuItem.Text = "Control"; - // - // quitToolStripMenuItem - // - this.quitToolStripMenuItem.Image = global::Duplicati.GUI.Properties.Resources.CloseMenuIcon; - this.quitToolStripMenuItem.Name = "quitToolStripMenuItem"; - this.quitToolStripMenuItem.Size = new System.Drawing.Size(125, 22); - this.quitToolStripMenuItem.Text = "Quit"; - this.quitToolStripMenuItem.Click += new System.EventHandler(this.quitToolStripMenuItem_Click); - // - // toolStripSeparator3 - // - this.toolStripSeparator3.Name = "toolStripSeparator3"; - this.toolStripSeparator3.Size = new System.Drawing.Size(122, 6); + resources.ApplyResources(this.controlToolStripMenuItem, "controlToolStripMenuItem"); // // pauseToolStripMenuItem // this.pauseToolStripMenuItem.Image = global::Duplicati.GUI.Properties.Resources.Pause; this.pauseToolStripMenuItem.Name = "pauseToolStripMenuItem"; - this.pauseToolStripMenuItem.Size = new System.Drawing.Size(168, 22); - this.pauseToolStripMenuItem.Text = "Pause"; + resources.ApplyResources(this.pauseToolStripMenuItem, "pauseToolStripMenuItem"); this.pauseToolStripMenuItem.Click += new System.EventHandler(this.pauseToolStripMenuItem_Click); // // pausePeriodToolStripMenuItem @@ -157,69 +129,76 @@ this.DelayDuration30Menu, this.DelayDuration60Menu}); this.pausePeriodToolStripMenuItem.Name = "pausePeriodToolStripMenuItem"; - this.pausePeriodToolStripMenuItem.Size = new System.Drawing.Size(168, 22); - this.pausePeriodToolStripMenuItem.Text = "Pause period"; + resources.ApplyResources(this.pausePeriodToolStripMenuItem, "pausePeriodToolStripMenuItem"); + // + // DelayDuration05Menu + // + this.DelayDuration05Menu.Image = global::Duplicati.GUI.Properties.Resources.Clock05; + this.DelayDuration05Menu.Name = "DelayDuration05Menu"; + resources.ApplyResources(this.DelayDuration05Menu, "DelayDuration05Menu"); + this.DelayDuration05Menu.Tag = "5m"; + // + // DelayDuration15Menu + // + this.DelayDuration15Menu.Image = global::Duplicati.GUI.Properties.Resources.Clock15; + this.DelayDuration15Menu.Name = "DelayDuration15Menu"; + resources.ApplyResources(this.DelayDuration15Menu, "DelayDuration15Menu"); + this.DelayDuration15Menu.Tag = "15m"; + // + // DelayDuration30Menu + // + this.DelayDuration30Menu.Image = global::Duplicati.GUI.Properties.Resources.Clock30; + this.DelayDuration30Menu.Name = "DelayDuration30Menu"; + resources.ApplyResources(this.DelayDuration30Menu, "DelayDuration30Menu"); + this.DelayDuration30Menu.Tag = "30m"; + // + // DelayDuration60Menu + // + this.DelayDuration60Menu.Image = global::Duplicati.GUI.Properties.Resources.Clock60; + this.DelayDuration60Menu.Name = "DelayDuration60Menu"; + resources.ApplyResources(this.DelayDuration60Menu, "DelayDuration60Menu"); + this.DelayDuration60Menu.Tag = "1h"; + this.DelayDuration60Menu.Click += new System.EventHandler(this.DelayDurationMenu_Click); // // stopToolStripMenuItem // - this.stopToolStripMenuItem.Enabled = false; + resources.ApplyResources(this.stopToolStripMenuItem, "stopToolStripMenuItem"); this.stopToolStripMenuItem.Image = global::Duplicati.GUI.Properties.Resources.Stop; this.stopToolStripMenuItem.Name = "stopToolStripMenuItem"; - this.stopToolStripMenuItem.Size = new System.Drawing.Size(168, 22); - this.stopToolStripMenuItem.Text = "Stop"; this.stopToolStripMenuItem.Click += new System.EventHandler(this.stopToolStripMenuItem_Click); // // throttleOptionsToolStripMenuItem // this.throttleOptionsToolStripMenuItem.Image = global::Duplicati.GUI.Properties.Resources.Throttle; this.throttleOptionsToolStripMenuItem.Name = "throttleOptionsToolStripMenuItem"; - this.throttleOptionsToolStripMenuItem.Size = new System.Drawing.Size(168, 22); - this.throttleOptionsToolStripMenuItem.Text = "Throttle options..."; + resources.ApplyResources(this.throttleOptionsToolStripMenuItem, "throttleOptionsToolStripMenuItem"); this.throttleOptionsToolStripMenuItem.Click += new System.EventHandler(this.throttleOptionsToolStripMenuItem_Click); // - // DelayDuration05Menu + // toolStripSeparator3 // - this.DelayDuration05Menu.Image = global::Duplicati.GUI.Properties.Resources.Clock05; - this.DelayDuration05Menu.Name = "DelayDuration05Menu"; - this.DelayDuration05Menu.Size = new System.Drawing.Size(152, 22); - this.DelayDuration05Menu.Tag = "5m"; - this.DelayDuration05Menu.Text = "5 minutes"; + this.toolStripSeparator3.Name = "toolStripSeparator3"; + resources.ApplyResources(this.toolStripSeparator3, "toolStripSeparator3"); // - // DelayDuration15Menu + // quitToolStripMenuItem // - this.DelayDuration15Menu.Image = global::Duplicati.GUI.Properties.Resources.Clock15; - this.DelayDuration15Menu.Name = "DelayDuration15Menu"; - this.DelayDuration15Menu.Size = new System.Drawing.Size(152, 22); - this.DelayDuration15Menu.Tag = "15m"; - this.DelayDuration15Menu.Text = "15 minutes"; + this.quitToolStripMenuItem.Image = global::Duplicati.GUI.Properties.Resources.CloseMenuIcon; + this.quitToolStripMenuItem.Name = "quitToolStripMenuItem"; + resources.ApplyResources(this.quitToolStripMenuItem, "quitToolStripMenuItem"); + this.quitToolStripMenuItem.Click += new System.EventHandler(this.quitToolStripMenuItem_Click); // - // DelayDuration30Menu + // label1 // - this.DelayDuration30Menu.Image = global::Duplicati.GUI.Properties.Resources.Clock30; - this.DelayDuration30Menu.Name = "DelayDuration30Menu"; - this.DelayDuration30Menu.Size = new System.Drawing.Size(152, 22); - this.DelayDuration30Menu.Tag = "30m"; - this.DelayDuration30Menu.Text = "30 minutes"; - // - // DelayDuration60Menu - // - this.DelayDuration60Menu.Image = global::Duplicati.GUI.Properties.Resources.Clock60; - this.DelayDuration60Menu.Name = "DelayDuration60Menu"; - this.DelayDuration60Menu.Size = new System.Drawing.Size(152, 22); - this.DelayDuration60Menu.Tag = "1h"; - this.DelayDuration60Menu.Text = "1 hour"; - this.DelayDuration60Menu.Click += new System.EventHandler(this.DelayDurationMenu_Click); + resources.ApplyResources(this.label1, "label1"); + this.label1.Name = "label1"; // // MainForm // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + resources.ApplyResources(this, "$this"); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(143, 29); this.Controls.Add(this.label1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Name = "MainForm"; this.ShowInTaskbar = false; - this.Text = "Duplicati Control Window"; this.WindowState = System.Windows.Forms.FormWindowState.Minimized; this.Load += new System.EventHandler(this.MainForm_Load); this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing); diff --git a/Duplicati/GUI/MainForm.resx b/Duplicati/GUI/MainForm.resx index cb9a0f1f2..3e6a83a18 100644 --- a/Duplicati/GUI/MainForm.resx +++ b/Duplicati/GUI/MainForm.resx @@ -124,6 +124,109 @@ 115, 17 + + Segoe UI, 9pt, style=Bold + + + 125, 22 + + + Status + + + 125, 22 + + + Wizard... + + + 122, 6 + + + 125, 22 + + + Options... + + + 122, 6 + + + 168, 22 + + + Pause + + + 132, 22 + + + 5 minutes + + + 132, 22 + + + 15 minutes + + + 132, 22 + + + 30 minutes + + + 132, 22 + + + 1 hour + + + 168, 22 + + + Pause period + + + + False + + + 168, 22 + + + Stop + + + 168, 22 + + + Throttle options... + + + 125, 22 + + + Control + + + 122, 6 + + + 125, 22 + + + Quit + + + 126, 132 + + + TrayMenu + + + System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + AAABAAwAMDAQAAEABABoBgAAxgAAACAgEAABAAQA6AIAAC4HAAAYGBAAAQAEAOgBAAAWCgAAEBAQAAEA @@ -627,4 +730,151 @@ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAEAAA== + + True + + + 8, 8 + + + 123, 13 + + + 0 + + + Duplicati dummy window + + + label1 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + + + True + + + 6, 13 + + + 143, 29 + + + Duplicati Control Window + + + TrayIcon + + + System.Windows.Forms.NotifyIcon, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + statusToolStripMenuItem + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + wizardToolStripMenuItem + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + toolStripSeparator1 + + + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + optionsToolStripMenuItem + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + toolStripSeparator2 + + + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + controlToolStripMenuItem + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pauseToolStripMenuItem + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pausePeriodToolStripMenuItem + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + DelayDuration05Menu + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + DelayDuration15Menu + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + DelayDuration30Menu + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + DelayDuration60Menu + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + stopToolStripMenuItem + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + throttleOptionsToolStripMenuItem + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + toolStripSeparator3 + + + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + quitToolStripMenuItem + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + MainForm + + + System.Windows.Forms.Form, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file