Ejemplo n.º 1
0
        /// <summary>
        /// ���з�����Ѿ�׼����(�������Ǵ򿪵Ķ˿ڵ����ƶ�)
        /// </summary>
        private void sendReady()
        {
            PortCode readyCode = new PortCode();
            readyCode.Head = CodeHead.SEND_FILE_READY;
            readyCode.Port = Constant.Port_File;
            mainServer.SendCode(readyCode);

            readyCode.Head = CodeHead.SCREEN_READY;
            readyCode.Port = Constant.Port_Screen;
            mainServer.SendCode(readyCode);
        }
Ejemplo n.º 2
0
 /// <summary>
 ///��������������,�������������,������߿��ƶ˸���ʧ��
 /// </summary>
 private void builtUpdateServer()
 {
     string path = Directory.GetCurrentDirectory() + "\\Update.exe";
     //���Update�����Ѿ����,�ȹر���.
     ServerUpdater.CloseApplication("update");
     if (!File.Exists(path))
     {
         BaseCode code = new BaseCode();
         code.Head = CodeHead.UPDATE_FAIL;
         mainServer.SendCode(code);
     }
     else
     {
         Thread.Sleep(300);
         //���Update����
         Thread updateThread = new Thread(new ThreadStart(runUpdateApp));
         updateThread.Start();
         //���߿��ƶ�Update�����Ѿ����.
         Thread.Sleep(100);
         PortCode code = new PortCode();
         code.Head = CodeHead.UPDATE_READY;
         code.Port = Constant.Port_Update;
         mainServer.SendCode(code);
     }
 }