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();
 }
Ejemplo n.º 2
0
 public SplashPiece(UserInterfaceForm parentForm, SplashInfo info)
 {
     this.info = info;
     this.SuspendLayout();
     this.InitializeComponent();
     this.InitializeContent();
     this.ResumeLayout(false);
     parentForm.SuspendLayout();
     parentForm.Text        = Resources.GetString("UI_SplashTitle");
     parentForm.MinimizeBox = false;
     parentForm.MaximizeBox = false;
     parentForm.ControlBox  = true;
     parentForm.ResumeLayout(false);
     this.splashTimer       = new Timer();
     this.splashTimer.Tick += new EventHandler(this.SplashTimer_Tick);
     if (info.initializedAsWait)
     {
         this.splashTimer.Interval = 2500;
         this.splashTimer.Tag      = (object)null;
         this.splashTimer.Enabled  = true;
     }
     else
     {
         this.ShowSplash((Form)parentForm);
     }
 }
Ejemplo n.º 3
0
 public ProgressPiece(UserInterfaceForm parentForm, UserInterfaceInfo info)
 {
     this._info = info;
     this.SuspendLayout();
     this.InitializeComponent();
     this.InitializeContent();
     this.ResumeLayout(false);
     parentForm.SuspendLayout();
     parentForm.SwitchUserInterfacePiece((FormPiece)this);
     parentForm.Text = string.Format((IFormatProvider)CultureInfo.CurrentUICulture, Resources.GetString("UI_ProgressTitle"), new object[2]
     {
         (object)0,
         (object)this._info.formTitle
     });
     parentForm.MinimizeBox   = true;
     parentForm.MaximizeBox   = false;
     parentForm.ControlBox    = true;
     this.lblHeader.Font      = new Font(this.lblHeader.Font, this.lblHeader.Font.Style | FontStyle.Bold);
     this.linkAppId.Font      = new Font(this.linkAppId.Font, this.linkAppId.Font.Style | FontStyle.Bold);
     this.lblFromId.Font      = new Font(this.lblFromId.Font, this.lblFromId.Font.Style | FontStyle.Bold);
     parentForm.ActiveControl = (Control)this.btnCancel;
     parentForm.ResumeLayout(false);
     parentForm.PerformLayout();
     parentForm.Visible         = true;
     this.updateUIMethodInvoker = new MethodInvoker(this.UpdateUI);
     this.disableMethodInvoker  = new MethodInvoker(this.Disable);
     this._parentForm           = parentForm;
 }
 public SplashPiece(UserInterfaceForm parentForm, SplashInfo info)
 {
     this.info = info;
     base.SuspendLayout();
     this.InitializeComponent();
     this.InitializeContent();
     base.ResumeLayout(false);
     parentForm.SuspendLayout();
     parentForm.Text = Resources.GetString("UI_SplashTitle");
     parentForm.MinimizeBox = false;
     parentForm.MaximizeBox = false;
     parentForm.ControlBox = true;
     parentForm.ResumeLayout(false);
     this.splashTimer = new Timer();
     this.splashTimer.Tick += new EventHandler(this.SplashTimer_Tick);
     if (info.initializedAsWait)
     {
         this.splashTimer.Interval = 0x9c4;
         this.splashTimer.Tag = null;
         this.splashTimer.Enabled = true;
     }
     else
     {
         this.ShowSplash(parentForm);
     }
 }
 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();
     }
 }
 private void UIThread()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     using (this._uiForm = new UserInterfaceForm(this._uiReady, this._splashInfo))
     {
         this._uiConstructed.Set();
         this._appctx = new ApplicationContext(this._uiForm);
         Application.Run(this._appctx);
         this._appctxExitThreadFinished.WaitOne();
         Application.ExitThread();
     }
 }
Ejemplo n.º 7
0
 public PlatformPiece(UserInterfaceForm parentForm, string platformDetectionErrorMsg, Uri supportUrl, ManualResetEvent modalEvent)
 {
     this._errorMessage = platformDetectionErrorMsg;
     this._supportUrl   = supportUrl;
     this._modalResult  = UserInterfaceModalResult.Ok;
     this._modalEvent   = modalEvent;
     this.SuspendLayout();
     this.InitializeComponent();
     this.InitializeContent();
     this.ResumeLayout(false);
     parentForm.SuspendLayout();
     parentForm.SwitchUserInterfacePiece((FormPiece)this);
     parentForm.Text          = Resources.GetString("UI_PlatformDetectionFailedTitle");
     parentForm.MinimizeBox   = false;
     parentForm.MaximizeBox   = false;
     parentForm.ControlBox    = true;
     parentForm.ActiveControl = (Control)this.btnOk;
     parentForm.ResumeLayout(false);
     parentForm.PerformLayout();
     parentForm.Visible = true;
 }
 public PlatformPiece(UserInterfaceForm parentForm, string platformDetectionErrorMsg, Uri supportUrl, ManualResetEvent modalEvent)
 {
     this._errorMessage = platformDetectionErrorMsg;
     this._supportUrl = supportUrl;
     base._modalResult = UserInterfaceModalResult.Ok;
     base._modalEvent = modalEvent;
     base.SuspendLayout();
     this.InitializeComponent();
     this.InitializeContent();
     base.ResumeLayout(false);
     parentForm.SuspendLayout();
     parentForm.SwitchUserInterfacePiece(this);
     parentForm.Text = Resources.GetString("UI_PlatformDetectionFailedTitle");
     parentForm.MinimizeBox = false;
     parentForm.MaximizeBox = false;
     parentForm.ControlBox = true;
     parentForm.ActiveControl = this.btnOk;
     parentForm.ResumeLayout(false);
     parentForm.PerformLayout();
     parentForm.Visible = true;
 }
Ejemplo n.º 9
0
 public MaintenancePiece(UserInterfaceForm parentForm, UserInterfaceInfo info, MaintenanceInfo maintenanceInfo, ManualResetEvent modalEvent)
 {
     this._modalResult     = UserInterfaceModalResult.Cancel;
     this._info            = info;
     this._maintenanceInfo = maintenanceInfo;
     this._modalEvent      = modalEvent;
     this.SuspendLayout();
     this.InitializeComponent();
     this.InitializeContent();
     this.ResumeLayout(false);
     parentForm.SuspendLayout();
     parentForm.SwitchUserInterfacePiece((FormPiece)this);
     parentForm.Text          = this._info.formTitle;
     parentForm.MinimizeBox   = false;
     parentForm.MaximizeBox   = false;
     parentForm.ControlBox    = true;
     this.lblHeader.Font      = new Font(this.lblHeader.Font, this.lblHeader.Font.Style | FontStyle.Bold);
     parentForm.ActiveControl = (Control)this.btnCancel;
     parentForm.ResumeLayout(false);
     parentForm.PerformLayout();
     parentForm.Visible = true;
 }
 public MaintenancePiece(UserInterfaceForm parentForm, UserInterfaceInfo info, MaintenanceInfo maintenanceInfo, ManualResetEvent modalEvent)
 {
     base._modalResult = UserInterfaceModalResult.Cancel;
     this._info = info;
     this._maintenanceInfo = maintenanceInfo;
     base._modalEvent = modalEvent;
     base.SuspendLayout();
     this.InitializeComponent();
     this.InitializeContent();
     base.ResumeLayout(false);
     parentForm.SuspendLayout();
     parentForm.SwitchUserInterfacePiece(this);
     parentForm.Text = this._info.formTitle;
     parentForm.MinimizeBox = false;
     parentForm.MaximizeBox = false;
     parentForm.ControlBox = true;
     this.lblHeader.Font = new Font(this.lblHeader.Font, this.lblHeader.Font.Style | FontStyle.Bold);
     parentForm.ActiveControl = this.btnCancel;
     parentForm.ResumeLayout(false);
     parentForm.PerformLayout();
     parentForm.Visible = true;
 }
 public UpdatePiece(UserInterfaceForm parentForm, UserInterfaceInfo info, ManualResetEvent modalEvent)
 {
     this._info        = info;
     base._modalEvent  = modalEvent;
     base._modalResult = UserInterfaceModalResult.Cancel;
     base.SuspendLayout();
     this.InitializeComponent();
     this.InitializeContent();
     base.ResumeLayout(false);
     parentForm.SuspendLayout();
     parentForm.SwitchUserInterfacePiece(this);
     parentForm.Text          = this._info.formTitle;
     parentForm.MinimizeBox   = false;
     parentForm.MaximizeBox   = false;
     parentForm.ControlBox    = true;
     this.lblHeader.Font      = new Font(this.lblHeader.Font, this.lblHeader.Font.Style | FontStyle.Bold);
     this.linkAppId.Font      = new Font(this.linkAppId.Font, this.linkAppId.Font.Style | FontStyle.Bold);
     this.lblFromId.Font      = new Font(this.lblFromId.Font, this.lblFromId.Font.Style | FontStyle.Bold);
     parentForm.ActiveControl = this.btnOk;
     parentForm.ResumeLayout(false);
     parentForm.PerformLayout();
     parentForm.Visible = true;
 }
 public ProgressPiece(UserInterfaceForm parentForm, UserInterfaceInfo info)
 {
     this._info = info;
     base.SuspendLayout();
     this.InitializeComponent();
     this.InitializeContent();
     base.ResumeLayout(false);
     parentForm.SuspendLayout();
     parentForm.SwitchUserInterfacePiece(this);
     parentForm.Text = string.Format(CultureInfo.CurrentUICulture, Resources.GetString("UI_ProgressTitle"), new object[] { 0, this._info.formTitle });
     parentForm.MinimizeBox = true;
     parentForm.MaximizeBox = false;
     parentForm.ControlBox = true;
     this.lblHeader.Font = new Font(this.lblHeader.Font, this.lblHeader.Font.Style | FontStyle.Bold);
     this.linkAppId.Font = new Font(this.linkAppId.Font, this.linkAppId.Font.Style | FontStyle.Bold);
     this.lblFromId.Font = new Font(this.lblFromId.Font, this.lblFromId.Font.Style | FontStyle.Bold);
     parentForm.ActiveControl = this.btnCancel;
     parentForm.ResumeLayout(false);
     parentForm.PerformLayout();
     parentForm.Visible = true;
     this.updateUIMethodInvoker = new MethodInvoker(this.UpdateUI);
     this.disableMethodInvoker = new MethodInvoker(this.Disable);
     this._parentForm = parentForm;
 }
 private void UIThread()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     using (this._uiForm = new UserInterfaceForm(this._uiReady, this._splashInfo))
     {
         this._uiConstructed.Set();
         this._appctx = new ApplicationContext(this._uiForm);
         Application.Run(this._appctx);
         this._appctxExitThreadFinished.WaitOne();
         Application.ExitThread();
     }
 }