/// <summary> /// загрузка данных из обьекта класса TextEditorOptions /// </summary> /// <param name="options"></param> public void SetOptionsData(TextEditorOptions options) { options.LoadFontFamiliesToComboBox(comboBoxTextEditorSystemFonts); options.LoadGraphicsUnitToComboBox(comboBoxTextEditorFontSizeUnits); comboBoxTextEditorSystemFonts.SelectedItem = options.FontName; comboBoxTextEditorFontSizeUnits.SelectedItem = options.FontSizeUnits; comboBoxTextEditorFontSize.Text = options.FontSize.ToString(); checkBoxTextEditorBold.Checked = options.FontBold; checkBoxTextEditorItalic.Checked = options.FontItalic; checkBoxTextEditorStrikeout.Checked = options.FontStrikeout; checkBoxTextEditorUnderLine.Checked = options.FontUnderLine; }
public void SetDefaultConfiguration() { projectOptions = new ProjectOptions(); projectOptions.SetDefault(); textEditorOptions = new TextEditorOptions(); textEditorOptions.SetDefault(); librariesOptions = new LibrariesOptions(); librariesOptions.SetDefault(); _FSMOptions = new FSMOptions(); _FSMOptions.SetDefault(); entityDrawningOptions = new EntityDrawningOptions(); entityDrawningOptions.SetDefault(); _GHDLOptions = new GHDLOptions(); _GHDLOptions.SetDefault(); }
/// <summary> /// получение данных в виде обьекта класса TextEditorOptions /// </summary> /// <param name="sender"></param> /// <param name="e"></param> public void GetOptionsData(TextEditorOptions options) { options.FontName = comboBoxTextEditorSystemFonts.SelectedItem as string; string fontSize = comboBoxTextEditorFontSize.Text; if (string.IsNullOrEmpty(fontSize) == true) { fontSize = (string)comboBoxTextEditorFontSize.SelectedItem; } float ffontSize = 1.0f; bool res = float.TryParse(fontSize, out ffontSize); if (res == true) { options.FontSize = ffontSize; } options.FontSizeUnits = (GraphicsUnit)comboBoxTextEditorFontSizeUnits.SelectedItem; options.FontBold = checkBoxTextEditorBold.Checked; options.FontItalic = checkBoxTextEditorItalic.Checked; options.FontStrikeout = checkBoxTextEditorStrikeout.Checked; options.FontUnderLine = checkBoxTextEditorUnderLine.Checked; }