Example #1
0
        //Manual Get Station Name
        public void LoadFilterParameter()
        {
            //Stations = new ObservableCollection<string>(
            //                await RestAlarmsRepo.GetStationNameAsync());

            // Adding Station ComboBox items
            mstationItems.Add(new Item("All", "StationName"));
            foreach (var Station in RestAlarmsRepo.StationsName)
            {
                mstationItems.Add(new Item(Station.ToString(), "StationName"));
            }

            // Adding Priority ComboBox items
            mpriorityItems.Add(new Item("All", "Priority"));
            foreach (var Priority in RestAlarmsRepo.Priority)
            {
                mpriorityItems.Add(new Item(Priority.ToString(), "Priority"));
            }

            // Adding GoupDescription ComboBox items
            mgroupDescItems.Add(new Item("All", "GroupDescription"));
            foreach (var GroupDescription in RestAlarmsRepo.DeviceType)
            {
                mgroupDescItems.Add(new Item(GroupDescription.ToString(), "GroupDescription"));
            }
        }
Example #2
0
        //Auto Get Station Name when DB has been loaded.
        private void OnRestAlarmChanged(object source, RestEventArgs arg)
        {
            if (arg.message == "hasLoaded")
            {
                // Adding Station ComboBox items
                foreach (var Station in RestAlarmsRepo.StationsName)
                {
                    mstationItems.Add(new Item(Station.ToString(), "StationName"));
                }

                // Adding Priority ComboBox items
                foreach (var Priority in RestAlarmsRepo.Priority)
                {
                    mpriorityItems.Add(new Item(Priority.ToString(), "Priority"));
                }

                // Adding GoupDescription ComboBox items
                foreach (var GroupDescription in RestAlarmsRepo.DeviceType)
                {
                    mgroupDescItems.Add(new Item(GroupDescription.ToString(), "GroupDescription"));
                }
            }
        }