diff --git a/src/AddIns/Debugger/Debugger.AddIn/Pads/ParallelPad/DrawSurface.xaml b/src/AddIns/Debugger/Debugger.AddIn/Pads/ParallelPad/DrawSurface.xaml index 872579fd82..9d574e64d0 100644 --- a/src/AddIns/Debugger/Debugger.AddIn/Pads/ParallelPad/DrawSurface.xaml +++ b/src/AddIns/Debugger/Debugger.AddIn/Pads/ParallelPad/DrawSurface.xaml @@ -1,6 +1,7 @@  - - + \ No newline at end of file diff --git a/src/AddIns/Debugger/Debugger.AddIn/Pads/ParallelPad/DrawSurface.xaml.cs b/src/AddIns/Debugger/Debugger.AddIn/Pads/ParallelPad/DrawSurface.xaml.cs index 229b01b162..22b9aa63fa 100644 --- a/src/AddIns/Debugger/Debugger.AddIn/Pads/ParallelPad/DrawSurface.xaml.cs +++ b/src/AddIns/Debugger/Debugger.AddIn/Pads/ParallelPad/DrawSurface.xaml.cs @@ -14,7 +14,6 @@ namespace Debugger.AddIn.Pads.ParallelPad { public partial class DrawSurface : UserControl { - private Point dragStartedPoint; private ScaleTransform zoom = new ScaleTransform(); public DrawSurface() @@ -22,9 +21,6 @@ namespace Debugger.AddIn.Pads.ParallelPad InitializeComponent(); ContentControl.LayoutTransform = zoom; - - this.PreviewMouseLeftButtonDown += DrawSurface_PreviewMouseLeftButtonDown; - this.PreviewMouseLeftButtonUp += DrawSurface_MouseLeftButtonUp; } public void SetGraph(ParallelStacksGraph graph) @@ -46,51 +42,6 @@ namespace Debugger.AddIn.Pads.ParallelPad ZoomControl.Visibility = Visibility.Hidden; } } - - #region Pan - - void DrawSurface_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e) - { - if (e.OriginalSource is TextBlock || e.OriginalSource is Shape || e.OriginalSource is ScrollChrome) - return; - - dragStartedPoint = e.GetPosition(drawingSurface); - drawingSurface.CaptureMouse(); - this.PreviewMouseMove += DrawSurface_PreviewMouseMove; - e.Handled = true; - } - - void DrawSurface_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) - { - drawingSurface.ReleaseMouseCapture(); - if (e.OriginalSource is Shape || e.OriginalSource is TextBlock) - return; - - this.PreviewMouseMove -= DrawSurface_PreviewMouseMove; - Cursor = Cursors.Arrow; - } - - void DrawSurface_PreviewMouseMove(object sender, MouseEventArgs e) - { - if (e.OriginalSource is TextBlock || e.OriginalSource is Shape || e.OriginalSource is ScrollChrome) - return; - - if (!drawingSurface.IsMouseCaptured) return; - - if (e.LeftButton == MouseButtonState.Pressed) - { - Cursor = Cursors.SizeAll; - var point = e.GetPosition(drawingSurface); - Vector v = point - dragStartedPoint; - ContentControl.Margin = new Thickness( - ContentControl.Margin.Left + v.X / 80, - ContentControl.Margin.Top + v.Y / 80, 0, 0); - - e.Handled = true; - } - } - - #endregion #region Zoom diff --git a/src/AddIns/Debugger/Debugger.AddIn/Pads/ParallelPad/ParallelStackPad.cs b/src/AddIns/Debugger/Debugger.AddIn/Pads/ParallelPad/ParallelStackPad.cs index 71cdd8838d..d267d81bdb 100644 --- a/src/AddIns/Debugger/Debugger.AddIn/Pads/ParallelPad/ParallelStackPad.cs +++ b/src/AddIns/Debugger/Debugger.AddIn/Pads/ParallelPad/ParallelStackPad.cs @@ -75,7 +75,7 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads currentThreadStacks.Clear(); - using(new PrintTimes("Parallel stack - create stacks refresh")) { + using(new PrintTimes("Create stacks")) { try { // create all simple ThreadStacks foreach (Thread thread in debuggedProcess.Threads) { @@ -94,7 +94,7 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads } } } - using(new PrintTimes("Parallel stack - run algorithm")) { + using(new PrintTimes("Run algorithm")) { if (isMethodView) { // build method view for threads diff --git a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Controls/DragScrollViewer.cs b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Controls/DragScrollViewer.cs index cf88805625..465e5fd4ac 100644 --- a/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Controls/DragScrollViewer.cs +++ b/src/AddIns/Debugger/Debugger.AddIn/Visualizers/Controls/DragScrollViewer.cs @@ -19,6 +19,9 @@ namespace Debugger.AddIn.Visualizers.Controls public DragScrollViewer() : base() { + this.VerticalScrollBarVisibility = ScrollBarVisibility.Auto; + this.HorizontalScrollBarVisibility = ScrollBarVisibility.Auto; + this.PreviewMouseDown += new System.Windows.Input.MouseButtonEventHandler(DragScrollViewer_PreviewMouseDown); this.PreviewMouseMove += new System.Windows.Input.MouseEventHandler(DragScrollViewer_PreviewMouseMove); this.PreviewMouseUp += new System.Windows.Input.MouseButtonEventHandler(DragScrollViewer_PreviewMouseUp);