/// <summary> Конструктор </summary>
        public ViewChatEditMessage(ViewChatMessageDetail viewChatMessageDetail, ViewModelChatDetail viewModelChatDetail)
        {
            InitializeComponent();

            _viewChatMessageDetail = viewChatMessageDetail;

            _editMessageControl = _viewChatMessageDetail.ControlEditMessage;

            _earlyTextFromTextBlock = _editMessageControl.Message.StringContent;

            _shouldDeleteQuote = false;

            TextEditMessage.Text = _earlyTextFromTextBlock;

            if (_editMessageControl.Message.HaveQuoted)
            {
                var quotedMessage = new QuotedMessage(_editMessageControl.Message.ListQuotedModelChatMessage.ToList(), viewModelChatDetail);

                _attachQuotedMessages = quotedMessage.ReturnGrid;

                ArrayListTextBlockQuotedMessage = quotedMessage.ArrayListTextBlock;

                GridQuotedMessage.Children.Add(_attachQuotedMessages);

                RectangleQuotedMessage.Visibility      = Visibility.Visible;
                GridVisibilityQuotedMessage.Visibility = Visibility.Visible;
            }
        }
        ///<summary> Обработчик нажатия на пункт меню учасники чата </summary>
        private void ContextMenuChatMembers_OnClick(object sender, RoutedEventArgs e)
        {
            var modelChat = ListBoxChat.SelectedItem as ModelChat;

            if (modelChat == null)
            {
                return;
            }

            //var rightWorkspaceContent = WindowMain.GetRightWorkspaceContent();
            //var existChatMessageDetail = rightWorkspaceContent != null ? rightWorkspaceContent is ViewChatMessageDetail : true;

            //var chatMessageDetail = existChatMessageDetail ? rightWorkspaceContent as ViewChatMessageDetail : null;

            //var createNewViewChatMessageDetail = chatMessageDetail != null ? chatMessageDetail.CurrentModelChat.Id != _viewModelChat.CurrentModelChat.Id: false;

            var chatMessageDetail = WindowMain.GetRightWorkspaceContent() as ViewChatMessageDetail;

            if (chatMessageDetail?.CurrentModelChat.Id != _viewModelChat.CurrentModelChat.Id)
            {
                var viewChatMessageDetail = new ViewChatMessageDetail(modelChat);
                WindowMain.ShowInRightWorkspace(viewChatMessageDetail);
                viewChatMessageDetail.OnInviteMembers_MouseClick(null, null);
            }
            else
            {
                chatMessageDetail?.OnInviteMembers_MouseClick(null, null);
            }
        }
Exemplo n.º 3
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.ViewChatMessageDetailUserControl = ((dodicall.View.ViewChatMessageDetail)(target));

            #line 9 "..\..\..\View\ViewChatMessageDetail.xaml"
                this.ViewChatMessageDetailUserControl.SizeChanged += new System.Windows.SizeChangedEventHandler(this.ViewChatMessageDetail_OnSizeChanged);

            #line default
            #line hidden
                return;

            case 2:
                this.GridMain = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.GridHeaderChat = ((System.Windows.Controls.Grid)(target));
                return;

            case 4:
                this.StackPanelTitle = ((System.Windows.Controls.StackPanel)(target));

            #line 40 "..\..\..\View\ViewChatMessageDetail.xaml"
                this.StackPanelTitle.MouseEnter += new System.Windows.Input.MouseEventHandler(this.OnTitleChatMouseEnter);

            #line default
            #line hidden
                return;

            case 5:
                this.ChatTitleTextBlock = ((System.Windows.Controls.TextBlock)(target));

            #line 41 "..\..\..\View\ViewChatMessageDetail.xaml"
                this.ChatTitleTextBlock.MouseEnter += new System.Windows.Input.MouseEventHandler(this.OnTitleChatMouseEnter);

            #line default
            #line hidden

            #line 41 "..\..\..\View\ViewChatMessageDetail.xaml"
                this.ChatTitleTextBlock.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.OnChatTitleTextBlock_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 6:
                this.ChatTitleEditButton = ((System.Windows.Controls.Button)(target));

            #line 42 "..\..\..\View\ViewChatMessageDetail.xaml"
                this.ChatTitleEditButton.MouseEnter += new System.Windows.Input.MouseEventHandler(this.OnTitleChatMouseEnter);

            #line default
            #line hidden

            #line 42 "..\..\..\View\ViewChatMessageDetail.xaml"
                this.ChatTitleEditButton.MouseLeave += new System.Windows.Input.MouseEventHandler(this.OnTitleChatMouseLeave);

            #line default
            #line hidden

            #line 42 "..\..\..\View\ViewChatMessageDetail.xaml"
                this.ChatTitleEditButton.Click += new System.Windows.RoutedEventHandler(this.TitleChatEditMouseButtonDown);

            #line default
            #line hidden
                return;

            case 7:
                this.StackPanelEditTitle = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 8:
                this.ChatTitleTextBox = ((System.Windows.Controls.TextBox)(target));

            #line 47 "..\..\..\View\ViewChatMessageDetail.xaml"
                this.ChatTitleTextBox.PreviewKeyUp += new System.Windows.Input.KeyEventHandler(this.ChatTitleTextBox_OnPreviewKeyDown);

            #line default
            #line hidden

            #line 47 "..\..\..\View\ViewChatMessageDetail.xaml"
                this.ChatTitleTextBox.LostFocus += new System.Windows.RoutedEventHandler(this.ChatTitleTextBox_LostFocus);

            #line default
            #line hidden
                return;

            case 9:
                this.ChatTitleEditConfirmButton = ((System.Windows.Controls.Image)(target));

            #line 48 "..\..\..\View\ViewChatMessageDetail.xaml"
                this.ChatTitleEditConfirmButton.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.ChatTitleEditConfirmButton_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 10:
                this.ChatTitleEditAbortButton = ((System.Windows.Controls.Image)(target));

            #line 50 "..\..\..\View\ViewChatMessageDetail.xaml"
                this.ChatTitleEditAbortButton.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.TitleChatAbortEditMouseButtonDown);

            #line default
            #line hidden
                return;

            case 11:
                this.GridModelContactStatus = ((System.Windows.Controls.Grid)(target));
                return;

            case 12:
                this.EllipseStatus = ((System.Windows.Shapes.Ellipse)(target));
                return;

            case 13:
                this.StackPanelCountModelContact = ((System.Windows.Controls.StackPanel)(target));

            #line 63 "..\..\..\View\ViewChatMessageDetail.xaml"
                this.StackPanelCountModelContact.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.StackPanelCountModelContact_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 14:
                this.HideOrOpenUserContactList = ((System.Windows.Controls.Image)(target));
                return;

            case 15:
                this.TextBlockCountModelContact = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 16:
                this.ButtonPhone = ((System.Windows.Controls.Button)(target));

            #line 73 "..\..\..\View\ViewChatMessageDetail.xaml"
                this.ButtonPhone.Click += new System.Windows.RoutedEventHandler(this.ButtonPhone_OnClick);

            #line default
            #line hidden
                return;

            case 17:
                this.ImagePhone = ((System.Windows.Controls.Image)(target));
                return;

            case 18:
                this.ButtonVideo = ((System.Windows.Controls.Button)(target));
                return;

            case 19:
                this.ImageVideo = ((System.Windows.Controls.Image)(target));
                return;

            case 20:

            #line 81 "..\..\..\View\ViewChatMessageDetail.xaml"
                ((System.Windows.Controls.Image)(target)).MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.ContextMenuOpen);

            #line default
            #line hidden
                return;

            case 21:

            #line 84 "..\..\..\View\ViewChatMessageDetail.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.OnInviteMembers_MouseClick);

            #line default
            #line hidden
                return;

            case 22:
                this.Sep1 = ((System.Windows.Controls.Separator)(target));
                return;

            case 23:
                this.LeaveChatSeparator = ((System.Windows.Controls.Separator)(target));
                return;

            case 24:
                this.LeaceChatContextMenuItem = ((System.Windows.Controls.MenuItem)(target));
                return;

            case 25:
                this.MultipleChoiceMenuItem = ((System.Windows.Controls.MenuItem)(target));

            #line 89 "..\..\..\View\ViewChatMessageDetail.xaml"
                this.MultipleChoiceMenuItem.Click += new System.Windows.RoutedEventHandler(this.MultipleChoiceMenuItem_Click);

            #line default
            #line hidden
                return;

            case 26:
                this.ScrollChatUserList = ((System.Windows.Controls.ScrollViewer)(target));
                return;

            case 27:
                this.ItemsControlChatUserList = ((System.Windows.Controls.ItemsControl)(target));
                return;

            case 29:
                this.TopMenuMultipleChoice = ((System.Windows.Controls.Grid)(target));
                return;

            case 30:
                this.CheckBoxSelectAll = ((System.Windows.Controls.CheckBox)(target));

            #line 151 "..\..\..\View\ViewChatMessageDetail.xaml"
                this.CheckBoxSelectAll.Click += new System.Windows.RoutedEventHandler(this.CheckBoxSelectAll_Click);

            #line default
            #line hidden
                return;

            case 31:
                this.ButtonCancelMultipleChoice = ((System.Windows.Controls.Button)(target));

            #line 154 "..\..\..\View\ViewChatMessageDetail.xaml"
                this.ButtonCancelMultipleChoice.Click += new System.Windows.RoutedEventHandler(this.ButtonCancelMultipleChoice_Click);

            #line default
            #line hidden
                return;

            case 32:
                this.GridDetailListMessage = ((System.Windows.Controls.Grid)(target));
                return;

            case 33:
                this.ScrollViewerListMessage = ((System.Windows.Controls.ScrollViewer)(target));

            #line 161 "..\..\..\View\ViewChatMessageDetail.xaml"
                this.ScrollViewerListMessage.ScrollChanged += new System.Windows.Controls.ScrollChangedEventHandler(this.ScrollViewerListMessage_ScrollChanged);

            #line default
            #line hidden
                return;

            case 34:
                this.GridListMessage = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 35:
                this.GridTopDateMessage = ((System.Windows.Controls.Grid)(target));
                return;

            case 36:
                this.RectangleDateMessage = ((System.Windows.Shapes.Rectangle)(target));
                return;

            case 37:
                this.TextBlockTopDateMessage = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 38:
                this.RectangleQuotedMessage = ((System.Windows.Shapes.Rectangle)(target));
                return;

            case 39:
                this.GridQuotedMessage = ((System.Windows.Controls.Grid)(target));
                return;

            case 40:
                this.ButtonRemoveQuotedMessage = ((System.Windows.Controls.Button)(target));

            #line 181 "..\..\..\View\ViewChatMessageDetail.xaml"
                this.ButtonRemoveQuotedMessage.Click += new System.Windows.RoutedEventHandler(this.ButtonRemoveQuotedMessage_Click);

            #line default
            #line hidden
                return;

            case 41:
                this.RectangleMessage = ((System.Windows.Shapes.Rectangle)(target));
                return;

            case 42:
                this.GridSetMessage = ((System.Windows.Controls.Grid)(target));
                return;

            case 43:
                this.TextBoxWriteMessage = ((System.Windows.Controls.TextBox)(target));

            #line 194 "..\..\..\View\ViewChatMessageDetail.xaml"
                this.TextBoxWriteMessage.PreviewKeyDown += new System.Windows.Input.KeyEventHandler(this.TextBoxWriteMessage_OnPreviewKeyDown);

            #line default
            #line hidden

            #line 194 "..\..\..\View\ViewChatMessageDetail.xaml"
                this.TextBoxWriteMessage.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.TextBoxWriteMessage_TextChanged);

            #line default
            #line hidden

            #line 195 "..\..\..\View\ViewChatMessageDetail.xaml"
                this.TextBoxWriteMessage.GotFocus += new System.Windows.RoutedEventHandler(this.TextBoxWriteMessage_GotFocus);

            #line default
            #line hidden

            #line 195 "..\..\..\View\ViewChatMessageDetail.xaml"
                this.TextBoxWriteMessage.LostFocus += new System.Windows.RoutedEventHandler(this.TextBoxWriteMessage_LostFocus);

            #line default
            #line hidden
                return;

            case 44:
                this.TextBlockWriteMessage = ((System.Windows.Controls.TextBlock)(target));

            #line 196 "..\..\..\View\ViewChatMessageDetail.xaml"
                this.TextBlockWriteMessage.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.TextBlockEnterMessage_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 45:

            #line 198 "..\..\..\View\ViewChatMessageDetail.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Click_ClipButton);

            #line default
            #line hidden
                return;

            case 46:

            #line 202 "..\..\..\View\ViewChatMessageDetail.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Click_ClipSendContact);

            #line default
            #line hidden
                return;

            case 47:
                this.ImageSendMessage = ((System.Windows.Controls.Image)(target));

            #line 207 "..\..\..\View\ViewChatMessageDetail.xaml"
                this.ImageSendMessage.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.ImageSendMessage_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 48:
                this.RectangleSendMessage = ((System.Windows.Shapes.Rectangle)(target));
                return;

            case 49:
                this.GridWriteMessageDisable = ((System.Windows.Controls.Grid)(target));
                return;

            case 50:
                this.BottomMenuMultipleChoice = ((System.Windows.Controls.Grid)(target));
                return;

            case 51:
                this.ButtonMultipleForwardMessage = ((System.Windows.Controls.Button)(target));

            #line 222 "..\..\..\View\ViewChatMessageDetail.xaml"
                this.ButtonMultipleForwardMessage.Click += new System.Windows.RoutedEventHandler(this.ButtonMultipleForwardMessage_Click);

            #line default
            #line hidden
                return;

            case 52:
                this.ButtonMultipleCopyMessage = ((System.Windows.Controls.Button)(target));

            #line 230 "..\..\..\View\ViewChatMessageDetail.xaml"
                this.ButtonMultipleCopyMessage.Click += new System.Windows.RoutedEventHandler(this.ButtonMultipleCopyMessage_Click);

            #line default
            #line hidden
                return;

            case 53:
                this.ButtonMultipleCiteMessage = ((System.Windows.Controls.Button)(target));

            #line 238 "..\..\..\View\ViewChatMessageDetail.xaml"
                this.ButtonMultipleCiteMessage.Click += new System.Windows.RoutedEventHandler(this.ButtonMultipleCiteMessage_Click);

            #line default
            #line hidden
                return;

            case 54:
                this.ButtonMultipleExportMessage = ((System.Windows.Controls.Button)(target));

            #line 246 "..\..\..\View\ViewChatMessageDetail.xaml"
                this.ButtonMultipleExportMessage.Click += new System.Windows.RoutedEventHandler(this.ButtonMultipleExportMessage_Click);

            #line default
            #line hidden
                return;

            case 55:
                this.ButtonMultipleFavoriteMessage = ((System.Windows.Controls.Button)(target));

            #line 254 "..\..\..\View\ViewChatMessageDetail.xaml"
                this.ButtonMultipleFavoriteMessage.Click += new System.Windows.RoutedEventHandler(this.ButtonMultipleFavoriteMessage_Click);

            #line default
            #line hidden
                return;

            case 56:
                this.ButtonMultipleDeleteMessage = ((System.Windows.Controls.Button)(target));

            #line 262 "..\..\..\View\ViewChatMessageDetail.xaml"
                this.ButtonMultipleDeleteMessage.Click += new System.Windows.RoutedEventHandler(this.ButtonMultipleDeleteMessage_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }