Example #1
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;
 }
Example #2
0
 /// <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;
 }