|
|
@ -3,6 +3,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
using System; |
|
|
|
using System; |
|
|
|
using System.Linq; |
|
|
|
using System.Linq; |
|
|
|
|
|
|
|
using System.Windows; |
|
|
|
using System.Windows.Controls; |
|
|
|
using System.Windows.Controls; |
|
|
|
using System.Windows.Input; |
|
|
|
using System.Windows.Input; |
|
|
|
using System.Windows.Threading; |
|
|
|
using System.Windows.Threading; |
|
|
@ -13,7 +14,6 @@ using Debugger.AddIn.Pads.Controls; |
|
|
|
using Debugger.AddIn.TreeModel; |
|
|
|
using Debugger.AddIn.TreeModel; |
|
|
|
using ICSharpCode.Core; |
|
|
|
using ICSharpCode.Core; |
|
|
|
using ICSharpCode.Core.Presentation; |
|
|
|
using ICSharpCode.Core.Presentation; |
|
|
|
using ICSharpCode.SharpDevelop.Project; |
|
|
|
|
|
|
|
using ICSharpCode.SharpDevelop.Services; |
|
|
|
using ICSharpCode.SharpDevelop.Services; |
|
|
|
using ICSharpCode.SharpDevelop.Workbench; |
|
|
|
using ICSharpCode.SharpDevelop.Workbench; |
|
|
|
using ICSharpCode.TreeView; |
|
|
|
using ICSharpCode.TreeView; |
|
|
@ -42,7 +42,7 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads |
|
|
|
res.InitializeComponent(); |
|
|
|
res.InitializeComponent(); |
|
|
|
|
|
|
|
|
|
|
|
tree = new SharpTreeView(); |
|
|
|
tree = new SharpTreeView(); |
|
|
|
tree.Root = new SharpTreeNode(); |
|
|
|
tree.Root = new WatchRootNode(); |
|
|
|
tree.ShowRoot = false; |
|
|
|
tree.ShowRoot = false; |
|
|
|
tree.View = (GridView)res["variableGridView"]; |
|
|
|
tree.View = (GridView)res["variableGridView"]; |
|
|
|
tree.SetValue(GridViewColumnAutoSize.AutoWidthProperty, "50%;25%;25%"); |
|
|
|
tree.SetValue(GridViewColumnAutoSize.AutoWidthProperty, "50%;25%;25%"); |
|
|
@ -128,4 +128,32 @@ namespace ICSharpCode.SharpDevelop.Gui.Pads |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class WatchRootNode : SharpTreeNode |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
public override bool CanDrop(DragEventArgs e, int index) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
e.Effects = DragDropEffects.None; |
|
|
|
|
|
|
|
if (e.Data.GetDataPresent(DataFormats.StringFormat)) { |
|
|
|
|
|
|
|
e.Effects = DragDropEffects.Copy; |
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public override void Drop(DragEventArgs e, int index) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (e.Data == null) return; |
|
|
|
|
|
|
|
if (!e.Data.GetDataPresent(DataFormats.StringFormat)) return; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var watchValue = e.Data.GetData(DataFormats.StringFormat).ToString(); |
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(watchValue)) return; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var pad = SD.Workbench.GetPad(typeof(WatchPad)).PadContent as WatchPad; |
|
|
|
|
|
|
|
if (pad == null) return; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pad.AddWatch(watchValue); |
|
|
|
|
|
|
|
WindowsDebugger.RefreshPads(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|