44 lines
1.2 KiB
C#
44 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Windows.Forms;
|
|
|
|
namespace InvoicingTool
|
|
{
|
|
static class Program
|
|
{
|
|
private static System.Threading.Mutex mutex;
|
|
/// <summary>
|
|
/// 应用程序的主入口点。
|
|
/// </summary>
|
|
[STAThread]
|
|
static void Main(string[] args)
|
|
{
|
|
Application.EnableVisualStyles();
|
|
Application.SetCompatibleTextRenderingDefault(false);
|
|
mutex = new System.Threading.Mutex(true, "InvoicingToolOnlyRun");
|
|
if (mutex.WaitOne(0, false))
|
|
{
|
|
if (args.Count() > 0)
|
|
{
|
|
if (args[0].ToLower() == "checkbill")
|
|
{
|
|
Application.Run(new CheckBill());
|
|
}
|
|
else
|
|
{
|
|
Application.Run(new MenuMain(args));
|
|
}
|
|
}
|
|
else
|
|
{
|
|
Application.Run(new MenuMain(args));
|
|
}
|
|
}else
|
|
{
|
|
Application.Exit();
|
|
}
|
|
}
|
|
}
|
|
}
|