-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
57 lines (52 loc) · 1.08 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
45
46
47
48
49
50
51
52
53
54
55
56
57
/*
* Created by SharpDevelop.
* User: Michael
* Date: 04/11/2015
* Time: 21:05
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using System.Windows.Forms;
namespace FlyingToasters
{
/// <summary>
/// Class with program entry point.
/// </summary>
internal sealed class Program
{
/// <summary>
/// Program entry point.
/// </summary>
[STAThread]
private static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
if (args.Length > 0)
{
//MessageBox.Show("Args are " + args[0]);
if (args[0].StartsWith("/c"))
{
//
// Show configuration dialog
//
Application.Run(new ConfigForm());
return;
}
else if (args[0].Equals("/p"))
{
//
// Show a preview.
//
Application.Run(new MainForm(new IntPtr(long.Parse(args[1]))));
return;
}
}
//
// In all other cases (including the "/s" argument), just show full screen.
//
Application.Run(new MainForm());
}
}
}