public GateSpawner(IRotatable player, GateSettings settings) { _numInColumn = settings.NumInColumn; _gateBlock = settings.GateBlock; _outerGate = settings.OuterGate; _player = player; }
public ReservationViewModel(GateSettings settings) { this.settings = settings; this.gate = new Gate(settings); _tableItems = new ObservableCollection <TableReservation>(); _takeawayItems = new ObservableCollection <TakeAwayReservation>(); _roomItems = new ObservableCollection <RoomReservation>(); //gate.GetTableDataFromServer(GenerateUrl(maxTableReservationId.ToString(), "restaurant"), tableItems); //gate.GetTakeAwayDataFromServer(GenerateUrl(maxTakeAwayReservationId.ToString(), "takeaway"), takeawayItems); //gate.GetRoomDataFromServer(GenerateUrl(maxRoomReservationId.ToString(), "room"), roomItems); }
public void LoadGateSettings() { XmlSerializer formatter = new XmlSerializer(typeof(GateSettings)); try { using (FileStream fs = new FileStream("GateSettings.xml", FileMode.OpenOrCreate)) { gateSettings = (GateSettings)formatter.Deserialize(fs); } } catch { gateSettings = new GateSettings(); } }