Пример #1
0
        private static void CreateOptionsFile(string file)
        {
            string dir = file.Substring(0, file.LastIndexOf('\\'));

            Directory.CreateDirectory(dir);
            FileStream f = File.Create(file);

            f.Close();
            IOFile.WriteLine(file, 1, "Version;1.2", true);
            IOFile.WriteLine(file, 2, "ReleaseDate;2011-07-04", true);
        }
Пример #2
0
        /// <summary>Saves the lists in a file in csv format.</summary>
        /// <param name="filename">The filename.</param>
        public void SaveListsInFile(string filename)
        {
            string s = "COLOR SPACE;A;B;C";

            IOFile.WriteFile(filename, s);

            s = "HSB max;";
            double[] d = MaxValues[(int)ColorSpaceEnum.HSB];
            IOFile.WriteLine(
                filename,
                1,
                s + d[0] + ";" + d[1] + ";" + d[2] + ";",
                true);
            s = "HSB min;";
            d = MinValues[(int)ColorSpaceEnum.HSB];
            IOFile.WriteLine(
                filename,
                2,
                s + d[0] + ";" + d[1] + ";" + d[2] + ";",
                true);

            s = "HSL max;";
            d = MaxValues[(int)ColorSpaceEnum.HSL];
            IOFile.WriteLine(
                filename,
                3,
                s + d[0] + ";" + d[1] + ";" + d[2] + ";",
                true);
            s = "HSL min;";
            d = MinValues[(int)ColorSpaceEnum.HSL];
            IOFile.WriteLine(
                filename,
                4,
                s + d[0] + ";" + d[1] + ";" + d[2] + ";",
                true);

            s = "LAB max;";
            d = MaxValues[(int)ColorSpaceEnum.LAB];
            IOFile.WriteLine(
                filename,
                5,
                s + d[0] + ";" + d[1] + ";" + d[2] + ";",
                true);
            s = "LAB min;";
            d = MinValues[(int)ColorSpaceEnum.LAB];
            IOFile.WriteLine(
                filename,
                6,
                s + d[0] + ";" + d[1] + ";" + d[2] + ";",
                true);

            s = "LCH max;";
            d = MaxValues[(int)ColorSpaceEnum.LCH];
            IOFile.WriteLine(
                filename,
                7,
                s + d[0] + ";" + d[1] + ";" + d[2] + ";",
                true);
            s = "LCH min;";
            d = MinValues[(int)ColorSpaceEnum.LCH];
            IOFile.WriteLine(
                filename,
                8,
                s + d[0] + ";" + d[1] + ";" + d[2] + ";",
                true);

            s = "LUV max;";
            d = MaxValues[(int)ColorSpaceEnum.LUV];
            IOFile.WriteLine(
                filename,
                9,
                s + d[0] + ";" + d[1] + ";" + d[2] + ";",
                true);
            s = "LUV min;";
            d = MinValues[(int)ColorSpaceEnum.LUV];
            IOFile.WriteLine(
                filename,
                10,
                s + d[0] + ";" + d[1] + ";" + d[2] + ";",
                true);

            s = "RGB max;";
            d = MaxValues[(int)ColorSpaceEnum.RGB];
            IOFile.WriteLine(
                filename,
                11,
                s + d[0] + ";" + d[1] + ";" + d[2] + ";",
                true);
            s = "RGB min;";
            d = MinValues[(int)ColorSpaceEnum.RGB];
            IOFile.WriteLine(
                filename,
                12,
                s + d[0] + ";" + d[1] + ";" + d[2] + ";",
                true);

            s = "SRGB max;";
            d = MaxValues[(int)ColorSpaceEnum.SRGB];
            IOFile.WriteLine(
                filename,
                13,
                s + d[0] + ";" + d[1] + ";" + d[2] + ";",
                true);
            s = "SRGB min;";
            d = MinValues[(int)ColorSpaceEnum.SRGB];
            IOFile.WriteLine(
                filename,
                14,
                s + d[0] + ";" + d[1] + ";" + d[2] + ";",
                true);

            s = "XYZ max;";
            d = MaxValues[(int)ColorSpaceEnum.XYZ];
            IOFile.WriteLine(
                filename,
                15,
                s + d[0] + ";" + d[1] + ";" + d[2] + ";",
                true);
            s = "XYZ min;";
            d = MinValues[(int)ColorSpaceEnum.XYZ];
            IOFile.WriteLine(
                filename,
                16,
                s + d[0] + ";" + d[1] + ";" + d[2] + ";",
                true);
        }