1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111:
| [Serializable()] public class TPoint { #region private variables private double _Mila; private double _Rvelo; private double _ss; private Int16 _Rad; private POIType _POI; private string _POIName; private double _lt; private double _lg; #endregion
}
[Serializable()] public class FPLPoint : TPoint { DateTime _arr; DateTime _dep; bool _pass; int _posID; FPLOptimize _simFlag; }
[Serializable()] public class FPL : KeyedCollection<string, FPLPoint>, IBindingList, ISerializable { #region private variables private string _name; private string _ident = ""; private bool _org; private FPLValidityFlags[] _validity = new FPLValidityFlags[0]; private DateTime _validityStart; private DateTime _validityEnd; private DateTime[] _validityDates; private TrackInfo _parent; private FPLCollection _FPLCParent;
#endregion
#region ISerializable
public void GetObjectData(SerializationInfo Info, StreamingContext Context) { Info.AddValue("FPL",this.ToArray()); Info.AddValue("N", _name); Info.AddValue("I", _ident); Info.AddValue("V", _validity); Info.AddValue("S", _validityStart); Info.AddValue("E", _validityEnd); Info.AddValue("D", _validityDates); }
protected FPL(SerializationInfo Info, StreamingContext Context) { FPLPoint[] Imp = (FPLPoint[])Info.GetValue("FPL", typeof(FPLPoint[]));
foreach (FPLPoint p in Imp) { this.Add(p); }
_name = Info.GetString("N"); _ident = Info.GetString("I"); _validity = (FPLValidityFlags[])Info.GetValue("V", typeof(FPLValidityFlags[])); _validityStart = Info.GetDateTime("S"); _validityEnd = Info.GetDateTime("E"); _validityDates = (DateTime[])Info.GetValue("D", typeof(DateTime[]));
}
#endregion }
[Serializable()] [PropGridAttr] [TypeConverterAttribute(typeof(VDTPropertyConverter))] public class FPLCollection : KeyedCollection<string, Fahrplan>, ISerializable, IBindingList { #region ISerializable
public void GetObjectData(SerializationInfo Info, StreamingContext Context) { FPL[] fpls = this.ToArray(); Info.AddValue("F", fpls); }
protected FPLCollection(SerializationInfo Info, StreamingContext Context) { FPL[] imp = (Fahrplan[])Info.GetValue("F", typeof(FPL[])); for (int i = 0; i < imp.Length; i++) { if (imp[i] == null) { imp[i]= new FPL(); imp[i].Identification = String.Format("new FPL({0})", i); } imp[i].Parent = this._Parent; imp[i].FPLCParent = this; this.Add(imp[i]);
} }
#endregion |