void Server_ConnectionChanged(object sender, PM3State state) { switch (state) { case PM3State.Connected: m_NotifyIcon.Icon = PerformantServer.Properties.Resources.ConnectedIcon; m_NotifyIcon.Text = PerformantServer.Properties.Resources.ConnectedTooltip; break; case PM3State.Disconnected: m_NotifyIcon.Icon = PerformantServer.Properties.Resources.DisconnectedIcon; m_NotifyIcon.Text = PerformantServer.Properties.Resources.DisconnectedTooltip; break; } }
public Server() { m_Connection = new DirectConnection.Connection(); m_CmdData = new uint[64]; m_RspData = new uint[64]; m_Responder = new Responder(); m_Listener = new Listener(7474); m_Client = null; m_TcpTimeout = new Stopwatch(); m_PM3State = PM3State.Disconnected; m_FrameCount = 0; m_Thread = new Thread(ThreadProc); m_Thread.Name = "Server"; m_Quit = false; }
private void SetConnectionState(PM3State state) { if (m_PM3State != state) { if (ConnectionChanged != null) { ConnectionChanged(this, state); } } m_PM3State = state; }