public override void Read() { Color from = Color.Black; Color To = Color.Black; var items = new AreaTransitionItem(); var counter4 = 0; foreach (var strings in from s in Strings where !string.IsNullOrEmpty(s) where s.StartsWith("0x") select s.Split(separator)) { if (strings.Length < 4) { items.ColorFrom = ReadColorFromInt(strings[0]); if (strings.Length > 1) { items.ColorTo = ReadColorFromInt(strings[1]); } continue; } if (strings.Length == 4) { TransitionCheck(items, strings.ToList(), counter4); counter4++; counter4 = counter4 % 3; } if (counter4 == 0) { SmoothsAll.List.Add(items); items = new AreaTransitionItem(); continue; } } }
public void GetData(Action <object, Exception> callback) { var trans = new AreaTransitionItem { Name = "Trans Item Data Model" }; var random = new Random(); trans.TextureIdTo = random.Next(0, 200); foreach ( LineType lineType in Enum.GetValues(typeof(LineType))) { foreach (var direction in Enum.GetValues(typeof(Direction))) { for (var i = 0; i < 10; i++) { trans.AddElement(lineType, (int)direction, random.Next(0, 100)); } } } callback(trans, null); }
public override void Cleanup() { _transList = null; _selected = null; _cloned = null; }