Skip to content

Commit

Permalink
update to version 2.3.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
mjohne authored Apr 13, 2020
1 parent d33142d commit 87fd093
Show file tree
Hide file tree
Showing 9 changed files with 257 additions and 90 deletions.
2 changes: 2 additions & 0 deletions Days Counter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@
</ItemGroup>
<ItemGroup>
<Content Include="logo.ico" />
<None Include="Resources\application-blue.png" />
<None Include="Resources\application.png" />
<None Include="Resources\calendar-day.png" />
<None Include="Resources\switch-small.png" />
</ItemGroup>
Expand Down
219 changes: 138 additions & 81 deletions MainWindow.Designer.cs

Large diffs are not rendered by default.

62 changes: 60 additions & 2 deletions MainWindow.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Windows.Forms;
using MijoSoftware.AssemblyInformation;
using DaysCounter.Properties;

namespace DaysCounter
{
Expand Down Expand Up @@ -143,14 +144,71 @@ public MainWindow()
/// <param name="sender">object sender</param>
/// <param name="e">event arguments</param>
/// <remarks>The parameter <paramref name="e"/> is not needed, but must be indicated.</remarks>
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);
}

/// <summary>
/// Clear the information text of the status bar
/// </summary>
/// <param name="sender">object sender</param>
/// <param name="e">event arguments</param>
/// <remarks>The parameters <paramref name="e"/> and <paramref name="sender"/> are not needed, but must be indicated.</remarks>
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();
}
}
}
4 changes: 2 additions & 2 deletions MainWindow.resx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAK
DAAAAk1TRnQBSQFMAgEBBAEAAYABAAGAAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
DAAAAk1TRnQBSQFMAgEBBAEAAaABAAGgAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
Expand Down Expand Up @@ -186,7 +186,7 @@
<value>108, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>67</value>
<value>58</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
Expand Down
6 changes: 3 additions & 3 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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("")]

Expand All @@ -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")]
38 changes: 38 additions & 0 deletions Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 14 additions & 2 deletions Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,22 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="calendar-day" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\calendar-day.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="switch-small" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\switch-small.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="calendar-day" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\calendar-day.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="application" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\application.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="application-blue" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\application-blue.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="stayNotOnTop" xml:space="preserve">
<value>Stay not on top</value>
</data>
<data name="stayOnTop" xml:space="preserve">
<value>Stay on top</value>
</data>
</root>
Binary file added Resources/application-blue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Resources/application.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 87fd093

Please sign in to comment.