-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
34 lines (33 loc) · 1.18 KB
/
Program.cs
File metadata and controls
34 lines (33 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System;
using System.Diagnostics;
namespace PhotoFinder
{
class Program
{
static void Main(string[] args)
{
if (Environment.GetCommandLineArgs().Length <= 1)
{
new ContextMenuEditor().EditRegistry();
Console.WriteLine("Press any button to exit");
Console.ReadKey();
}
else if (Environment.GetCommandLineArgs()[1] == "-clear")
{
new ContextMenuEditor().ClearRegistry();
Console.WriteLine("Press any button to exit");
Console.ReadKey();
}
else
{
string PathToFile = "";
for (int i = 1; i < Environment.GetCommandLineArgs().Length; ++i)
{
PathToFile += Environment.GetCommandLineArgs()[i] + " ";
}
Process.Start(FindImage.GetUriImage(PathToFile)); // if this will not work try this
//Process.Start("cmd", $"/c start {FindImage.GetUriImage(PathToFile)}");
}
}
}
}