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(); }
public CommonOptions() { _esColorSet = new EscapesequenceColorSet(); if (_configAttributes == null) { InitConfigAttributes(); } }
public EditEscapeSequenceColor(Color back, Color fore, EscapesequenceColorSet cs) { StringResource sr = TerminalUIPlugin.Instance.Strings; // // Windows フォーム デザイナ サポートに必要です。 // InitializeComponent(); _colorBoxes = new ColorButton[16]; _backColor = back; _foreColor = fore; _esColorSet = (EscapesequenceColorSet)cs.Clone(); int ti = 0; int y = 8; AddBackColorUI(y, ref ti); y += 24; { AddUI(-1, 0, y, ref ti); //-1はデフォルト色設定 y += 24; int y1 = y; for (int i = 0; i < 8; i++) { AddUI(i, 0, y, ref ti); //-1はデフォルト色設定 y += 24; } y = y1; for (int i = 8; i < 16; i++) { AddUI(i, 250, y, ref ti); y += 24; } } y += 8; _setDefaultButton = new Button(); _setDefaultButton.Left = 356; _setDefaultButton.Width = 144; _setDefaultButton.Click += new EventHandler(OnSetDefault); _setDefaultButton.Text = sr.GetString("Form.EditEscapesequenceColor._setDefaultButton"); _setDefaultButton.Top = y; _setDefaultButton.TabIndex = ti++; _setDefaultButton.FlatStyle = FlatStyle.System; this.Controls.Add(_setDefaultButton); y += 32; _okButton.Text = sr.GetString("Common.OK"); _okButton.Top = y; _cancelButton.Text = sr.GetString("Common.Cancel"); _cancelButton.Top = y; this.Text = sr.GetString("Form.EditEscapesequenceColor.Text"); this.ClientSize = new Size(this.ClientSize.Width, y + 32); }
private void CmdSetPaletteDefault() { for (int i = 0; i < _colorBoxes.Length; i++) { Color c = EscapesequenceColorSet.GetDefaultColor(i); _colorBoxes[i].SelectedColor = c; _colorBoxes[i].Invalidate(); ((Label)_colorBoxes[i].Tag).ForeColor = c; } }
private void OnSetDefault(object sender, EventArgs args) { for (int i = 0; i < _colorBoxes.Length; i++) { Color c = EscapesequenceColorSet.GetDefaultColor(i); _colorBoxes[i].SelectedColor = c; _colorBoxes[i].Invalidate(); ((Label)_colorBoxes[i].Tag).ForeColor = c; } }
private void OnEditColorEscapeSequence(object sender, EventArgs args) { EditEscapeSequenceColor dlg = new EditEscapeSequenceColor(_fontSample.BackColor, _fontSample.ForeColor, _ESColorSet); if (GCUtil.ShowModalDialog(FindForm(), dlg) == DialogResult.OK) { _ESColorSet = dlg.Result; _bgColorBox.SelectedColor = dlg.GBackColor; _textColorBox.SelectedColor = dlg.GForeColor; _fontSample.ForeColor = dlg.GForeColor; _fontSample.BackColor = dlg.GBackColor; _fontSample.Invalidate(); _bgColorBox.Invalidate(); _textColorBox.Invalidate(); } }
public EditEscapeSequenceColor(Color back, Color fore, EscapesequenceColorSet cs) { // // Windows フォーム デザイナ サポートに必要です。 // InitializeComponent(); // // TODO: InitializeComponent 呼び出しの後に、コンストラクタ コードを追加してください。 // _colorBoxes = new ColorButton[8]; _backColor = back; _foreColor = fore; _esColorSet = (EscapesequenceColorSet)cs.Clone(); int ti = 0; int y = 8; AddBackColorUI(y, ref ti); y += 24; for (int i = -1; i < 8; i++) { AddUI(i, y, ref ti); //-1はデフォルト色設定 y += 24; } y += 8; _setDefaultButton = new Button(); _setDefaultButton.Left = 106; _setDefaultButton.Width = 144; _setDefaultButton.Click += new EventHandler(OnSetDefault); _setDefaultButton.Text = GApp.Strings.GetString("Form.EditEscapesequenceColor._setDefaultButton"); _setDefaultButton.Top = y; _setDefaultButton.TabIndex = ti++; _setDefaultButton.FlatStyle = FlatStyle.System; this.Controls.Add(_setDefaultButton); y += 32; _okButton.Text = GApp.Strings.GetString("Common.OK"); _okButton.Top = y; _cancelButton.Text = GApp.Strings.GetString("Common.Cancel"); _cancelButton.Top = y; this.Text = GApp.Strings.GetString("Form.EditEscapesequenceColor.Text"); this.ClientSize = new Size(this.ClientSize.Width, y + 32); }
public EditEscapeSequenceColor(Color back, Color fore, EscapesequenceColorSet cs) { StringResource sr = TerminalUIPlugin.Instance.Strings; // // Windows フォーム デザイナ サポートに必要です。 // InitializeComponent(); _colorBoxes = new ColorButton[8]; _backColor = back; _foreColor = fore; _esColorSet = (EscapesequenceColorSet)cs.Clone(); int ti = 0; int y = 8; AddBackColorUI(y, ref ti); y += 24; for (int i = -1; i < 8; i++) { AddUI(i, y, ref ti); //-1はデフォルト色設定 y += 24; } y += 8; _setDefaultButton = new Button(); _setDefaultButton.Left = 106; _setDefaultButton.Width = 144; _setDefaultButton.Click += new EventHandler(OnSetDefault); _setDefaultButton.Text = sr.GetString("Form.EditEscapesequenceColor._setDefaultButton"); _setDefaultButton.Top = y; _setDefaultButton.TabIndex = ti++; _setDefaultButton.FlatStyle = FlatStyle.System; this.Controls.Add(_setDefaultButton); y += 32; _okButton.Text = sr.GetString("Common.OK"); _okButton.Top = y; _cancelButton.Text = sr.GetString("Common.Cancel"); _cancelButton.Top = y; this.Text = sr.GetString("Form.EditEscapesequenceColor.Text"); this.ClientSize = new Size(this.ClientSize.Width, y + 32); }
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; }
private void OnEditColorEscapeSequence(object sender, EventArgs args) { EditEscapeSequenceColor dlg = new EditEscapeSequenceColor(_fontSample.BackColor, _fontSample.ForeColor, _ESColorSet); if (dlg.ShowDialog(FindForm()) == DialogResult.OK) { _ESColorSet = dlg.Result; _bgColorBox.SelectedColor = dlg.GBackColor; _textColorBox.SelectedColor = dlg.GForeColor; _fontSample.ForeColor = dlg.GForeColor; _fontSample.BackColor = dlg.GBackColor; _fontSample.Invalidate(); _bgColorBox.Invalidate(); _textColorBox.Invalidate(); } }