Skip to content

Commit

Permalink
Shortcut recognition adjusted
Browse files Browse the repository at this point in the history
  • Loading branch information
manfred-mueller committed Nov 14, 2024
1 parent 1fbb67e commit 0537afc
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion InstallScript.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "ShowDesktop"
#define MyAppVersion "1.0.0"
#define MyAppVersion "1.0.1"
#define MyAppExeName MyAppName + ".exe"
#define MyAppPublisher "NASS e.K."
#define MyAppURL "https://www.nass-ek.de"
Expand Down
6 changes: 4 additions & 2 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,17 @@ static void Main()

// Define the full path to the expected shortcut file (appName + ".lnk")
string shortcutPath = Path.Combine(taskBarFolderPath, appName + ".lnk");
string appPath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location);

// Versioning information for display
Version version = Assembly.GetExecutingAssembly().GetName().Version;
string appVersion = $"{version.Major}.{version.Minor}.{version.Build}";
string helpStringCmd =
String.Format("{3}{0} {1}, {2} {3}{3}", Assembly.GetExecutingAssembly().GetName().Name, appVersion, ShowDesktop.Properties.Resources.Copyright, Environment.NewLine) +
String.Format(ShowDesktop.Properties.Resources.HelpTextCmd, System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location), Environment.NewLine, System.Diagnostics.Process.GetCurrentProcess().ProcessName) + "\n";
String.Format(ShowDesktop.Properties.Resources.HelpTextCmd, appPath, Environment.NewLine, System.Diagnostics.Process.GetCurrentProcess().ProcessName) + "\n";
string helpStringGui =
String.Format("{0} {1}{2}{2}", Assembly.GetExecutingAssembly().GetName().Name, appVersion, Environment.NewLine) +
String.Format(ShowDesktop.Properties.Resources.HelpTextGui, System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location), Environment.NewLine, System.Diagnostics.Process.GetCurrentProcess().ProcessName) + "\n";
String.Format(ShowDesktop.Properties.Resources.HelpTextGui, appPath, Environment.NewLine, System.Diagnostics.Process.GetCurrentProcess().ProcessName) + "\n";

// Check if the shortcut exists
if (!File.Exists(shortcutPath))
Expand All @@ -87,6 +88,7 @@ static void Main()
else
{
MessageBox.Show(helpStringGui, "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
Process.Start(appPath);
Application.Exit();
}
}
Expand Down
2 changes: 1 addition & 1 deletion Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
// 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.0.0.0")]
[assembly: AssemblyVersion("1.0.1.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
2 changes: 1 addition & 1 deletion Properties/Resources.Designer.cs

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

2 changes: 1 addition & 1 deletion Properties/Resources.de.resx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
<value>©2024 Manfred Mueller</value>
</data>
<data name="HelpTextGui" xml:space="preserve">
<value>{0}{1}im Explorer öffnen, Rechtsklick auf {2}.exe{1}und 'An Taskleiste anheften' auswählen.</value>
<value>Im folgenden Fenster Rechtsklick auf {2}.exe{1}und 'An Taskleiste anheften' auswählen.</value>
</data>
<data name="HelpTextCmd" xml:space="preserve">
<value>{0} im Explorer öffnen{1}und nach Rechtsklick auf {2}.exe 'An Taskleiste anheften' wählen.</value>
Expand Down
2 changes: 1 addition & 1 deletion Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
<value>©2024 Manfred Mueller</value>
</data>
<data name="HelpTextGui" xml:space="preserve">
<value>Open {0} in explorer window and choose 'pin to taskbar'{1}after right click on {2}.exe.</value>
<value>Choose 'pin to taskbar'{0}after right click on {1}exe{0}in the following window.</value>
</data>
<data name="HelpTextCmd" xml:space="preserve">
<value>Open {0} in explorer window{1}and choose 'pin to taskbar' after right click on {2}.exe.</value>
Expand Down
Binary file removed bin/Release/ShowDesktop-Setup-1.0.0.exe
Binary file not shown.
Binary file added bin/Release/ShowDesktop-Setup-1.0.1.exe
Binary file not shown.
Binary file modified bin/Release/ShowDesktop.exe
Binary file not shown.

0 comments on commit 0537afc

Please sign in to comment.