public override void Run()
		{
			if (this.Owner is WatchPad) {
				WatchPad pad = (WatchPad)this.Owner;
				TreeViewAdv ctrl = (TreeViewAdv)pad.Control;
				
				string input = MessageService.ShowInputBox(StringParser.Parse("${res:MainWindow.Windows.Debug.Watch.AddWatch}"),
				                                           StringParser.Parse("${res:MainWindow.Windows.Debug.Watch.EnterExpression}"),
				                                           "");
				if (!string.IsNullOrEmpty(input)) {
					ctrl.BeginUpdate();
					TextNode text = new TextNode(input, SupportedLanguage.CSharp);
					TreeViewVarNode node = new TreeViewVarNode(pad.Process, ctrl, text);
					
					pad.Watches.Add(text);
					ctrl.Root.Children.Add(node);
					ctrl.EndUpdate();
				}
				
				pad.RefreshPad();
			}
		}
Esempio n. 2
0
		void watchList_DragDrop(object sender, DragEventArgs e)
		{
			watchList.BeginUpdate();
			TextNode text = new TextNode(e.Data.GetData(DataFormats.StringFormat).ToString(), SupportedLanguage.CSharp);
			TreeViewVarNode node = new TreeViewVarNode(this.debuggedProcess, this.watchList, text);
			watches.Add(text);
			watchList.Root.Children.Add(node);
			watchList.EndUpdate();
			
			node.IsSelected = true;
			
			this.RefreshPad();
		}
Esempio n. 3
0
		void watchList_DoubleClick(object sender, MouseEventArgs e)
		{
			if (watchList.SelectedNode == null)
			{
				watchList.BeginUpdate();
				TextNode text = new TextNode("", SupportedLanguage.CSharp);
				TreeViewVarNode node = new TreeViewVarNode(this.debuggedProcess, this.watchList, text);
				watches.Add(text);
				watchList.Root.Children.Add(node);
				watchList.EndUpdate();
				
				node.IsSelected = true;
				
				this.RefreshPad();
				
				foreach (NodeControlInfo nfo in watchList.GetNodeControls(node)) {
					if (nfo.Control is WatchItemName)
						((EditableControl)nfo.Control).MouseUp(new TreeNodeAdvMouseEventArgs(e));
				}
			}
		}