コード例 #1
0
ファイル: ClientForm.cs プロジェクト: divyang4481/IIOPNet
 private void ProcessDyadicCommand(DyadicOp cmd)
 {
     try {
         cmd.operand1 = Int32.Parse(m_operand1Textbox.Text);
         cmd.operand2 = Int32.Parse(m_operand2Textbox.Text);
         DyadicOp cmdResult = (DyadicOp)m_commandTarget.executeCommand(cmd);
         m_resultValue.Text = cmdResult.result.ToString();
     } catch (System.FormatException) {
         MessageBox.Show("Invalid integer, check operands!");
     } catch (Exception ex) {
         Console.WriteLine("exception encountered, while executing command: " + ex);
         MessageBox.Show("an exception occured, while executing command!");
     }
 }
コード例 #2
0
 private void ProcessDyadicCommand(DyadicOp cmd) {
     try {                
         cmd.operand1 = Int32.Parse(m_operand1Textbox.Text);
         cmd.operand2 = Int32.Parse(m_operand2Textbox.Text);
         DyadicOp cmdResult = (DyadicOp)m_commandTarget.executeCommand(cmd);
         m_resultValue.Text = cmdResult.result.ToString();
     } catch (System.FormatException) {
         MessageBox.Show("Invalid integer, check operands!");
     } catch (Exception ex) {
         Console.WriteLine("exception encountered, while executing command: " + ex);
         MessageBox.Show("an exception occured, while executing command!");
     }        
 }