Beispiel #1
0
        private void _debugList_MouseRightButtonUp(object sender, MouseButtonEventArgs e)
        {
            try {
                ListViewItem item = _debugList.GetObjectAtPoint <ListViewItem>(e.GetPosition(_debugList)) as ListViewItem;

                if (item != null)
                {
                    DebugItemView view = item.Content as DebugItemView;

                    if (view != null)
                    {
                        if (view.CanSelectInTextEditor())
                        {
                            ((MenuItem)_debugList.ContextMenu.Items[0]).Visibility = Visibility.Visible;
                            ((MenuItem)_debugList.ContextMenu.Items[1]).Visibility = Visibility.Visible;
                        }
                        else
                        {
                            ((MenuItem)_debugList.ContextMenu.Items[0]).Visibility = Visibility.Collapsed;
                            ((MenuItem)_debugList.ContextMenu.Items[1]).Visibility = Visibility.Collapsed;
                        }
                    }
                }
                else
                {
                    e.Handled = true;
                }
            }
            catch (Exception err) {
                ErrorHandler.HandleException(err);
            }
        }
Beispiel #2
0
 private void _miCopy_Click(object sender, RoutedEventArgs e)
 {
     try {
         DebugItemView view = (DebugItemView)_debugList.SelectedItem;
         view.Copy();
     }
     catch (Exception err) {
         ErrorHandler.HandleException(err);
     }
 }
Beispiel #3
0
 private void _miOpenNotepad_Click(object sender, RoutedEventArgs e)
 {
     try {
         DebugItemView view = (DebugItemView)_debugList.SelectedItem;
         GTabsMaker.SelectInNotepadpp(view.FilePath, view.Line);
     }
     catch (Exception err) {
         ErrorHandler.HandleException(err);
     }
 }
Beispiel #4
0
 private void _miOpen_Click(object sender, RoutedEventArgs e)
 {
     try {
         DebugItemView view = (DebugItemView)_debugList.SelectedItem;
         Process.Start(view.FilePath);
     }
     catch (Exception err) {
         ErrorHandler.HandleException(err);
     }
 }
Beispiel #5
0
        private void _debugList_MouseRightButtonUp(object sender, MouseButtonEventArgs e)
        {
            try {
                ListViewItem item = _debugList.GetObjectAtPoint <ListViewItem>(e.GetPosition(_debugList)) as ListViewItem;

                if (item != null)
                {
                    DebugItemView view = item.Content as DebugItemView;

                    if (view != null)
                    {
                        if (view.CanSelectInTextEditor())
                        {
                            return;
                        }
                    }
                }

                e.Handled = true;
            }
            catch (Exception err) {
                ErrorHandler.HandleException(err);
            }
        }