Пример #1
0
        private void FillAlerts()
        {
            string[] listact = new string[6] {
                "Slabé", "Stredné", "Vysoké", "Dlho bez pohybu", "Prekročenie hranice", "Nastal pád"
            };
            int i = 0;

            foreach (var a in listact)
            {
                AlertsObj act = new AlertsObj()
                {
                    id   = i++,
                    Name = a
                };

                switch (act.id)
                {
                case 0:
                    act.AlertSwitchIsChecked = SettingsController.AlertLow;
                    break;

                case 1:
                    act.AlertSwitchIsChecked = SettingsController.AlertMiddle;
                    break;

                case 2:
                    act.AlertSwitchIsChecked = SettingsController.AlertHigh;
                    break;

                case 3:
                    act.AlertSwitchIsChecked = SettingsController.AlertMovementTime;
                    break;

                case 4:
                    act.AlertSwitchIsChecked = SettingsController.AlertMovement;
                    break;

                case 5:
                    act.AlertSwitchIsChecked = SettingsController.AlertFall;
                    break;
                }


                ListOfAlerts.Add(act);
            }
        }
Пример #2
0
        private void FillAlerts()
        {
            string[] listact = new string[6] {
                "Slabé", "Stredné", "Vysoké", "Dlho bez pohybu", "Prekročenie hranice", "Nastal pád"
            };
            int i = 0;

            foreach (var a in listact)
            {
                AlertsObj act = new AlertsObj()
                {
                    id   = i++,
                    Name = a,
                    AlertSwitchIsChecked = false
                };

                ListOfAlerts.Add(act);
            }
        }