Exemplo n.º 1
0
 public static void ShowErrorDialogOnlyIfPrimaryCUAndSDKReady(Control parent, string errorMsg, Exception ex, string helpTopic, string accessibleName)
 {
     if (parent.InvokeRequired)
     return;
       ErrorDialog errorDlg = new ErrorDialog(errorMsg, ex, helpTopic, accessibleName);
       ErrorHelper.ShowErrorDialog(parent, errorDlg, errorMsg, false);
 }
Exemplo n.º 2
0
 public static void ShowErrorDialog(Control parent, string errorMsg, Exception ex, string helpTopic, string accessibleName)
 {
     if (parent.InvokeRequired)
     return;
       ErrorDialog errorDlg = new ErrorDialog(errorMsg, ex, helpTopic, accessibleName);
       ErrorHelper.ShowErrorDialog(parent, errorDlg, errorMsg, true);
 }
Exemplo n.º 3
0
 public ErrorPanel(ErrorDialog parentDialog, string errorMessage, string details, string helpTopic)
 {
     this._parentDialog = parentDialog;
       this._helpTopic = helpTopic;
       if (this._textPanel == null)
       {
     this._textPanel = new TextPanel();
     this._textPanel.Location = new Point(74, 30);
     this._textPanel.Size = new Size(261, 72);
     this._textPanel.TabStop = false;
     this.Controls.Add((Control) this._textPanel);
       }
       this.InitializeComponent();
       this._origProblemImageLocation = this.ErrorPanel_ProblemImage.Location;
       this._origErrorMsgLblLocation = this._textPanel.Location;
       this.CustomInitializeComponents(errorMessage, details);
       this.ErrorPanel_ProblemImage.Image = (Image) ScalingUtils.ScaleBitmap(this.ErrorPanel_ProblemImage.Image);
 }
Exemplo n.º 4
0
 private static void ShowErrorDialog(Control parent, ErrorDialog errorDlg, string errorMsg, bool alwaysShowErrorMsg)
 {
     if (!alwaysShowErrorMsg && (!MediaHandler.IntelCUIsInControl || !MediaHandler.TheMedia.WiMAXIsReady))
     return;
       if (!alwaysShowErrorMsg)
       {
     if (!AdapterHandler.TheAdapter.RadioIsOn())
     {
       if (errorMsg != ErrorStringsHelper.GetString("General_RadioOnFailed"))
       {
     if (errorMsg != ErrorStringsHelper.GetString("General_RadioOffFailed"))
       return;
       }
     }
       }
       try
       {
     if (File.Exists("C:\\Windows\\Media\\Windows XP Critical Stop.wav"))
       new SoundPlayer("C:\\Windows\\Media\\Windows XP Critical Stop.wav").Play();
     else if (File.Exists("C:\\Windows\\Media\\Windows Critical Stop.wav"))
       new SoundPlayer("C:\\Windows\\Media\\Windows Critical Stop.wav").Play();
       }
       catch (Exception ex)
       {
     Logging.LogEvent(TraceModule.SDK, TraceLevel.Warning, typeof (ErrorDialog), Logging.GetMessageForException(ex));
       }
       if (AppFramework.TaskTray.ShowPopupInTaskTray())
       {
     errorDlg.FormType = FormTypeEnum.TaskTrayWithCloseBtn;
     errorDlg.StartPosition = FormStartPosition.Manual;
     errorDlg.Location = AppFramework.TaskTray.GetTaskTrayPopupLocation(DPIUtils.ScaleSize(errorDlg.Size));
     UIHelper.ShowAsTopMostForm((Form) errorDlg);
       }
       else
       {
     if (AppFramework.Dashboard != null && AppFramework.Dashboard.WindowState == FormWindowState.Minimized)
       AppFramework.Dashboard.WindowState = FormWindowState.Normal;
     AppFramework.Dashboard.BringToFront();
     errorDlg.FormType = FormTypeEnum.Dialog;
     if (AppFramework.Dashboard != null && AppFramework.Dashboard.Visible)
       errorDlg.StartPosition = FormStartPosition.CenterParent;
     else
       errorDlg.StartPosition = FormStartPosition.CenterScreen;
     int num = (int) errorDlg.ShowDialog((IWin32Window) parent);
       }
 }