diff --git a/Days Counter.csproj b/Days Counter.csproj
index 27aef21..300ab85 100644
--- a/Days Counter.csproj
+++ b/Days Counter.csproj
@@ -161,6 +161,8 @@
+
+
diff --git a/MainWindow.Designer.cs b/MainWindow.Designer.cs
index dcf7d63..e3350c4 100644
--- a/MainWindow.Designer.cs
+++ b/MainWindow.Designer.cs
@@ -34,21 +34,20 @@ private void InitializeComponent()
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
this.statusStrip = new System.Windows.Forms.StatusStrip();
this.labelInformation = new System.Windows.Forms.ToolStripStatusLabel();
+ this.toolStripSplitButtonStayOnTop = new System.Windows.Forms.ToolStripSplitButton();
+ this.toolStripMenuItemStayNotOnTop = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripMenuItemStayOnTop = new System.Windows.Forms.ToolStripMenuItem();
this.labelTitle = new System.Windows.Forms.Label();
this.labelDescription = new System.Windows.Forms.Label();
this.labelCopyright = new System.Windows.Forms.Label();
- this.buttonDateOfTheBirth = new System.Windows.Forms.Button();
this.dateTimePickerDateOfTheBirth = new System.Windows.Forms.DateTimePicker();
this.labelDateOfTheBirth = new System.Windows.Forms.Label();
- this.buttonSwitchDateIn = new System.Windows.Forms.Button();
this.dateTimePickerDateIn = new System.Windows.Forms.DateTimePicker();
this.numericUpDownDays = new System.Windows.Forms.NumericUpDown();
this.dateTimePickerDateOut = new System.Windows.Forms.DateTimePicker();
this.labelDateIn = new System.Windows.Forms.Label();
this.labelDateOut = new System.Windows.Forms.Label();
this.dateTimePickerEnd = new System.Windows.Forms.DateTimePicker();
- this.buttonSwitchDateBegin = new System.Windows.Forms.Button();
- this.buttonSwitchDateEnd = new System.Windows.Forms.Button();
this.dateTimePickerBegin = new System.Windows.Forms.DateTimePicker();
this.labelDateBegin = new System.Windows.Forms.Label();
this.labelDateEnd = new System.Windows.Forms.Label();
@@ -56,6 +55,10 @@ private void InitializeComponent()
this.labelDaysCounted = new System.Windows.Forms.Label();
this.labelDaysOld = new System.Windows.Forms.Label();
this.labelDaysSpan = new System.Windows.Forms.Label();
+ this.buttonSwitchDateEnd = new System.Windows.Forms.Button();
+ this.buttonSwitchDateBegin = new System.Windows.Forms.Button();
+ this.buttonSwitchDateIn = new System.Windows.Forms.Button();
+ this.buttonDateOfTheBirth = new System.Windows.Forms.Button();
this.BottomToolStripPanel = new System.Windows.Forms.ToolStripPanel();
this.TopToolStripPanel = new System.Windows.Forms.ToolStripPanel();
this.RightToolStripPanel = new System.Windows.Forms.ToolStripPanel();
@@ -98,7 +101,8 @@ private void InitializeComponent()
this.statusStrip.AccessibleRole = System.Windows.Forms.AccessibleRole.StatusBar;
this.statusStrip.Dock = System.Windows.Forms.DockStyle.None;
this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.labelInformation});
+ this.labelInformation,
+ this.toolStripSplitButtonStayOnTop});
this.statusStrip.Location = new System.Drawing.Point(0, 0);
this.statusStrip.Name = "statusStrip";
this.statusStrip.RenderMode = System.Windows.Forms.ToolStripRenderMode.ManagerRenderMode;
@@ -119,8 +123,59 @@ private void InitializeComponent()
this.labelInformation.AccessibleRole = System.Windows.Forms.AccessibleRole.StaticText;
this.labelInformation.AutoToolTip = true;
this.labelInformation.Name = "labelInformation";
- this.labelInformation.Size = new System.Drawing.Size(70, 17);
+ this.labelInformation.Size = new System.Drawing.Size(307, 17);
+ this.labelInformation.Spring = true;
this.labelInformation.Text = "information";
+ this.labelInformation.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // toolStripSplitButtonStayOnTop
+ //
+ this.toolStripSplitButtonStayOnTop.AccessibleDescription = "Set or unset the window to the top";
+ this.toolStripSplitButtonStayOnTop.AccessibleName = "Stay on top";
+ this.toolStripSplitButtonStayOnTop.AccessibleRole = System.Windows.Forms.AccessibleRole.SplitButton;
+ this.toolStripSplitButtonStayOnTop.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
+ this.toolStripSplitButtonStayOnTop.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.toolStripMenuItemStayNotOnTop,
+ this.toolStripMenuItemStayOnTop});
+ this.toolStripSplitButtonStayOnTop.Image = global::DaysCounter.Properties.Resources.application;
+ this.toolStripSplitButtonStayOnTop.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.toolStripSplitButtonStayOnTop.Name = "toolStripSplitButtonStayOnTop";
+ this.toolStripSplitButtonStayOnTop.Size = new System.Drawing.Size(32, 20);
+ this.toolStripSplitButtonStayOnTop.Text = "Stay not on top";
+ this.toolStripSplitButtonStayOnTop.ButtonClick += new System.EventHandler(this.ToolStripSplitButtonStayOnTop_ButtonClick);
+ this.toolStripSplitButtonStayOnTop.MouseEnter += new System.EventHandler(this.SetStatusbar_Enter);
+ this.toolStripSplitButtonStayOnTop.MouseLeave += new System.EventHandler(this.ClearStatusbar_Leave);
+ //
+ // toolStripMenuItemStayNotOnTop
+ //
+ this.toolStripMenuItemStayNotOnTop.AccessibleDescription = "Unset the window from the top";
+ this.toolStripMenuItemStayNotOnTop.AccessibleName = "Stay on top";
+ this.toolStripMenuItemStayNotOnTop.AccessibleRole = System.Windows.Forms.AccessibleRole.MenuItem;
+ this.toolStripMenuItemStayNotOnTop.AutoToolTip = true;
+ this.toolStripMenuItemStayNotOnTop.Checked = true;
+ this.toolStripMenuItemStayNotOnTop.CheckState = System.Windows.Forms.CheckState.Checked;
+ this.toolStripMenuItemStayNotOnTop.Image = global::DaysCounter.Properties.Resources.application;
+ this.toolStripMenuItemStayNotOnTop.Name = "toolStripMenuItemStayNotOnTop";
+ this.toolStripMenuItemStayNotOnTop.ShortcutKeyDisplayString = "";
+ this.toolStripMenuItemStayNotOnTop.Size = new System.Drawing.Size(180, 22);
+ this.toolStripMenuItemStayNotOnTop.Text = "Stay ¬ on top";
+ this.toolStripMenuItemStayNotOnTop.Click += new System.EventHandler(this.ToolStripMenuItemStayNotOnTop_Click);
+ this.toolStripMenuItemStayNotOnTop.MouseEnter += new System.EventHandler(this.SetStatusbar_Enter);
+ this.toolStripMenuItemStayNotOnTop.MouseLeave += new System.EventHandler(this.ClearStatusbar_Leave);
+ //
+ // toolStripMenuItemStayOnTop
+ //
+ this.toolStripMenuItemStayOnTop.AccessibleDescription = "Set the window to the top";
+ this.toolStripMenuItemStayOnTop.AccessibleName = "Stay on top";
+ this.toolStripMenuItemStayOnTop.AccessibleRole = System.Windows.Forms.AccessibleRole.MenuItem;
+ this.toolStripMenuItemStayOnTop.AutoToolTip = true;
+ this.toolStripMenuItemStayOnTop.Image = global::DaysCounter.Properties.Resources.application_blue;
+ this.toolStripMenuItemStayOnTop.Name = "toolStripMenuItemStayOnTop";
+ this.toolStripMenuItemStayOnTop.Size = new System.Drawing.Size(180, 22);
+ this.toolStripMenuItemStayOnTop.Text = "&Stay on top";
+ this.toolStripMenuItemStayOnTop.Click += new System.EventHandler(this.ToolStripMenuItemStayOnTop_Click);
+ this.toolStripMenuItemStayOnTop.MouseEnter += new System.EventHandler(this.SetStatusbar_Enter);
+ this.toolStripMenuItemStayOnTop.MouseLeave += new System.EventHandler(this.ClearStatusbar_Leave);
//
// labelTitle
//
@@ -177,24 +232,6 @@ private void InitializeComponent()
this.labelCopyright.MouseEnter += new System.EventHandler(this.SetStatusbar_Enter);
this.labelCopyright.MouseLeave += new System.EventHandler(this.ClearStatusbar_Leave);
//
- // buttonDateOfTheBirth
- //
- this.buttonDateOfTheBirth.AccessibleDescription = "Switch the input method of the date of the birth";
- this.buttonDateOfTheBirth.AccessibleName = "Change the input method of the date of the birth";
- this.buttonDateOfTheBirth.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
- this.buttonDateOfTheBirth.Image = global::DaysCounter.Properties.Resources.switch_small;
- this.buttonDateOfTheBirth.Location = new System.Drawing.Point(306, 6);
- this.buttonDateOfTheBirth.Name = "buttonDateOfTheBirth";
- this.buttonDateOfTheBirth.Size = new System.Drawing.Size(20, 20);
- this.buttonDateOfTheBirth.TabIndex = 2;
- this.toolTip.SetToolTip(this.buttonDateOfTheBirth, "Change the input method of the date of the birth");
- this.buttonDateOfTheBirth.UseVisualStyleBackColor = true;
- this.buttonDateOfTheBirth.Click += new System.EventHandler(this.ButtonDateOfTheBirth_Click);
- this.buttonDateOfTheBirth.Enter += new System.EventHandler(this.SetStatusbar_Enter);
- this.buttonDateOfTheBirth.Leave += new System.EventHandler(this.ClearStatusbar_Leave);
- this.buttonDateOfTheBirth.MouseEnter += new System.EventHandler(this.SetStatusbar_Enter);
- this.buttonDateOfTheBirth.MouseLeave += new System.EventHandler(this.ClearStatusbar_Leave);
- //
// dateTimePickerDateOfTheBirth
//
this.dateTimePickerDateOfTheBirth.AccessibleDescription = "Show the date of the birth";
@@ -221,31 +258,13 @@ private void InitializeComponent()
this.labelDateOfTheBirth.Name = "labelDateOfTheBirth";
this.labelDateOfTheBirth.Size = new System.Drawing.Size(86, 13);
this.labelDateOfTheBirth.TabIndex = 0;
- this.labelDateOfTheBirth.Text = "&Date of the birth:";
+ this.labelDateOfTheBirth.Text = "Date of the &birth:";
this.toolTip.SetToolTip(this.labelDateOfTheBirth, "Description of the date of the birth");
this.labelDateOfTheBirth.Enter += new System.EventHandler(this.SetStatusbar_Enter);
this.labelDateOfTheBirth.Leave += new System.EventHandler(this.ClearStatusbar_Leave);
this.labelDateOfTheBirth.MouseEnter += new System.EventHandler(this.SetStatusbar_Enter);
this.labelDateOfTheBirth.MouseLeave += new System.EventHandler(this.ClearStatusbar_Leave);
//
- // buttonSwitchDateIn
- //
- this.buttonSwitchDateIn.AccessibleDescription = "Switch the input method of the beginning date";
- this.buttonSwitchDateIn.AccessibleName = "Change the input method of the ending date";
- this.buttonSwitchDateIn.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
- this.buttonSwitchDateIn.Image = global::DaysCounter.Properties.Resources.switch_small;
- this.buttonSwitchDateIn.Location = new System.Drawing.Point(271, 6);
- this.buttonSwitchDateIn.Name = "buttonSwitchDateIn";
- this.buttonSwitchDateIn.Size = new System.Drawing.Size(20, 20);
- this.buttonSwitchDateIn.TabIndex = 2;
- this.toolTip.SetToolTip(this.buttonSwitchDateIn, "Change the input method of the ending date");
- this.buttonSwitchDateIn.UseVisualStyleBackColor = true;
- this.buttonSwitchDateIn.Click += new System.EventHandler(this.ButtonSwitchDateDays_Click);
- this.buttonSwitchDateIn.Enter += new System.EventHandler(this.SetStatusbar_Enter);
- this.buttonSwitchDateIn.Leave += new System.EventHandler(this.ClearStatusbar_Leave);
- this.buttonSwitchDateIn.MouseEnter += new System.EventHandler(this.SetStatusbar_Enter);
- this.buttonSwitchDateIn.MouseLeave += new System.EventHandler(this.ClearStatusbar_Leave);
- //
// dateTimePickerDateIn
//
this.dateTimePickerDateIn.AccessibleDescription = "Show the beginning date";
@@ -353,42 +372,6 @@ private void InitializeComponent()
this.dateTimePickerEnd.MouseEnter += new System.EventHandler(this.SetStatusbar_Enter);
this.dateTimePickerEnd.MouseLeave += new System.EventHandler(this.ClearStatusbar_Leave);
//
- // buttonSwitchDateBegin
- //
- this.buttonSwitchDateBegin.AccessibleDescription = "Switch the input method of the beginning date";
- this.buttonSwitchDateBegin.AccessibleName = "Change the input method of the beginning date";
- this.buttonSwitchDateBegin.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
- this.buttonSwitchDateBegin.Image = global::DaysCounter.Properties.Resources.switch_small;
- this.buttonSwitchDateBegin.Location = new System.Drawing.Point(255, 6);
- this.buttonSwitchDateBegin.Name = "buttonSwitchDateBegin";
- this.buttonSwitchDateBegin.Size = new System.Drawing.Size(20, 20);
- this.buttonSwitchDateBegin.TabIndex = 2;
- this.toolTip.SetToolTip(this.buttonSwitchDateBegin, "Change the input method of the beginning date");
- this.buttonSwitchDateBegin.UseVisualStyleBackColor = true;
- this.buttonSwitchDateBegin.Click += new System.EventHandler(this.ButtonSwitchDateBegin_Click);
- this.buttonSwitchDateBegin.Enter += new System.EventHandler(this.SetStatusbar_Enter);
- this.buttonSwitchDateBegin.Leave += new System.EventHandler(this.ClearStatusbar_Leave);
- this.buttonSwitchDateBegin.MouseEnter += new System.EventHandler(this.SetStatusbar_Enter);
- this.buttonSwitchDateBegin.MouseLeave += new System.EventHandler(this.ClearStatusbar_Leave);
- //
- // buttonSwitchDateEnd
- //
- this.buttonSwitchDateEnd.AccessibleDescription = "Switch the input method of the ending date";
- this.buttonSwitchDateEnd.AccessibleName = "Change the input method of the ending date";
- this.buttonSwitchDateEnd.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
- this.buttonSwitchDateEnd.Image = global::DaysCounter.Properties.Resources.switch_small;
- this.buttonSwitchDateEnd.Location = new System.Drawing.Point(255, 32);
- this.buttonSwitchDateEnd.Name = "buttonSwitchDateEnd";
- this.buttonSwitchDateEnd.Size = new System.Drawing.Size(20, 20);
- this.buttonSwitchDateEnd.TabIndex = 5;
- this.toolTip.SetToolTip(this.buttonSwitchDateEnd, "Change the input method of the ending date");
- this.buttonSwitchDateEnd.UseVisualStyleBackColor = true;
- this.buttonSwitchDateEnd.Click += new System.EventHandler(this.ButtonSwitchDateEnd_Click);
- this.buttonSwitchDateEnd.Enter += new System.EventHandler(this.SetStatusbar_Enter);
- this.buttonSwitchDateEnd.Leave += new System.EventHandler(this.ClearStatusbar_Leave);
- this.buttonSwitchDateEnd.MouseEnter += new System.EventHandler(this.SetStatusbar_Enter);
- this.buttonSwitchDateEnd.MouseLeave += new System.EventHandler(this.ClearStatusbar_Leave);
- //
// dateTimePickerBegin
//
this.dateTimePickerBegin.AccessibleDescription = "Show the beginning date";
@@ -507,6 +490,78 @@ private void InitializeComponent()
this.labelDaysSpan.MouseEnter += new System.EventHandler(this.SetStatusbar_Enter);
this.labelDaysSpan.MouseLeave += new System.EventHandler(this.ClearStatusbar_Leave);
//
+ // buttonSwitchDateEnd
+ //
+ this.buttonSwitchDateEnd.AccessibleDescription = "Switch the input method of the ending date";
+ this.buttonSwitchDateEnd.AccessibleName = "Change the input method of the ending date";
+ this.buttonSwitchDateEnd.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.buttonSwitchDateEnd.Image = global::DaysCounter.Properties.Resources.switch_small;
+ this.buttonSwitchDateEnd.Location = new System.Drawing.Point(255, 32);
+ this.buttonSwitchDateEnd.Name = "buttonSwitchDateEnd";
+ this.buttonSwitchDateEnd.Size = new System.Drawing.Size(20, 20);
+ this.buttonSwitchDateEnd.TabIndex = 5;
+ this.toolTip.SetToolTip(this.buttonSwitchDateEnd, "Change the input method of the ending date");
+ this.buttonSwitchDateEnd.UseVisualStyleBackColor = true;
+ this.buttonSwitchDateEnd.Click += new System.EventHandler(this.ButtonSwitchDateEnd_Click);
+ this.buttonSwitchDateEnd.Enter += new System.EventHandler(this.SetStatusbar_Enter);
+ this.buttonSwitchDateEnd.Leave += new System.EventHandler(this.ClearStatusbar_Leave);
+ this.buttonSwitchDateEnd.MouseEnter += new System.EventHandler(this.SetStatusbar_Enter);
+ this.buttonSwitchDateEnd.MouseLeave += new System.EventHandler(this.ClearStatusbar_Leave);
+ //
+ // buttonSwitchDateBegin
+ //
+ this.buttonSwitchDateBegin.AccessibleDescription = "Switch the input method of the beginning date";
+ this.buttonSwitchDateBegin.AccessibleName = "Change the input method of the beginning date";
+ this.buttonSwitchDateBegin.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.buttonSwitchDateBegin.Image = global::DaysCounter.Properties.Resources.switch_small;
+ this.buttonSwitchDateBegin.Location = new System.Drawing.Point(255, 6);
+ this.buttonSwitchDateBegin.Name = "buttonSwitchDateBegin";
+ this.buttonSwitchDateBegin.Size = new System.Drawing.Size(20, 20);
+ this.buttonSwitchDateBegin.TabIndex = 2;
+ this.toolTip.SetToolTip(this.buttonSwitchDateBegin, "Change the input method of the beginning date");
+ this.buttonSwitchDateBegin.UseVisualStyleBackColor = true;
+ this.buttonSwitchDateBegin.Click += new System.EventHandler(this.ButtonSwitchDateBegin_Click);
+ this.buttonSwitchDateBegin.Enter += new System.EventHandler(this.SetStatusbar_Enter);
+ this.buttonSwitchDateBegin.Leave += new System.EventHandler(this.ClearStatusbar_Leave);
+ this.buttonSwitchDateBegin.MouseEnter += new System.EventHandler(this.SetStatusbar_Enter);
+ this.buttonSwitchDateBegin.MouseLeave += new System.EventHandler(this.ClearStatusbar_Leave);
+ //
+ // buttonSwitchDateIn
+ //
+ this.buttonSwitchDateIn.AccessibleDescription = "Switch the input method of the beginning date";
+ this.buttonSwitchDateIn.AccessibleName = "Change the input method of the ending date";
+ this.buttonSwitchDateIn.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.buttonSwitchDateIn.Image = global::DaysCounter.Properties.Resources.switch_small;
+ this.buttonSwitchDateIn.Location = new System.Drawing.Point(271, 6);
+ this.buttonSwitchDateIn.Name = "buttonSwitchDateIn";
+ this.buttonSwitchDateIn.Size = new System.Drawing.Size(20, 20);
+ this.buttonSwitchDateIn.TabIndex = 2;
+ this.toolTip.SetToolTip(this.buttonSwitchDateIn, "Change the input method of the ending date");
+ this.buttonSwitchDateIn.UseVisualStyleBackColor = true;
+ this.buttonSwitchDateIn.Click += new System.EventHandler(this.ButtonSwitchDateDays_Click);
+ this.buttonSwitchDateIn.Enter += new System.EventHandler(this.SetStatusbar_Enter);
+ this.buttonSwitchDateIn.Leave += new System.EventHandler(this.ClearStatusbar_Leave);
+ this.buttonSwitchDateIn.MouseEnter += new System.EventHandler(this.SetStatusbar_Enter);
+ this.buttonSwitchDateIn.MouseLeave += new System.EventHandler(this.ClearStatusbar_Leave);
+ //
+ // buttonDateOfTheBirth
+ //
+ this.buttonDateOfTheBirth.AccessibleDescription = "Switch the input method of the date of the birth";
+ this.buttonDateOfTheBirth.AccessibleName = "Change the input method of the date of the birth";
+ this.buttonDateOfTheBirth.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
+ this.buttonDateOfTheBirth.Image = global::DaysCounter.Properties.Resources.switch_small;
+ this.buttonDateOfTheBirth.Location = new System.Drawing.Point(306, 6);
+ this.buttonDateOfTheBirth.Name = "buttonDateOfTheBirth";
+ this.buttonDateOfTheBirth.Size = new System.Drawing.Size(20, 20);
+ this.buttonDateOfTheBirth.TabIndex = 2;
+ this.toolTip.SetToolTip(this.buttonDateOfTheBirth, "Change the input method of the date of the birth");
+ this.buttonDateOfTheBirth.UseVisualStyleBackColor = true;
+ this.buttonDateOfTheBirth.Click += new System.EventHandler(this.ButtonDateOfTheBirth_Click);
+ this.buttonDateOfTheBirth.Enter += new System.EventHandler(this.SetStatusbar_Enter);
+ this.buttonDateOfTheBirth.Leave += new System.EventHandler(this.ClearStatusbar_Leave);
+ this.buttonDateOfTheBirth.MouseEnter += new System.EventHandler(this.SetStatusbar_Enter);
+ this.buttonDateOfTheBirth.MouseLeave += new System.EventHandler(this.ClearStatusbar_Leave);
+ //
// BottomToolStripPanel
//
this.BottomToolStripPanel.Dock = System.Windows.Forms.DockStyle.Bottom;
@@ -666,7 +721,7 @@ private void InitializeComponent()
this.labelDaysPlusMinus.Name = "labelDaysPlusMinus";
this.labelDaysPlusMinus.Size = new System.Drawing.Size(57, 13);
this.labelDaysPlusMinus.TabIndex = 3;
- this.labelDaysPlusMinus.Text = "Da&ys (-/+):";
+ this.labelDaysPlusMinus.Text = "&Days (-/+):";
this.labelDaysPlusMinus.Enter += new System.EventHandler(this.SetStatusbar_Enter);
this.labelDaysPlusMinus.Leave += new System.EventHandler(this.ClearStatusbar_Leave);
this.labelDaysPlusMinus.MouseEnter += new System.EventHandler(this.SetStatusbar_Enter);
@@ -735,7 +790,6 @@ private void InitializeComponent()
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
- this.MinimizeBox = false;
this.Name = "MainWindow";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Days Counter";
@@ -801,6 +855,9 @@ private void InitializeComponent()
private System.Windows.Forms.ToolStripPanel LeftToolStripPanel;
private System.Windows.Forms.ToolStripContentPanel ContentPanel;
private System.Windows.Forms.Label labelDaysSpan;
+ private System.Windows.Forms.ToolStripSplitButton toolStripSplitButtonStayOnTop;
+ private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemStayNotOnTop;
+ private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemStayOnTop;
}
}
diff --git a/MainWindow.cs b/MainWindow.cs
index f7c9f12..96af680 100644
--- a/MainWindow.cs
+++ b/MainWindow.cs
@@ -1,6 +1,7 @@
using System;
using System.Windows.Forms;
using MijoSoftware.AssemblyInformation;
+using DaysCounter.Properties;
namespace DaysCounter
{
@@ -143,7 +144,31 @@ public MainWindow()
/// object sender
/// event arguments
/// The parameter is not needed, but must be indicated.
- private void SetStatusbar_Enter(object sender, EventArgs e) => SetStatusbarText(text: ((Control)sender).AccessibleDescription);
+ private void SetStatusbar_Enter(object sender, EventArgs e)
+ {
+ string text = string.Empty;
+ if (sender is Control control)
+ {
+ text = control.AccessibleDescription;
+ }
+ else if (sender is ToolStripSplitButton toolStripSplitButton)
+ {
+ text = toolStripSplitButton.AccessibleDescription;
+ }
+ else if (sender is ToolStripButton toolStripButton)
+ {
+ text = toolStripButton.AccessibleDescription;
+ }
+ else if (sender is ToolStripLabel toolStripLabel)
+ {
+ text = toolStripLabel.AccessibleDescription;
+ }
+ else if (sender is ToolStripMenuItem toolStripMenuItem)
+ {
+ text = toolStripMenuItem.AccessibleDescription;
+ }
+ SetStatusbarText(text: text);
+ }
///
/// Clear the information text of the status bar
@@ -151,6 +176,39 @@ public MainWindow()
/// object sender
/// event arguments
/// The parameters and are not needed, but must be indicated.
- private void ClearStatusbar_Leave(object sender, EventArgs e) => SetStatusbarText(text: "");
+ private void ClearStatusbar_Leave(object sender, EventArgs e) => SetStatusbarText(text: string.Empty);
+
+ private void ApplicationStayNotOnTop()
+ {
+ TopMost = false;
+ toolStripMenuItemStayNotOnTop.Checked = !TopMost;
+ toolStripMenuItemStayOnTop.Checked = TopMost;
+ toolStripSplitButtonStayOnTop.Image = Resources.application;
+ toolStripSplitButtonStayOnTop.Text = Resources.stayNotOnTop;
+ }
+
+ private void ApplicationStayOnTop()
+ {
+ TopMost = true;
+ toolStripMenuItemStayNotOnTop.Checked = !TopMost;
+ toolStripMenuItemStayOnTop.Checked = TopMost;
+ toolStripSplitButtonStayOnTop.Image = Resources.application_blue;
+ toolStripSplitButtonStayOnTop.Text = Resources.stayOnTop;
+ }
+
+ private void ToolStripMenuItemStayNotOnTop_Click(object sender, EventArgs e)
+ {
+ ApplicationStayNotOnTop();
+ }
+
+ private void ToolStripMenuItemStayOnTop_Click(object sender, EventArgs e)
+ {
+ ApplicationStayOnTop();
+ }
+
+ private void ToolStripSplitButtonStayOnTop_ButtonClick(object sender, EventArgs e)
+ {
+ if (TopMost) ApplicationStayNotOnTop(); else ApplicationStayOnTop();
+ }
}
}
\ No newline at end of file
diff --git a/MainWindow.resx b/MainWindow.resx
index 7103270..247892a 100644
--- a/MainWindow.resx
+++ b/MainWindow.resx
@@ -125,7 +125,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAK
- DAAAAk1TRnQBSQFMAgEBBAEAAYABAAGAAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
+ DAAAAk1TRnQBSQFMAgEBBAEAAaABAAGgAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
@@ -186,7 +186,7 @@
108, 17
- 67
+ 58
diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs
index cb29268..4c200e7 100644
--- a/Properties/AssemblyInfo.cs
+++ b/Properties/AssemblyInfo.cs
@@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Mijo Software")]
[assembly: AssemblyProduct("Days Counter")]
-[assembly: AssemblyCopyright("Copyright © 2019")]
+[assembly: AssemblyCopyright("Copyright © 2019-2020")]
[assembly: AssemblyTrademark("Days Counter")]
[assembly: AssemblyCulture("")]
@@ -32,6 +32,6 @@
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.2.2.5")]
-[assembly: AssemblyFileVersion("1.2.2.5")]
+[assembly: AssemblyVersion("1.3.0.6")]
+[assembly: AssemblyFileVersion("1.3.0.6")]
[assembly: NeutralResourcesLanguage("en")]
diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs
index ad63674..8ae3d93 100644
--- a/Properties/Resources.Designer.cs
+++ b/Properties/Resources.Designer.cs
@@ -60,6 +60,26 @@ internal Resources() {
}
}
+ ///
+ /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap application {
+ get {
+ object obj = ResourceManager.GetObject("application", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap application_blue {
+ get {
+ object obj = ResourceManager.GetObject("application-blue", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
///
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
///
@@ -70,6 +90,24 @@ internal static System.Drawing.Bitmap calendar_day {
}
}
+ ///
+ /// Sucht eine lokalisierte Zeichenfolge, die Stay not on top ähnelt.
+ ///
+ internal static string stayNotOnTop {
+ get {
+ return ResourceManager.GetString("stayNotOnTop", resourceCulture);
+ }
+ }
+
+ ///
+ /// Sucht eine lokalisierte Zeichenfolge, die Stay on top ähnelt.
+ ///
+ internal static string stayOnTop {
+ get {
+ return ResourceManager.GetString("stayOnTop", resourceCulture);
+ }
+ }
+
///
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
///
diff --git a/Properties/Resources.resx b/Properties/Resources.resx
index baf3cf4..6facb95 100644
--- a/Properties/Resources.resx
+++ b/Properties/Resources.resx
@@ -118,10 +118,22 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ ..\Resources\calendar-day.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
..\Resources\switch-small.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-
- ..\Resources\calendar-day.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+ ..\Resources\application.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ ..\Resources\application-blue.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ Stay not on top
+
+
+ Stay on top
\ No newline at end of file
diff --git a/Resources/application-blue.png b/Resources/application-blue.png
new file mode 100644
index 0000000..9d372aa
Binary files /dev/null and b/Resources/application-blue.png differ
diff --git a/Resources/application.png b/Resources/application.png
new file mode 100644
index 0000000..ea60171
Binary files /dev/null and b/Resources/application.png differ