public void InitUI(ITerminalEmulatorOptions options) { AdjustFontDescription(options.Font, options.CJKFont); _fontSample.Font = options.Font; _fontSample.BackColor = options.BGColor; _fontSample.ForeColor = options.TextColor; _fontSample.ClearType = options.UseClearType; _fontSample.Invalidate(true); _backgroundImageBox.Text = options.BackgroundImageFileName; _imageStyleBox.SelectedItem = options.ImageStyle; // select EnumListItem<T> by T _bgColorBox.SelectedColor = options.BGColor; _textColorBox.SelectedColor = options.TextColor; _caretStyleBox.SelectedItem = options.CaretType; // select ListItem<T> by T _caretSpecifyColor.Checked = !options.CaretColor.IsEmpty; _caretBlink.Checked = options.CaretBlink; _caretColorBox.SelectedColor = options.CaretColor; _ESColorSet = options.EscapeSequenceColorSet; _darkenEsColorForBackground.Checked = options.DarkenEsColorForBackground; _useClearType = options.UseClearType; _enableBoldStyle = options.EnableBoldStyle; _font = options.Font; _cjkFont = options.CJKFont; _forceBoldStyle = options.ForceBoldStyle; _lineSpacingBox.Text = options.LineSpacing.ToString(); }
private void OnEditColorEscapeSequence(object sender, EventArgs args) { EditEscapeSequenceColor dlg = new EditEscapeSequenceColor(_fontSample.BackColor, _fontSample.ForeColor, _profile.ESColorSet); if (dlg.ShowDialog(this) == DialogResult.OK) { _profile.ESColorSet = dlg.Result; _profile.ForeColor = dlg.GForeColor; _profile.BackColor = dlg.GBackColor; _bgColorBox.SelectedColor = dlg.GBackColor; _textColorBox.SelectedColor = dlg.GForeColor; _fontSample.ForeColor = dlg.GForeColor; _fontSample.BackColor = dlg.GBackColor; _fontSample.Invalidate(); _bgColorBox.Invalidate(); _textColorBox.Invalidate(); } }
private void UpdateFontSample(object sender, EventArgs args) { if (_ignoreEvent) { return; } _lASCIISample.ClearType = _checkClearType.Checked; _lCJKSample.ClearType = _checkClearType.Checked; OnCJKFontChange(sender, args); OnASCIIFontChange(sender, args); _lASCIISample.Invalidate(); _lCJKSample.Invalidate(); }
public override void InitUI(ContainerOptions options) { AdjustFontDescription(options.Font, options.JapaneseFont); _fontSample.Font = options.Font; _fontSample.BackColor = options.BGColor; _fontSample.ForeColor = options.TextColor; _fontSample.ClearType = options.UseClearType; _fontSample.Invalidate(true); _backgroundImageBox.Text = options.BackgroundImageFileName; _imageStyleBox.SelectedIndex = (int)options.ImageStyle; _bgColorBox.SelectedColor = options.BGColor; _textColorBox.SelectedColor = options.TextColor; _caretStyleBox.SelectedIndex = CaretTypeToIndex(options.CaretType); _caretSpecifyColor.Checked = !options.CaretColor.IsEmpty; _caretBlink.Checked = (options.CaretType & CaretType.Blink) == CaretType.Blink; _caretColorBox.SelectedColor = options.CaretColor; _ESColorSet = options.ESColorSet; _defaultFileDir = options.DefaultFileDir; _useClearType = options.UseClearType; _font = options.Font; _japaneseFont = options.JapaneseFont; }