コード例 #1
0
		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();
			}
		}
コード例 #2
0
ファイル: WatchPad.cs プロジェクト: Bombadil77/SharpDevelop
		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();
		}
コード例 #3
0
ファイル: WatchPad.cs プロジェクト: Bombadil77/SharpDevelop
		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));
				}
			}
		}