public HistoryControl() : base(FactorySource.PerThread) { this.undoItemHighlight = -1; this.redoItemHighlight = -1; this.lastMouseClientPt = new PointInt32(-1, -1); this.backBrush = new SolidColorBrush(); this.selectionHighlightRenderer = new SelectionHighlightRenderer(); this.itemHeight = UIUtil.ScaleHeight(20); this.imageHeight = UIUtil.ScaleHeight(0x10); base.SetStyle(ControlStyles.StandardDoubleClick, false); this.InitializeComponent(); }
public FontListComboBoxHandler(System.Windows.Forms.ComboBox comboBox, IFontMap fontMap, string defaultFontName) : base(comboBox, DrawMode.OwnerDrawVariable) { this.textBrush = new SolidColorBrush(); this.fontPreviewRenderCache = new Dictionary <TupleStruct <string, float, PaintDotNet.UI.Media.Brush>, PlacedBitmap>(); this.selectionHighlightRenderer = new SelectionHighlightRenderer(); Validate.IsNotNull <IFontMap>(fontMap, "fontMap"); this.fontMap = fontMap.CreateRef(); this.fontMap.CollectionChanged += new EventHandler(this.OnFontFamilyNameCollectionChanged); this.systemFonts = new PaintDotNet.DirectWrite.SystemFonts(); this.defaultFontName = defaultFontName ?? this.systemFonts.Message.FontProperties.DisplayName; base.ComboBox.Sorted = true; base.ComboBox.Items.Add(defaultFontName); base.ComboBox.SelectedItem = defaultFontName; base.ComboBox.DropDownStyle = ComboBoxStyle.DropDownList; this.fontSampleText = PdnResources.GetString("ToolConfigStrip.FontFamilyComboBox.FontSampleText"); }