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(); }