Exemplo n.º 1
0
        protected override void SetStatus(ePhoneStatus status)
        {
            base.SetStatus(status);

            byte channelId = (byte)this.Channel.Id;

            switch (status)
            {
            case ePhoneStatus.Speaking:
            case ePhoneStatus.Listening:
                this.ClientApp.Service.ResumeRecord(channelId);
                break;

            case ePhoneStatus.Holding:
                this.ClientApp.Service.PauseRecord(channelId, 0);
                break;

            case ePhoneStatus.WaitForKeycode:
                this.ClientApp.Service.PauseRecord(channelId, 1);
                break;

            case ePhoneStatus.WaitForCommand:
                this.ClientApp.Service.PauseRecord(channelId, 2);
                break;

            case ePhoneStatus.WaitForReport:
                this.ClientApp.Service.PauseRecord(channelId, 3);
                break;
            }
        }
Exemplo n.º 2
0
 protected virtual void SetStatus(ePhoneStatus status)
 {
     this.Channel.Status = status;
     if (this.Unit != null)
     {
         this.Unit.Status = status;
     }
 }
Exemplo n.º 3
0
        public PhoneViewModel(Phone phone)
        {
            this.Phone       = phone;
            this.LastClicked = DateTime.Now;
            _status          = ePhoneStatus.Free;
            _lineStatus      = eLineStatus.Good;

            this.OnClickCommand = new RelayCommand(p => OnClick());
        }