示例#1
0
        private void Start()
        {
            try
            {
                label_runStatus.Text = "运行中...";
                button_Start.Enabled = false;
                _clientControl       = new ClientControl(10801, 10802);
                LogUtil.callback    += msgCallback;

                (AssemblyHandler.GetInstance <CloseApp>() as CloseApp).callback   += HideWindow;
                (AssemblyHandler.GetInstance <Uninstall>() as Uninstall).callback += Quit;
                //(AssemblyHandler.GetInstance<Uninstall>() as Uninstall).localUrl = Application.ExecutablePath;

                _clientControl.BeginReceive();

                //创建自启快捷方式
                //ToolForCmd.CreateShortcut();
            }
            catch (Exception e)
            {
                LogUtil.Error(e);
                label_runStatus.Text = "error!!";
                Stop();
            }
        }