Пример #1
0
        public static void LoadCustomStyle()
        {
            CustomStyle.Clear();
            string pathNormalItemsStyle = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), @"ChaosRecipeEnhancer\Styles\NormalItemsStyle.txt");

            string[] style = File.ReadAllLines(pathNormalItemsStyle);
            foreach (string line in style)
            {
                if (line == "")
                {
                    continue;
                }
                if (line.Contains("#"))
                {
                    continue;
                }
                CustomStyle.Add(line.Trim());
            }
        }
Пример #2
0
        public static void LoadCustomStyle()
        {
            CustomStyle.Clear();
            var pathNormalItemsStyle = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) ?? string.Empty, @"Styles\NormalItemsStyle.txt");
            var style = File.ReadAllLines(pathNormalItemsStyle);

            foreach (var line in style)
            {
                if (line == "")
                {
                    continue;
                }
                if (line.Contains("#"))
                {
                    continue;
                }
                CustomStyle.Add(line.Trim());
            }
        }