} // Line active /// <summary> /// OnLogIpAddr - First event when it makes sense to /// try to do any real work with target device. /// </summary> /// <param name="dwIpAddr"></param> /// <returns></returns> public int OnLogIpAddr(int dwIpAddr) // Link established. { if (!m_Connected) // Notify only if not connected. { this.itReason = INVOKE_CONNECT.START; this.m_ctlTarget.Invoke(this.m_deleCallback); m_Connected = true; } return(0); }
/// <summary> /// OnLogDisconnection - Connection ended. /// </summary> /// <returns></returns> public int OnLogDisconnection() { if (m_Connected) // Notify only if connected. { this.itReason = INVOKE_CONNECT.STOP; this.m_ctlTarget.Invoke(this.m_deleCallback); m_Connected = false; } return(0); }
DetectCallback(object sender, System.EventArgs e) { INVOKE_CONNECT it = this.m_rapicd.itReason; switch (it) { case INVOKE_CONNECT.START: this.cmdConnect_Click(this, new EventArgs()); this.txtStartDir.Text = @"\"; this.chkSubs.Checked = true; cmdFind.Enabled = true; this.cmdFind_Click(this, new EventArgs()); break; case INVOKE_CONNECT.STOP: this.cmdDisconnect_Click(this, new EventArgs()); break; } }