Ejemplo n.º 1
0
 public SerializebleSeatMapList GetSerializebleList()
 {
     list = new SerializebleSeatMapList();
     for (int i = 0; i <= 3; i++)
     {
         for (int j = 0; j <= 3; j++)
         {
             list.Add(seatsMap[i, j]);
         }
     }
     return(list);
 }
Ejemplo n.º 2
0
        private void UpdateSeatMap(SerializebleSeatMapList deserializedList)
        {
            int index = 0;

            for (int i = 0; i <= 3; i++)
            {
                for (int j = 0; j <= 3; j++)
                {
                    seatsMap[i, j] = deserializedList[index];
                    index++;
                }
            }
        }
Ejemplo n.º 3
0
        internal void DeserializeSeatMap()
        {
            SerializebleSeatMapList deserializedList = null;

            string filePath = "seatmap_serialized.xml";

            XmlSerializer serializer = new XmlSerializer(typeof(SerializebleSeatMapList));

            StreamReader reader = new StreamReader(filePath);

            deserializedList = (SerializebleSeatMapList)serializer.Deserialize(reader);

            reader.Close();

            UpdateSeatMap(deserializedList);
        }