예제 #1
0
        static void Main()
        {
            WebInterfaceClass wif = new WebInterfaceClass();

            try
            {
                if (!WebInterfaceClass.IPCCreated)
                {
                    MessageBox.Show("端口未正常建立!无法运行!");
                    return;
                }
                wif.SetDisplayMethod(true);
                wif.Init();
                wif.Start();
            }
            catch (Exception ce)
            {
                MessageBox.Show(string.Format("{0}:{1}", ce.Message, ce.StackTrace));
            }

            //Application.Run();
            ////ServiceBase[] ServicesToRun;
            ////ServicesToRun = new ServiceBase[]
            ////{
            ////    new Service1()
            ////};
            ////ServiceBase.Run(ServicesToRun);
        }
예제 #2
0
 protected override void OnStart(string[] args)
 {
     wif.Start();
 }