diff --git a/CapsLockIndicatorV3/AdvancedSettings.Designer.cs b/CapsLockIndicatorV3/AdvancedSettings.Designer.cs
index 48b4ad1..78ebf80 100644
--- a/CapsLockIndicatorV3/AdvancedSettings.Designer.cs
+++ b/CapsLockIndicatorV3/AdvancedSettings.Designer.cs
@@ -29,7 +29,6 @@ protected override void Dispose(bool disposing)
///
private void InitializeComponent()
{
- System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AdvancedSettings));
this.listView1 = new System.Windows.Forms.DarkModeListView();
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
@@ -122,7 +121,7 @@ private void InitializeComponent()
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 4;
- this.button1.Text = "&OK";
+ this.button1.Text = "value";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
@@ -131,11 +130,11 @@ private void InitializeComponent()
this.checkBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.checkBox1.AutoSize = true;
this.checkBox1.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.checkBox1.Location = new System.Drawing.Point(99, 106);
+ this.checkBox1.Location = new System.Drawing.Point(389, 106);
this.checkBox1.Name = "checkBox1";
- this.checkBox1.Size = new System.Drawing.Size(350, 20);
+ this.checkBox1.Size = new System.Drawing.Size(60, 20);
this.checkBox1.TabIndex = 3;
- this.checkBox1.Text = "I understand the above mentioned risks and wish to proceed";
+ this.checkBox1.Text = "value";
this.checkBox1.UseVisualStyleBackColor = true;
this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
//
@@ -148,7 +147,7 @@ private void InitializeComponent()
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(473, 68);
this.label3.TabIndex = 2;
- this.label3.Text = resources.GetString("label3.Text");
+ this.label3.Text = "value";
//
// label2
//
@@ -157,9 +156,9 @@ private void InitializeComponent()
this.label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(51)))), ((int)(((byte)(153)))));
this.label2.Location = new System.Drawing.Point(56, 9);
this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(74, 21);
+ this.label2.Size = new System.Drawing.Size(47, 21);
this.label2.TabIndex = 1;
- this.label2.Text = "Warning!";
+ this.label2.Text = "value";
//
// tableLayoutPanel1
//
@@ -240,7 +239,7 @@ private void InitializeComponent()
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
- this.Text = "Advanced Settings";
+ this.Text = "value";
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
diff --git a/CapsLockIndicatorV3/AdvancedSettings.cs b/CapsLockIndicatorV3/AdvancedSettings.cs
index 861138d..4528560 100644
--- a/CapsLockIndicatorV3/AdvancedSettings.cs
+++ b/CapsLockIndicatorV3/AdvancedSettings.cs
@@ -50,6 +50,12 @@ public AdvancedSettings()
}
pictureBox1.Image = IconExtractor.GetIcon("imageres.dll", 79, 48)?.ToBitmap();
+
+ Text = strings.advancedSettingsTitle;
+ label2.Text = strings.headerWarning;
+ label3.Text = strings.advancedSettingsWarning;
+ checkBox1.Text = strings.advancedSettingsConfirmation;
+ button1.Text = strings.ok;
}
private void ListView1_ItemActivate(object sender, EventArgs e)
diff --git a/CapsLockIndicatorV3/AdvancedSettings.resx b/CapsLockIndicatorV3/AdvancedSettings.resx
index 10f9972..1edb880 100644
--- a/CapsLockIndicatorV3/AdvancedSettings.resx
+++ b/CapsLockIndicatorV3/AdvancedSettings.resx
@@ -117,9 +117,6 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
- Changing advanced settings may cause unexpected behaviour and may lead to an unstable state of CapsLock Indicator. Please restart CapsLock Indicator after changing settings. Only change settings if you know what you are doing! Use this editor at your own risk!
-
17, 17
diff --git a/CapsLockIndicatorV3/BetterCheckBox.cs b/CapsLockIndicatorV3/BetterCheckBox.cs
index d2e6915..7f93394 100644
--- a/CapsLockIndicatorV3/BetterCheckBox.cs
+++ b/CapsLockIndicatorV3/BetterCheckBox.cs
@@ -25,9 +25,21 @@ public bool DarkMode
}
}
- const int STARTX = 16;
+ const int STARTX = 13;
+ int StartX => (int)(DPIHelper.GetScalingFactorPercent(Handle) * STARTX);
const int STARTY = 1;
+ private TextFormatFlags TextRenderingFlags
+ {
+ get
+ {
+ var flags = TextFormatFlags.Left | TextFormatFlags.VerticalCenter | TextFormatFlags.WordBreak;
+ if (!ShowKeyboardCues)
+ flags |= TextFormatFlags.HidePrefix;
+ return flags;
+ }
+ }
+
private static readonly Color N_Border = Color.FromArgb(137, 137, 137);
private static readonly Color N_Background = Color.FromArgb(0, 0, 0);
private static readonly Color N_Check = Color.FromArgb(222, 222, 222);
@@ -68,11 +80,12 @@ protected override void OnPaint(PaintEventArgs e)
if (!Enabled && FlatStyle != FlatStyle.System)
{
- e.Graphics.SetClip(new Rectangle(STARTX, 0, Width - STARTX, Height));
+ var bounds = new Rectangle(StartX, 0, Width - StartX, Height);
+ e.Graphics.SetClip(bounds);
e.Graphics.Clear(bgColor);
e.Graphics.ResetClip();
// Use legacy "DrawText" to make it look exactly the same as default
- TextRenderer.DrawText(e.Graphics, Text, Font, new Point(STARTX, STARTY), ForeColor.Blend(bgColor, 0.5d));
+ TextRenderer.DrawText(e.Graphics, base.Text, base.Font, bounds, base.ForeColor.Blend(bgColor, 0.5d), TextRenderingFlags);
}
}
else
@@ -153,7 +166,7 @@ protected override void OnPaint(PaintEventArgs e)
var textY = Height / 2 - textSz.Height / 2;
var textPt = new Point(boxSize + textMargin, textY);
- TextRenderer.DrawText(e.Graphics, Text, Font, textPt, fg);
+ TextRenderer.DrawText(e.Graphics, Text, Font, new Rectangle(StartX, 0, Width - StartX, Height), fg, TextRenderingFlags);
var focusRect = new Rectangle(textPt, textSz);
diff --git a/CapsLockIndicatorV3/BetterTabControl.cs b/CapsLockIndicatorV3/BetterTabControl.cs
index 1c024fd..b72b492 100644
--- a/CapsLockIndicatorV3/BetterTabControl.cs
+++ b/CapsLockIndicatorV3/BetterTabControl.cs
@@ -80,9 +80,9 @@ public BetterTabControl()
SetStyles();
- this.ControlAdded += new ControlEventHandler(FlatTabControl_ControlAdded);
- this.ControlRemoved += new ControlEventHandler(FlatTabControl_ControlRemoved);
- this.SelectedIndexChanged += new EventHandler(FlatTabControl_SelectedIndexChanged);
+ ControlAdded += new ControlEventHandler(FlatTabControl_ControlAdded);
+ ControlRemoved += new ControlEventHandler(FlatTabControl_ControlRemoved);
+ SelectedIndexChanged += new EventHandler(FlatTabControl_SelectedIndexChanged);
leftRightImages = new ImageList();
leftRightImages.ImageSize = new Size(16, 16); // default
@@ -141,76 +141,75 @@ internal void DrawControl(Graphics g)
if (!Visible)
return;
- Rectangle TabControlArea = this.ClientRectangle;
- Rectangle TabArea = this.DisplayRectangle;
+ Rectangle TabControlArea = ClientRectangle;
+ Rectangle TabArea = DisplayRectangle;
//----------------------------
// fill client area
- Brush br = new SolidBrush(mBackColor); //(SystemColors.Control); UPDATED
- g.FillRectangle(br, TabControlArea);
- br.Dispose();
+ using (Brush br = new SolidBrush(mBackColor))
+ g.FillRectangle(br, TabControlArea);
//----------------------------
//----------------------------
// draw border
int nDelta = SystemInformation.Border3DSize.Width;
- Pen border = new Pen(SystemColors.ControlDark);
TabArea.Inflate(nDelta, nDelta);
- g.DrawRectangle(border, TabArea);
- border.Dispose();
+ using (Pen border = new Pen(SystemColors.ControlDark))
+ g.DrawRectangle(border, TabArea);
//----------------------------
//----------------------------
// clip region for drawing tabs
- Region rsaved = g.Clip;
- Rectangle rreg;
-
- int nWidth = TabArea.Width + nMargin;
- if (bUpDown)
+ using (Region rsaved = g.Clip)
{
- // exclude updown control for painting
- if (scUpDown?.Handle != null && Native.IsWindowVisible(scUpDown.Handle))
+ Rectangle rreg;
+
+ int nWidth = TabArea.Width + nMargin;
+ if (bUpDown)
{
- Rectangle rupdown = new Rectangle();
- Native.GetWindowRect(scUpDown.Handle, ref rupdown);
- Rectangle rupdown2 = this.RectangleToClient(rupdown);
+ // exclude updown control for painting
+ if (scUpDown?.Handle != null && Native.IsWindowVisible(scUpDown.Handle))
+ {
+ Rectangle rupdown = new Rectangle();
+ Native.GetWindowRect(scUpDown.Handle, ref rupdown);
+ Rectangle rupdown2 = RectangleToClient(rupdown);
- nWidth = rupdown2.X;
+ nWidth = rupdown2.X;
+ }
}
- }
- rreg = new Rectangle(TabArea.Left, TabControlArea.Top, nWidth - nMargin, TabControlArea.Height);
+ rreg = new Rectangle(TabArea.Left, TabControlArea.Top, nWidth - nMargin, TabControlArea.Height);
- g.SetClip(rreg);
+ g.SetClip(rreg);
- // draw tabs
- for (int i = 0; i < this.TabCount; i++)
- DrawTab(g, this.TabPages[i], i);
+ // draw tabs
+ for (int i = 0; i < TabCount; i++)
+ DrawTab(g, TabPages[i], i);
- g.Clip = rsaved;
+ g.Clip = rsaved;
+ }
//----------------------------
//----------------------------
// draw background to cover flat border areas
- if (this.SelectedTab != null)
+ if (SelectedTab != null)
{
- TabPage tabPage = this.SelectedTab;
+ TabPage tabPage = SelectedTab;
Color color = tabPage.BackColor;
- border = new Pen(color);
-
- TabArea.Offset(1, 1);
- TabArea.Width -= 2;
- TabArea.Height -= 2;
-
- g.DrawRectangle(border, TabArea);
- TabArea.Width -= 1;
- TabArea.Height -= 1;
- g.DrawRectangle(border, TabArea);
-
- border.Dispose();
+ using (Pen border = new Pen(color))
+ {
+ TabArea.Offset(1, 1);
+ TabArea.Width -= 2;
+ TabArea.Height -= 2;
+
+ g.DrawRectangle(border, TabArea);
+ TabArea.Width -= 1;
+ TabArea.Height -= 1;
+ g.DrawRectangle(border, TabArea);
+ }
}
//----------------------------
}
@@ -221,9 +220,9 @@ internal void DrawTab(Graphics g, TabPage tabPage, int nIndex)
Rectangle recBounds = tr;
recBounds.Y -= 2;
recBounds.Height += 2;
- RectangleF tabTextArea = (RectangleF)recBounds;
+ RectangleF tabTextArea = recBounds;
- bool bSelected = (this.SelectedIndex == nIndex);
+ bool bSelected = (SelectedIndex == nIndex);
var state = new Native.DRAWITEMSTRUCT();
state.itemID = nIndex;
@@ -248,14 +247,13 @@ internal void DrawTab(Graphics g, TabPage tabPage, int nIndex)
recBounds.Width,
recBounds.Height - 2
);
- tabTextArea = (RectangleF)recBounds;
+ tabTextArea = recBounds;
}
//----------------------------
// fill this tab with background color
- Brush br = new SolidBrush(hoveredTab == nIndex && !bSelected ? Color.FromArgb(35, 66, 89) : tabPage.BackColor);
- g.FillRectangle(br, recBounds);
- br.Dispose();
+ using (Brush br = new SolidBrush(hoveredTab == nIndex && !bSelected ? Color.FromArgb(35, 66, 89) : tabPage.BackColor))
+ g.FillRectangle(br, recBounds);
//----------------------------
//----------------------------
@@ -266,23 +264,24 @@ internal void DrawTab(Graphics g, TabPage tabPage, int nIndex)
{
//----------------------------
// clear bottom lines
- Pen pen = new Pen(tabPage.BackColor);
-
- switch (this.Alignment)
+ using (Pen pen = new Pen(tabPage.BackColor))
{
- case TabAlignment.Top:
- g.DrawLine(pen, recBounds.Left + 1, recBounds.Bottom, recBounds.Right - 1, recBounds.Bottom);
- g.DrawLine(pen, recBounds.Left + 1, recBounds.Bottom + 1, recBounds.Right - 1, recBounds.Bottom + 1);
- break;
-
- case TabAlignment.Bottom:
- g.DrawLine(pen, recBounds.Left + 1, recBounds.Top, recBounds.Right - 1, recBounds.Top);
- g.DrawLine(pen, recBounds.Left + 1, recBounds.Top - 1, recBounds.Right - 1, recBounds.Top - 1);
- g.DrawLine(pen, recBounds.Left + 1, recBounds.Top - 2, recBounds.Right - 1, recBounds.Top - 2);
- break;
- }
- pen.Dispose();
+ switch (Alignment)
+ {
+ case TabAlignment.Top:
+ g.DrawLine(pen, recBounds.Left + 1, recBounds.Bottom, recBounds.Right - 1, recBounds.Bottom);
+ g.DrawLine(pen, recBounds.Left + 1, recBounds.Bottom + 1, recBounds.Right - 1, recBounds.Bottom + 1);
+ break;
+
+ case TabAlignment.Bottom:
+ g.DrawLine(pen, recBounds.Left + 1, recBounds.Top, recBounds.Right - 1, recBounds.Top);
+ g.DrawLine(pen, recBounds.Left + 1, recBounds.Top - 1, recBounds.Right - 1, recBounds.Top - 1);
+ g.DrawLine(pen, recBounds.Left + 1, recBounds.Top - 2, recBounds.Right - 1, recBounds.Top - 2);
+ break;
+ }
+
+ }
//----------------------------
}
//----------------------------
@@ -299,7 +298,7 @@ internal void DrawTab(Graphics g, TabPage tabPage, int nIndex)
Rectangle rimage = new Rectangle(recBounds.X + nLeftMargin, recBounds.Y + 1, img.Width, img.Height);
// adjust rectangles
- float nAdj = (float)(nLeftMargin + img.Width + nRightMargin);
+ float nAdj = nLeftMargin + img.Width + nRightMargin;
rimage.Y += (recBounds.Height - img.Height) / 2;
tabTextArea.X += nAdj;
@@ -312,13 +311,15 @@ internal void DrawTab(Graphics g, TabPage tabPage, int nIndex)
//----------------------------
// draw string
- StringFormat stringFormat = new StringFormat();
- stringFormat.Alignment = StringAlignment.Center;
- stringFormat.LineAlignment = StringAlignment.Center;
-
- br = new SolidBrush(tabPage.ForeColor);
+ using (StringFormat stringFormat = new StringFormat())
+ {
+ stringFormat.Alignment = StringAlignment.Center;
+ stringFormat.LineAlignment = StringAlignment.Center;
+ stringFormat.FormatFlags |= StringFormatFlags.NoWrap;
- g.DrawString(tabPage.Text, Font, br, tabTextArea, stringFormat);
+ using (Brush br = new SolidBrush(tabPage.ForeColor))
+ g.DrawString(tabPage.Text, Font, br, tabTextArea, stringFormat);
+ }
//----------------------------
if (bSelected && !((DrawItemState)state.itemState).HasFlag(DrawItemState.NoFocusRect))
@@ -353,7 +354,7 @@ internal void DrawIcons(Graphics g)
//----------------------------
// calc positions
- Rectangle TabControlArea = this.ClientRectangle;
+ Rectangle TabControlArea = ClientRectangle;
Rectangle r0 = new Rectangle();
Native.GetClientRect(scUpDown.Handle, ref r0);
@@ -381,7 +382,7 @@ internal void DrawIcons(Graphics g)
Image img = leftRightImages.Images[1];
if (img != null)
{
- if (this.TabCount > 0)
+ if (TabCount > 0)
{
Rectangle r3 = GetTabRectDPI(0);
if (r3.Left < TabControlArea.Left)
@@ -398,9 +399,9 @@ internal void DrawIcons(Graphics g)
img = leftRightImages.Images[0];
if (img != null)
{
- if (this.TabCount > 0)
+ if (TabCount > 0)
{
- Rectangle r3 = GetTabRectDPI(this.TabCount - 1);
+ Rectangle r3 = GetTabRectDPI(TabCount - 1);
if (r3.Right > (TabControlArea.Width - r0.Width))
g.DrawImage(img, r2);
else
@@ -419,7 +420,27 @@ protected override void OnCreateControl()
base.OnCreateControl();
FindUpDown();
- ItemSize = new Size(ItemSize.Width, (int)(24 * DPIHelper.GetScalingFactorPercent(Handle)));
+
+ UpdateItemSize();
+ }
+
+ public void UpdateItemSize()
+ {
+ const int H_PAD = 4;
+
+ var scale = DPIHelper.GetScalingFactorPercent(Handle);
+
+ int w = 0;
+ foreach (var tabText in TabPages.OfType().Select(p => p.Text).Where(p => p.Length > 0))
+ w = Math.Max(w, TextRenderer.MeasureText(tabText, Font).Width);
+
+ if (w < 1)
+ return;
+
+ w += H_PAD * 2;
+
+ ItemSize = new Size(w, (int)(24 * scale));
+ SizeMode = TabSizeMode.Fixed;
}
private void FlatTabControl_ControlAdded(object sender, ControlEventArgs e)
@@ -485,7 +506,7 @@ private void FindUpDown()
bool bFound = false;
// find the UpDown control
- IntPtr pWnd = Native.GetWindow(this.Handle, Native.GW_CHILD);
+ IntPtr pWnd = Native.GetWindow(Handle, Native.GW_CHILD);
while (pWnd != IntPtr.Zero)
{
@@ -506,8 +527,8 @@ private void FindUpDown()
{
//----------------------------
// Subclass it
- this.scUpDown = new SubClass(pWnd, true);
- this.scUpDown.SubClassedWndProc += new SubClass.SubClassWndProcEventHandler(scUpDown_SubClassedWndProc);
+ scUpDown = new SubClass(pWnd, true);
+ scUpDown.SubClassedWndProc += new SubClass.SubClassWndProcEventHandler(scUpDown_SubClassedWndProc);
//----------------------------
bUpDown = true;
@@ -550,11 +571,8 @@ private int scUpDown_SubClassedWndProc(ref Message m)
//------------------------
// redraw
IntPtr hDC = Native.GetWindowDC(scUpDown.Handle);
- Graphics g = Graphics.FromHdc(hDC);
-
- DrawIcons(g);
-
- g.Dispose();
+ using (Graphics g = Graphics.FromHdc(hDC))
+ DrawIcons(g);
Native.ReleaseDC(scUpDown.Handle, hDC);
//------------------------
@@ -624,7 +642,7 @@ private void InitializeComponent()
public Color MyBackColor
{
get { return mBackColor; }
- set { mBackColor = value; this.Invalidate(); }
+ set { mBackColor = value; Invalidate(); }
}
#endregion
diff --git a/CapsLockIndicatorV3/CapsLockIndicatorV3.csproj b/CapsLockIndicatorV3/CapsLockIndicatorV3.csproj
index 95c6b05..ab2d3e4 100644
--- a/CapsLockIndicatorV3/CapsLockIndicatorV3.csproj
+++ b/CapsLockIndicatorV3/CapsLockIndicatorV3.csproj
@@ -108,6 +108,7 @@
Component
+
Form
@@ -145,6 +146,18 @@
IndicatorOverlay.cs
+
+ Form
+
+
+ LanguageDownloadProgressForm.cs
+
+
+ UserControl
+
+
+ LanguageProgressRow.cs
+
Component
@@ -308,6 +321,12 @@
IndicatorOverlay.cs
+
+ LanguageDownloadProgressForm.cs
+
+
+ LanguageProgressRow.cs
+
MainForm.cs
diff --git a/CapsLockIndicatorV3/DllInfo.cs b/CapsLockIndicatorV3/DllInfo.cs
new file mode 100644
index 0000000..790be35
--- /dev/null
+++ b/CapsLockIndicatorV3/DllInfo.cs
@@ -0,0 +1,19 @@
+using System;
+
+namespace CapsLockIndicatorV3
+{
+ public struct DllInfo
+ {
+ public string Filepath;
+ public string SHA1;
+ public Version Version;
+
+ public override string ToString()
+ {
+ return "DllInfo{"
+ + "Filepath=" + Filepath + ";"
+ + "SHA1=" + SHA1 + ";"
+ + "Version=" + Version.ToString() + "}";
+ }
+ }
+}
diff --git a/CapsLockIndicatorV3/DownloadDialog.cs b/CapsLockIndicatorV3/DownloadDialog.cs
index 5bd29be..d55247e 100644
--- a/CapsLockIndicatorV3/DownloadDialog.cs
+++ b/CapsLockIndicatorV3/DownloadDialog.cs
@@ -6,6 +6,7 @@
using System.IO;
using System.Linq;
using System.Net;
+using System.Reflection;
using System.Threading;
using System.Windows.Forms;
@@ -13,6 +14,8 @@ namespace CapsLockIndicatorV3
{
public partial class DownloadDialog : DarkModeForm
{
+ public const string BAK_NAME = "~CapsLockIndicator.previousVersion.bak";
+
Stopwatch sw = new Stopwatch();
#if !DEBUG
WebClient Client;
@@ -126,23 +129,38 @@ private void button2_Click(object sender, EventArgs e)
private void restartButton_Click(object sender, EventArgs e)
{
#if !DEBUG
- bool runAtStarup = Registry.GetValue(@"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "CapsLock Indicator", null) != null;
-
- if (runAtStarup)
+ if (SettingsManager.Get("dontOverwriteApplicationOnUpdate"))
{
- RegistryKey rk = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run", true);
- rk.SetValue("CapsLock Indicator", newPath);
- }
+ bool runAtStarup = Registry.GetValue(@"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "CapsLock Indicator", null) != null;
+
+ if (runAtStarup)
+ {
+ RegistryKey rk = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run", true);
+ rk.SetValue("CapsLock Indicator", newPath);
+ }
- MainForm mainForm = Application.OpenForms.OfType().First();
+ MainForm mainForm = Application.OpenForms.OfType().First();
- mainForm.askCancel = false;
- Program.ReleaseMutex();
+ mainForm.askCancel = false;
+ Program.ReleaseMutex();
- Thread.Sleep(100);
+ Thread.Sleep(100);
- Process.Start(newPath);
- Application.Exit();
+ Process.Start(newPath);
+ Application.Exit();
+ }
+ else
+ {
+ var currExe = Assembly.GetExecutingAssembly().Location;
+ var currDir = Path.GetDirectoryName(currExe);
+ var bakFile = Path.Combine(currDir, BAK_NAME);
+ if (File.Exists(bakFile))
+ File.Delete(bakFile);
+ File.Move(currExe, BAK_NAME);
+ File.Move(newPath, currExe);
+
+ Program.Restart();
+ }
#endif
}
}
diff --git a/CapsLockIndicatorV3/FirstRunDialog.Designer.cs b/CapsLockIndicatorV3/FirstRunDialog.Designer.cs
index 3e6297f..9ee3a37 100644
--- a/CapsLockIndicatorV3/FirstRunDialog.Designer.cs
+++ b/CapsLockIndicatorV3/FirstRunDialog.Designer.cs
@@ -34,8 +34,7 @@ private void InitializeComponent()
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.lnkLabel2 = new CapsLockIndicatorV3.LnkLabel();
this.messageLabel = new System.Windows.Forms.Label();
- this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
- this.allowUpdatesCheckBox = new System.Windows.Forms.CheckBox();
+ this.allowUpdatesCheckBox = new CapsLockIndicatorV3.BetterCheckBox();
this.lnkLabel1 = new CapsLockIndicatorV3.LnkLabel();
this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel();
this.exitButton = new System.Windows.Forms.Button();
@@ -44,7 +43,6 @@ private void InitializeComponent()
this.lightButton = new System.Windows.Forms.Button();
this.darkButton = new System.Windows.Forms.Button();
this.tableLayoutPanel1.SuspendLayout();
- this.flowLayoutPanel1.SuspendLayout();
this.flowLayoutPanel2.SuspendLayout();
this.SuspendLayout();
//
@@ -63,28 +61,33 @@ private void InitializeComponent()
//
// tableLayoutPanel1
//
+ this.tableLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.tableLayoutPanel1.ColumnCount = 2;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
- this.tableLayoutPanel1.Controls.Add(this.lnkLabel2, 0, 5);
+ this.tableLayoutPanel1.Controls.Add(this.lnkLabel1, 0, 5);
+ this.tableLayoutPanel1.Controls.Add(this.allowUpdatesCheckBox, 0, 4);
+ this.tableLayoutPanel1.Controls.Add(this.lnkLabel2, 0, 8);
this.tableLayoutPanel1.Controls.Add(this.headerLabel, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.messageLabel, 0, 1);
- this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel1, 0, 4);
- this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel2, 1, 5);
+ this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel2, 1, 8);
this.tableLayoutPanel1.Controls.Add(this.themeLabel, 0, 2);
this.tableLayoutPanel1.Controls.Add(this.lightButton, 0, 3);
this.tableLayoutPanel1.Controls.Add(this.darkButton, 1, 3);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(9, 9);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
- this.tableLayoutPanel1.RowCount = 6;
+ this.tableLayoutPanel1.RowCount = 9;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 48F));
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 9F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
- this.tableLayoutPanel1.Size = new System.Drawing.Size(331, 319);
+ this.tableLayoutPanel1.Size = new System.Drawing.Size(357, 338);
this.tableLayoutPanel1.TabIndex = 1;
//
// lnkLabel2
@@ -92,7 +95,7 @@ private void InitializeComponent()
this.lnkLabel2.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lnkLabel2.AutoSize = true;
this.lnkLabel2.LinkColor = System.Drawing.SystemColors.HotTrack;
- this.lnkLabel2.Location = new System.Drawing.Point(0, 297);
+ this.lnkLabel2.Location = new System.Drawing.Point(0, 316);
this.lnkLabel2.Margin = new System.Windows.Forms.Padding(0);
this.lnkLabel2.Name = "lnkLabel2";
this.lnkLabel2.Size = new System.Drawing.Size(64, 15);
@@ -109,44 +112,33 @@ private void InitializeComponent()
this.messageLabel.Location = new System.Drawing.Point(0, 30);
this.messageLabel.Margin = new System.Windows.Forms.Padding(0);
this.messageLabel.Name = "messageLabel";
- this.messageLabel.Size = new System.Drawing.Size(331, 75);
+ this.messageLabel.Size = new System.Drawing.Size(357, 75);
this.messageLabel.TabIndex = 1;
this.messageLabel.Text = resources.GetString("messageLabel.Text");
//
- // flowLayoutPanel1
- //
- this.tableLayoutPanel1.SetColumnSpan(this.flowLayoutPanel1, 2);
- this.flowLayoutPanel1.Controls.Add(this.allowUpdatesCheckBox);
- this.flowLayoutPanel1.Controls.Add(this.lnkLabel1);
- this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
- this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 182);
- this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(0, 6, 0, 0);
- this.flowLayoutPanel1.Name = "flowLayoutPanel1";
- this.flowLayoutPanel1.Size = new System.Drawing.Size(331, 108);
- this.flowLayoutPanel1.TabIndex = 3;
- //
// allowUpdatesCheckBox
//
this.allowUpdatesCheckBox.Checked = true;
this.allowUpdatesCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
+ this.tableLayoutPanel1.SetColumnSpan(this.allowUpdatesCheckBox, 2);
+ this.allowUpdatesCheckBox.Dock = System.Windows.Forms.DockStyle.Top;
this.allowUpdatesCheckBox.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.allowUpdatesCheckBox.Location = new System.Drawing.Point(0, 0);
+ this.allowUpdatesCheckBox.Location = new System.Drawing.Point(0, 176);
this.allowUpdatesCheckBox.Margin = new System.Windows.Forms.Padding(0);
this.allowUpdatesCheckBox.Name = "allowUpdatesCheckBox";
- this.allowUpdatesCheckBox.Size = new System.Drawing.Size(312, 38);
+ this.allowUpdatesCheckBox.Size = new System.Drawing.Size(357, 57);
this.allowUpdatesCheckBox.TabIndex = 0;
this.allowUpdatesCheckBox.Text = "Allow CapsLock Indicator to periodically check for updates online (can be changed" +
" later)";
- this.allowUpdatesCheckBox.UseCompatibleTextRendering = true;
- this.allowUpdatesCheckBox.UseVisualStyleBackColor = true;
+ this.allowUpdatesCheckBox.UseVisualStyleBackColor = false;
this.allowUpdatesCheckBox.CheckedChanged += new System.EventHandler(this.allowUpdatesCheckBox_CheckedChanged);
//
// lnkLabel1
//
this.lnkLabel1.AutoSize = true;
+ this.tableLayoutPanel1.SetColumnSpan(this.lnkLabel1, 2);
this.lnkLabel1.LinkColor = System.Drawing.SystemColors.HotTrack;
- this.lnkLabel1.Location = new System.Drawing.Point(13, 38);
+ this.lnkLabel1.Location = new System.Drawing.Point(13, 233);
this.lnkLabel1.Margin = new System.Windows.Forms.Padding(13, 0, 0, 0);
this.lnkLabel1.Name = "lnkLabel1";
this.lnkLabel1.Size = new System.Drawing.Size(168, 15);
@@ -161,7 +153,7 @@ private void InitializeComponent()
this.flowLayoutPanel2.AutoSize = true;
this.flowLayoutPanel2.Controls.Add(this.exitButton);
this.flowLayoutPanel2.Controls.Add(this.okButton);
- this.flowLayoutPanel2.Location = new System.Drawing.Point(172, 290);
+ this.flowLayoutPanel2.Location = new System.Drawing.Point(198, 309);
this.flowLayoutPanel2.Margin = new System.Windows.Forms.Padding(0);
this.flowLayoutPanel2.Name = "flowLayoutPanel2";
this.flowLayoutPanel2.Size = new System.Drawing.Size(159, 29);
@@ -212,7 +204,7 @@ private void InitializeComponent()
this.lightButton.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.lightButton.Location = new System.Drawing.Point(3, 131);
this.lightButton.Name = "lightButton";
- this.lightButton.Size = new System.Drawing.Size(159, 42);
+ this.lightButton.Size = new System.Drawing.Size(172, 42);
this.lightButton.TabIndex = 6;
this.lightButton.Text = "Light";
this.lightButton.UseVisualStyleBackColor = true;
@@ -222,9 +214,9 @@ private void InitializeComponent()
//
this.darkButton.Dock = System.Windows.Forms.DockStyle.Fill;
this.darkButton.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.darkButton.Location = new System.Drawing.Point(168, 131);
+ this.darkButton.Location = new System.Drawing.Point(181, 131);
this.darkButton.Name = "darkButton";
- this.darkButton.Size = new System.Drawing.Size(160, 42);
+ this.darkButton.Size = new System.Drawing.Size(173, 42);
this.darkButton.TabIndex = 7;
this.darkButton.Text = "Dark";
this.darkButton.UseVisualStyleBackColor = true;
@@ -235,9 +227,10 @@ private void InitializeComponent()
this.AcceptButton = this.okButton;
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
+ this.AutoSize = true;
this.BackColor = System.Drawing.SystemColors.Window;
this.CancelButton = this.exitButton;
- this.ClientSize = new System.Drawing.Size(349, 337);
+ this.ClientSize = new System.Drawing.Size(375, 356);
this.ControlBox = false;
this.Controls.Add(this.tableLayoutPanel1);
this.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
@@ -247,12 +240,11 @@ private void InitializeComponent()
this.MinimizeBox = false;
this.Name = "FirstRunDialog";
this.Padding = new System.Windows.Forms.Padding(9);
+ this.ShowIcon = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "CapsLock Indicator";
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
- this.flowLayoutPanel1.ResumeLayout(false);
- this.flowLayoutPanel1.PerformLayout();
this.flowLayoutPanel2.ResumeLayout(false);
this.ResumeLayout(false);
@@ -264,8 +256,7 @@ private void InitializeComponent()
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Label messageLabel;
private System.Windows.Forms.Button okButton;
- private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
- private System.Windows.Forms.CheckBox allowUpdatesCheckBox;
+ private BetterCheckBox allowUpdatesCheckBox;
private LnkLabel lnkLabel1;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2;
private System.Windows.Forms.Button exitButton;
diff --git a/CapsLockIndicatorV3/FirstRunDialog.cs b/CapsLockIndicatorV3/FirstRunDialog.cs
index 2c2e367..4f2b189 100644
--- a/CapsLockIndicatorV3/FirstRunDialog.cs
+++ b/CapsLockIndicatorV3/FirstRunDialog.cs
@@ -25,11 +25,10 @@ public FirstRunDialog()
HandleCreated += FirstRunDialog_HandleCreated;
- DarkModeProvider.RegisterForm(this);
- DarkModeChanged += FirstRunDialog_DarkModeChanged;
-
FormClosing += FirstRunDialog_FormClosing;
+ Shown += FirstRunDialog_Shown;
+
ControlScheduleSetDarkMode(darkButton, true);
headerLabel.Text = strings.firstRunHeading;
@@ -50,6 +49,12 @@ public FirstRunDialog()
}
}
+ private void FirstRunDialog_Shown(object sender, EventArgs e)
+ {
+ Width = Width + 1;
+ Height = Height + 1;
+ }
+
private void FirstRunDialog_FormClosing(object sender, FormClosingEventArgs e)
{
if (e.CloseReason == CloseReason.UserClosing)
@@ -58,10 +63,21 @@ private void FirstRunDialog_FormClosing(object sender, FormClosingEventArgs e)
private void FirstRunDialog_HandleCreated(object sender, EventArgs e)
{
+ DarkModeProvider.RegisterForm(this);
+ DarkModeChanged += FirstRunDialog_DarkModeChanged;
+ }
+
+ private void FirstRunDialog_DarkModeChanged(object sender, EventArgs e)
+ {
+ //RecreateHandle();
+
var dark = DarkModeProvider.IsDark;
Native.UseImmersiveDarkModeColors(Handle, dark);
+ Opacity -= 0.0001;
+ Opacity += 0.0001;
+
headerLabel.ForeColor = dark ? Color.White : Color.FromArgb(255, 0, 51, 153);
Icon = (Icon)resources.GetObject("CLIv3_Icon" + (dark ? "_Dark" : ""));
@@ -74,6 +90,7 @@ private void FirstRunDialog_HandleCreated(object sender, EventArgs e)
allowUpdatesCheckBox.ForeColor =
dark ? Color.White : SystemColors.WindowText;
+ allowUpdatesCheckBox.DarkMode = dark;
allowUpdatesCheckBox.FlatStyle = dark ? FlatStyle.Standard : FlatStyle.System;
BackColor = dark ? Color.FromArgb(255, 32, 32, 32) : SystemColors.Window;
@@ -83,11 +100,6 @@ private void FirstRunDialog_HandleCreated(object sender, EventArgs e)
ControlScheduleSetDarkMode(exitButton, dark);
}
- private void FirstRunDialog_DarkModeChanged(object sender, EventArgs e)
- {
- RecreateHandle();
- }
-
private void allowUpdatesCheckBox_CheckedChanged(object sender, EventArgs e)
{
SettingsManager.Set("checkForUpdates", allowUpdatesCheckBox.Checked);
diff --git a/CapsLockIndicatorV3/IconPackBrowser.cs b/CapsLockIndicatorV3/IconPackBrowser.cs
index fdad680..142a59f 100644
--- a/CapsLockIndicatorV3/IconPackBrowser.cs
+++ b/CapsLockIndicatorV3/IconPackBrowser.cs
@@ -134,7 +134,7 @@ private void Ofs_OnDownloadRequested(object sender, string id)
Total = -1,
Message = strings.iconPackDownloadingMetadata
});
- Native.SetNativeEnabled(Handle, false);
+ Native.SetNativeEnabled(this, false);
using (var w = new WebClient())
{
@@ -153,7 +153,7 @@ private void Ofs_OnDownloadRequested(object sender, string id)
cancelled = e.Cancelled;
progressDialog.Close();
- Native.SetNativeEnabled(Handle, true);
+ Native.SetNativeEnabled(this, true);
Show();
Focus();
@@ -187,7 +187,7 @@ private void DownloadPack(string id, IconPackMetadata metadata)
Total = -1,
Message = strings.iconPackDownloadingPack
});
- Native.SetNativeEnabled(Handle, false);
+ Native.SetNativeEnabled(this, false);
using (var w = new WebClient())
{
@@ -203,7 +203,7 @@ private void DownloadPack(string id, IconPackMetadata metadata)
w.DownloadDataCompleted += (object wcsender, DownloadDataCompletedEventArgs e) =>
{
progressDialog.Close();
- Native.SetNativeEnabled(Handle, true);
+ Native.SetNativeEnabled(this, true);
Show();
Focus();
diff --git a/CapsLockIndicatorV3/LanguageDownloadProgressForm.Designer.cs b/CapsLockIndicatorV3/LanguageDownloadProgressForm.Designer.cs
new file mode 100644
index 0000000..b6a4dab
--- /dev/null
+++ b/CapsLockIndicatorV3/LanguageDownloadProgressForm.Designer.cs
@@ -0,0 +1,120 @@
+
+namespace CapsLockIndicatorV3
+{
+ partial class LanguageDownloadProgressForm
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
+ this.progressBar1 = new System.Windows.Forms.ProgressBar();
+ this.panel1 = new System.Windows.Forms.Panel();
+ this.button1 = new System.Windows.Forms.Button();
+ this.tableLayoutPanel1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // tableLayoutPanel1
+ //
+ this.tableLayoutPanel1.ColumnCount = 2;
+ this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
+ this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
+ this.tableLayoutPanel1.Controls.Add(this.progressBar1, 0, 0);
+ this.tableLayoutPanel1.Controls.Add(this.panel1, 0, 1);
+ this.tableLayoutPanel1.Controls.Add(this.button1, 1, 2);
+ this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.tableLayoutPanel1.Location = new System.Drawing.Point(9, 9);
+ this.tableLayoutPanel1.Name = "tableLayoutPanel1";
+ this.tableLayoutPanel1.RowCount = 3;
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 22F));
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F));
+ this.tableLayoutPanel1.Size = new System.Drawing.Size(563, 258);
+ this.tableLayoutPanel1.TabIndex = 0;
+ //
+ // progressBar1
+ //
+ this.tableLayoutPanel1.SetColumnSpan(this.progressBar1, 2);
+ this.progressBar1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.progressBar1.Location = new System.Drawing.Point(3, 3);
+ this.progressBar1.Name = "progressBar1";
+ this.progressBar1.Size = new System.Drawing.Size(557, 16);
+ this.progressBar1.TabIndex = 0;
+ //
+ // panel1
+ //
+ this.panel1.AutoScroll = true;
+ this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+ this.tableLayoutPanel1.SetColumnSpan(this.panel1, 2);
+ this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panel1.Location = new System.Drawing.Point(9, 31);
+ this.panel1.Margin = new System.Windows.Forms.Padding(9);
+ this.panel1.Name = "panel1";
+ this.panel1.Size = new System.Drawing.Size(545, 189);
+ this.panel1.TabIndex = 1;
+ //
+ // button1
+ //
+ this.button1.Anchor = System.Windows.Forms.AnchorStyles.Right;
+ this.button1.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.button1.FlatStyle = System.Windows.Forms.FlatStyle.System;
+ this.button1.Location = new System.Drawing.Point(470, 232);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(90, 23);
+ this.button1.TabIndex = 2;
+ this.button1.Text = "close";
+ this.button1.UseVisualStyleBackColor = true;
+ this.button1.Click += new System.EventHandler(this.button1_Click);
+ //
+ // LanguageDownloadProgressForm
+ //
+ this.AcceptButton = this.button1;
+ this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
+ this.CancelButton = this.button1;
+ this.ClientSize = new System.Drawing.Size(581, 276);
+ this.Controls.Add(this.tableLayoutPanel1);
+ this.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "LanguageDownloadProgressForm";
+ this.Padding = new System.Windows.Forms.Padding(9);
+ this.ShowIcon = false;
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "value";
+ this.tableLayoutPanel1.ResumeLayout(false);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
+ private System.Windows.Forms.ProgressBar progressBar1;
+ private System.Windows.Forms.Panel panel1;
+ private System.Windows.Forms.Button button1;
+ }
+}
\ No newline at end of file
diff --git a/CapsLockIndicatorV3/LanguageDownloadProgressForm.cs b/CapsLockIndicatorV3/LanguageDownloadProgressForm.cs
new file mode 100644
index 0000000..5e8bba3
--- /dev/null
+++ b/CapsLockIndicatorV3/LanguageDownloadProgressForm.cs
@@ -0,0 +1,213 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Globalization;
+using System.IO;
+using System.Linq;
+using System.Net;
+using System.Reflection;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace CapsLockIndicatorV3
+{
+ public partial class LanguageDownloadProgressForm : DarkModeForm
+ {
+ public const string DLL_NAME = "CapsLockIndicatorV3.resources.dll";
+ public const string DLL_UPDATE_DIR = "~update";
+
+ private int totalOperations = 0;
+ private int completedOperations = 0;
+
+ private KeyValuePair[] dlls;
+ Dictionary progs;
+
+ public event EventHandler DownloadCompleted;
+
+ public LanguageDownloadProgressForm()
+ {
+ InitializeComponent();
+
+ HandleCreated += (s, e) =>
+ {
+ DarkModeChanged += LanguageDownloadProgressForm_DarkModeChanged;
+ DarkModeProvider.RegisterForm(this);
+ };
+
+ button1.Text = strings.restart;
+ button1.Enabled = false;
+
+ Text = strings.downloadTranslationsTitle;
+
+ Shown += LanguageDownloadProgressForm_Shown;
+ }
+
+ private void LanguageDownloadProgressForm_Shown(object sender, EventArgs e)
+ {
+ if (dlls != null)
+ BeginDownload();
+ }
+
+ public void DownloadLangFiles(KeyValuePair[] dlls)
+ {
+ this.dlls = dlls;
+
+ Show();
+ }
+
+ private void BeginDownload()
+ {
+ Native.SetCloseButtonEnabled(this, false);
+
+ var exeDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
+
+ progs = new Dictionary();
+
+ totalOperations = dlls.Length;
+
+ panel1.SuspendLayout();
+
+ foreach (var dll in dlls)
+ {
+ var row = new LanguageProgressRow();
+ panel1.Controls.Add(row);
+ panel1.Controls.SetChildIndex(row, 0);
+
+ row.Dock = DockStyle.Top;
+ row.Text = GetNameOfLocale(dll.Key) + " (" + dll.Key + ")";
+ row.Name = "languageRow" + dll.Key;
+ row.Style = ProgressBarStyle.Marquee;
+
+ progs[dll.Key] = row;
+ }
+
+ progressBar1.Maximum = dlls.Length;
+
+ PerformDarkModeUpdate();
+
+ panel1.ResumeLayout(true);
+
+ var updateDir = Path.Combine(exeDir, DLL_UPDATE_DIR);
+ Directory.CreateDirectory(updateDir);
+
+ Parallel.ForEach(dlls, new ParallelOptions()
+ {
+ MaxDegreeOfParallelism = 4
+ }, (dll) =>
+ {
+ var tempFile = Path.GetTempFileName();
+ var dllPath = Path.Combine(updateDir, dll.Key + ".dll");
+
+ using (var wc = new WebClient())
+ {
+ wc.Headers.Add(HttpRequestHeader.UserAgent, VersionCheck.UserAgent);
+
+ //Invoke((MethodInvoker)delegate
+ //{
+ // var p = progs[dll.Key];
+ // p.Style = ProgressBarStyle.Continuous;
+ //});
+
+ wc.DownloadFileCompleted += (s, e) =>
+ {
+ Invoke((MethodInvoker)delegate
+ {
+ var p = progs[dll.Key];
+
+ if (e.Error != null)
+ {
+ p.Style = ProgressBarStyle.Continuous;
+ p.Value = p.Maximum = 1;
+ p.SetError(true, e.Error.Message);
+
+ File.Delete(tempFile);
+ }
+ else
+ {
+ p.Value = p.Maximum;
+
+ if (File.Exists(dllPath))
+ File.Delete(dllPath);
+
+ File.Move(tempFile, dllPath);
+ }
+
+
+ progressBar1.Value += 1;
+ });
+ UpdateCompletion();
+ };
+ wc.DownloadProgressChanged += (s, e) =>
+ {
+ Invoke((MethodInvoker)delegate
+ {
+ var p = progs[dll.Key];
+ p.Style = ProgressBarStyle.Continuous;
+ p.Maximum = (int)e.TotalBytesToReceive;
+ p.Value = (int)e.BytesReceived;
+ });
+ };
+
+ wc.DownloadFileAsync(new Uri(dll.Value.Filepath), tempFile);
+ }
+ });
+ }
+
+ private static string GetNameOfLocale(string locale)
+ {
+ var culture = CultureInfo.GetCultureInfo(locale);
+ return culture.NativeName;
+ }
+
+ private void UpdateCompletion()
+ {
+ ++completedOperations;
+
+ if (completedOperations >= totalOperations)
+ {
+ Native.SetCloseButtonEnabled(this, true);
+ button1.Enabled = true;
+ DownloadCompleted?.Invoke(this, EventArgs.Empty);
+ }
+ }
+
+ private void LanguageDownloadProgressForm_DarkModeChanged(object sender, EventArgs e)
+ {
+ PerformDarkModeUpdate();
+ }
+
+ private void PerformDarkModeUpdate()
+ {
+ var dark = DarkModeProvider.IsDark;
+
+ Native.UseImmersiveDarkModeColors(Handle, dark);
+
+ BackColor = dark ? Color.FromArgb(255, 32, 32, 32) : SystemColors.Window;
+ ForeColor = dark ? Color.White : SystemColors.WindowText;
+
+ panel1.BackColor = dark ? Color.FromArgb(255, 32, 32, 32) : SystemColors.Window;
+ panel1.ForeColor = dark ? Color.White : SystemColors.WindowText;
+
+ ControlScheduleSetDarkMode(progressBar1, dark);
+ ControlScheduleSetDarkMode(button1, dark);
+ ControlScheduleSetDarkMode(panel1, dark);
+
+ if (progs != null)
+ {
+ foreach (var p in progs.Values)
+ {
+ ControlScheduleSetDarkMode(p.ProgressBar, dark);
+ p.ToolTip.DarkMode = dark;
+ }
+ }
+ }
+
+ private void button1_Click(object sender, EventArgs e)
+ {
+ Program.Restart();
+ }
+ }
+}
diff --git a/CapsLockIndicatorV3/LanguageDownloadProgressForm.resx b/CapsLockIndicatorV3/LanguageDownloadProgressForm.resx
new file mode 100644
index 0000000..29dcb1b
--- /dev/null
+++ b/CapsLockIndicatorV3/LanguageDownloadProgressForm.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/CapsLockIndicatorV3/LanguageProgressRow.Designer.cs b/CapsLockIndicatorV3/LanguageProgressRow.Designer.cs
new file mode 100644
index 0000000..3e42e71
--- /dev/null
+++ b/CapsLockIndicatorV3/LanguageProgressRow.Designer.cs
@@ -0,0 +1,109 @@
+
+namespace CapsLockIndicatorV3
+{
+ partial class LanguageProgressRow
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
+ this.label1 = new System.Windows.Forms.Label();
+ this.progressBar1 = new System.Windows.Forms.ProgressBar();
+ this.pictureBox1 = new System.Windows.Forms.PictureBox();
+ this.betterToolTip1 = new CapsLockIndicatorV3.BetterToolTip(this.components);
+ this.tableLayoutPanel1.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
+ this.SuspendLayout();
+ //
+ // tableLayoutPanel1
+ //
+ this.tableLayoutPanel1.ColumnCount = 3;
+ this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
+ this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 50F));
+ this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 165F));
+ this.tableLayoutPanel1.Controls.Add(this.label1, 0, 0);
+ this.tableLayoutPanel1.Controls.Add(this.progressBar1, 2, 0);
+ this.tableLayoutPanel1.Controls.Add(this.pictureBox1, 1, 0);
+ this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
+ this.tableLayoutPanel1.Name = "tableLayoutPanel1";
+ this.tableLayoutPanel1.RowCount = 1;
+ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
+ this.tableLayoutPanel1.Size = new System.Drawing.Size(841, 22);
+ this.tableLayoutPanel1.TabIndex = 0;
+ //
+ // label1
+ //
+ this.label1.Anchor = System.Windows.Forms.AnchorStyles.Left;
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(3, 4);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(0, 13);
+ this.label1.TabIndex = 0;
+ //
+ // progressBar1
+ //
+ this.progressBar1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.progressBar1.Location = new System.Drawing.Point(679, 3);
+ this.progressBar1.MarqueeAnimationSpeed = 25;
+ this.progressBar1.Name = "progressBar1";
+ this.progressBar1.Size = new System.Drawing.Size(159, 16);
+ this.progressBar1.TabIndex = 1;
+ //
+ // pictureBox1
+ //
+ this.pictureBox1.Anchor = System.Windows.Forms.AnchorStyles.Right;
+ this.pictureBox1.Location = new System.Drawing.Point(660, 3);
+ this.pictureBox1.Margin = new System.Windows.Forms.Padding(3, 3, 0, 3);
+ this.pictureBox1.Name = "pictureBox1";
+ this.pictureBox1.Size = new System.Drawing.Size(16, 16);
+ this.pictureBox1.TabIndex = 2;
+ this.pictureBox1.TabStop = false;
+ //
+ // LanguageProgressRow
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.tableLayoutPanel1);
+ this.Name = "LanguageProgressRow";
+ this.Size = new System.Drawing.Size(841, 22);
+ this.tableLayoutPanel1.ResumeLayout(false);
+ this.tableLayoutPanel1.PerformLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.ProgressBar progressBar1;
+ private System.Windows.Forms.PictureBox pictureBox1;
+ private BetterToolTip betterToolTip1;
+ }
+}
diff --git a/CapsLockIndicatorV3/LanguageProgressRow.cs b/CapsLockIndicatorV3/LanguageProgressRow.cs
new file mode 100644
index 0000000..6f8ad92
--- /dev/null
+++ b/CapsLockIndicatorV3/LanguageProgressRow.cs
@@ -0,0 +1,67 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace CapsLockIndicatorV3
+{
+ public partial class LanguageProgressRow : UserControl
+ {
+ public new string Text
+ {
+ get => label1.Text;
+ set => label1.Text = value;
+ }
+
+ public int Minimum
+ {
+ get => progressBar1.Minimum;
+ set => progressBar1.Minimum = value;
+ }
+
+ public int Maximum
+ {
+ get => progressBar1.Maximum;
+ set => progressBar1.Maximum = value;
+ }
+
+ public int Value
+ {
+ get => progressBar1.Value;
+ set => progressBar1.Value = value;
+ }
+
+ public ProgressBarStyle Style
+ {
+ get => progressBar1.Style;
+ set => progressBar1.Style = value;
+ }
+
+ public ProgressBar ProgressBar => progressBar1;
+ public BetterToolTip ToolTip => betterToolTip1;
+
+ public LanguageProgressRow()
+ {
+ InitializeComponent();
+ }
+
+ public void SetError(bool error, string errorMessage = null)
+ {
+ Native.SetProgressBarState(progressBar1, error ? ProgressBarState.Error : ProgressBarState.Normal);
+ pictureBox1.Image = error ? (
+ SysIcons.GetSystemIcon(SysIcons.SHSTOCKICONID.SIID_ERROR, SysIcons.IconSize.Small).ToBitmap()
+ ) : null;
+ betterToolTip1.SetToolTip(pictureBox1,
+ (
+ (error ? strings.failedToDownloadTranslationToolTip : "")
+ + (errorMessage == null ? "" : ("\n" + errorMessage))
+ ).Trim()
+ );
+ }
+ }
+}
diff --git a/CapsLockIndicatorV3/LanguageProgressRow.resx b/CapsLockIndicatorV3/LanguageProgressRow.resx
new file mode 100644
index 0000000..4d6d541
--- /dev/null
+++ b/CapsLockIndicatorV3/LanguageProgressRow.resx
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 17, 17
+
+
\ No newline at end of file
diff --git a/CapsLockIndicatorV3/MainForm.Designer.cs b/CapsLockIndicatorV3/MainForm.Designer.cs
index db44634..6580b34 100644
--- a/CapsLockIndicatorV3/MainForm.Designer.cs
+++ b/CapsLockIndicatorV3/MainForm.Designer.cs
@@ -78,9 +78,10 @@ private void InitializeComponent()
this.panel1 = new System.Windows.Forms.Panel();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.displayTimeGroup = new System.Windows.Forms.GroupBox();
- this.onlyShowWhenActiveCheckBox = new CapsLockIndicatorV3.BetterCheckBox();
- this.displayTimeLabel = new System.Windows.Forms.Label();
+ this.tableLayoutPanel6 = new System.Windows.Forms.TableLayoutPanel();
this.displayTimeSlider = new System.Windows.Forms.TrackBar();
+ this.displayTimeLabel = new System.Windows.Forms.Label();
+ this.onlyShowWhenActiveCheckBox = new CapsLockIndicatorV3.BetterCheckBox();
this.coloursGroup = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel5 = new System.Windows.Forms.TableLayoutPanel();
this.backgroundColourActivatedButton = new System.Windows.Forms.Button();
@@ -111,11 +112,13 @@ private void InitializeComponent()
this.positionTopCenter = new System.Windows.Forms.RadioButton();
this.positionTopLeft = new System.Windows.Forms.RadioButton();
this.opacityGroup = new System.Windows.Forms.GroupBox();
- this.opacityLabel = new System.Windows.Forms.Label();
+ this.tableLayoutPanel7 = new System.Windows.Forms.TableLayoutPanel();
this.opacitySlider = new System.Windows.Forms.TrackBar();
+ this.opacityLabel = new System.Windows.Forms.Label();
this.borderGroup = new System.Windows.Forms.GroupBox();
- this.bdSizeLabel = new System.Windows.Forms.Label();
+ this.tableLayoutPanel8 = new System.Windows.Forms.TableLayoutPanel();
this.bdSizeSlider = new System.Windows.Forms.TrackBar();
+ this.bdSizeLabel = new System.Windows.Forms.Label();
this.downloadIcons = new CapsLockIndicatorV3.LnkLabel();
this.tabControl1 = new CapsLockIndicatorV3.BetterTabControl();
this.tabPage3 = new System.Windows.Forms.TabPage();
@@ -128,9 +131,6 @@ private void InitializeComponent()
this.advSettingsButton = new System.Windows.Forms.Button();
this.tutorialToolTip = new CapsLockIndicatorV3.BetterToolTip(this.components);
this.tutorialTimer = new System.Windows.Forms.Timer(this.components);
- this.tableLayoutPanel6 = new System.Windows.Forms.TableLayoutPanel();
- this.tableLayoutPanel7 = new System.Windows.Forms.TableLayoutPanel();
- this.tableLayoutPanel8 = new System.Windows.Forms.TableLayoutPanel();
this.generalIconContextMenuStrip.SuspendLayout();
this.iconsGroup.SuspendLayout();
this.indicatorGroup.SuspendLayout();
@@ -143,6 +143,7 @@ private void InitializeComponent()
this.tableLayoutPanel3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.displayTimeGroup.SuspendLayout();
+ this.tableLayoutPanel6.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.displayTimeSlider)).BeginInit();
this.coloursGroup.SuspendLayout();
this.tableLayoutPanel5.SuspendLayout();
@@ -156,8 +157,10 @@ private void InitializeComponent()
this.positionGroup.SuspendLayout();
this.positionButtonLayout.SuspendLayout();
this.opacityGroup.SuspendLayout();
+ this.tableLayoutPanel7.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.opacitySlider)).BeginInit();
this.borderGroup.SuspendLayout();
+ this.tableLayoutPanel8.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.bdSizeSlider)).BeginInit();
this.tabControl1.SuspendLayout();
this.tabPage3.SuspendLayout();
@@ -165,9 +168,6 @@ private void InitializeComponent()
this.tableLayoutPanel4.SuspendLayout();
this.tabPage2.SuspendLayout();
this.flowLayoutPanel1b.SuspendLayout();
- this.tableLayoutPanel6.SuspendLayout();
- this.tableLayoutPanel7.SuspendLayout();
- this.tableLayoutPanel8.SuspendLayout();
this.SuspendLayout();
//
// updateTimer
@@ -231,7 +231,7 @@ private void InitializeComponent()
this.iconsGroup.Location = new System.Drawing.Point(12, 12);
this.iconsGroup.Margin = new System.Windows.Forms.Padding(12, 12, 3, 3);
this.iconsGroup.Name = "iconsGroup";
- this.iconsGroup.Size = new System.Drawing.Size(292, 103);
+ this.iconsGroup.Size = new System.Drawing.Size(292, 101);
this.iconsGroup.TabIndex = 0;
this.iconsGroup.TabStop = false;
this.iconsGroup.Text = "showIconsFor";
@@ -287,7 +287,7 @@ private void InitializeComponent()
this.indicatorGroup.Location = new System.Drawing.Point(310, 12);
this.indicatorGroup.Margin = new System.Windows.Forms.Padding(3, 12, 12, 3);
this.indicatorGroup.Name = "indicatorGroup";
- this.indicatorGroup.Size = new System.Drawing.Size(292, 103);
+ this.indicatorGroup.Size = new System.Drawing.Size(292, 101);
this.indicatorGroup.TabIndex = 1;
this.indicatorGroup.TabStop = false;
this.indicatorGroup.Text = "showNotificationWhen";
@@ -366,7 +366,7 @@ private void InitializeComponent()
this.aboutPanel.Controls.Add(this.aboutPanelTopBorder);
this.aboutPanel.Controls.Add(this.aboutText);
this.aboutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
- this.aboutPanel.Location = new System.Drawing.Point(0, 236);
+ this.aboutPanel.Location = new System.Drawing.Point(0, 232);
this.aboutPanel.Margin = new System.Windows.Forms.Padding(0);
this.aboutPanel.Name = "aboutPanel";
this.aboutPanel.Size = new System.Drawing.Size(614, 65);
@@ -566,7 +566,7 @@ private void InitializeComponent()
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 64F));
- this.tableLayoutPanel1.Size = new System.Drawing.Size(614, 301);
+ this.tableLayoutPanel1.Size = new System.Drawing.Size(614, 297);
this.tableLayoutPanel1.TabIndex = 14;
//
// flowLayoutPanel1
@@ -577,10 +577,10 @@ private void InitializeComponent()
this.flowLayoutPanel1.Controls.Add(this.hideOnStartupCheckBox);
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
- this.flowLayoutPanel1.Location = new System.Drawing.Point(12, 121);
+ this.flowLayoutPanel1.Location = new System.Drawing.Point(12, 119);
this.flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(12, 3, 3, 9);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
- this.flowLayoutPanel1.Size = new System.Drawing.Size(292, 106);
+ this.flowLayoutPanel1.Size = new System.Drawing.Size(292, 104);
this.flowLayoutPanel1.TabIndex = 2;
//
// tableLayoutPanel2
@@ -595,7 +595,7 @@ private void InitializeComponent()
this.tableLayoutPanel2.Controls.Add(this.checkForUpdatesButton, 1, 2);
this.tableLayoutPanel2.Controls.Add(this.checkForUpdatedCheckBox, 0, 2);
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
- this.tableLayoutPanel2.Location = new System.Drawing.Point(310, 121);
+ this.tableLayoutPanel2.Location = new System.Drawing.Point(310, 119);
this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(3, 3, 12, 9);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 4;
@@ -604,7 +604,7 @@ private void InitializeComponent()
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
- this.tableLayoutPanel2.Size = new System.Drawing.Size(292, 106);
+ this.tableLayoutPanel2.Size = new System.Drawing.Size(292, 104);
this.tableLayoutPanel2.TabIndex = 3;
//
// hideWindow
@@ -679,33 +679,25 @@ private void InitializeComponent()
this.displayTimeGroup.Dock = System.Windows.Forms.DockStyle.Fill;
this.displayTimeGroup.Location = new System.Drawing.Point(3, 3);
this.displayTimeGroup.Name = "displayTimeGroup";
- this.displayTimeGroup.Size = new System.Drawing.Size(298, 67);
+ this.displayTimeGroup.Size = new System.Drawing.Size(298, 66);
this.displayTimeGroup.TabIndex = 0;
this.displayTimeGroup.TabStop = false;
this.displayTimeGroup.Text = "displayTime";
//
- // onlyShowWhenActiveCheckBox
- //
- this.onlyShowWhenActiveCheckBox.AutoSize = true;
- this.onlyShowWhenActiveCheckBox.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.onlyShowWhenActiveCheckBox.Location = new System.Drawing.Point(6, 70);
- this.onlyShowWhenActiveCheckBox.Name = "onlyShowWhenActiveCheckBox";
- this.onlyShowWhenActiveCheckBox.Size = new System.Drawing.Size(148, 20);
- this.onlyShowWhenActiveCheckBox.TabIndex = 2;
- this.onlyShowWhenActiveCheckBox.Text = "onlyShowWhenActive";
- this.onlyShowWhenActiveCheckBox.UseVisualStyleBackColor = true;
- this.onlyShowWhenActiveCheckBox.CheckedChanged += new System.EventHandler(this.onlyShowWhenActiveCheckBox_CheckedChanged);
- //
- // displayTimeLabel
+ // tableLayoutPanel6
//
- this.displayTimeLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
- this.displayTimeLabel.Location = new System.Drawing.Point(222, 8);
- this.displayTimeLabel.Name = "displayTimeLabel";
- this.displayTimeLabel.Size = new System.Drawing.Size(67, 29);
- this.displayTimeLabel.TabIndex = 1;
- this.displayTimeLabel.Text = "500 ms";
- this.displayTimeLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.displayTimeLabel.Click += new System.EventHandler(this.displayTimeLabel_Click);
+ this.tableLayoutPanel6.ColumnCount = 2;
+ this.tableLayoutPanel6.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 75F));
+ this.tableLayoutPanel6.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
+ this.tableLayoutPanel6.Controls.Add(this.displayTimeSlider, 0, 0);
+ this.tableLayoutPanel6.Controls.Add(this.displayTimeLabel, 1, 0);
+ this.tableLayoutPanel6.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.tableLayoutPanel6.Location = new System.Drawing.Point(3, 19);
+ this.tableLayoutPanel6.Name = "tableLayoutPanel6";
+ this.tableLayoutPanel6.RowCount = 1;
+ this.tableLayoutPanel6.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
+ this.tableLayoutPanel6.Size = new System.Drawing.Size(292, 44);
+ this.tableLayoutPanel6.TabIndex = 3;
//
// displayTimeSlider
//
@@ -715,13 +707,36 @@ private void InitializeComponent()
this.displayTimeSlider.Maximum = 2001;
this.displayTimeSlider.Minimum = 50;
this.displayTimeSlider.Name = "displayTimeSlider";
- this.displayTimeSlider.Size = new System.Drawing.Size(213, 39);
+ this.displayTimeSlider.Size = new System.Drawing.Size(213, 38);
this.displayTimeSlider.TabIndex = 0;
this.displayTimeSlider.TickFrequency = 250;
this.displayTimeSlider.TickStyle = System.Windows.Forms.TickStyle.Both;
this.displayTimeSlider.Value = 500;
this.displayTimeSlider.Scroll += new System.EventHandler(this.displayTimeSlider_Scroll);
//
+ // displayTimeLabel
+ //
+ this.displayTimeLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
+ this.displayTimeLabel.Location = new System.Drawing.Point(222, 7);
+ this.displayTimeLabel.Name = "displayTimeLabel";
+ this.displayTimeLabel.Size = new System.Drawing.Size(67, 29);
+ this.displayTimeLabel.TabIndex = 1;
+ this.displayTimeLabel.Text = "500 ms";
+ this.displayTimeLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.displayTimeLabel.Click += new System.EventHandler(this.displayTimeLabel_Click);
+ //
+ // onlyShowWhenActiveCheckBox
+ //
+ this.onlyShowWhenActiveCheckBox.AutoSize = true;
+ this.onlyShowWhenActiveCheckBox.FlatStyle = System.Windows.Forms.FlatStyle.System;
+ this.onlyShowWhenActiveCheckBox.Location = new System.Drawing.Point(6, 70);
+ this.onlyShowWhenActiveCheckBox.Name = "onlyShowWhenActiveCheckBox";
+ this.onlyShowWhenActiveCheckBox.Size = new System.Drawing.Size(148, 20);
+ this.onlyShowWhenActiveCheckBox.TabIndex = 2;
+ this.onlyShowWhenActiveCheckBox.Text = "onlyShowWhenActive";
+ this.onlyShowWhenActiveCheckBox.UseVisualStyleBackColor = true;
+ this.onlyShowWhenActiveCheckBox.CheckedChanged += new System.EventHandler(this.onlyShowWhenActiveCheckBox_CheckedChanged);
+ //
// coloursGroup
//
this.coloursGroup.Controls.Add(this.tableLayoutPanel5);
@@ -729,7 +744,7 @@ private void InitializeComponent()
this.coloursGroup.Location = new System.Drawing.Point(307, 3);
this.coloursGroup.Name = "coloursGroup";
this.tableLayoutPanel4.SetRowSpan(this.coloursGroup, 3);
- this.coloursGroup.Size = new System.Drawing.Size(298, 213);
+ this.coloursGroup.Size = new System.Drawing.Size(298, 210);
this.coloursGroup.TabIndex = 3;
this.coloursGroup.TabStop = false;
this.coloursGroup.Text = "colours";
@@ -761,7 +776,7 @@ private void InitializeComponent()
this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.66667F));
this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.66667F));
this.tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.66667F));
- this.tableLayoutPanel5.Size = new System.Drawing.Size(292, 191);
+ this.tableLayoutPanel5.Size = new System.Drawing.Size(292, 188);
this.tableLayoutPanel5.TabIndex = 12;
//
// backgroundColourActivatedButton
@@ -783,7 +798,7 @@ private void InitializeComponent()
this.borderColourDeactivatedPreview.Dock = System.Windows.Forms.DockStyle.Fill;
this.borderColourDeactivatedPreview.Location = new System.Drawing.Point(3, 158);
this.borderColourDeactivatedPreview.Name = "borderColourDeactivatedPreview";
- this.borderColourDeactivatedPreview.Size = new System.Drawing.Size(58, 30);
+ this.borderColourDeactivatedPreview.Size = new System.Drawing.Size(58, 27);
this.borderColourDeactivatedPreview.TabIndex = 11;
this.borderColourDeactivatedPreview.TabStop = false;
//
@@ -827,7 +842,7 @@ private void InitializeComponent()
this.borderColourDeactivatedButton.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.borderColourDeactivatedButton.Location = new System.Drawing.Point(67, 158);
this.borderColourDeactivatedButton.Name = "borderColourDeactivatedButton";
- this.borderColourDeactivatedButton.Size = new System.Drawing.Size(222, 30);
+ this.borderColourDeactivatedButton.Size = new System.Drawing.Size(222, 27);
this.borderColourDeactivatedButton.TabIndex = 8;
this.borderColourDeactivatedButton.Text = "borderColourDecativated";
this.borderColourDeactivatedButton.UseVisualStyleBackColor = true;
@@ -906,9 +921,9 @@ private void InitializeComponent()
//
this.fontGroupBox.Controls.Add(this.fontButton);
this.fontGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
- this.fontGroupBox.Location = new System.Drawing.Point(3, 76);
+ this.fontGroupBox.Location = new System.Drawing.Point(3, 75);
this.fontGroupBox.Name = "fontGroupBox";
- this.fontGroupBox.Size = new System.Drawing.Size(298, 67);
+ this.fontGroupBox.Size = new System.Drawing.Size(298, 66);
this.fontGroupBox.TabIndex = 2;
this.fontGroupBox.TabStop = false;
this.fontGroupBox.Text = "font";
@@ -920,7 +935,7 @@ private void InitializeComponent()
this.fontButton.Font = new System.Drawing.Font("Segoe UI", 12F);
this.fontButton.Location = new System.Drawing.Point(3, 19);
this.fontButton.Name = "fontButton";
- this.fontButton.Size = new System.Drawing.Size(292, 45);
+ this.fontButton.Size = new System.Drawing.Size(292, 44);
this.fontButton.TabIndex = 2;
this.fontButton.Text = "preview";
this.fontButton.UseVisualStyleBackColor = true;
@@ -939,9 +954,9 @@ private void InitializeComponent()
//
this.positionGroup.Controls.Add(this.positionButtonLayout);
this.positionGroup.Dock = System.Windows.Forms.DockStyle.Fill;
- this.positionGroup.Location = new System.Drawing.Point(3, 149);
+ this.positionGroup.Location = new System.Drawing.Point(3, 147);
this.positionGroup.Name = "positionGroup";
- this.positionGroup.Size = new System.Drawing.Size(298, 67);
+ this.positionGroup.Size = new System.Drawing.Size(298, 66);
this.positionGroup.TabIndex = 11;
this.positionGroup.TabStop = false;
this.positionGroup.Text = "overlayPosition";
@@ -968,7 +983,7 @@ private void InitializeComponent()
this.positionButtonLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
this.positionButtonLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
this.positionButtonLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
- this.positionButtonLayout.Size = new System.Drawing.Size(292, 45);
+ this.positionButtonLayout.Size = new System.Drawing.Size(292, 44);
this.positionButtonLayout.TabIndex = 0;
//
// positionBottomRight
@@ -976,10 +991,10 @@ private void InitializeComponent()
this.positionBottomRight.Appearance = System.Windows.Forms.Appearance.Button;
this.positionBottomRight.Dock = System.Windows.Forms.DockStyle.Fill;
this.positionBottomRight.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.positionBottomRight.Location = new System.Drawing.Point(194, 30);
+ this.positionBottomRight.Location = new System.Drawing.Point(194, 28);
this.positionBottomRight.Margin = new System.Windows.Forms.Padding(0);
this.positionBottomRight.Name = "positionBottomRight";
- this.positionBottomRight.Size = new System.Drawing.Size(98, 15);
+ this.positionBottomRight.Size = new System.Drawing.Size(98, 16);
this.positionBottomRight.TabIndex = 8;
this.positionBottomRight.UseVisualStyleBackColor = true;
this.positionBottomRight.CheckedChanged += new System.EventHandler(this.positionButton_CheckedChanged);
@@ -989,10 +1004,10 @@ private void InitializeComponent()
this.positionBottomCenter.Appearance = System.Windows.Forms.Appearance.Button;
this.positionBottomCenter.Dock = System.Windows.Forms.DockStyle.Fill;
this.positionBottomCenter.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.positionBottomCenter.Location = new System.Drawing.Point(97, 30);
+ this.positionBottomCenter.Location = new System.Drawing.Point(97, 28);
this.positionBottomCenter.Margin = new System.Windows.Forms.Padding(0);
this.positionBottomCenter.Name = "positionBottomCenter";
- this.positionBottomCenter.Size = new System.Drawing.Size(97, 15);
+ this.positionBottomCenter.Size = new System.Drawing.Size(97, 16);
this.positionBottomCenter.TabIndex = 7;
this.positionBottomCenter.UseVisualStyleBackColor = true;
this.positionBottomCenter.CheckedChanged += new System.EventHandler(this.positionButton_CheckedChanged);
@@ -1002,10 +1017,10 @@ private void InitializeComponent()
this.positionBottomLeft.Appearance = System.Windows.Forms.Appearance.Button;
this.positionBottomLeft.Dock = System.Windows.Forms.DockStyle.Fill;
this.positionBottomLeft.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.positionBottomLeft.Location = new System.Drawing.Point(0, 30);
+ this.positionBottomLeft.Location = new System.Drawing.Point(0, 28);
this.positionBottomLeft.Margin = new System.Windows.Forms.Padding(0);
this.positionBottomLeft.Name = "positionBottomLeft";
- this.positionBottomLeft.Size = new System.Drawing.Size(97, 15);
+ this.positionBottomLeft.Size = new System.Drawing.Size(97, 16);
this.positionBottomLeft.TabIndex = 6;
this.positionBottomLeft.UseVisualStyleBackColor = true;
this.positionBottomLeft.CheckedChanged += new System.EventHandler(this.positionButton_CheckedChanged);
@@ -1015,10 +1030,10 @@ private void InitializeComponent()
this.positionMiddleRight.Appearance = System.Windows.Forms.Appearance.Button;
this.positionMiddleRight.Dock = System.Windows.Forms.DockStyle.Fill;
this.positionMiddleRight.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.positionMiddleRight.Location = new System.Drawing.Point(194, 15);
+ this.positionMiddleRight.Location = new System.Drawing.Point(194, 14);
this.positionMiddleRight.Margin = new System.Windows.Forms.Padding(0);
this.positionMiddleRight.Name = "positionMiddleRight";
- this.positionMiddleRight.Size = new System.Drawing.Size(98, 15);
+ this.positionMiddleRight.Size = new System.Drawing.Size(98, 14);
this.positionMiddleRight.TabIndex = 5;
this.positionMiddleRight.UseVisualStyleBackColor = true;
this.positionMiddleRight.CheckedChanged += new System.EventHandler(this.positionButton_CheckedChanged);
@@ -1028,10 +1043,10 @@ private void InitializeComponent()
this.positionMiddleCenter.Appearance = System.Windows.Forms.Appearance.Button;
this.positionMiddleCenter.Dock = System.Windows.Forms.DockStyle.Fill;
this.positionMiddleCenter.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.positionMiddleCenter.Location = new System.Drawing.Point(97, 15);
+ this.positionMiddleCenter.Location = new System.Drawing.Point(97, 14);
this.positionMiddleCenter.Margin = new System.Windows.Forms.Padding(0);
this.positionMiddleCenter.Name = "positionMiddleCenter";
- this.positionMiddleCenter.Size = new System.Drawing.Size(97, 15);
+ this.positionMiddleCenter.Size = new System.Drawing.Size(97, 14);
this.positionMiddleCenter.TabIndex = 4;
this.positionMiddleCenter.UseVisualStyleBackColor = true;
this.positionMiddleCenter.CheckedChanged += new System.EventHandler(this.positionButton_CheckedChanged);
@@ -1041,10 +1056,10 @@ private void InitializeComponent()
this.positionMiddleLeft.Appearance = System.Windows.Forms.Appearance.Button;
this.positionMiddleLeft.Dock = System.Windows.Forms.DockStyle.Fill;
this.positionMiddleLeft.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.positionMiddleLeft.Location = new System.Drawing.Point(0, 15);
+ this.positionMiddleLeft.Location = new System.Drawing.Point(0, 14);
this.positionMiddleLeft.Margin = new System.Windows.Forms.Padding(0);
this.positionMiddleLeft.Name = "positionMiddleLeft";
- this.positionMiddleLeft.Size = new System.Drawing.Size(97, 15);
+ this.positionMiddleLeft.Size = new System.Drawing.Size(97, 14);
this.positionMiddleLeft.TabIndex = 3;
this.positionMiddleLeft.UseVisualStyleBackColor = true;
this.positionMiddleLeft.CheckedChanged += new System.EventHandler(this.positionButton_CheckedChanged);
@@ -1057,7 +1072,7 @@ private void InitializeComponent()
this.positionTopRight.Location = new System.Drawing.Point(194, 0);
this.positionTopRight.Margin = new System.Windows.Forms.Padding(0);
this.positionTopRight.Name = "positionTopRight";
- this.positionTopRight.Size = new System.Drawing.Size(98, 15);
+ this.positionTopRight.Size = new System.Drawing.Size(98, 14);
this.positionTopRight.TabIndex = 2;
this.positionTopRight.UseVisualStyleBackColor = true;
this.positionTopRight.CheckedChanged += new System.EventHandler(this.positionButton_CheckedChanged);
@@ -1070,7 +1085,7 @@ private void InitializeComponent()
this.positionTopCenter.Location = new System.Drawing.Point(97, 0);
this.positionTopCenter.Margin = new System.Windows.Forms.Padding(0);
this.positionTopCenter.Name = "positionTopCenter";
- this.positionTopCenter.Size = new System.Drawing.Size(97, 15);
+ this.positionTopCenter.Size = new System.Drawing.Size(97, 14);
this.positionTopCenter.TabIndex = 1;
this.positionTopCenter.UseVisualStyleBackColor = true;
this.positionTopCenter.CheckedChanged += new System.EventHandler(this.positionButton_CheckedChanged);
@@ -1083,7 +1098,7 @@ private void InitializeComponent()
this.positionTopLeft.Location = new System.Drawing.Point(0, 0);
this.positionTopLeft.Margin = new System.Windows.Forms.Padding(0);
this.positionTopLeft.Name = "positionTopLeft";
- this.positionTopLeft.Size = new System.Drawing.Size(97, 15);
+ this.positionTopLeft.Size = new System.Drawing.Size(97, 14);
this.positionTopLeft.TabIndex = 0;
this.positionTopLeft.UseVisualStyleBackColor = true;
this.positionTopLeft.CheckedChanged += new System.EventHandler(this.positionButton_CheckedChanged);
@@ -1092,23 +1107,28 @@ private void InitializeComponent()
//
this.opacityGroup.Controls.Add(this.tableLayoutPanel7);
this.opacityGroup.Dock = System.Windows.Forms.DockStyle.Fill;
- this.opacityGroup.Location = new System.Drawing.Point(3, 222);
+ this.opacityGroup.Location = new System.Drawing.Point(3, 219);
this.opacityGroup.Name = "opacityGroup";
- this.opacityGroup.Size = new System.Drawing.Size(298, 70);
+ this.opacityGroup.Size = new System.Drawing.Size(298, 69);
this.opacityGroup.TabIndex = 2;
this.opacityGroup.TabStop = false;
this.opacityGroup.Text = "opacity";
//
- // opacityLabel
+ // tableLayoutPanel7
//
- this.opacityLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
- this.opacityLabel.Location = new System.Drawing.Point(222, 8);
- this.opacityLabel.Name = "opacityLabel";
- this.opacityLabel.Size = new System.Drawing.Size(67, 31);
- this.opacityLabel.TabIndex = 1;
- this.opacityLabel.Text = "100%";
- this.opacityLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.opacityLabel.Click += new System.EventHandler(this.opacityLabel_Click);
+ this.tableLayoutPanel7.ColumnCount = 2;
+ this.tableLayoutPanel7.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 75F));
+ this.tableLayoutPanel7.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
+ this.tableLayoutPanel7.Controls.Add(this.opacitySlider, 0, 0);
+ this.tableLayoutPanel7.Controls.Add(this.opacityLabel, 1, 0);
+ this.tableLayoutPanel7.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.tableLayoutPanel7.Location = new System.Drawing.Point(3, 19);
+ this.tableLayoutPanel7.Name = "tableLayoutPanel7";
+ this.tableLayoutPanel7.RowCount = 1;
+ this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
+ this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 50F));
+ this.tableLayoutPanel7.Size = new System.Drawing.Size(292, 47);
+ this.tableLayoutPanel7.TabIndex = 2;
//
// opacitySlider
//
@@ -1118,34 +1138,50 @@ private void InitializeComponent()
this.opacitySlider.Maximum = 100;
this.opacitySlider.Minimum = 1;
this.opacitySlider.Name = "opacitySlider";
- this.opacitySlider.Size = new System.Drawing.Size(213, 42);
+ this.opacitySlider.Size = new System.Drawing.Size(213, 41);
this.opacitySlider.TabIndex = 0;
this.opacitySlider.TickFrequency = 10;
this.opacitySlider.TickStyle = System.Windows.Forms.TickStyle.Both;
this.opacitySlider.Value = 100;
this.opacitySlider.Scroll += new System.EventHandler(this.opacitySlider_Scroll);
//
+ // opacityLabel
+ //
+ this.opacityLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
+ this.opacityLabel.Location = new System.Drawing.Point(222, 8);
+ this.opacityLabel.Name = "opacityLabel";
+ this.opacityLabel.Size = new System.Drawing.Size(67, 31);
+ this.opacityLabel.TabIndex = 1;
+ this.opacityLabel.Text = "100%";
+ this.opacityLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.opacityLabel.Click += new System.EventHandler(this.opacityLabel_Click);
+ //
// borderGroup
//
this.borderGroup.Controls.Add(this.tableLayoutPanel8);
this.borderGroup.Dock = System.Windows.Forms.DockStyle.Fill;
- this.borderGroup.Location = new System.Drawing.Point(307, 222);
+ this.borderGroup.Location = new System.Drawing.Point(307, 219);
this.borderGroup.Name = "borderGroup";
- this.borderGroup.Size = new System.Drawing.Size(298, 70);
+ this.borderGroup.Size = new System.Drawing.Size(298, 69);
this.borderGroup.TabIndex = 3;
this.borderGroup.TabStop = false;
this.borderGroup.Text = "borderThickness";
//
- // bdSizeLabel
+ // tableLayoutPanel8
//
- this.bdSizeLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
- this.bdSizeLabel.Location = new System.Drawing.Point(222, 2);
- this.bdSizeLabel.Name = "bdSizeLabel";
- this.bdSizeLabel.Size = new System.Drawing.Size(67, 43);
- this.bdSizeLabel.TabIndex = 1;
- this.bdSizeLabel.Text = "4";
- this.bdSizeLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.bdSizeLabel.Click += new System.EventHandler(this.bdSizeLabel_Click);
+ this.tableLayoutPanel8.ColumnCount = 2;
+ this.tableLayoutPanel8.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 75F));
+ this.tableLayoutPanel8.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
+ this.tableLayoutPanel8.Controls.Add(this.bdSizeSlider, 0, 0);
+ this.tableLayoutPanel8.Controls.Add(this.bdSizeLabel, 1, 0);
+ this.tableLayoutPanel8.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.tableLayoutPanel8.Location = new System.Drawing.Point(3, 19);
+ this.tableLayoutPanel8.Name = "tableLayoutPanel8";
+ this.tableLayoutPanel8.RowCount = 1;
+ this.tableLayoutPanel8.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
+ this.tableLayoutPanel8.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 50F));
+ this.tableLayoutPanel8.Size = new System.Drawing.Size(292, 47);
+ this.tableLayoutPanel8.TabIndex = 2;
//
// bdSizeSlider
//
@@ -1154,13 +1190,24 @@ private void InitializeComponent()
this.bdSizeSlider.Location = new System.Drawing.Point(3, 3);
this.bdSizeSlider.Maximum = 32;
this.bdSizeSlider.Name = "bdSizeSlider";
- this.bdSizeSlider.Size = new System.Drawing.Size(213, 42);
+ this.bdSizeSlider.Size = new System.Drawing.Size(213, 41);
this.bdSizeSlider.TabIndex = 0;
this.bdSizeSlider.TickFrequency = 4;
this.bdSizeSlider.TickStyle = System.Windows.Forms.TickStyle.Both;
this.bdSizeSlider.Value = 32;
this.bdSizeSlider.Scroll += new System.EventHandler(this.bdSizeSlider_Scroll);
//
+ // bdSizeLabel
+ //
+ this.bdSizeLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
+ this.bdSizeLabel.Location = new System.Drawing.Point(222, 2);
+ this.bdSizeLabel.Name = "bdSizeLabel";
+ this.bdSizeLabel.Size = new System.Drawing.Size(67, 43);
+ this.bdSizeLabel.TabIndex = 1;
+ this.bdSizeLabel.Text = "4";
+ this.bdSizeLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.bdSizeLabel.Click += new System.EventHandler(this.bdSizeLabel_Click);
+ //
// downloadIcons
//
this.downloadIcons.AutoSize = true;
@@ -1181,19 +1228,21 @@ private void InitializeComponent()
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.tabControl1.ItemSize = new System.Drawing.Size(99, 24);
this.tabControl1.Location = new System.Drawing.Point(0, 0);
this.tabControl1.MyBackColor = System.Drawing.SystemColors.Control;
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(622, 329);
+ this.tabControl1.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
this.tabControl1.TabIndex = 13;
//
// tabPage3
//
this.tabPage3.Controls.Add(this.tableLayoutPanel1);
- this.tabPage3.Location = new System.Drawing.Point(4, 24);
+ this.tabPage3.Location = new System.Drawing.Point(4, 28);
this.tabPage3.Name = "tabPage3";
- this.tabPage3.Size = new System.Drawing.Size(614, 301);
+ this.tabPage3.Size = new System.Drawing.Size(614, 297);
this.tabPage3.TabIndex = 2;
this.tabPage3.Tag = "340";
this.tabPage3.Text = "general";
@@ -1201,10 +1250,10 @@ private void InitializeComponent()
// tabPage1
//
this.tabPage1.Controls.Add(this.tableLayoutPanel4);
- this.tabPage1.Location = new System.Drawing.Point(4, 24);
+ this.tabPage1.Location = new System.Drawing.Point(4, 28);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
- this.tabPage1.Size = new System.Drawing.Size(614, 301);
+ this.tabPage1.Size = new System.Drawing.Size(614, 297);
this.tabPage1.TabIndex = 0;
this.tabPage1.Tag = "474";
this.tabPage1.Text = "notification";
@@ -1229,16 +1278,16 @@ private void InitializeComponent()
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25.00063F));
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25.00063F));
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 24.99813F));
- this.tableLayoutPanel4.Size = new System.Drawing.Size(608, 295);
+ this.tableLayoutPanel4.Size = new System.Drawing.Size(608, 291);
this.tableLayoutPanel4.TabIndex = 12;
//
// tabPage2
//
this.tabPage2.Controls.Add(this.flowLayoutPanel1b);
- this.tabPage2.Location = new System.Drawing.Point(4, 24);
+ this.tabPage2.Location = new System.Drawing.Point(4, 28);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
- this.tabPage2.Size = new System.Drawing.Size(614, 301);
+ this.tabPage2.Size = new System.Drawing.Size(614, 297);
this.tabPage2.TabIndex = 1;
this.tabPage2.Tag = "163";
this.tabPage2.Text = "advancedOptions";
@@ -1254,7 +1303,7 @@ private void InitializeComponent()
this.flowLayoutPanel1b.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
this.flowLayoutPanel1b.Location = new System.Drawing.Point(3, 3);
this.flowLayoutPanel1b.Name = "flowLayoutPanel1b";
- this.flowLayoutPanel1b.Size = new System.Drawing.Size(608, 295);
+ this.flowLayoutPanel1b.Size = new System.Drawing.Size(608, 291);
this.flowLayoutPanel1b.TabIndex = 0;
//
// darkModeCheckBox
@@ -1302,53 +1351,6 @@ private void InitializeComponent()
this.tutorialTimer.Interval = 1000;
this.tutorialTimer.Tick += new System.EventHandler(this.tutorialTimer_Tick);
//
- // tableLayoutPanel6
- //
- this.tableLayoutPanel6.ColumnCount = 2;
- this.tableLayoutPanel6.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 75F));
- this.tableLayoutPanel6.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
- this.tableLayoutPanel6.Controls.Add(this.displayTimeSlider, 0, 0);
- this.tableLayoutPanel6.Controls.Add(this.displayTimeLabel, 1, 0);
- this.tableLayoutPanel6.Dock = System.Windows.Forms.DockStyle.Fill;
- this.tableLayoutPanel6.Location = new System.Drawing.Point(3, 19);
- this.tableLayoutPanel6.Name = "tableLayoutPanel6";
- this.tableLayoutPanel6.RowCount = 1;
- this.tableLayoutPanel6.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
- this.tableLayoutPanel6.Size = new System.Drawing.Size(292, 45);
- this.tableLayoutPanel6.TabIndex = 3;
- //
- // tableLayoutPanel7
- //
- this.tableLayoutPanel7.ColumnCount = 2;
- this.tableLayoutPanel7.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 75F));
- this.tableLayoutPanel7.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
- this.tableLayoutPanel7.Controls.Add(this.opacitySlider, 0, 0);
- this.tableLayoutPanel7.Controls.Add(this.opacityLabel, 1, 0);
- this.tableLayoutPanel7.Dock = System.Windows.Forms.DockStyle.Fill;
- this.tableLayoutPanel7.Location = new System.Drawing.Point(3, 19);
- this.tableLayoutPanel7.Name = "tableLayoutPanel7";
- this.tableLayoutPanel7.RowCount = 1;
- this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
- this.tableLayoutPanel7.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
- this.tableLayoutPanel7.Size = new System.Drawing.Size(292, 48);
- this.tableLayoutPanel7.TabIndex = 2;
- //
- // tableLayoutPanel8
- //
- this.tableLayoutPanel8.ColumnCount = 2;
- this.tableLayoutPanel8.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 75F));
- this.tableLayoutPanel8.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
- this.tableLayoutPanel8.Controls.Add(this.bdSizeSlider, 0, 0);
- this.tableLayoutPanel8.Controls.Add(this.bdSizeLabel, 1, 0);
- this.tableLayoutPanel8.Dock = System.Windows.Forms.DockStyle.Fill;
- this.tableLayoutPanel8.Location = new System.Drawing.Point(3, 19);
- this.tableLayoutPanel8.Name = "tableLayoutPanel8";
- this.tableLayoutPanel8.RowCount = 1;
- this.tableLayoutPanel8.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
- this.tableLayoutPanel8.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
- this.tableLayoutPanel8.Size = new System.Drawing.Size(292, 48);
- this.tableLayoutPanel8.TabIndex = 2;
- //
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
@@ -1387,6 +1389,8 @@ private void InitializeComponent()
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.displayTimeGroup.ResumeLayout(false);
this.displayTimeGroup.PerformLayout();
+ this.tableLayoutPanel6.ResumeLayout(false);
+ this.tableLayoutPanel6.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.displayTimeSlider)).EndInit();
this.coloursGroup.ResumeLayout(false);
this.tableLayoutPanel5.ResumeLayout(false);
@@ -1400,8 +1404,12 @@ private void InitializeComponent()
this.positionGroup.ResumeLayout(false);
this.positionButtonLayout.ResumeLayout(false);
this.opacityGroup.ResumeLayout(false);
+ this.tableLayoutPanel7.ResumeLayout(false);
+ this.tableLayoutPanel7.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.opacitySlider)).EndInit();
this.borderGroup.ResumeLayout(false);
+ this.tableLayoutPanel8.ResumeLayout(false);
+ this.tableLayoutPanel8.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.bdSizeSlider)).EndInit();
this.tabControl1.ResumeLayout(false);
this.tabPage3.ResumeLayout(false);
@@ -1410,12 +1418,6 @@ private void InitializeComponent()
this.tabPage2.ResumeLayout(false);
this.flowLayoutPanel1b.ResumeLayout(false);
this.flowLayoutPanel1b.PerformLayout();
- this.tableLayoutPanel6.ResumeLayout(false);
- this.tableLayoutPanel6.PerformLayout();
- this.tableLayoutPanel7.ResumeLayout(false);
- this.tableLayoutPanel7.PerformLayout();
- this.tableLayoutPanel8.ResumeLayout(false);
- this.tableLayoutPanel8.PerformLayout();
this.ResumeLayout(false);
}
diff --git a/CapsLockIndicatorV3/MainForm.cs b/CapsLockIndicatorV3/MainForm.cs
index 0f50a37..2b5bff2 100644
--- a/CapsLockIndicatorV3/MainForm.cs
+++ b/CapsLockIndicatorV3/MainForm.cs
@@ -22,6 +22,8 @@
using System.ComponentModel;
using System.Text;
using System.Net;
+using System.Security.Cryptography;
+using System.Threading.Tasks;
namespace CapsLockIndicatorV3
{
@@ -230,6 +232,134 @@ public MainForm()
if (!SettingsManager.Get("hideOnStartup"))
Visible = true;
+
+ if (SettingsManager.Get("checkForUpdates"))
+ BeginCheckOldLanguageFiles();
+ }
+
+ private void BeginCheckOldLanguageFiles()
+ {
+ Task.Run(async () =>
+ {
+ var oldLangs = await CheckOldLanguageFiles();
+
+ if (oldLangs.Length > 0 && MessageBox.Show(strings.updateLocaleMessageBox, "CapsLock Indicator", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
+ UpdateLanguageFiles(oldLangs);
+ });
+ }
+
+ private List> GetLanguageFileVersions()
+ {
+ using (var cryptoProvider = new SHA1CryptoServiceProvider())
+ {
+ var l = new List>();
+
+ CultureInfo[] culture = CultureInfo.GetCultures(CultureTypes.AllCultures);
+ string exeLocation = Path.GetDirectoryName(Uri.UnescapeDataString(new UriBuilder(Assembly.GetExecutingAssembly().CodeBase).Path));
+ var cis = culture.Where(cultureInfo => cultureInfo.Name.Length > 0 && Directory.Exists(Path.Combine(exeLocation, cultureInfo.Name)));
+
+ foreach (var ci in cis)
+ {
+ var name = ci.Name;
+ var path = Path.Combine(exeLocation, ci.Name, "CapsLockIndicatorV3.resources.dll");
+ var inf = AssemblyName.GetAssemblyName(path);
+ var ver = inf.Version;
+ string sha1;
+ using (var fs = File.OpenRead(path))
+ using (var bs = new BufferedStream(fs))
+ sha1 = ToLowerCaseHexString(cryptoProvider.ComputeHash(bs));
+
+ l.Add(new KeyValuePair(name, new DllInfo()
+ {
+ Filepath = path,
+ SHA1 = sha1,
+ Version = ver
+ }));
+ }
+
+ return l;
+ }
+ }
+
+ void UpdateLanguageFiles(KeyValuePair[] dlls)
+ {
+ //var sb = new StringBuilder();
+
+ //foreach (var kvp in dlls)
+ // sb.AppendLine(kvp.Key + "\t" + kvp.Value);
+
+ //MessageBox.Show(sb.ToString());
+
+ BeginInvoke((MethodInvoker)delegate
+ {
+ var w = new LanguageDownloadProgressForm();
+ Native.SetNativeEnabled(this, false);
+ w.DownloadLangFiles(dlls);
+ w.FormClosed += (sender, e) =>
+ {
+ //w.Close();
+ w.Dispose();
+ Native.SetNativeEnabled(this, true);
+ };
+ });
+ }
+
+ async private Task[]> CheckOldLanguageFiles()
+ {
+ const string langServiceUrl = "https://cli.jonaskohl.de/!/langservice";
+
+ using (var wc = new WebClient())
+ {
+ wc.Headers.Add(HttpRequestHeader.UserAgent, VersionCheck.UserAgent);
+
+ var langInfoStr = await wc.DownloadStringTaskAsync(langServiceUrl);
+
+ var langInfo = XDocument.Parse(langInfoStr).Root;
+ var remoteLangs = langInfo.Elements("lang").Select(t =>
+ {
+ var name = t.Attribute("locale").Value;
+ var version = t.Attribute("version").Value;
+ var sha1 = t.Attribute("dllHashSHA1").Value;
+
+ return new KeyValuePair(name, new DllInfo()
+ {
+ Filepath = langServiceUrl + "?download=" + name + "&as=dll",
+ SHA1 = sha1,
+ Version = new Version(version)
+ });
+ }).ToDictionary(i => i.Key, i => i.Value);
+ var currentLangs = GetLanguageFileVersions().ToDictionary(i => i.Key, i => i.Value);
+
+ var oldLangs = new List>();
+
+ foreach (var lang in currentLangs)
+ {
+ if (!remoteLangs.ContainsKey(lang.Key))
+ continue;
+
+ var remoteLang = remoteLangs[lang.Key];
+
+ var localVer = lang.Value.Version;
+ var remoteVer = remoteLang.Version;
+
+#if DEBUG
+ if (remoteVer != localVer)
+#else
+ if (remoteVer > localVer)
+#endif
+ oldLangs.Add(new KeyValuePair(lang.Key, remoteLang));
+ }
+
+ return oldLangs.ToArray();
+ }
+ }
+
+ private string ToLowerCaseHexString(byte[] vs)
+ {
+ var sb = new StringBuilder();
+ foreach (var b in vs)
+ sb.Append(b.ToString("x2"));
+ return sb.ToString();
}
private void TabControl1_SelectedIndexChanged(object sender, EventArgs e)
@@ -585,6 +715,7 @@ private void AddCultures()
localeComboBox.SelectedIndex = 0;
localeComboBox.Items.Add(new DropDownLocale("--ln", ""));
+ localeComboBox.Items.Add(new DropDownLocale("--check-for-updates", strings.checkForUpdates));
localeComboBox.Items.Add(new DropDownLocale("--get-more", strings.downloadMoreTranslations));
}
@@ -646,6 +777,8 @@ void ApplyLocales()
searchOnResumeCheckBox.Text = strings.searchForUpdatesOnResumeOption;
mainToolTip.SetToolTip(dismissButton, strings.dismiss);
+ tabControl1.UpdateItemSize();
+
ApplyEOLStrings();
}
@@ -833,7 +966,7 @@ void handleVersion(string xmlData)
Version cVersion = new Version(currentVersion);
Version lVersion = new Version(latestVersion);
-#if !DEBUG
+#if !DEBUG || DEBUG
if (lVersion > cVersion)
#endif
{
@@ -913,7 +1046,7 @@ void GeneralIconMouseDoubleClick(object sender, MouseEventArgs e)
{
Show();
Focus();
- generalIcon.Visible = false;
+ //generalIcon.Visible = false;
isHidden = false;
ShowInTaskbar = true;
}
@@ -1035,6 +1168,11 @@ private void localeComboBox_SelectedIndexChanged(object sender, EventArgs e)
localeComboBox.SelectedIndex = previousLocaleIndex;
Process.Start("https://cli.jonaskohl.de/!/translations#download-translations");
}
+ else if (locale.localeString == "--check-for-updates")
+ {
+ localeComboBox.SelectedIndex = previousLocaleIndex;
+ BeginCheckOldLanguageFiles();
+ }
else
{
Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(locale.localeString);
@@ -1063,6 +1201,8 @@ private void localeComboBox_Format(object sender, ListControlConvertEventArgs e)
var itm = (DropDownLocale)e.ListItem;
if (itm.localeString == "--get-more")
e.Value = strings.downloadMoreTranslations;
+ else if (itm.localeString == "--check-for-updates")
+ e.Value = strings.checkForUpdates.Replace("&", "");
else if (itm.localeString == "__default")
e.Value = itm.displayText;
else if (itm.localeString == "--ln")
diff --git a/CapsLockIndicatorV3/MainForm.resx b/CapsLockIndicatorV3/MainForm.resx
index 07711bb..956a82e 100644
--- a/CapsLockIndicatorV3/MainForm.resx
+++ b/CapsLockIndicatorV3/MainForm.resx
@@ -132,6 +132,9 @@
671, 17
+
+ 232, 56
+
799, 17
@@ -160,12 +163,6 @@
rEHgAKxB8AOsQQ==
-
- 232, 56
-
-
- 232, 56
-
351, 56
diff --git a/CapsLockIndicatorV3/Native.cs b/CapsLockIndicatorV3/Native.cs
index d2d592e..973acdb 100644
--- a/CapsLockIndicatorV3/Native.cs
+++ b/CapsLockIndicatorV3/Native.cs
@@ -33,6 +33,9 @@ internal static class Native
[DllImport("user32.dll", CharSet = CharSet.Auto)]
public extern static IntPtr SendMessage(IntPtr hWnd, int Msg, IntPtr wParam, IntPtr lParam);
+ [DllImport("user32.dll", CharSet = CharSet.Auto)]
+ public extern static IntPtr SendMessage(IntPtr hWnd, uint Msg, uint wParam, uint lParam);
+
[DllImport("uxtheme.dll", CharSet = CharSet.Unicode)]
internal static extern IntPtr OpenThemeData(IntPtr hwnd, string pszClassList);
@@ -93,6 +96,12 @@ internal static class Native
[DllImport("user32.dll", CharSet = CharSet.Auto)]
internal static extern bool GetWindowRect(IntPtr hWnd, [In, Out] ref Rectangle rect);
+ [DllImport("user32")]
+ static extern IntPtr GetSystemMenu(IntPtr hWnd, bool bRevert);
+
+ [DllImport("user32")]
+ static extern bool EnableMenuItem(IntPtr hMenu, uint uIDEnableItem, uint uEnable);
+
[StructLayout(LayoutKind.Sequential)]
public struct COLORREF
{
@@ -222,11 +231,36 @@ public enum ButtonFlags : int
public const int HC_ACTION = 0;
public const int WH_CALLWNDPROC = 4;
public const int GWL_WNDPROC = -4;
-
- public static void SetNativeEnabled(IntPtr hWnd, bool enabled)
+ const uint MF_BYCOMMAND = 0;
+ const uint MF_DISABLED = 2;
+ const uint MF_ENABLED = 0;
+ const uint SC_CLOSE = 0xF060;
+ const uint PBM_SETRANGE = WM_USER + 1;
+ const uint PBM_SETRANGE32 = WM_USER + 6;
+ const uint PBM_SETPOS = WM_USER + 2;
+ const uint PBM_SETSTATE = WM_USER + 16;
+ const uint PBST_NORMAL = 0x0001;
+ const uint PBST_ERROR = 0x0002;
+ const uint PBST_PAUSED = 0x0003;
+
+ public static void SetNativeEnabled(Form form, bool enabled)
{
- SetWindowLong(hWnd, GWL_STYLE, GetWindowLong(hWnd, GWL_STYLE) &
+ SetWindowLong(form.Handle, GWL_STYLE, GetWindowLong(form.Handle, GWL_STYLE) &
~WS_DISABLED | (enabled ? 0 : WS_DISABLED));
+
+ if (enabled)
+ form.Focus();
+ }
+
+ public static void SetProgressBarState(ProgressBar pbar, ProgressBarState state)
+ {
+ SendMessage(pbar.Handle, PBM_SETSTATE, (uint)state, 0);
+ }
+
+ public static void SetProgressBarValue(ProgressBar pbar, int value, int max)
+ {
+ SendMessage(pbar.Handle, PBM_SETRANGE32, 0, (uint)max);
+ SendMessage(pbar.Handle, PBM_SETPOS, (uint)value, 0);
}
public enum DeviceCap
@@ -330,6 +364,12 @@ public static bool GetButtonFlag(ButtonBase button, ButtonFlags flag)
var dynMethod = typeof(ButtonBase).GetMethod("GetFlag", BindingFlags.NonPublic | BindingFlags.Instance);
return (bool)dynMethod.Invoke(button, new object[] { (int)flag });
}
+
+ public static void SetCloseButtonEnabled(IWin32Window form, bool enabled)
+ {
+ var sm = GetSystemMenu(form.Handle, false);
+ EnableMenuItem(sm, SC_CLOSE, MF_BYCOMMAND | (enabled ? MF_ENABLED : MF_DISABLED));
+ }
}
internal class SubClass : System.Windows.Forms.NativeWindow
@@ -403,4 +443,11 @@ private int OnSubClassedWndProc(ref Message m)
return 0;
}
}
+
+ public enum ProgressBarState : uint
+ {
+ Normal = 0x0001,
+ Error = 0x0002,
+ Paused = 0x0003
+ }
}
diff --git a/CapsLockIndicatorV3/Program.cs b/CapsLockIndicatorV3/Program.cs
index 15e267c..6412f07 100644
--- a/CapsLockIndicatorV3/Program.cs
+++ b/CapsLockIndicatorV3/Program.cs
@@ -63,10 +63,13 @@ enum DisplayType
[STAThread]
private static void Main(string[] args)
{
+ CleanupPreviousVersion();
+ ApplyLocaleUpdates();
+
SettingsManager.Load();
- if (Environment.OSVersion.Version.Major >= 6)
- SetProcessDPIAware();
+ //if (Environment.OSVersion.Version.Major >= 6)
+ // SetProcessDPIAware();
if (mutex.WaitOne(TimeSpan.Zero, true)) // No instance is open
{
@@ -119,11 +122,70 @@ private static void Main(string[] args)
}
}
+ private static void ApplyLocaleUpdates()
+ {
+ var currExe = Assembly.GetExecutingAssembly().Location;
+ var currDir = Path.GetDirectoryName(currExe);
+
+ var updateDir = Path.Combine(currDir, LanguageDownloadProgressForm.DLL_UPDATE_DIR);
+
+ if (Directory.Exists(updateDir))
+ {
+ var dlls = Directory.GetFiles(updateDir, "*.dll");
+
+ foreach (var dll in dlls)
+ {
+ var targetDir = Path.Combine(currDir, Path.GetFileNameWithoutExtension(dll));
+ var targetFile = Path.Combine(targetDir, LanguageDownloadProgressForm.DLL_NAME);
+
+ Directory.CreateDirectory(targetDir);
+
+ if (File.Exists(targetFile))
+ File.Delete(targetFile);
+
+ File.Move(dll, targetFile);
+ }
+
+ Directory.Delete(updateDir, true);
+ }
+ }
+
public static void ReleaseMutex()
{
mutex.ReleaseMutex();
mutex.Close();
mutex.Dispose();
}
+
+ public static void CleanupPreviousVersion()
+ {
+ var currExe = Assembly.GetExecutingAssembly().Location;
+ var currDir = Path.GetDirectoryName(currExe);
+ var bakFile = Path.Combine(currDir, DownloadDialog.BAK_NAME);
+ if (File.Exists(bakFile))
+ File.Delete(bakFile);
+ }
+
+ public static void Restart()
+ {
+ ReleaseMutex();
+
+ Thread.Sleep(100);
+ var currExe = Assembly.GetExecutingAssembly().Location;
+
+ var psi = new ProcessStartInfo("powershell", "Start-Sleep -Milliseconds 1000; & \"" + currExe + "\"");
+ psi.UseShellExecute = false;
+ psi.CreateNoWindow = true;
+ Process.Start(psi);
+
+ Application.Exit();
+
+ //for (var i = Application.OpenForms.Count - 1; i >= 0; --i)
+ //Application.OpenForms[i].Close();
+
+ //AppDomain.Unload(AppDomain.CurrentDomain);
+
+ //Application.Restart();
+ }
}
}
diff --git a/CapsLockIndicatorV3/ProgressDialog.cs b/CapsLockIndicatorV3/ProgressDialog.cs
index ced3094..00f2387 100644
--- a/CapsLockIndicatorV3/ProgressDialog.cs
+++ b/CapsLockIndicatorV3/ProgressDialog.cs
@@ -45,11 +45,11 @@ public static async void DoWorkAsync(Form parent, Action
public static async Task DoWork(Form parent, Action> work)
{
var dialog = new ProgressDialog();
- Native.SetNativeEnabled(parent.Handle, false);
+ Native.SetNativeEnabled(parent, false);
dialog.Show(parent);
var prog = new Progress(p => dialog.ReportProgress(p));
await Task.Run(() => work(prog));
- Native.SetNativeEnabled(parent.Handle, true);
+ Native.SetNativeEnabled(parent, true);
dialog.Close();
}
@@ -76,7 +76,7 @@ private static void _doWorkAsync(Form parent, Action> wo
var dialog = new ProgressDialog();
dialog.Invoke(new MethodInvoker(() =>
{
- Native.SetNativeEnabled(parent.Handle, false);
+ Native.SetNativeEnabled(parent, false);
dialog.Show(parent);
}));
var prog = new Progress(p =>
@@ -92,7 +92,7 @@ private static void _doWorkAsync(Form parent, Action> wo
work(prog);
dialog.Invoke(new MethodInvoker(() =>
{
- Native.SetNativeEnabled(parent.Handle, true);
+ Native.SetNativeEnabled(parent, true);
dialog.Close();
}));
}
diff --git a/CapsLockIndicatorV3/Properties/AssemblyInfo.cs b/CapsLockIndicatorV3/Properties/AssemblyInfo.cs
index 9e6458e..1d7f81b 100644
--- a/CapsLockIndicatorV3/Properties/AssemblyInfo.cs
+++ b/CapsLockIndicatorV3/Properties/AssemblyInfo.cs
@@ -24,6 +24,6 @@
//
// You can specify all the values or you can use the default the Revision and
// Build Numbers by using the '*' as shown below:
-[assembly: AssemblyVersion("3.14.0.0")]
-[assembly: AssemblyFileVersion("3.14.0.0")]
+[assembly: AssemblyVersion("3.15.0.0")]
+[assembly: AssemblyFileVersion("3.15.0.0")]
[assembly: Guid ("6f54c357-0542-4d7d-9225-338bc3cd7834")]
diff --git a/CapsLockIndicatorV3/Resources/defaultSettings.txt b/CapsLockIndicatorV3/Resources/defaultSettings.txt
index b9bf865..eff4e8c 100644
--- a/CapsLockIndicatorV3/Resources/defaultSettings.txt
+++ b/CapsLockIndicatorV3/Resources/defaultSettings.txt
@@ -15,6 +15,7 @@ b:firstRun=True
b:searchForUpdatesAfterResume=True
b:showNotificationOnAllScreens=False
b:supressEOLMessage=False
+b:dontOverwriteApplicationOnUpdate=False
c:indBgColourActive=255;66;66;66
c:indFgColourActive=255;255;255;255
c:indBdColourActive=255;77;180;52
diff --git a/CapsLockIndicatorV3/Resources/settingsDescriptions.txt b/CapsLockIndicatorV3/Resources/settingsDescriptions.txt
index 5fa12df..7ec89bf 100644
--- a/CapsLockIndicatorV3/Resources/settingsDescriptions.txt
+++ b/CapsLockIndicatorV3/Resources/settingsDescriptions.txt
@@ -1,36 +1,37 @@
-numIco Show icon for num lock
-capsIco Show icon for caps lock
-scrollIco Show icon for scroll lock
-numInd Show notification for num lock
-capsInd Show notification for caps lock
-scrollInd Show notification for scroll lock
-noIco Don't show icons
-noInd Don't show notifications
-darkMode Enable dark color scheme (Has no effect on anything below Windows 10)
-hideOnStartup Hide CapsLock Indicator on startup
-checkForUpdates Automatically check for updates
-upgradeRequired Internal. :b:{Do not change!}
-alwaysShowWhenActive Don't hide overlay as long as key is active
-firstRun If true, shows the :i:{First run} dialog on next start
-searchForUpdatesAfterResume Whether CapsLock Indicator should search for updates after a system resume (i.e. after hibernation)
-showNotificationOnAllScreens :b:{Experimental:} Show notification on all screens instead of the screen containg the cursor
-supressEOLMessage Internal. :b:{Do not change!}
-indBgColourActive Background color of overlay when key is active
-indFgColourActive Text color of overlay when key is active
-indBdColourActive Border color of overlay when key is active
-indBgColourInactive Background color of overlay when key is inactive
-indFgColourInactive Text color of overlay when key is inactive
-indBdColourInactive Border color of overlay when key is inactive
-indFont Overlay font
-indDisplayTime Overlay display time
-indOpacity Overlay opacity
-bdSize Overlay border width
-versionNo Internal. :b:{Do not change!}
-overlayPosition Position of the overlay
-customMessageCapsOn Custom message to display when caps lock was activated
-customMessageCapsOff Custom message to display when caps lock was deactivated
-customMessageNumOn Custom message to display when num lock was activated
-customMessageNumOff Custom message to display when num lock was deactivated
-customMessageScrollOn Custom message to display when scroll lock was activated
-customMessageScrollOff Custom message to display when scroll lock was deactivated
-selectedLanguage Selected language
\ No newline at end of file
+numIco Show icon for num lock
+capsIco Show icon for caps lock
+scrollIco Show icon for scroll lock
+numInd Show notification for num lock
+capsInd Show notification for caps lock
+scrollInd Show notification for scroll lock
+noIco Don't show icons
+noInd Don't show notifications
+darkMode Enable dark color scheme (Has no effect on anything below Windows 10)
+hideOnStartup Hide CapsLock Indicator on startup
+checkForUpdates Automatically check for updates
+upgradeRequired Internal. :b:{Do not change!}
+alwaysShowWhenActive Don't hide overlay as long as key is active
+firstRun If true, shows the :i:{First run} dialog on next start
+searchForUpdatesAfterResume Whether CapsLock Indicator should search for updates after a system resume (i.e. after hibernation)
+showNotificationOnAllScreens :b:{Experimental:} Show notification on all screens instead of the screen containg the cursor
+supressEOLMessage Internal. :b:{Do not change!}
+dontOverwriteApplicationOnUpdate If true, restores the previous behaviour where on each update a new executable would be downloaded. If false, replaces the old executable.
+indBgColourActive Background color of overlay when key is active
+indFgColourActive Text color of overlay when key is active
+indBdColourActive Border color of overlay when key is active
+indBgColourInactive Background color of overlay when key is inactive
+indFgColourInactive Text color of overlay when key is inactive
+indBdColourInactive Border color of overlay when key is inactive
+indFont Overlay font
+indDisplayTime Overlay display time
+indOpacity Overlay opacity
+bdSize Overlay border width
+versionNo Internal. :b:{Do not change!}
+overlayPosition Position of the overlay
+customMessageCapsOn Custom message to display when caps lock was activated
+customMessageCapsOff Custom message to display when caps lock was deactivated
+customMessageNumOn Custom message to display when num lock was activated
+customMessageNumOff Custom message to display when num lock was deactivated
+customMessageScrollOn Custom message to display when scroll lock was activated
+customMessageScrollOff Custom message to display when scroll lock was deactivated
+selectedLanguage Selected language
\ No newline at end of file
diff --git a/CapsLockIndicatorV3/SysIcons.cs b/CapsLockIndicatorV3/SysIcons.cs
index d674f78..94c6820 100644
--- a/CapsLockIndicatorV3/SysIcons.cs
+++ b/CapsLockIndicatorV3/SysIcons.cs
@@ -21,6 +21,7 @@ public static class SysIcons
public enum SHSTOCKICONID : uint
{
SIID_WARNING = 78,
+ SIID_ERROR = 80,
SIID_SHIELD = 131,
}
diff --git a/CapsLockIndicatorV3/VersionCheck.cs b/CapsLockIndicatorV3/VersionCheck.cs
index 541fbaf..61e2188 100644
--- a/CapsLockIndicatorV3/VersionCheck.cs
+++ b/CapsLockIndicatorV3/VersionCheck.cs
@@ -9,20 +9,27 @@ namespace CapsLockIndicatorV3
///
/// This class checks if a new version is available.
///
- static class VersionCheck
+ public static class VersionCheck
{
- const string CheckURL = "https://cli.jonaskohl.de/version.php?details&xml&newClient3=true";
+ const string CheckURL = "https://cli.jonaskohl.de/!/version?details&xml&newClient3=true";
public static string newVersion = null;
- public static async void IsLatestVersion(Action callback, bool isManualCheck)
+ private static string version;
+
+ public static string UserAgent =>
+ "Mozilla/4.0 (compatible; MSIE 7.0; " + Environment.OSVersion.ToString() + "; " + (Environment.Is64BitOperatingSystem? "Win64; x64" : "Win32; x86") + ") Trident 7.0 (KHTML, like Gecko) CapsLockIndicator/" + version;
+
+ static VersionCheck()
{
Assembly assembly = Assembly.GetExecutingAssembly();
- FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(assembly.Location);
- string version = fvi.FileVersion;
- var userAgentString = "Mozilla/4.0 (compatible; MSIE 7.0; " + Environment.OSVersion.ToString() + "; " + (Environment.Is64BitOperatingSystem ? "Win64; x64" : "Win32; x86") + ") Trident 7.0 (KHTML, like Gecko) CapsLockIndicator/" + version;
+ FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(assembly.Location);
+ version = fvi.FileVersion;
+ }
+ public static async void IsLatestVersion(Action callback, bool isManualCheck)
+ {
WebClient client = new WebClient();
- client.Headers.Add(HttpRequestHeader.UserAgent, userAgentString);
+ client.Headers.Add(HttpRequestHeader.UserAgent, UserAgent);
ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
try
diff --git a/CapsLockIndicatorV3/strings.Designer.cs b/CapsLockIndicatorV3/strings.Designer.cs
index 912c824..da2dda3 100644
--- a/CapsLockIndicatorV3/strings.Designer.cs
+++ b/CapsLockIndicatorV3/strings.Designer.cs
@@ -78,6 +78,33 @@ internal static string advancedSettings {
}
}
+ ///
+ /// Looks up a localized string similar to I understand the above mentioned risks and wish to proceed.
+ ///
+ internal static string advancedSettingsConfirmation {
+ get {
+ return ResourceManager.GetString("advancedSettingsConfirmation", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Advanced settings.
+ ///
+ internal static string advancedSettingsTitle {
+ get {
+ return ResourceManager.GetString("advancedSettingsTitle", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Changing advanced settings may cause unexpected behaviour and may lead to an unstable state of CapsLock Indicator. Please restart CapsLock Indicator after changing settings. Only change settings if you know what you are doing! Use this editor at your own risk!.
+ ///
+ internal static string advancedSettingsWarning {
+ get {
+ return ResourceManager.GetString("advancedSettingsWarning", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Automatically check for updates.
///
@@ -115,7 +142,7 @@ internal static string borderColourActivatedButton {
}
///
- /// Looks up a localized string similar to Border colour deactivated.
+ /// Looks up a localized string similar to Border colour decativated.
///
internal static string borderColourDeactivatedButton {
get {
@@ -132,6 +159,15 @@ internal static string borderThicknessGroup {
}
}
+ ///
+ /// Looks up a localized string similar to C&ancel.
+ ///
+ internal static string cancel {
+ get {
+ return ResourceManager.GetString("cancel", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Caps lock.
///
@@ -159,6 +195,15 @@ internal static string checkingForUpdates {
}
}
+ ///
+ /// Looks up a localized string similar to &Close.
+ ///
+ internal static string close {
+ get {
+ return ResourceManager.GetString("close", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Colours.
///
@@ -249,6 +294,15 @@ internal static string downloadMoreTranslations {
}
}
+ ///
+ /// Looks up a localized string similar to Download translations.
+ ///
+ internal static string downloadTranslationsTitle {
+ get {
+ return ResourceManager.GetString("downloadTranslationsTitle", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to &Exit Application.
///
@@ -268,7 +322,16 @@ internal static string exitMessage {
}
///
- /// Looks up a localized string similar to &Allow CapsLock Indicator to periodically check for updates online (can be changed later).
+ /// Looks up a localized string similar to Failed to download translation.
+ ///
+ internal static string failedToDownloadTranslationToolTip {
+ get {
+ return ResourceManager.GetString("failedToDownloadTranslationToolTip", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Allow CapsLock Indicator to periodically check for updates online (can be changed later).
///
internal static string firstRunAllowUpdateCheck {
get {
@@ -385,7 +448,7 @@ internal static string foregroundColourActivatedButton {
}
///
- /// Looks up a localized string similar to Text colour deactivated.
+ /// Looks up a localized string similar to Text colour activated.
///
internal static string foregroundColourDeactivatedButton {
get {
@@ -402,6 +465,15 @@ internal static string generalIconBalloonText {
}
}
+ ///
+ /// Looks up a localized string similar to Warning!.
+ ///
+ internal static string headerWarning {
+ get {
+ return ResourceManager.GetString("headerWarning", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Hide on start up.
///
@@ -501,6 +573,15 @@ internal static string keyIsOn {
}
}
+ ///
+ /// Looks up a localized string similar to &No.
+ ///
+ internal static string no {
+ get {
+ return ResourceManager.GetString("no", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to &Notification settings.
///
@@ -528,6 +609,15 @@ internal static string numLock {
}
}
+ ///
+ /// Looks up a localized string similar to &OK.
+ ///
+ internal static string ok {
+ get {
+ return ResourceManager.GetString("ok", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Opacity.
///
@@ -564,6 +654,15 @@ internal static string reloadedIconsInfo {
}
}
+ ///
+ /// Looks up a localized string similar to &Restart.
+ ///
+ internal static string restart {
+ get {
+ return ResourceManager.GetString("restart", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to &Save && close.
///
@@ -717,6 +816,15 @@ internal static string updateInfoFormat {
}
}
+ ///
+ /// Looks up a localized string similar to Some of the currently installed translations seem to be outdated. Do you want to update them now?.
+ ///
+ internal static string updateLocaleMessageBox {
+ get {
+ return ResourceManager.GetString("updateLocaleMessageBox", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to &Update now.
///
@@ -725,5 +833,14 @@ internal static string updateNow {
return ResourceManager.GetString("updateNow", resourceCulture);
}
}
+
+ ///
+ /// Looks up a localized string similar to &Yes.
+ ///
+ internal static string yes {
+ get {
+ return ResourceManager.GetString("yes", resourceCulture);
+ }
+ }
}
}
diff --git a/CapsLockIndicatorV3/strings.de.resx b/CapsLockIndicatorV3/strings.de.resx
index 12eb3e5..5b2c44b 100644
--- a/CapsLockIndicatorV3/strings.de.resx
+++ b/CapsLockIndicatorV3/strings.de.resx
@@ -121,7 +121,16 @@
Farbschema wird angepasst... Bitte warten...
- Erw. Einstellungen
+ Erweiterte Optionen
+
+
+ Ich verstehe die oben genannten Risiken und möchte fortfahren
+
+
+ Erweiterte Optionen
+
+
+ Das Ändern der erweiterten Optionen kann zu unerwartetem Verhalten und einem instablien Zustand von CapsLock Indicator führen. Bitte starten Sie CapsLock Indicator neu, nachdem Sie die Einstellungen geändert haben. Ändern Sie nur Einstellungen, sofern Sie wissen, was Sie machen! Verwenden Sie diesen Editor auf eigene Gefahr!
Automatisch nach Aktualisierungen suchen
@@ -141,6 +150,9 @@
Randstärke
+
+ &Abbrechen
+
Feststelltaste
@@ -150,6 +162,9 @@
Suche nach Updates...
+
+ &Schließen
+
Farben
@@ -180,14 +195,20 @@
Mehr Sprachen herunterladen...
+
+ Übersetzungen herunterladen
+
V&erlassen
Die Anwendung zu verlassen heißt, dass die Icons und Benachrichtigungen nicht länger angezeigt weden. Trotzdem verlassen?
+
+ Herunterladen der Übersetzung fehlgeschlagen
+
- Zulassen, dass CapsLock Indicator online nach Aktualisierungen sucht
+ &Zulassen, dass CapsLock Indicator online nach Aktualisierungen sucht
&Dunkel
@@ -231,6 +252,9 @@
CapsLock Indicator kann wieder angezeigt werden, wenn Sie auf dieses Symbol doppelklicken.
+
+ &Warnung!
+
Beim Starten verstecken
@@ -264,6 +288,9 @@
{0} ist an
+
+ &Nein
+
Benachr.-Einst.
@@ -273,6 +300,9 @@
Num-Lock
+
+ &OK
+
Deckkraft
@@ -285,6 +315,9 @@
Symbole neu geladen
+
+ &Neu starten
+
&Speichern && schließen
@@ -304,13 +337,13 @@
Keine Icons zeigen
- Keine Benachr. anzeigen
+ Keine Benachrichtigung anzeigen
- Zeige Benachr., wenn...
+ Zeige Benachrichtigung wenn...
- Benachr. immer anz., wenn aktiv
+ Benachrichtigung immer anzeigen, wenn aktiv
Autostart
@@ -336,7 +369,13 @@
Version {0}, erschienen {1}
+
+ Einige installierte Übersetzungen sind veraltet. Möchten Sie diese jetzt aktualisieren?
+
Jetzt update&n
+
+ &Ja
+
\ No newline at end of file
diff --git a/CapsLockIndicatorV3/strings.fr.resx b/CapsLockIndicatorV3/strings.fr.resx
index c6f0e57..4030ee3 100644
--- a/CapsLockIndicatorV3/strings.fr.resx
+++ b/CapsLockIndicatorV3/strings.fr.resx
@@ -117,24 +117,18 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
Paramètres Avancées
Label of the hyperlink that opens the settings file
-
-
Couleur de fond activée
The caption for the "Background colour activated" button.
@@ -144,15 +138,15 @@
The caption for the "Background colour deactivated" button.
- Couleur de bord activée
+ Couleur de bord activé
The caption for the "Border colour activated" button.
- Couleur de bord désactivée
+ Couleur de bord désactivé
The caption for the "Border colour deactivated" button.
- Epaisseur des bords
+ Épaisseur des bords
Label of the border thickness groupbox
@@ -160,7 +154,7 @@
The name of the caps lock key
- Vérifier les mises à jours
+ Vérifier les mises à jo&urs
The caption for the button that manually checks for updates. The character after the "&" is the hotkey that is used with the ALT key.
@@ -179,20 +173,14 @@
&Afficher
Used in the context menu of the CLI tray icon.
-
-
-
-
&Annuler
The caption for the "Dismiss" button. The character after the "&" is the hotkey that is used with the ALT key.
@@ -201,19 +189,16 @@
Durée d'affichage
The title for the "Display time" group box
-
-
Télécharger &manuellement
The caption for the "Download manually" button. The character after the "&" is the hotkey that is used with the ALT key.
- Télécharger plus de traductions....
+ Télécharger plus de traductions...
The last dropdown item in the locale dropdown.
@@ -228,34 +213,22 @@
Autoriser CapsLock Indicator à vérifier périodiquement les mises à jour en ligne (peut être modifié plus tard)
Label of the checkbox that determines whether or not CLI should search for updates
-
-
-
-
-
-
-
-
Contribuer
Label of the hyperlink that takes you to CLI's GitHub page
@@ -269,15 +242,15 @@
The heading of the first-run dialog
- Merci d'avoir choisi CapsLock Indicator ! Ce programme est open-source et gratuit, il l'a toujours été, et le sera toujours ! Souhaitez-vous contribuer vous-même à CapsLock Indicator ? Visitez le lien ci-dessous pour plus d'informations ! Veuillez également prendre un moment pour examiner les paramètres ci-dessous!
+ Merci d'avoir choisi CapsLock Indicator ! Ce programme est open-source et gratuit, il l'a toujours été, et le sera toujours ! Souhaitez-vous contribuer vous-même à CapsLock Indicator ? Visitez le lien ci-dessous pour plus d'informations ! Veuillez également prendre un moment pour examiner les paramètres ci-dessous !
The message of the first-run dialog
- Quelles informations seront envoyées?
+ Quelles informations seront envoyées ?
The label of the hyperlink that shows which information will be sent on each update check
- &C'est Partie!
+ &C'est Parti !
Button that starts the application. The character after the "&" is the hotkey that is used with the ALT key.
@@ -285,11 +258,11 @@
The title for the "Font" group box
- Couleur de texte activée
+ Couleur de texte activé
The caption for the "Text colour activated" button.
- Couleur de texte désactivée
+ Couleur de texte désactivé
The caption for the "Text colour deactivated" button.
@@ -304,48 +277,30 @@
&Cacher la fenêtre
The caption for the button that hides the window. The character after the "&" is the hotkey that is used with the ALT key.
-
-
-
-
-
-
-
-
-
-
-
-
{0} mis à jour
Used for the check boxes in the "Show notification when..." group box. "{0}" will be replaced with the key name
@@ -382,35 +337,26 @@
En permanence
Text to display instead of the time if indicator overlay display is set to permanently.
-
-
- &Sauvegarder && et quitter
+ &Sauvegarder et quitter
The caption for the "Save & Close" button. The character after the "&" is the hotkey that is used with the ALT key. Use two "&" to display a "&" character
Arrêt défil.
The name of the scroll lock key
-
-
-
-
Afficher les icônes pour...
The title for the "Show icons for..." group box
@@ -428,54 +374,39 @@
The title for the "Show notification when..." group box
- Toujours afficher l'overlay en mode Activé
+ Toujours afficher l'overlay quand actif
The label for the check box that indicates whether overlay should only be shown when active
Démarrer à l'ouverture de session
The label for the check box that enables or disabled the auto start.
-
-
-
-
-
-
-
-
-
-
Une mise à jour de CapsLock Indicator est disponible !
The title for the update window.
- Version {0}, publiée le {1}
+ Version {0}, publiée le {1}
Displayed in the "Update Available" dialog. {0} is the version, {1} is the release date and time.
diff --git a/CapsLockIndicatorV3/strings.ko.resx b/CapsLockIndicatorV3/strings.ko.resx
index c9cdbda..2924533 100644
--- a/CapsLockIndicatorV3/strings.ko.resx
+++ b/CapsLockIndicatorV3/strings.ko.resx
@@ -117,24 +117,18 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
고급 설정
Label of the hyperlink that opens the settings file
-
-
활성화시 배경 색
The caption for the "Background colour activated" button.
@@ -179,20 +173,14 @@
창 보이기(&S)
Used in the context menu of the CLI tray icon.
-
-
-
-
창 숨기기(&D)
The caption for the "Dismiss" button. The character after the "&" is the hotkey that is used with the ALT key.
@@ -201,13 +189,10 @@
노출 시간
The title for the "Display time" group box
-
-
수동 다운로드(&m)
The caption for the "Download manually" button. The character after the "&" is the hotkey that is used with the ALT key.
@@ -228,34 +213,22 @@
주기적인 업데이트 확인을 허용합니다. (설정 변경 가능)
Label of the checkbox that determines whether or not CLI should search for updates
-
-
-
-
-
-
-
-
기여하기
Label of the hyperlink that takes you to CLI's GitHub page
@@ -304,48 +277,30 @@
창 숨기기(&H)
The caption for the button that hides the window. The character after the "&" is the hotkey that is used with the ALT key.
-
-
-
-
-
-
-
-
-
-
-
-
{0} 변경됨
Used for the check boxes in the "Show notification when..." group box. "{0}" will be replaced with the key name
@@ -382,13 +337,10 @@
계속 유지
Text to display instead of the time if indicator overlay display is set to permanently.
-
-
저장 후 종료(&S)
The caption for the "Save & Close" button. The character after the "&" is the hotkey that is used with the ALT key. Use two "&" to display a "&" character
@@ -397,20 +349,14 @@
Scroll lock
The name of the scroll lock key
-
-
-
-
아이콘 설정
The title for the "Show icons for..." group box
@@ -435,41 +381,26 @@
시작시 자동 시작
The label for the check box that enables or disabled the auto start.
-
-
-
-
-
-
-
-
-
-
CapsLock Indicator 업데이트가 있습니다.
The title for the update window.
diff --git a/CapsLockIndicatorV3/strings.resx b/CapsLockIndicatorV3/strings.resx
index 4889733..ce48fa5 100644
--- a/CapsLockIndicatorV3/strings.resx
+++ b/CapsLockIndicatorV3/strings.resx
@@ -125,6 +125,18 @@
Advanced Settings
Label of the hyperlink that opens the settings file
+
+ I understand the above mentioned risks and wish to proceed
+ Confirmation text for Advanced Settings
+
+
+ Advanced settings
+ Window text for Advanced Settings
+
+
+ Changing advanced settings may cause unexpected behaviour and may lead to an unstable state of CapsLock Indicator. Please restart CapsLock Indicator after changing settings. Only change settings if you know what you are doing! Use this editor at your own risk!
+ Warning text for Advanced Settings
+
Automatically check for updates
Tooltip for the checkbox next to the update button
@@ -142,13 +154,17 @@
The caption for the "Border colour activated" button.
- Border colour deactivated
+ Border colour decativated
The caption for the "Border colour deactivated" button.
Border thickness
Label of the border thickness groupbox
+
+ C&ancel
+ Generic label for Cancel button
+
Caps lock
The name of the caps lock key
@@ -161,6 +177,10 @@
Checking for updates...
The caption for the "Check for updates" button when it's searching for updates.
+
+ &Close
+ Generic label for Close button
+
Colours
The title for the "Colours" group box
@@ -201,6 +221,10 @@
Download more translations...
The last dropdown item in the locale dropdown.
+
+ Download translations
+ Window title for the download translations dialog
+
&Exit Application
The caption for the button that exits the application. The character after the "&" is the hotkey that is used with the ALT key.
@@ -209,8 +233,12 @@
Exiting the application means the icons and notifications are no longer displayed. Exit anyway?
The message to display on application exit
+
+ Failed to download translation
+ Tooltip for failed translation download
+
- &Allow CapsLock Indicator to periodically check for updates online (can be changed later)
+ Allow CapsLock Indicator to periodically check for updates online (can be changed later)
Label of the checkbox that determines whether or not CLI should search for updates
@@ -262,13 +290,17 @@
The caption for the "Text colour activated" button.
- Text colour deactivated
+ Text colour activated
The caption for the "Text colour deactivated" button.
You can show CapsLock Indicator again by double clicking on this icon.
The text that is shown in the icon balloon tip when CLI is being hidden.
+
+ Warning!
+ Generic header for Warning
+
Hide on start up
Used for the hide on startup checkbox
@@ -313,6 +345,10 @@
{0} is on
The text to display in the notification when a key is on. "{0}" will be replaced with the key name
+
+ &No
+ Generic label for No button
+
&Notification settings
The caption for the button that opens the notification settings. The character after the "&" is the hotkey that is used with the ALT key.
@@ -325,6 +361,10 @@
Num lock
The name of the num lock key
+
+ &OK
+ Generic label for OK button
+
Opacity
The title for the "Opacity" group box
@@ -341,6 +381,10 @@
Reloaded icons
Shown in a notification when hot-reloading icons.
+
+ &Restart
+ Generic label for Restart button
+
&Save && close
The caption for the "Save & Close" button. The character after the "&" is the hotkey that is used with the ALT key. Use two "&" to display a "&" character
@@ -409,8 +453,16 @@
Version {0}, released {1}
Displayed in the "Update Available" dialog. {0} is the version, {1} is the release date and time.
+
+ Some of the currently installed translations seem to be outdated. Do you want to update them now?
+ Message box when old translations are found
+
&Update now
The caption for the "Update now" button. The character after the "&" is the hotkey that is used with the ALT key.
+
+ &Yes
+ Generic label for Yes button
+
\ No newline at end of file