public override void Read() { var coastpart = new TransitionItemsCoast(); var CoastTotal = new AreaTransitionItemCoast(); var counterLengt4 = 0; foreach (string s in Strings.Where(s => !string.IsNullOrEmpty(s)).Where(s => !s.StartsWith("//")&& s!="1")) { if(s.Contains("=")) { CoastTotal.Name = s; continue; } var str = s.Split(separator, StringSplitOptions.RemoveEmptyEntries); if(str.Length==1) { if(s.StartsWith("0x") && coastpart.Color == System.Windows.Media.Colors.Black) { coastpart.Color = ReadColorFromInt(s); continue; } if(s.StartsWith("0x")) { coastpart.Texture = Convert.ToInt32(s, 16); continue; } } if(str.Length==4) { TransitionCheck(coastpart, str.ToList(), counterLengt4); counterLengt4++; counterLengt4 = counterLengt4%3; } if(counterLengt4 == 0) { if (CoastTotal.Coast.Color == System.Windows.Media.Colors.Black) { CoastTotal.Coast = coastpart; } else { CoastTotal.Ground = coastpart; CoastsAll.List.Add(CoastTotal); CoastTotal = new AreaTransitionItemCoast(); } coastpart = new TransitionItemsCoast(); continue; } } }
protected AreaTransitionItemCoast(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { Name = (string)Deserialize(() => Name, info); Coast = (TransitionItemsCoast)Deserialize(() => Coast, info); Ground = (TransitionItemsCoast)Deserialize(() => Ground, info); }
protected AreaTransitionItemCoast(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { Name = (string) Deserialize(() => Name,info); Coast = (TransitionItemsCoast) Deserialize(() => Coast, info); Ground = (TransitionItemsCoast) Deserialize(() => Ground, info); }
public AreaTransitionItemCoast() { Coast = new TransitionItemsCoast(); Ground = new TransitionItemsCoast(); Name = ""; }