Ejemplo n.º 1
0
        public DayTypeAlarmViewModel(IClientApp app) : base(app)
        {
            this.App.AddLog("Khai báo âm hiệu", false);
            ButtonList = new ObservableCollection <ConfigButtonViewModel>();
            var service = Proxy.CreateProxy();
            var list    = service.GetEnums("DayType");

            foreach (var item in list)
            {
                var obj = new ConfigButtonViewModel();
                obj.Value = item.Value;
                obj.Name  = item.Desc_VN;
                ButtonList.Add(obj);
                obj.OnClicked += TypeClick;
            }

            _isAlarmOnSwitch = service.IsAlartOnSwitch();
        }
Ejemplo n.º 2
0
        private void Init()
        {
            ButtonList = new ObservableCollection <ConfigButtonViewModel>();
            var list = _proxy.GetEnums("DayType");

            foreach (var item in list)
            {
                var obj = new ConfigButtonViewModel();
                obj.Value = item.Value;
                obj.Name  = item.Desc_VN;
                if (this.Value == obj.Value)
                {
                    obj.Selected = true;
                }
                ButtonList.Add(obj);
                obj.OnClicked += TypeClick;
            }
        }