public ColorSchemeCollection(SchemeTarget type, string filename) { _type = type; _filename = filename; SelectedIndex = -1; ReadFromFile(filename); }
internal static void EditColorSchemes(IAppContext context, SchemeTarget target, IWin32Window parent) { using (var form = new ColorSchemesForm(context, ColorSchemeProvider.GetList(target))) { context.View.ShowChildView(form, parent); } }
public static ColorSchemeCollection GetList(SchemeTarget type) { if (_dict.ContainsKey(type)) { return(_dict[type]); } return(null); }
/// <summary> /// Returns the path to the specified style file, in case the file doesn't exist - creates it. /// </summary> private static string GetFilename(SchemeTarget type) { string path = ResourcePathHelper.GetStylesPath(); switch (type) { case SchemeTarget.Vector: return(path + "colorschemes.xml"); case SchemeTarget.Charts: return(path + "chartcolorsxml"); } return(string.Empty); }
internal static void SetFirstColorScheme(SchemeTarget type, IFeatureSet fs) { GetList(type).SetFirstColorScheme(fs); }
internal static void SetFirstColorScheme(SchemeTarget type, Color color) { GetList(type).SetFirstColorScheme(color); }