public MainForm() { InitializeComponent(); m_MyTcpClientArm = new MyTcpClient(); if (m_OnePageMaxBytes < 256) { m_SendFileData = new byte[Message.MessageLength]; } }
private void TimerConnectServer_Tick(object sender, EventArgs e) { Debug.WriteLine("Timer!"); if (m_MyTcpClientArm != null && !m_MyTcpClientArm.IsConnected) { m_MyTcpClientArm.Close(); m_MyTcpClientArm = new MyTcpClient(); IPAddress ControlIp = IPAddress.Parse(TextBoxIp.Text); int ControlPort = int.Parse(TextBoxPort.Text); m_MyTcpClientArm.CreateConnect(ControlIp, ControlPort); } if (m_MyTcpClientArm != null && m_MyTcpClientArm.IsConnected) { TimerConnectServer.Stop(); m_UpdateAction = UpdateAction.UpdateAction_SendFileLength; } }