예제 #1
0
 private void button1_Click(object sender, EventArgs e)
 {
   if (this.textBox2.Text != this.textBox3.Text)
   {
     int num1 = (int) MessageBox.Show("Check new password again!!!", "Error");
   }
   else
   {
     string command = "<command id=\"change_pass\" oldpass=\"" + this.textBox1.Text + "\" newpass=\"" + this.textBox2.Text + "\"/>";
     try
     {
       TransaqResult transaqResult;
       if (this.selectedDll == DllSelector.txmlconnector_dll)
       {
         transaqResult = new TransaqResult(this.MessageParsing(TXmlConnector.Instance.SendCommand(command)));
       }
       else
       {
         if (this.selectedDll != DllSelector.txcn_dll)
           throw new ArgumentException("Unknown dll " + (object) this.selectedDll);
         transaqResult = new TransaqResult(this.MessageParsing(TXcnConnector.Instance.SendCommand(command)));
       }
       if (transaqResult.Success)
       {
         int num2 = (int) MessageBox.Show("Password change is completed", "Result", MessageBoxButtons.OK);
         this.password = this.textBox2.Text;
       }
       else
       {
         int num3 = (int) MessageBox.Show("Password change is not completed\n\n" + transaqResult.Message, "Result", MessageBoxButtons.OK);
       }
     }
     catch (Exception ex)
     {
       int num2 = (int) MessageBox.Show(ex.Message);
     }
   }
   this.Close();
 }
예제 #2
0
파일: Transaq.cs 프로젝트: smther/FreeOQ
 private TransaqResult SendCommandLine(string cmd)
 {
   cmd = cmd + (object) char.MinValue;
   TransaqResult transaqResult = new TransaqResult();
   try
   {
     transaqResult = new TransaqResult(this.GetResultString(this.connector.SendCommand(cmd)));
   }
   catch (Exception ex)
   {
     this.EmitError(ex.Message);
   }
   if (!transaqResult.Success)
   {
     if (!string.IsNullOrWhiteSpace(transaqResult.Message))
       this.EmitError(transaqResult.Message);
     if (!string.IsNullOrWhiteSpace(transaqResult.Error))
       this.EmitError(transaqResult.Error);
   }
   return transaqResult;
 }