コード例 #1
0
        private void gateway_ConnectionError(object sender, OpenWebNetErrorEventArgs e)
        {
            this.Invoke(commandUpdateRes, e.ErrorType.ToString());

            if (e.ErrorType == OpenWebNetErrorType.Exception)
            {
                MessageBox.Show(e.Exception.ToString());
            }
        }
コード例 #2
0
ファイル: MainFrm.cs プロジェクト: jphomi/JP-OpenWebNet
        private void gateway_ConnectionError(object sender, OpenWebNetErrorEventArgs e)
        {
            SocketException socketEx;

            if (e.Exception == null)
            {
                return;
            }

            socketEx = e.Exception as SocketException;

            if (socketEx == null)
            {
                MessageBox.Show("Error: " + e.Exception.Message, "MyHomeShortcut", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            if (socketEx.SocketErrorCode == SocketError.ConnectionRefused)
            {
                MessageBox.Show("The server has refused the connection...Check IP and Port", "MyHomeShortcut", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
コード例 #3
0
 private void gateway_ConnectionError(object sender, OpenWebNetErrorEventArgs e)
 {
     MessageBox.Show(e.Exception.ToString());
 }