Ejemplo n.º 1
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;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes new instance of <see cref="Appearance" />
 /// </summary>
 public Appearance()
 {
     bar = new AppearanceBar();
     bar.AppearanceChanged += OnAppearanceChanged;
     item = new AppearanceItem();
     item.AppearanceChanged += OnAppearanceChanged;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BarItem" /> class with Specified owner of <see cref="BarItem" />
 /// </summary>
 /// <param name="owner">The owner.</param>
 public BarItem(ZeroitToxicButton owner)
 {
     this.owner  = owner;
     caption     = GetCaption();
     enabled     = true;
     Height      = 0;
     imageIndex  = -1;
     MouseDown   = false;
     MouseOver   = false;
     selected    = false;
     Top         = 0;
     tag         = null;
     toolTipText = caption;
     appearance  = new AppearanceItem();
     appearance.AppearanceChanged += OnAppearanceChanged;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BarItem" /> class.
 /// </summary>
 public BarItem()
 {
     caption     = string.Empty;
     enabled     = true;
     Height      = 0;
     imageIndex  = -1;
     MouseDown   = false;
     MouseOver   = false;
     owner       = null;
     selected    = false;
     Top         = 0;
     tag         = null;
     toolTipText = string.Empty;
     appearance  = new AppearanceItem();
     appearance.AppearanceChanged += OnAppearanceChanged;
     showBorder = ShowBorder.Inherit;
 }
 /// <summary>
 /// Assigns Values of supplied <see cref="AppearanceItem" /> to current object.
 /// </summary>
 /// <param name="app"><see cref="AppearanceItem" /> object whose value is to be assigned.</param>
 public void Assign(AppearanceItem app)
 {
     backStyle.Assign(app.BackStyle);
     clickStyle.Assign(app.ClickStyle);
     gradient        = app.Gradient;
     hoverBorder     = app.HoverBorder;
     hoverForeGround = app.HoverForeGround;
     hoverStyle.Assign(app.HoverStyle);
     normalBorder       = app.NormalBorder;
     normalForeGround   = app.NormalForeGround;
     selectedBorder     = app.SelectedBorder;
     selectedForeGround = app.SelectedForeGround;
     disabledBorder     = app.DisabledBorder;
     disabledForeGround = app.disabledForeGround;
     selectedHoverStyle.Assign(app.SelectedHoverStyle);
     selectedStyle.Assign(app.SelectedStyle);
     disabledStyle.Assign(app.DisabledStyle);
     appearenceText.Assign(app.AppearenceText);
 }
        /// <summary>
        /// Creates a new object that is a copy of the current instance.
        /// </summary>
        /// <returns>A new object that is a copy of this instance.</returns>
        public object Clone()
        {
            var app = new AppearanceItem();

            app.BackStyle.Assign((ColorPair)BackStyle.Clone());
            app.ClickStyle.Assign((ColorPair)ClickStyle.Clone());
            app.DisabledBorder     = DisabledBorder;
            app.DisabledForeGround = DisabledForeGround;
            app.DisabledStyle.Assign((ColorPair)DisabledStyle.Clone());
            app.Gradient        = Gradient;
            app.HoverBorder     = HoverBorder;
            app.HoverForeGround = HoverForeGround;
            app.HoverStyle.Assign((ColorPair)HoverStyle.Clone());
            app.NormalBorder       = NormalBorder;
            app.NormalForeGround   = NormalForeGround;
            app.SelectedBorder     = SelectedBorder;
            app.SelectedForeGround = SelectedForeGround;
            app.SelectedHoverStyle.Assign((ColorPair)SelectedHoverStyle.Clone());
            app.SelectedStyle.Assign((ColorPair)SelectedStyle.Clone());
            app.AppearenceText.Assign((AppearenceText)AppearenceText.Clone());
            return(app);
        }