コード例 #1
0
 public PhoneListViewModel(ClientAppViewModel app)
 {
     this.App   = app;
     this.Items = new MTObservableCollection <T>();
     this.Items.CollectionChanged += Items_CollectionChanged;
     GetItemsFromServer();
 }
コード例 #2
0
        public ChannelListViewModel(ClientAppViewModel app) : base(app)
        {
            var address = this.App.Service.GetPOAddress(this.App.POId);

            this.PO = new POViewModel(new PO()
            {
                Id = this.App.POId, Address = address
            });
        }
コード例 #3
0
        public UnitPhoneListViewModel(ClientAppViewModel app) : base(app)
        {
            GenerateViews();
            this.ShowResult = true;

            switch (this.App.WorkingMode)
            {
            case eWorkingMode.Alert:
            case eWorkingMode.CCPK_Alert:
            case eWorkingMode.TSL_Alert:
                this.ShowTask = true;
                break;

            default:
                this.ShowTask = false;
                break;
            }
        }
コード例 #4
0
        public PrivateAlarmViewModel(ClientAppViewModel app)
        {
            this.App = app;
            var service = NovaAlert.Config.Proxy.CreateProxy();

            DTCList       = service.GetDayTypes();
            _dateSelected = App.Service.GetDateTime();
            _daySelected  = _dateSelected.DayOfWeek;
            LoadDay();
            PrevDayCommand     = new RelayCommand(p => PrevDay());
            NextDayCommand     = new RelayCommand(p => NextDay());
            BDPKCommand        = new RelayCommand(p => BDPK(), p => FunctionEnable(FunctionSelection.BDPK));
            BDCDCommand        = new RelayCommand(p => BDCD(), p => FunctionEnable(FunctionSelection.DBCD));
            MainSoundCommand   = new RelayCommand(p => MainSound(), p => SoundEnable(SoundSelection.Main));
            SecondSoundCommand = new RelayCommand(p => SecondSound(), p => SoundEnable(SoundSelection.Second));
            MicCommand         = new RelayCommand(p => Mic(), p => FunctionEnable(FunctionSelection.Mic));
            FileOpenCommand    = new RelayCommand(p => FileOpen(), p => FunctionEnable(FunctionSelection.File));

            this.MainConnection   = new SwitchConnection(this.App.ClientId, new SwitchConnectionEnd(OtherDevice.SoundChannels[0]), new SwitchConnectionEnd(OtherDevice.Amply));
            this.SecondConnection = new SwitchConnection(this.App.ClientId, new SwitchConnectionEnd(OtherDevice.SoundChannels[0]), new SwitchConnectionEnd(OtherDevice.Speakers[this.App.ClientId - 1]));
        }
コード例 #5
0
 public AlertMenuViewModel(ClientAppViewModel app, eAlertMode mode = eAlertMode.Call) : base(app)
 {
     this.Mode = mode;
     this.ShowSwithModeButton = (this.App.WorkingMode == eWorkingMode.Alert || this.App.WorkingMode == eWorkingMode.TSL_Alert) &&
                                string.Compare(app.Service.GetParameterValue(eGlobalParameter.ShowTSL), "true", true) == 0;
 }
コード例 #6
0
 public TSL_ChannelListViewModel(ClientAppViewModel app) : base(app)
 {
 }
コード例 #7
0
 public MenuViewModel(ClientAppViewModel app)
 {
     this.App = app;
     InitCommand();
     _login = new LoginViewModel();
 }