Skip to content

Commit 6f6f075

Browse files
authored
Merge pull request #7 from handruin/issue_06
Fixing bug that is identified in issue number 6 on github.
2 parents fff5b25 + 790e00c commit 6f6f075

File tree

6 files changed

+32
-14
lines changed

6 files changed

+32
-14
lines changed

SPDIFKA/Properties/AssemblyInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
[assembly: AssemblyConfiguration("")]
1111
[assembly: AssemblyCompany("")]
1212
[assembly: AssemblyProduct("SPDIF-KA")]
13-
[assembly: AssemblyCopyright("Copyright handruin.com © 2015")]
13+
[assembly: AssemblyCopyright("Copyright handruin.com © 2016")]
1414
[assembly: AssemblyTrademark("")]
1515
[assembly: AssemblyCulture("")]
1616

@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.1.0.0")]
36-
[assembly: AssemblyFileVersion("1.1.0.0")]
35+
[assembly: AssemblyVersion("1.2.0.0")]
36+
[assembly: AssemblyFileVersion("1.2.0.0")]

SPDIFKA/SPDIFGUI.cs

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ public partial class SPDIFKAGUI : Form
1111
private static String startMessage = "running";
1212
private static String toolStripStartText = "Start " + name;
1313
private static String toolStripStopText = "Stop " + name;
14+
private bool isAppVisible = true;
1415

1516
private static String version = System.Reflection.Assembly.GetExecutingAssembly()
1617
.GetName()
@@ -40,6 +41,21 @@ public SPDIFKAGUI()
4041
this.loadState();
4142
}
4243

44+
/// <summary>
45+
/// Overriding this method to solve an issue related to starting this application in a minimized state.
46+
/// This now allows the utility to start minimized and hides this utility from the alt + tab menu.
47+
/// </summary>
48+
/// <param name="isVisible"></param>
49+
protected override void SetVisibleCore(bool isVisible)
50+
{
51+
if (!isAppVisible)
52+
{
53+
isVisible = false;
54+
if (!this.IsHandleCreated) CreateHandle();
55+
}
56+
base.SetVisibleCore(isVisible);
57+
}
58+
4359
/// <summary>
4460
/// Load the settings and state of the application that were previously saved.
4561
/// </summary>
@@ -96,9 +112,9 @@ private void Form1_Resize(object sender, EventArgs e)
96112
/// </summary>
97113
private void minimize()
98114
{
99-
this.WindowState = FormWindowState.Minimized;
115+
this.isAppVisible = false;
100116
spdifka.Visible = true;
101-
this.ShowInTaskbar = false;
117+
this.ShowInTaskbar = false;
102118
this.Hide();
103119
}
104120

@@ -107,6 +123,7 @@ private void minimize()
107123
/// </summary>
108124
private void restore()
109125
{
126+
this.isAppVisible = true;
110127
this.WindowState = FormWindowState.Normal;
111128
this.ShowInTaskbar = true;
112129
this.Show();
@@ -153,7 +170,7 @@ private void toolStripExit_Click(object sender, EventArgs e)
153170
/// <param name="e"></param>
154171
private void toolStripAbout_Click(object sender, EventArgs e)
155172
{
156-
MessageBox.Show("Copyright 2015 handruin.com - Version " + version, "About", MessageBoxButtons.OK, MessageBoxIcon.Information);
173+
MessageBox.Show("Copyright 2016 handruin.com - Version " + version, "About", MessageBoxButtons.OK, MessageBoxIcon.Information);
157174
}
158175

159176
/// <summary>

SPDIFKA/SPDIFKA.csproj

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@
5151
<ApplicationIcon>bar-chart-64-white.ico</ApplicationIcon>
5252
</PropertyGroup>
5353
<PropertyGroup>
54-
<SignManifests>true</SignManifests>
54+
<SignManifests>false</SignManifests>
5555
</PropertyGroup>
5656
<PropertyGroup>
57-
<SignAssembly>false</SignAssembly>
57+
<SignAssembly>true</SignAssembly>
5858
</PropertyGroup>
5959
<PropertyGroup>
6060
<ManifestCertificateThumbprint>7046D9568D59A523617F9A0EC71F678DB1DC4ED4</ManifestCertificateThumbprint>
@@ -71,6 +71,12 @@
7171
<PropertyGroup>
7272
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
7373
</PropertyGroup>
74+
<PropertyGroup>
75+
<StartupObject>SPDIFKA.SPDIFKA</StartupObject>
76+
</PropertyGroup>
77+
<PropertyGroup>
78+
<AssemblyOriginatorKeyFile>spdifka-sn-key.pfx</AssemblyOriginatorKeyFile>
79+
</PropertyGroup>
7480
<ItemGroup>
7581
<Reference Include="Microsoft.VisualBasic" />
7682
<Reference Include="PresentationFramework" />
@@ -119,7 +125,7 @@
119125
<DependentUpon>Settings.settings</DependentUpon>
120126
<DesignTimeSharedInput>True</DesignTimeSharedInput>
121127
</Compile>
122-
<None Include="SPDIFKA_TemporaryKey.pfx" />
128+
<None Include="spdifka-sn-key.pfx" />
123129
</ItemGroup>
124130
<ItemGroup>
125131
<None Include="App.config" />

SPDIFKA/SPDIFKA_TemporaryKey.pfx

-1.63 KB
Binary file not shown.

SPDIFKA/UserPreferences.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ public UserPreferences()
1717
Load();
1818
}
1919

20-
//~UserPreferences()
21-
//{
22-
// Save();
23-
//}
24-
2520
public void Save()
2621
{
2722
Properties.Settings.Default.IsHidden = this.IsHidden;

SPDIFKA/spdifka-sn-key.pfx

1.67 KB
Binary file not shown.

0 commit comments

Comments
 (0)