-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
44 lines (37 loc) · 1.26 KB
/
Program.cs
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
35
36
37
38
39
40
41
42
43
44
using System;
using System.Threading;
using System.Windows.Forms;
namespace XShortCoreIndex
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
private static double _interval = 24;
private static String _dataPath = String.Empty;
private static String _targetPath = String.Empty;
public static string DataPath { get => _dataPath; set => _dataPath = value; }
public static string TargetPath { get => _targetPath; set => _targetPath = value; }
public static double Interval { get => _interval; set => _interval = value; }
private static Mutex m_Mutex;
[STAThread]
static void Main(String[] args)
{
_dataPath = args[0];
_targetPath = args[1];
_interval = Double.Parse(args[2]);
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
m_Mutex = new Mutex(true, "XShortBackground");
if (m_Mutex.WaitOne(0, false))
{
Application.Run(new BackgroundActivity());
}
else
{
return;
}
}
}
}