Пример #1
0
        /// <summary> Конструктор </summary>
        public ViewModelCallActive(ModelCall modelCall)
        {
            CallbackRouter.Instance.ModelCallChanged += OnModelCallChanged;

            if (modelCall != null)
            {
                CurrentModelCall = modelCall;
            }
            else
            {
                OnCloseView();
            }

            CommandAcceptCall = new Command(obj => AcceptCall());
            CommandHangupCall = new Command(obj => HangupCall());

            Mute = DataSourceCall.CheckMuteMicrophone();

            ExistCall = true;
        }
Пример #2
0
        /// <summary> Конструктор </summary>
        public ViewModelCallActive(ModelContact modelContact)
        {
            CallbackRouter.Instance.ModelCallChanged += OnModelCallChanged;

            if (DataSourceCall.StartOutgoingCall(modelContact))
            {
                CurrentModelCall = DataSourceCall.GetListActiveCall()?.FirstOrDefault();
            }
            else
            {
                OnCloseView();
            }

            CommandHangupCall     = new Command(obj => HangupCall());
            CommandMuteMicrophone = new Command(obj => MuteMicrophone());

            Mute = DataSourceCall.CheckMuteMicrophone();

            ExistCall = true;
        }