public CallViewModel(CallView callView)
 {
     curCallView       = callView;
     EndCallCMD        = new RelayCommand(EndCall);
     BackCommand       = new RelayCommand(BackToMain);
     HideRatingViewCMD = new RelayCommand(HideRatingView);
     SendFeedBackCMD   = new RelayCommand(this.SendFeedBack, this.CanSendFeedBack);
     KeyboardCMD       = new RelayCommand(ShowHideKeyboard);
     DtmfCMD           = new RelayCommand(SendDTMF);
     spark             = ApplicationController.Instance.CurSparkManager.CurSpark;
 }
 public CallViewModel(CallView callView)
 {
     curCallView       = callView;
     EndCallCMD        = new RelayCommand(EndCall);
     BackCommand       = new RelayCommand(BackToMain);
     HideRatingViewCMD = new RelayCommand(HideRatingView);
     SendFeedBackCMD   = new RelayCommand(this.SendFeedBack, this.CanSendFeedBack);
     KeyboardCMD       = new RelayCommand(ShowHideKeyboard);
     DtmfCMD           = new RelayCommand(SendDTMF);
     StopShareCMD      = new RelayCommand(StopShare);
     spark             = ApplicationController.Instance.CurSparkManager.CurSpark;
     shareSourceList   = new ObservableCollection <ShareSource>();
 }
        public MessageSessionViewModel()
        {
            BackCommand          = new RelayCommand(BackToMain);
            SndMsgCommand        = new RelayCommand(SendMessage);
            DownloadFileCMD      = new RelayCommand(DownLoadFile);
            DownloadThumbnailCMD = new RelayCommand(DownloadThumbnail);
            AttachFileCMD        = new RelayCommand(AttachFile);
            DeleteMsgCommand     = new RelayCommand(DeleteMsg);
            ListMessageCMD       = new RelayCommand(ListMessage);
            GetMessageCMD        = new RelayCommand(GetMessage);

            spark                  = ApplicationController.Instance.CurSparkManager.CurSpark;
            messageClient          = spark?.Messages;
            messageClient.OnEvent += OnMessageEvent;
            MessageList            = new ObservableCollection <TimelineMessage>();
            AttachedFiles          = new ObservableCollection <string>();

            FilesList = new ObservableCollection <RemoteFile>();

            var address = ApplicationController.Instance.CurSparkManager.CurCalleeAddress;

            if (address.Contains('@') || StringExtention.Base64UrlDecode(address).Contains("PEOPLE"))
            {
                RoomTitle       = address;
                isDirectMessage = true;
                toPersonEmail   = address;
            }
            else
            {
                spark?.Rooms.Get(address, r =>
                {
                    if (r.IsSuccess)
                    {
                        RoomTitle = r.Data.Title;
                    }
                });
                toRoomId = address;
            }
        }