Example #1
0
 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);
     }
 }
Example #2
0
        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);
        }
Example #3
0
 public void SaveData(System.IO.BinaryWriter writer, bool last)
 {
     StreamHelper.WriteString(writer, name);
     writer.Write(data);
     ScorItem.SerializeDefaultToken(writer, last);
 }
Example #4
0
 public void LoadData(System.IO.BinaryReader reader)
 {
     name = StreamHelper.ReadString(reader);
     data = ScorItem.UnserializeDefaultToken(reader);
 }
Example #5
0
 public ScoreItemBusinessRewards(ScorItem si)
     : base(si)
 {
     InitializeComponent();
 }
Example #6
0
 public ScoreItemDefault(ScorItem si)
     : base(si)
 {
     InitializeComponent();
     data = new byte[0];
 }
Example #7
0
 internal AScorItem(ScorItem si)
 {
     this.parent = si;
     InitializeComponent();
 }
Example #8
0
 public ScoreItemLearnedBehaviour(ScorItem si)
     : base(si)
 {
     InitializeComponent();
     llRemove.Enabled = false;
 }
Example #9
0
 public byte[] UnserializeToken(ScorItem si, System.IO.BinaryReader reader)
 {
     return(ScorItem.UnserializeDefaultToken(reader));
 }