/// <summary> /// 开始更新服务端 /// </summary> public void UpdateServer() { BaseCode code = new BaseCode(); code.Head = CodeHead.VERSION; if (currentControler == null) { MessageBox.Show("你还没连接任何主机或连接中断!"); } else { currentControler.SendCode(code); } }
/// <summary> /// 获取对方信息(IP和主机名) /// </summary> /// <param name="sender"></param> private void GetServerMessage(BaseCommunication sender) { BaseControler controler = sender as BaseControler; if (controler != null) { BaseCode code = new BaseCode(); code.Head = CodeHead.HOST_MESSAGE; controler.SendCode(code); } }