コード例 #1
0
ファイル: Dashboard.cs プロジェクト: GNUtn/wimaxcu
 private void InitializeComponent()
 {
     ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (Dashboard));
       this.TheApdoEventHandler = new APDOEventHandler();
       this.SuspendLayout();
       this.TheApdoEventHandler.BackColor = Color.DarkRed;
       componentResourceManager.ApplyResources((object) this.TheApdoEventHandler, "TheApdoEventHandler");
       this.TheApdoEventHandler.Name = "TheApdoEventHandler";
       this.AutoScaleMode = AutoScaleMode.None;
       componentResourceManager.ApplyResources((object) this, "$this");
       this.Controls.Add((Control) this.TheApdoEventHandler);
       this.ForeColor = Color.Black;
       this.FormType = FormTypeEnum.MainApplication;
       this.KeyPreview = true;
       this.MaximizeBox = false;
       this.Name = "Dashboard";
       this.WindowState = FormWindowState.Minimized;
       this.ResumeLayout(false);
 }
コード例 #2
0
ファイル: APDOEventHandler.cs プロジェクト: GNUtn/wimaxcu
 private DialogResult PromptUser(APDOEventHandler.PromptType promptType)
 {
     string promptText = string.Empty;
       string clickableText = string.Empty;
       LinkLabelLinkClickedEventHandler linkClickedEventHandler = (LinkLabelLinkClickedEventHandler) null;
       if (promptType == APDOEventHandler.PromptType.PackageDownload)
       {
     clickableText = DashboardStringHelper.GetString("CapitalClickHere_Clickable");
     promptText = string.Format(DashboardStringHelper.GetString("APDO_PromptUserPackageDownload"), (object) clickableText);
     linkClickedEventHandler = new LinkLabelLinkClickedEventHandler(this.OnPackageDownloadHelpLinkClicked);
       }
       else if (promptType == APDOEventHandler.PromptType.PackageInstall)
     promptText = DashboardStringHelper.GetString("APDO_PromptUserPackageInstall");
       this._callSetPackageUpdateState = true;
       DialogResult dialogResult = this.ShowPromptDialog(promptText, clickableText, linkClickedEventHandler, CustomMessageBoxStyle.YesRemindMeLater);
       int num;
       switch (dialogResult)
       {
     case DialogResult.Ignore:
       return dialogResult;
     case DialogResult.Yes:
       num = 1;
       break;
     default:
       num = 0;
       break;
       }
       bool userApprovedAction = num != 0;
       if (this._callSetPackageUpdateState && (promptType == APDOEventHandler.PromptType.PackageDownload || promptType == APDOEventHandler.PromptType.PackageInstall))
       {
     int errorCode = APDOHandler.Singleton.SetPackageUpdateState(userApprovedAction);
     if (errorCode != 0)
     {
       ErrorHelper.ShowErrorDialog((Control) AppFramework.Dashboard, ErrorStringsHelper.GetString("General_SetPackageUpdateStateFailed"), ErrorHelper.TranslateErrorCodeToMessage(errorCode), (string) null, "SetPackageUpdateStateFailed");
       dialogResult = DialogResult.Abort;
     }
     else if (userApprovedAction && promptType == APDOEventHandler.PromptType.PackageDownload)
       Eventing.GenerateUIEvent("WiMAXSP.OnAPDO", (object) this, new object[1]
       {
     (object) APDOEventType.PackageDownloadStarted
       });
       }
       return dialogResult;
 }