Ejemplo n.º 1
0
 public ErrorPiece(UserInterfaceForm parentForm, string errorTitle, string errorMessage, string logFileLocation, string linkUrl, string linkUrlMessage, ManualResetEvent modalEvent)
 {
   this._errorMessage = errorMessage;
   this._logFileLocation = logFileLocation;
   this._linkUrl = linkUrl;
   this._linkUrlMessage = linkUrlMessage;
   this._modalResult = UserInterfaceModalResult.Ok;
   this._modalEvent = modalEvent;
   this.SuspendLayout();
   this.InitializeComponent();
   this.InitializeContent();
   this.ResumeLayout(false);
   parentForm.SuspendLayout();
   parentForm.SwitchUserInterfacePiece((FormPiece) this);
   parentForm.Text = errorTitle;
   parentForm.MinimizeBox = false;
   parentForm.MaximizeBox = false;
   parentForm.ControlBox = true;
   parentForm.ActiveControl = (Control) this.btnOk;
   parentForm.ResumeLayout(false);
   parentForm.PerformLayout();
   parentForm.Visible = true;
   if (Form.ActiveForm == parentForm)
     return;
   parentForm.Activate();
 }
 public ErrorPiece(UserInterfaceForm parentForm, string errorTitle, string errorMessage, string logFileLocation, string linkUrl, string linkUrlMessage, ManualResetEvent modalEvent)
 {
     this._errorMessage = errorMessage;
     this._logFileLocation = logFileLocation;
     this._linkUrl = linkUrl;
     this._linkUrlMessage = linkUrlMessage;
     base._modalResult = UserInterfaceModalResult.Ok;
     base._modalEvent = modalEvent;
     base.SuspendLayout();
     this.InitializeComponent();
     this.InitializeContent();
     base.ResumeLayout(false);
     parentForm.SuspendLayout();
     parentForm.SwitchUserInterfacePiece(this);
     parentForm.Text = errorTitle;
     parentForm.MinimizeBox = false;
     parentForm.MaximizeBox = false;
     parentForm.ControlBox = true;
     parentForm.ActiveControl = this.btnOk;
     parentForm.ResumeLayout(false);
     parentForm.PerformLayout();
     parentForm.Visible = true;
     if (Form.ActiveForm != parentForm)
     {
         parentForm.Activate();
     }
 }