public frmOrderFormConfirm(string message, string caption, frmOrderFormConfirm.OpenStyle openStyle)
 {
     this.InitializeComponent();
     this.Text = caption;
     this.openFormStyle = openStyle;
     this._message = message;
 }
 public frmOrderFormConfirm(string message, frmOrderFormConfirm.OpenStyle openStyle, string pinCode)
 {
     this.InitializeComponent();
     this.openFormStyle = openStyle;
     ApplicationInfo.UserPincodeLastEntry = pinCode;
     this._message = message;
 }
Example #3
0
 private void ShowOrderFormConfirm(string message, string orderParam, frmOrderFormConfirm.OpenStyle openStyle)
 {
     if (base.InvokeRequired)
     {
         base.Invoke(new frmEditOrder.ShowOrderFormConfirmCallBack(this.ShowOrderFormConfirm), new object[]
         {
             message,
             orderParam,
             openStyle
         });
     }
     else
     {
         try
         {
             if (this._frmConfirm != null)
             {
                 if (!this._frmConfirm.IsDisposed)
                 {
                     this._frmConfirm.FormClosing -= new FormClosingEventHandler(this.frmConfirm_FormClosing);
                     this._frmConfirm.Dispose();
                 }
                 this._frmConfirm = null;
             }
             this._frmConfirm = new frmOrderFormConfirm(message, "", openStyle);
             this._frmConfirm.FormClosing -= new FormClosingEventHandler(this.frmConfirm_FormClosing);
             this._frmConfirm.FormClosing += new FormClosingEventHandler(this.frmConfirm_FormClosing);
             this._frmConfirm.TopLevel = false;
             this._frmConfirm.OrderParam = orderParam;
             if (base.Parent.GetType() == typeof(Panel))
             {
                 this._frmConfirm.Parent = base.Parent.Parent;
             }
             else if (base.Parent.GetType().BaseType == typeof(ClientBaseForm))
             {
                 this._frmConfirm.Parent = base.Parent;
             }
             else if (base.Parent.Parent.Parent.GetType() == typeof(frmMain))
             {
                 this._frmConfirm.Parent = base.Parent.Parent.Parent;
             }
             this._frmConfirm.Location = new Point((this._frmConfirm.Parent.Width - this._frmConfirm.Width) / 2, (this._frmConfirm.Parent.Height - this._frmConfirm.Height) / 2);
             this._frmConfirm.TopMost = true;
             this._frmConfirm.Show();
             this._frmConfirm.BringToFront();
         }
         catch (Exception ex)
         {
             this.ShowError("ShowMessageInFormConfirm", ex);
         }
     }
 }
 private void ShowOrderFormConfirm(string message, string orderParam, frmOrderFormConfirm.OpenStyle openStyle)
 {
     if (base.InvokeRequired)
     {
         base.Invoke(new frmDcaCreateNew.ShowOrderFormConfirmCallBack(this.ShowOrderFormConfirm), new object[]
         {
             message,
             orderParam,
             openStyle
         });
     }
     else
     {
         try
         {
             if (this._frmConfirm != null)
             {
                 if (!this._frmConfirm.IsDisposed)
                 {
                     this._frmConfirm.FormClosing -= new FormClosingEventHandler(this.frmConfirm_FormClosing);
                     this._frmConfirm.Dispose();
                 }
                 this._frmConfirm = null;
             }
             this._frmConfirm = new frmOrderFormConfirm(message, openStyle, this.tbPin.Text.Trim());
             this._frmConfirm.FormClosing -= new FormClosingEventHandler(this.frmConfirm_FormClosing);
             this._frmConfirm.FormClosing += new FormClosingEventHandler(this.frmConfirm_FormClosing);
             this._frmConfirm.TopLevel = false;
             this._frmConfirm.OssMessage = string.Empty;
             this._frmConfirm.StockThreshold = string.Empty;
             this._frmConfirm.OrderParam = orderParam;
             this._frmConfirm.Parent = this;
             this._frmConfirm.Location = new Point((this._frmConfirm.Parent.Width - this._frmConfirm.Width) / 2, (this._frmConfirm.Parent.Height - this._frmConfirm.Height) / 2);
             this._frmConfirm.TopMost = true;
             this._frmConfirm.Show();
             this._frmConfirm.BringToFront();
         }
         catch (Exception ex)
         {
             this.ShowError("ShowMessageInFormConfirm", ex);
         }
     }
 }
 private void ShowMessageBox(string message, frmOrderFormConfirm.OpenStyle openStyle, Control lastFocusOjb)
 {
     if (base.InvokeRequired)
     {
         base.Invoke(new frmDcaCreateNew.ShowMessageBoxCallBack(this.ShowMessageBox), new object[]
         {
             message,
             openStyle,
             lastFocusOjb
         });
     }
     else
     {
         try
         {
             this._lastFocusOjb = lastFocusOjb;
             if (this._frmConfirm != null)
             {
                 if (!this._frmConfirm.IsDisposed)
                 {
                     this._frmConfirm.FormClosing -= new FormClosingEventHandler(this.frmConfirm_FormClosing);
                     this._frmConfirm.Dispose();
                 }
                 this._frmConfirm = null;
             }
             this._frmConfirm = new frmOrderFormConfirm(message, openStyle);
             this._frmConfirm.FormClosing -= new FormClosingEventHandler(this.frmConfirm_FormClosing);
             this._frmConfirm.FormClosing += new FormClosingEventHandler(this.frmConfirm_FormClosing);
             this._frmConfirm.TopLevel = false;
             this._frmConfirm.Parent = this;
             this._frmConfirm.Location = new Point((this._frmConfirm.Parent.Width - this._frmConfirm.Width) / 2, (this._frmConfirm.Parent.Height - this._frmConfirm.Height) / 2);
             this._frmConfirm.TopMost = true;
             this._frmConfirm.Show();
             this._frmConfirm.BringToFront();
         }
         catch (Exception ex)
         {
             this.ShowError("ShowMessageInFormConfirm", ex);
         }
     }
 }
Example #6
0
 public void CloseViewOrderInfoBox()
 {
     try
     {
         if (this._viewOrderInfo != null)
         {
             this._viewOrderInfo.Close();
             this._viewOrderInfo = null;
         }
         if (this.frmConfirm != null)
         {
             this.frmConfirm.FormClosing -= new FormClosingEventHandler(this.frmConfirm_FormClosing);
             if (!this.frmConfirm.IsDisposed)
             {
                 this.frmConfirm.Dispose();
             }
             this.frmConfirm = null;
         }
     }
     catch (Exception ex)
     {
         this.ShowError("CloseViewOrderInfoBox", ex);
     }
 }
 public void SetFormActivate(string side)
 {
     try
     {
         if (this._frmConfirm != null)
         {
             if (!this._frmConfirm.IsDisposed)
             {
                 this._frmConfirm.Dispose();
             }
             this._frmConfirm = null;
         }
         if (ApplicationInfo.IsEquityAccount)
         {
             if (this.SetColorBySide(side))
             {
                 if (Settings.Default.BSBoxDefaultStock)
                 {
                     if (this.cbStock.Text == string.Empty)
                     {
                         this.SetCurrentSymbol(ApplicationInfo.CurrentSymbol);
                     }
                 }
                 this.ShowCreditValue();
                 if (Settings.Default.MainBottomStyle == 5)
                 {
                     this.SetVisibleControlEquity();
                     this.cbMMStock.Focus();
                 }
                 else
                 {
                     this.cbStock.Focus();
                 }
             }
         }
         else
         {
             this._showSideTFEX = ((side == "B") ? "L" : side);
             this.DoClear_TFEX();
             this.SetColorBySide_TFEX();
             if (Settings.Default.BSBoxDefaultStock)
             {
                 if (this.tbSeries.Text == string.Empty)
                 {
                     this.SetCurrentSymbol(ApplicationInfo.CurrentSymbol);
                 }
             }
             this.tbSeries.Focus();
             this.tbSeries.SelectAll();
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 private void ShowOrderFormConfirm(string message, string orderParam, string ossWarning, string stockTH)
 {
     if (base.InvokeRequired)
     {
         base.Invoke(new ucSendNewOrder.ShowOrderFormConfirmCallBack(this.ShowOrderFormConfirm), new object[]
         {
             message,
             orderParam,
             ossWarning,
             stockTH
         });
     }
     else
     {
         try
         {
             if (this._frmConfirm != null)
             {
                 if (!this._frmConfirm.IsDisposed)
                 {
                     this._frmConfirm.FormClosing -= new FormClosingEventHandler(this.frmConfirm_FormClosing);
                     this._frmConfirm.Dispose();
                 }
                 this._frmConfirm = null;
             }
             this._frmConfirm = new frmOrderFormConfirm(message, frmOrderFormConfirm.OpenStyle.ConfirmSendNew);
             this._frmConfirm.FormClosing -= new FormClosingEventHandler(this.frmConfirm_FormClosing);
             this._frmConfirm.FormClosing += new FormClosingEventHandler(this.frmConfirm_FormClosing);
             this._frmConfirm.TopLevel = false;
             this._frmConfirm.OssMessage = ossWarning;
             this._frmConfirm.StockThreshold = stockTH;
             this._frmConfirm.OrderParam = orderParam;
             this._frmConfirm.Parent = base.Parent.Parent;
             this._frmConfirm.Location = new Point((this._frmConfirm.Parent.Width - this._frmConfirm.Width) / 2, (this._frmConfirm.Parent.Height - this._frmConfirm.Height) / 2);
             this._frmConfirm.TopMost = true;
             this._frmConfirm.Show();
             this._frmConfirm.BringToFront();
         }
         catch (Exception ex)
         {
             this.ShowError("ShowMessageInFormConfirm", ex);
         }
     }
 }
 private void ShowMessageInFormConfirm(string message, frmOrderFormConfirm.OpenStyle openStyle, Control lastObject)
 {
     this._objLastActive = lastObject;
     this.ShowMessageInFormConfirm(message, openStyle);
 }
Example #10
0
 private void ShowMessageInFormConfirm(string message, frmOrderFormConfirm.OpenStyle openStyle, int verifyCode)
 {
     if (base.InvokeRequired)
     {
         base.Invoke(new frmBatchOrder.ShowMessageInFormConfirmCallBack(this.ShowMessageInFormConfirm), new object[]
         {
             message,
             openStyle,
             verifyCode
         });
     }
     else
     {
         try
         {
             if (this._frmConfirm != null)
             {
                 if (!this._frmConfirm.IsDisposed)
                 {
                     this._frmConfirm.Dispose();
                 }
                 this._frmConfirm = null;
             }
             this._frmConfirm = new frmOrderFormConfirm(message, openStyle);
             this._frmConfirm.FormClosing -= new FormClosingEventHandler(this.frmConfirm_FormClosing);
             this._frmConfirm.FormClosing += new FormClosingEventHandler(this.frmConfirm_FormClosing);
             this._frmConfirm.TopLevel = false;
             this._frmConfirm.Parent = base.Parent;
             this._frmConfirm.Location = new Point((this._frmConfirm.Parent.Width - this._frmConfirm.Width) / 2, (this._frmConfirm.Parent.Height - this._frmConfirm.Height) / 2);
             this._frmConfirm.TopMost = true;
             this._frmConfirm.Show();
             this._frmConfirm.BringToFront();
         }
         catch (Exception ex)
         {
             this.ShowError("ShowMessageInFormConfirm", ex);
         }
     }
 }
Example #11
0
 private void ShowMessageInFormConfirm(string message, frmOrderFormConfirm.OpenStyle openStyle)
 {
     this.ShowMessageInFormConfirm(message, openStyle, 0);
 }
 private void ShowMessage(string message)
 {
     if (base.InvokeRequired)
     {
         base.Invoke(new frmPcPriceAlert.ShowMessageCallBack(this.ShowMessage), new object[]
         {
             message
         });
     }
     else
     {
         try
         {
             if (this.frmConfirm != null)
             {
                 if (!this.frmConfirm.IsDisposed)
                 {
                     this.frmConfirm.Dispose();
                 }
                 this.frmConfirm = null;
             }
             this.frmConfirm = new frmOrderFormConfirm(message, "", frmOrderFormConfirm.OpenStyle.ShowBox);
             this.frmConfirm.TopLevel = false;
             this.frmConfirm.Parent = this;
             this.frmConfirm.Location = new Point((base.Width - this.frmConfirm.Width) / 2, (base.Height - this.frmConfirm.Height) / 2);
             this.frmConfirm.TopMost = true;
             this.frmConfirm.Show();
             this.frmConfirm.BringToFront();
         }
         catch (Exception ex)
         {
             this.ShowError("ShowMessageInFormConfirm", ex);
         }
     }
 }