public override void Read()
        {
            var itemgroup = new CollectionItem();
            
            var items = new AreaItems();
            
            var item = new SingleItem();

            foreach (string s in Strings)
            {
                if (s.StartsWith("// ")) continue;
                
                if(s.StartsWith("//"))
                {
                    items = new AreaItems {Name = s.Replace("//", "")};

                    continue;
                }
                
                if(string.IsNullOrEmpty(s)) continue;

                if (s.StartsWith("0x"))
                {
                    if(items.Color!=System.Windows.Media.Colors.Black)
                    {
                        Items.List.Add(items);
                    }
                    items.Color=ReadColorFromInt(s);
                    itemgroup = new CollectionItem();
                    Items.List.Add(items);
                    continue;
                }
                itemgroup = new CollectionItem();
                var str = s.Split('/');
                itemgroup.Name = str.Last();
                var s1 = str[0].Split(separator, StringSplitOptions.RemoveEmptyEntries).ToList();

                itemgroup.Percent = int.Parse(s1.First());

                s1.Remove(s1.First());
                
                for (int index = 0; index < s1.Count; index++)
                {
                    DivideEtImpera(index,s1,ref item, itemgroup);
                }

                items.List.Add(itemgroup);
            }
        }
Exemple #2
0
 public AreaColor()
 {
     Color = Colors.Black;
     TextureIndex = 0;
     Index = 0;
     Min = 0;
     Max = 0;
     Name = "";
     _list= new ObservableCollection<CircleMountain>();
     Type = TypeColor.None;
     _items = new AreaItems();
     _transitionTexture = new ObservableCollection<AreaTransitionTexture>();
     _transitionItems = new ObservableCollection<AreaTransitionItem>();
     _coast = new AreaTransitionItemCoast();
     _transitionCliff = new ObservableCollection<AreaTransitionCliffTexture>();
     _SmoothCoast = new ObservableCollection<CircleMountain>();
     _coastAltitude = 0;
     _cliffCoast = false;
 }