private void Item_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            Node n = (sender as TreeViewItem).Header as Node;

            if (n != null)
            {
                _codeEditor.SetCaretTo(_codeEditor.CurrentCodeFile, n.Offset);
            }

            e.Handled = true;
        }
Exemple #2
0
        private void Item_MouseClick(object sender, MouseButtonEventArgs e)
        {
            FrameworkElement item = sender as FrameworkElement;

            if (item.DataContext != null)
            {
                CodeFile.Bookmark b = item.DataContext as CodeFile.Bookmark;
                _codeEditor.SetCaretTo(_codeEditor.CurrentCodeFile, b.Offset);
            }

            ParentButton.IsOpen = false;
            e.Handled           = true;
        }
Exemple #3
0
        private void ErrorList_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.Enter)
            {
                ListViewItem item  = sender as ListViewItem;
                CompileError error = item.Content as CompileError;

                if (error.IsActive)
                {
                    // Позиционируем на позицию курсор
                    CodeEditorView.SetCaretTo(error.File, error.BeginOffset);
                }

                e.Handled = true;
            }
            else if (e.Key == Key.Space)
            {
                ListViewItem item = sender as ListViewItem;
                CompileError obj  = item.Content as CompileError;

                if (CodeEditorView.GetIfAnotherErrorColor(obj.ErrorType))
                {
                    CodeEditorView.UnSetAnotherErrorColor(obj.ErrorType);
                }
                else
                {
                    CodeEditorView.SetAnotherErrorColor(obj.ErrorType);
                }

                Dict.DoPulse();
            }
        }
Exemple #4
0
        private void ErrorItem_DoubleClick(object sender, MouseButtonEventArgs e)
        {
            ListViewItem item  = sender as ListViewItem;
            CompileError error = item.Content as CompileError;

            if (error.IsActive)
            {
                // Позиционируем на позицию курсор
                CodeEditorView.SetCaretTo(error.File, error.BeginOffset);
            }

            e.Handled = true;
        }