Exemplo n.º 1
0
 /// <summary>
 /// Initializes new instance of <see cref="Appearance"/>
 /// </summary>
 public Appearance()
 {
     bar = new AppearanceBar();
     bar.AppearanceChanged += OnAppearanceChanged;
     item = new AppearanceItem();
     item.AppearanceChanged += OnAppearanceChanged;
 }
 /// <summary>
 /// Initializes a new instance of <see cref="DrawBackGroundEventArgs"/> with supplied arguments.
 /// </summary>
 /// <param name="graphics">Graphics surface where drawing has to be done.</param>
 /// <param name="bounds"><see cref="ButtonBar"/> control's boundry.</param>
 /// <param name="appearance">Appearance of current <see cref="ButtonBar"/></param>
 /// <param name="bar">Related <see cref="ButtonBar"/></param>
 public DrawBackGroundEventArgs(Graphics graphics, Rectangle bounds, AppearanceBar appearance, ButtonBar bar)
 {
     Graphics = graphics;
     Bounds = bounds;
     Appearance = appearance;
     Bar = bar;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes new instance of <see cref="Appearance"/>
 /// </summary>
 public Appearance()
 {
     bar = new AppearanceBar();
     bar.AppearanceChanged += OnAppearanceChanged;
     item = new AppearanceItem();
     item.AppearanceChanged += OnAppearanceChanged;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Assigns Values of supplied <see cref="AppearanceBar"/> to current object.
 /// </summary>
 /// <param name="app"><see cref="AppearanceBar"/> object whose value is to be assigned.</param>
 public void Assign(AppearanceBar app)
 {
     backStyle.Assign(app.BackStyle);
     focusedBorder = app.FocusedBorder;
     normalBorder  = app.NormalBorder;
     appearanceBorder.Assign(app.AppearanceBorder);
     cornerRadius = app.cornerRadius;
     disabledMask = app.disabledMask;
 }
Exemplo n.º 5
0
        /// <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>
        /// <filterpriority>2</filterpriority>
        public object Clone()
        {
            var app = new AppearanceBar();

            app.BackStyle.Assign((ColorPair)BackStyle.Clone());
            app.AppearanceBorder.Assign((AppearanceBorder)AppearanceBorder.Clone());
            app.CornerRadius  = CornerRadius;
            app.DisabledMask  = DisabledMask;
            app.FocusedBorder = FocusedBorder;
            app.NormalBorder  = NormalBorder;
            return(app);
        }
Exemplo n.º 6
0
 /// <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>
 /// <filterpriority>2</filterpriority>
 public object Clone()
 {
     var app = new AppearanceBar();
     app.BackStyle.Assign((ColorPair) BackStyle.Clone());
     app.AppearanceBorder.Assign((AppearanceBorder) AppearanceBorder.Clone());
     app.CornerRadius = CornerRadius;
     app.DisabledMask = DisabledMask;
     app.FocusedBorder = FocusedBorder;
     app.NormalBorder = NormalBorder;
     return app;
 }
Exemplo n.º 7
0
 /// <summary>
 /// Assigns Values of supplied <see cref="AppearanceBar"/> to current object.
 /// </summary>
 /// <param name="app"><see cref="AppearanceBar"/> object whose value is to be assigned.</param>
 public void Assign(AppearanceBar app)
 {
     backStyle.Assign(app.BackStyle);
     focusedBorder = app.FocusedBorder;
     normalBorder = app.NormalBorder;
     appearanceBorder.Assign(app.AppearanceBorder);
     cornerRadius = app.cornerRadius;
     disabledMask = app.disabledMask;
 }
Exemplo n.º 8
0
 public AppearanceEditorUI(ButtonBar 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[]
                                    {
                                        Resources.THEME_VS2005,
                                        Resources.THEME_CLASSIC,
                                        Resources.THEME_BLUE,
                                        Resources.THEME_OLIVE,
                                        Resources.THEME_ROYAL,
                                        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 = Resources.LBL_CURRENT_STYLE;
     lblApply.Text = Resources.LNK_APPLYTHEME;
     lblAvailableTheme.Text = Resources.LBL_AVAILABLE_THEME;
     lblLoad.Text = Resources.LNK_LOAD;
     lblPreview.Text = Resources.LBL_PREVIEW;
     lblReload.Text = Resources.LNK_RELOAD;
     lblReset.Text = Resources.LNK_RESET;
     lblSave.Text = Resources.LNK_SAVETHEME;
     Text = Resources.FORM_TEXT;
 }