ab56a9bcf7
SVN-Revision: r240
43 lines
1.1 KiB
C#
43 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Windows.Forms;
|
|
|
|
namespace CallDelphi
|
|
{
|
|
static class Program
|
|
{
|
|
/// <summary>
|
|
/// 应用程序的主入口点。
|
|
/// </summary>
|
|
[STAThread]
|
|
static void Main(string[] args)
|
|
{
|
|
//一次只能启动一个实例
|
|
System.Threading.Mutex mutex = new System.Threading.Mutex(false, "LsjkRunOnce");
|
|
bool Running = !mutex.WaitOne(0, false);
|
|
if (Running)
|
|
{
|
|
//MessageBox.Show("exists");
|
|
return;
|
|
}
|
|
Application.EnableVisualStyles();
|
|
Application.SetCompatibleTextRenderingDefault(false);
|
|
var fCall = new frmCall();
|
|
|
|
fCall.operatorid = "0";
|
|
fCall.operatorname = "";
|
|
if (args.Length>1)
|
|
{
|
|
fCall.operatorid = args[0];
|
|
fCall.operatorname = args[1];
|
|
fCall.servername = args[2];
|
|
fCall.dbname = args[3];
|
|
}
|
|
Application.Run(fCall);
|
|
|
|
|
|
}
|
|
}
|
|
}
|