示例#1
0
        private void LoadFromFileButton_Click(object sender, EventArgs e)
        {
            string fileName = Common.GetOpenFileName(FilterStylesheets);

            if (string.IsNullOrEmpty(fileName))
            {
                return;
            }
            StyleFactory styles = StyleFactory.LoadFromFile(fileName);

            StyleFactory.Instance = styles;
            StylesProperties.Fill(StyleFactory.Instance);
            CodeUnit.ReloadAllStyles();
            CodeUnit.Redraw();
        }
示例#2
0
        public OptionsForm(CodeUnitBlock codeUnit)
        {
            InitializeComponent();

            CodeUnit = codeUnit;

            DesignOfUniversalControlCombo.SelectedValueChanged += DesignOfUniversalControlCombo_SelectedValueChanged;
            DesignOfUniversalControlCombo.Value = Settings.Current.DesignOfUniversalControl;

            CurlyCombo.SelectedItem          = Settings.Current.CurliesInUniversalControl.ToString();
            CurlyCombo.SelectedValueChanged += CurlyCombo_SelectedValueChanged;

            FontSizeBox.Value = Settings.Current.FontSize;

            StylesProperties.Fill(StyleFactory.Instance);
            StylesProperties.Changed += StylesProperties_Changed;
        }