/// <summary> Конструктор </summary> public ViewCallActive() { InitializeComponent(); _viewModelCallActive = new ViewModelCallActive(); DataContext = _viewModelCallActive; if (_viewModelCallActive.CurrentModelCall != null && _viewModelCallActive.CurrentModelCall.ModelContactObj?.ModelContactSubscriptionObj != null && _viewModelCallActive.CurrentModelCall.ModelContactObj.ModelContactSubscriptionObj.ModelEnumSubscriptionStateObj.Code == 3 /* Both */) { ButtonChat.Visibility = Visibility.Visible; } else { ButtonChat.Visibility = Visibility.Hidden; } StackPanelVideo.Visibility = Visibility.Collapsed; ImageAccept.Visibility = Visibility.Visible; _viewModelCallActive.CloseView += ViewModelCallActiveOnCloseView; _viewModelCallActive.EventViewModel += ViewModelCallActiveOnEventViewModel; _viewModelCallActive.CommandCallTransfer = new Command(obj => ShowCallTransferWindow()); }
/// <summary> показать звонок </summary> public static void ShowCall(ViewModelCallActive viewModelCallActive) { if (viewModelCallActive == null) { return; } WindowMain.ShowInRightWorkspaceFront(new ViewCallActive(viewModelCallActive)); }
/// <summary> Конструктор </summary> private WindowCallActive(ModelContact modelContact, string number) { InitializeComponent(); _viewModelCallActive = new ViewModelCallActive(modelContact, number); DataContext = _viewModelCallActive; Instance = this; _viewModelCallActive.CloseView += ViewModelCallActiveOnCloseView; _viewModelCallActive.EventViewModel += ViewModelCallActiveOnEventViewModel; }
/// <summary> Конструктор </summary> private WindowCallActive() { InitializeComponent(); _viewModelCallActive = new ViewModelCallActive(); DataContext = _viewModelCallActive; Instance = this; ImageAccept.Visibility = Visibility.Visible; _viewModelCallActive.CloseView += ViewModelCallActiveOnCloseView; _viewModelCallActive.EventViewModel += ViewModelCallActiveOnEventViewModel; }
/// <summary> Конструктор </summary> public ViewCallActive(ViewModelCallActive viewModelCallActive) { InitializeComponent(); _viewModelCallActive = viewModelCallActive; DataContext = _viewModelCallActive; if (_viewModelCallActive.CurrentModelCall != null && _viewModelCallActive.CurrentModelCall.IsDodicall && _viewModelCallActive.CurrentModelCall.ModelContactObj?.ModelContactSubscriptionObj != null && _viewModelCallActive.CurrentModelCall.ModelContactObj.ModelContactSubscriptionObj.ModelEnumSubscriptionStateObj.Code == 3 /* Both */) { ButtonChat.Visibility = Visibility.Visible; } else { ButtonChat.Visibility = Visibility.Hidden; } if (_viewModelCallActive.CurrentModelCall?.ModelEnumCallDirectionObj.Code == 1) // Incoming { StackPanelVideo.Visibility = Visibility.Collapsed; StackPanelCallTransfer.Visibility = Visibility.Collapsed; ImageAccept.Visibility = Visibility.Visible; } if (_viewModelCallActive.CurrentModelCall?.ModelEnumCallStateObj.Code == 3) // CallStateConversation { ChangeToActiveCall(); } _viewModelCallActive.CloseView += ViewModelCallActiveOnCloseView; _viewModelCallActive.EventViewModel += ViewModelCallActiveOnEventViewModel; _viewModelCallActive.CommandCallTransfer = new Command(obj => ShowCallTransferWindow()); }