Beispiel #1
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();
            }
        }
Beispiel #2
0
        public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
        {
            CompileError.Type?type = values[0] as CompileError.Type?;

            return(CodeEditor.GetIfAnotherErrorColor(type.Value));
        }