예제 #1
0
 protected BaseErrorDialog()
 {
     this.InitializeComponent();
     this.iconBox.Image            = IconLibrary.ToBitmap(Icons.Error, this.iconBox.Size);
     this.cancelButton.Text        = Strings.Ok;
     this.messageLabel.UseMnemonic = false;
 }
예제 #2
0
        public ExchangeDialog()
        {
            this.InitializeComponent();
            this.cancelButton.Text     = Strings.Cancel;
            this.okButton.Text         = Strings.Ok;
            this.helpButton.Text       = Strings.Help;
            this.buttonsPanel.TabIndex = int.MaxValue;
            if (ExchangeDialog.lockImage == null)
            {
                Size empty = Size.Empty;
                empty.Width              = Math.Min(this.lockButton.Width, this.lockButton.Height);
                empty.Height             = empty.Width;
                ExchangeDialog.lockImage = IconLibrary.ToBitmap(Icons.LockIcon, empty);
            }
            this.lockButton.Image     = ExchangeDialog.lockImage;
            this.lockButton.Visible   = false;
            this.lockButton.FlatStyle = FlatStyle.Flat;
            this.lockButton.FlatAppearance.BorderSize         = 0;
            this.lockButton.FlatAppearance.BorderColor        = this.lockButton.BackColor;
            this.lockButton.FlatAppearance.MouseOverBackColor = this.lockButton.BackColor;
            this.lockButton.FlatAppearance.MouseDownBackColor = this.lockButton.BackColor;
            ToolTip toolTip = new ToolTip();

            toolTip.SetToolTip(this.lockButton, Strings.ShowLockButtonToolTipText);
            this.helpButton.Click += delegate(object param0, EventArgs param1)
            {
                this.OnHelpRequested(new HelpEventArgs(Point.Empty));
            };
            this.helpButton.Visible = false;
        }
 public PromptForChoicesDialog()
 {
     this.InitializeComponent();
     this.yesButton.Text   = Strings.Yes;
     this.yesButton.Click += delegate(object param0, EventArgs param1)
     {
         this.UserChoice = ConfirmationChoice.Yes;
         base.Close();
     };
     this.yesToAllButton.Text   = Strings.YesToAll;
     this.yesToAllButton.Click += delegate(object param0, EventArgs param1)
     {
         this.UserChoice = ConfirmationChoice.YesToAll;
         base.Close();
     };
     this.noButton.Text   = Strings.No;
     this.noButton.Click += delegate(object param0, EventArgs param1)
     {
         this.UserChoice = ConfirmationChoice.No;
         base.Close();
     };
     this.cancelButton.Text   = Strings.Cancel;
     this.cancelButton.Click += delegate(object param0, EventArgs param1)
     {
         this.UserChoice = ConfirmationChoice.NoToAll;
         base.Close();
     };
     this.warningIconPictureBox.Image = IconLibrary.ToBitmap(Icons.Warning, this.warningIconPictureBox.Size);
     base.AcceptButton = this.yesButton;
     base.CancelButton = this.cancelButton;
     this.UpdateButtonStatus(true);
 }
예제 #4
0
 public RbacPermissionLockResultPane()
 {
     base.ViewModeCommands.Add(Theme.VisualEffectsCommands);
     base.EnableVisualEffects = true;
     this.InitializeComponent();
     this.titleImage.Image = IconLibrary.ToBitmap(Icons.LockIcon, this.titleImage.Size);
     this.labelTitle.Text  = Strings.NotPermittedByRbac;
 }
예제 #5
0
 public BulkActionControl()
 {
     this.InitializeComponent();
     this.Text = Strings.BulkActionTitleText;
     this.warningIconPictureBox.Image = IconLibrary.ToBitmap(Icons.Warning, this.warningIconPictureBox.Size);
     this.bulkActionLabel.Text        = Strings.BulkActionLabelText;
     this.expandScopeCheckBox.Text    = Strings.BulkActionCheckBoxText;
 }
예제 #6
0
 public ErrorReportResultPane()
 {
     base.ViewModeCommands.Add(Theme.VisualEffectsCommands);
     base.EnableVisualEffects = true;
     this.InitializeComponent();
     this.LabelTitle = Strings.WelcomeToESM;
     this.UpdateTitleFont();
     this.titleImage.Image          = IconLibrary.ToBitmap(Icons.Error, this.titleImage.Size);
     this.contentLabel.LinkClicked += this.contentLabel_LinkClicked;
 }
예제 #7
0
        public int RegisterIcon(string name, Icon icon)
        {
            int num = -1;

            if (icon != null && !string.IsNullOrEmpty(name) && !this.imageListMap.TryGetValue(name, out num))
            {
                Bitmap bitmap = IconLibrary.ToBitmap(icon, SystemInformation.SmallIconSize);
                this.snapIn.SmallImages.Add(bitmap);
                num = this.snapIn.SmallImages.Count - 1;
                this.imageListMap[name] = num;
            }
            return(num);
        }
예제 #8
0
 public IconedInfoControl(Icon icon, string description) : this()
 {
     this.pictureBox.Image = IconLibrary.ToBitmap(icon, this.pictureBox.Size);
     this.infoLabel.Text   = description;
 }
예제 #9
0
		public PropertySheetDialog()
		{
			this.InitializeComponent();
			base.Size = new Size(443, 507);
			this.cancelButton.Text = Strings.Cancel;
			this.okButton.Text = Strings.Ok;
			this.applyButton.Text = Strings.PropertySheetDialogApply;
			this.helpButton.Text = Strings.PropertySheetDialogHelp;
			if (PropertySheetDialog.lockImage == null)
			{
				Size empty = Size.Empty;
				empty.Width = Math.Min(this.lockButton.Width, this.lockButton.Height);
				empty.Height = empty.Width;
				PropertySheetDialog.lockImage = IconLibrary.ToBitmap(Icons.LockIcon, empty);
				PropertySheetDialog.commandLogPropertyExposureEnabledImage = IconLibrary.ToBitmap(Icons.CommandLogPropertyExposureEnabled, empty);
				PropertySheetDialog.commandLogPropertyExposureDisabledImage = IconLibrary.ToBitmap(Icons.CommandLogPropertyExposureDisabled, empty);
			}
			this.commandExposureButton.Image = PropertySheetDialog.commandLogPropertyExposureDisabledImage;
			this.lockButton.Image = PropertySheetDialog.lockImage;
			ToolTip toolTip = new ToolTip();
			toolTip.SetToolTip(this.lockButton, Strings.ShowLockButtonToolTipText);
			toolTip.SetToolTip(this.commandExposureButton, Strings.ShowEMSCommand);
			this.applyButton.Enabled = false;
			this.lockButton.Visible = false;
			this.lockButton.FlatStyle = FlatStyle.Flat;
			this.lockButton.FlatAppearance.BorderSize = 0;
			this.lockButton.FlatAppearance.BorderColor = this.lockButton.BackColor;
			this.lockButton.FlatAppearance.MouseOverBackColor = this.lockButton.BackColor;
			this.lockButton.FlatAppearance.MouseDownBackColor = this.lockButton.BackColor;
			this.commandExposureButton.Enabled = false;
			this.commandExposureButton.FlatStyle = FlatStyle.Flat;
			this.commandExposureButton.FlatAppearance.BorderSize = 0;
			this.commandExposureButton.FlatAppearance.BorderColor = this.commandExposureButton.BackColor;
			this.applyButton.Click += delegate(object param0, EventArgs param1)
			{
				this.PerformApply();
				this.SetActivePage((ExchangePropertyPageControl)this.tabControl.SelectedTab.Tag);
			};
			this.commandExposureButton.MouseEnter += delegate(object param0, EventArgs param1)
			{
				if (this.commandExposureButton.Enabled)
				{
					this.commandExposureButton.FlatStyle = FlatStyle.Standard;
				}
			};
			this.commandExposureButton.MouseLeave += delegate(object param0, EventArgs param1)
			{
				this.commandExposureButton.FlatStyle = FlatStyle.Flat;
			};
			this.commandExposureButton.Click += delegate(object param0, EventArgs param1)
			{
				if (this.isValid && this.isDirty && ((ExchangePropertyPageControl)this.tabControl.SelectedTab.Tag).OnKillActive())
				{
					List<DataHandler> list = new List<DataHandler>();
					ExchangePropertyPageControl[] array = (ExchangePropertyPageControl[])this.tabControl.Tag;
					foreach (ExchangePropertyPageControl exchangePropertyPageControl in array)
					{
						if (exchangePropertyPageControl.IsHandleCreated && exchangePropertyPageControl.Context != null && exchangePropertyPageControl.Context.IsDirty)
						{
							if (!exchangePropertyPageControl.TryApply())
							{
								return;
							}
							if (!list.Contains(exchangePropertyPageControl.DataHandler))
							{
								list.Add(exchangePropertyPageControl.DataHandler);
							}
						}
					}
					StringBuilder stringBuilder = new StringBuilder();
					foreach (DataHandler dataHandler in list)
					{
						stringBuilder.Append(dataHandler.CommandToRun);
					}
					using (PropertyPageDialog propertyPageDialog = new PropertyPageDialog(new PropertyPageCommandExposureControl
					{
						CommandToShow = stringBuilder.ToString()
					}))
					{
						propertyPageDialog.CancelVisible = false;
						((ExchangePage)this.tabControl.SelectedTab.Tag).ShowDialog(propertyPageDialog);
					}
				}
			};
			this.helpButton.Click += delegate(object param0, EventArgs param1)
			{
				this.OnHelpRequested(new HelpEventArgs(Point.Empty));
			};
		}