コード例 #1
0
 public ColorSchemeCollection(SchemeTarget type, string filename)
 {
     _type         = type;
     _filename     = filename;
     SelectedIndex = -1;
     ReadFromFile(filename);
 }
コード例 #2
0
 internal static void EditColorSchemes(IAppContext context, SchemeTarget target, IWin32Window parent)
 {
     using (var form = new ColorSchemesForm(context, ColorSchemeProvider.GetList(target)))
     {
         context.View.ShowChildView(form, parent);
     }
 }
コード例 #3
0
 public static ColorSchemeCollection GetList(SchemeTarget type)
 {
     if (_dict.ContainsKey(type))
     {
         return(_dict[type]);
     }
     return(null);
 }
コード例 #4
0
        /// <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);
        }
コード例 #5
0
 internal static void SetFirstColorScheme(SchemeTarget type, IFeatureSet fs)
 {
     GetList(type).SetFirstColorScheme(fs);
 }
コード例 #6
0
 internal static void SetFirstColorScheme(SchemeTarget type, Color color)
 {
     GetList(type).SetFirstColorScheme(color);
 }