public MonthCalander() { InitMonthContextMenu(); Location = new Point(0, 0); selectedDate = DateTime.Now; Size = new Size(ControlWidth, (BottomLabelsPos.Y + BottomLabelHeight) + 5); SetStyle(ControlStyles.AllPaintingInWmPaint, true); SetStyle(ControlStyles.DoubleBuffer, true); SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.Selectable, true); themeProperty = new ThemeProperty(); appearance = new MonthCalanderAppearance(); appearance.AppearanceChanged += OnAppearanceChanged; themeProperty.ThemeChanged += OnAppearanceChanged; CreateMemoryBitmap(); SetDefaults(); SetThemeDefaults(); }
public AppearanceEditor(MonthCalanderAppearance appearance) { this.appearance = (MonthCalanderAppearance)appearance.Clone(); InitializeComponent(); pgrdMain.SelectedObject = appearance; lbxTemplate.Items.AddRange(new object[] { "VS2005", "Classic", "Blue", "OliveGreen", "Royale", "Silver" }); lbxTemplate.SelectedIndex = 0; calPreview.Appearance.Assign(appearance); calPreview.ThemeProperty.UseTheme = false; }