Ejemplo n.º 1
0
            /// <summary>
            /// Handles the <see cref="E:ApplyClick" /> event.
            /// </summary>
            /// <param name="sender">The sender.</param>
            /// <param name="e">The <see cref="LinkLabelLinkClickedEventArgs"/> instance containing the event data.</param>
            private void OnApplyClick(object sender, LinkLabelLinkClickedEventArgs e)
            {
                var selection = lbxTemplate.SelectedItem.ToString();

                if (Properties.Resources.THEME_VS2005 == selection)
                {
                    SetColors(ColorSchemeDefinition.VS2005);
                }
                else if (Properties.Resources.THEME_CLASSIC == selection)
                {
                    SetColors(ColorSchemeDefinition.Classic);
                }
                else if (Properties.Resources.THEME_BLUE == selection)
                {
                    SetColors(ColorSchemeDefinition.Blue);
                }
                else if (Properties.Resources.THEME_OLIVE == selection)
                {
                    SetColors(ColorSchemeDefinition.OliveGreen);
                }
                else if (Properties.Resources.THEME_ROYAL == selection)
                {
                    SetColors(ColorSchemeDefinition.Royale);
                }
                else if (Properties.Resources.THEME_SILVER == selection)
                {
                    SetColors(ColorSchemeDefinition.Silver);
                }
                pgrdBar.Refresh();
                pgrdItem.Refresh();
                bBar.RefreshControl();
                original.RefreshControl();
            }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AppearanceEditorUI"/> class.
 /// </summary>
 /// <param name="original">The original.</param>
 public AppearanceEditorUI(ZeroitToxicButton original)
 {
     this.original = original;
     appBar        = (AppearanceBar)original.Appearance.Bar.Clone();
     appItem       = (AppearanceItem)original.Appearance.Item.Clone();
     InitializeComponent();
     pgrdBar.SelectedObject  = original.Appearance.Bar;
     pgrdItem.SelectedObject = original.Appearance.Item;
     lbxTemplate.Items.AddRange(new object[]
     {
         Properties.Resources.THEME_VS2005,
         Properties.Resources.THEME_CLASSIC,
         Properties.Resources.THEME_BLUE,
         Properties.Resources.THEME_OLIVE,
         Properties.Resources.THEME_ROYAL,
         Properties.Resources.THEME_SILVER
     });
     lbxTemplate.SelectedIndex = 0;
     bBar.Appearance.Bar.Assign(appBar);
     bBar.Appearance.Item.Assign(appItem);
     bBar.ThemeProperty.UseTheme = false;
     bBar.SetThemeDefaults();
     bBar.RefreshControl();
     lblCurrentStyle.Text   = Properties.Resources.LBL_CURRENT_STYLE;
     lblApply.Text          = Properties.Resources.LNK_APPLYTHEME;
     lblAvailableTheme.Text = Properties.Resources.LBL_AVAILABLE_THEME;
     lblLoad.Text           = Properties.Resources.LNK_LOAD;
     lblPreview.Text        = Properties.Resources.LBL_PREVIEW;
     lblReload.Text         = Properties.Resources.LNK_RELOAD;
     lblReset.Text          = Properties.Resources.LNK_RESET;
     lblSave.Text           = Properties.Resources.LNK_SAVETHEME;
     Text = Properties.Resources.FORM_TEXT;
 }
 /// <summary>
 /// Clears the buttons.
 /// </summary>
 protected virtual void ClearButtons()
 {
     ZeroitToxicButton.Items.Clear();
     ZeroitToxicButton.RefreshControl();
     ZeroitToxicButton.Invalidate();
     RefreshComponent();
 }
Ejemplo n.º 4
0
 /// <summary>
 /// This function is called whenever there is change <see cref="Appearance" />
 /// </summary>
 /// <param name="sender">Event source.</param>
 /// <param name="tArgs">Object containing Event data</param>
 protected virtual void OnAppearanceChanged(object sender, GenericEventArgs <AppearanceAction> tArgs)
 {
     if (owner == null)
     {
         return;
     }
     owner.RefreshControl();
 }
        /// <summary>
        /// Adds the button.
        /// </summary>
        protected virtual void AddButton()
        {
            var item = new BarItem(ZeroitToxicButton);

            ZeroitToxicButton.Items.Add(item);
            ZeroitToxicButton.RefreshControl();
            ZeroitToxicButton.Invalidate();
            RefreshComponent();
        }
 /// <summary>
 /// Deletes the button.
 /// </summary>
 protected virtual void DeleteButton()
 {
     if (ZeroitToxicButton.SelectedItem == null)
     {
         return;
     }
     ZeroitToxicButton.Items.Remove(ZeroitToxicButton.SelectedItem);
     if (ZeroitToxicButton.Items.Count > 0)
     {
         ZeroitToxicButton.Items[0].Selected = true;
     }
     ZeroitToxicButton.RefreshControl();
     ZeroitToxicButton.Invalidate();
     RefreshComponent();
 }