internal override void Serialize(System.IO.BinaryWriter writer, bool last) { base.Serialize(writer, last); writer.Write((Int16)lb.Items.Count); writer.Write((byte)0); ScorItem.SerializeDefaultToken(writer, last && lb.Items.Count == 0); for (int i = 0; i < lb.Items.Count; i++) { ScoreItemBusinessRewards.Element e = lb.Items[i] as ScoreItemBusinessRewards.Element; e.SaveData(writer, last && i == lb.Items.Count - 1); } }
public byte[] UnserializeToken(ScorItem si, System.IO.BinaryReader reader) { byte[] data = ScorItem.UnserializeDefaultToken(reader); int ct = BitConverter.ToInt16(data, 0); gui = new ScoreItemBusinessRewards(si); for (int i = 0; i < ct; i++) { ScoreItemBusinessRewards.Element item = new ScoreItemBusinessRewards.Element(); item.LoadData(reader); gui.AddElement(item); } return(data); }
public void SaveData(System.IO.BinaryWriter writer, bool last) { StreamHelper.WriteString(writer, name); writer.Write(data); ScorItem.SerializeDefaultToken(writer, last); }
public void LoadData(System.IO.BinaryReader reader) { name = StreamHelper.ReadString(reader); data = ScorItem.UnserializeDefaultToken(reader); }
public ScoreItemBusinessRewards(ScorItem si) : base(si) { InitializeComponent(); }
public ScoreItemDefault(ScorItem si) : base(si) { InitializeComponent(); data = new byte[0]; }
internal AScorItem(ScorItem si) { this.parent = si; InitializeComponent(); }
public ScoreItemLearnedBehaviour(ScorItem si) : base(si) { InitializeComponent(); llRemove.Enabled = false; }
public byte[] UnserializeToken(ScorItem si, System.IO.BinaryReader reader) { return(ScorItem.UnserializeDefaultToken(reader)); }