예제 #1
0
        public void EditLocker(int id, Locker locker)
        {
            Lockers[id] = locker;

            if (id == 0)
            {
                LeftLocker = locker;
            }

            if (id == Lockers.Count - 1)
            {
                RightLocker = locker;
            }
        }
예제 #2
0
        public void InsertLocker(int id, Locker locker)
        {
            Lockers.Insert(id, locker);

            if (id == 0)
            {
                LeftLocker = locker;
            }

            if (id == Lockers.Count - 1)
            {
                RightLocker = locker;
            }
        }
예제 #3
0
        private void FillLockerInfos(Locker locker)
        {
            // type
            LockTypeBox.SelectedIndex = int.Parse(locker.Type[1] + "") - 1;

            // entraxe
            EntraxeUpDown.Value = locker.Entraxe;

            // kit patere pieds
            PatereCheck.IsChecked = (locker.KitPiedPat) >= 2;
            PiedCheck.IsChecked   = (locker.KitPiedPat % 2) != 0;

            // barre penderie
            PenderieBox.SelectedIndex = locker.IsPend;

            // type plaque
            PlaqueBox.SelectedIndex = locker.TypePlaq;

            // type serrure
            TypeSerrBox.SelectedIndex = TypeSerrBox.Items.IndexOf(locker.TypeSerr.Split(',')[0]);

            DisableIncompatibleOptions();
        }
예제 #4
0
 public void SetLocker(int idx, Locker locker)
 {
     Lockers[idx] = locker;
 }
예제 #5
0
 private string ToFileFormat(Locker locker)
 {
     return($"{locker.Type};{locker.Entraxe};{locker.KitPiedPat};{locker.IsPend};{locker.TypeSerr};{locker.TypePlaq}");
 }