-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ShartTerminal: Added code to generic search for know executables
- Loading branch information
Showing
4 changed files
with
44 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"pins":[ | ||
{ | ||
"pin":1, | ||
"externalVoltage":"high" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows.Forms; | ||
|
||
namespace SharpTerminal | ||
{ | ||
/// <summary> | ||
/// All the useful stuff that does not fit anywhere else and does not deserve their own file.... | ||
/// </summary> | ||
internal static class Util | ||
{ | ||
public static string FindExecutable(string executableName) | ||
{ | ||
string executableFile = executableName + ".exe"; | ||
string path = executableFile; | ||
if (System.IO.File.Exists(executableFile)) | ||
return executableFile; | ||
|
||
path = System.Reflection.Assembly.GetEntryAssembly().Location; | ||
path = path.Replace("SharpTerminal.dll", executableFile); | ||
path = path.Replace("SharpTerminal", executableName); | ||
|
||
return System.IO.File.Exists(path) ? path : null; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters