本文整理汇总了C#中MonoDevelop.Debugger.PinnedWatch类的典型用法代码示例。如果您正苦于以下问题:C# PinnedWatch类的具体用法?C# PinnedWatch怎么用?C# PinnedWatch使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PinnedWatch类属于MonoDevelop.Debugger命名空间,在下文中一共展示了PinnedWatch类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PinnedWatchWidget
public PinnedWatchWidget (TextEditor editor, PinnedWatch watch)
{
objectValue = watch.Value;
Editor = editor;
Watch = watch;
valueTree = new ObjectValueTreeView ();
valueTree.AllowAdding = false;
valueTree.AllowEditing = true;
valueTree.AllowPinning = true;
valueTree.HeadersVisible = false;
valueTree.CompactView = true;
valueTree.PinnedWatch = watch;
if (objectValue != null)
valueTree.AddValue (objectValue);
valueTree.ButtonPressEvent += HandleValueTreeButtonPressEvent;
valueTree.ButtonReleaseEvent += HandleValueTreeButtonReleaseEvent;
valueTree.MotionNotifyEvent += HandleValueTreeMotionNotifyEvent;
Gtk.Frame fr = new Gtk.Frame ();
fr.ShadowType = Gtk.ShadowType.Out;
fr.Add (valueTree);
Add (fr);
HandleEditorOptionsChanged (null, null);
ShowAll ();
//unpin.Hide ();
Editor.EditorOptionsChanged += HandleEditorOptionsChanged;
DebuggingService.PausedEvent += HandleDebuggingServicePausedEvent;
DebuggingService.ResumedEvent += HandleDebuggingServiceResumedEvent;
}
示例2: DebugValueWindow
// PinWindow pinWindow;
// TreeIter currentPinIter;
public DebugValueWindow (Mono.TextEditor.TextEditor editor, int offset, StackFrame frame, ObjectValue value, PinnedWatch watch): base (Gtk.WindowType.Toplevel)
{
this.TypeHint = WindowTypeHint.PopupMenu;
this.AllowShrink = false;
this.AllowGrow = false;
this.Decorated = false;
TransientFor = (Gtk.Window) editor.Toplevel;
// Avoid getting the focus when the window is shown. We'll get it when the mouse enters the window
AcceptFocus = false;
sw = new ScrolledWindow ();
sw.HscrollbarPolicy = PolicyType.Never;
sw.VscrollbarPolicy = PolicyType.Never;
tree = new ObjectValueTreeView ();
sw.Add (tree);
ContentBox.Add (sw);
tree.Frame = frame;
tree.CompactView = true;
tree.AllowAdding = false;
tree.AllowEditing = true;
tree.HeadersVisible = false;
tree.AllowPinning = true;
tree.RootPinAlwaysVisible = true;
tree.PinnedWatch = watch;
DocumentLocation location = editor.Document.OffsetToLocation (offset);
tree.PinnedWatchLine = location.Line;
tree.PinnedWatchFile = ((ExtensibleTextEditor)editor).View.ContentName;
tree.AddValue (value);
tree.Selection.UnselectAll ();
tree.SizeAllocated += OnTreeSizeChanged;
tree.PinStatusChanged += delegate {
Destroy ();
};
// tree.MotionNotifyEvent += HandleTreeMotionNotifyEvent;
sw.ShowAll ();
// pinWindow = new PinWindow (this);
// pinWindow.SetPinned (false);
// pinWindow.ButtonPressEvent += HandlePinWindowButtonPressEvent;
tree.StartEditing += delegate {
Modal = true;
};
tree.EndEditing += delegate {
Modal = false;
};
ShowArrow = true;
Theme.CornerRadius = 3;
}
示例3: Remove
public void Remove (PinnedWatch watch)
{
lock (watches) {
if (watch.Store != this)
return;
watch.Store = null;
watches.Remove (watch);
}
OnWatchRemoved (watch);
OnChanged ();
}
示例4: Add
public void Add (PinnedWatch watch)
{
lock (watches) {
if (watch.Store != null)
throw new InvalidOperationException ("Watch already belongs to another store");
watch.Store = this;
watches.Add (watch);
}
OnWatchAdded (watch);
OnChanged ();
}
示例5: Bind
internal void Bind (PinnedWatch watch, Breakpoint be)
{
lock (watches) {
if (be == null) {
if (watch.BoundTracer != null)
liveWatches.Remove (watch.BoundTracer);
watch.LiveUpdate = false;
} else {
watch.BoundTracer = be;
liveWatches [be] = watch;
watch.LiveUpdate = true;
}
}
}
示例6: DebugValueWindow
public DebugValueWindow (TextEditor editor, int offset, StackFrame frame, ObjectValue value, PinnedWatch watch) : base (Gtk.WindowType.Toplevel)
{
this.TypeHint = WindowTypeHint.PopupMenu;
this.AllowShrink = false;
this.AllowGrow = false;
this.Decorated = false;
TransientFor = (Gtk.Window) ((Gtk.Widget)editor).Toplevel;
// Avoid getting the focus when the window is shown. We'll get it when the mouse enters the window
AcceptFocus = false;
sw = new ScrolledWindow ();
sw.HscrollbarPolicy = PolicyType.Never;
sw.VscrollbarPolicy = PolicyType.Never;
tree = new ObjectValueTreeView ();
sw.Add (tree);
ContentBox.Add (sw);
tree.Frame = frame;
tree.CompactView = true;
tree.AllowAdding = false;
tree.AllowEditing = true;
tree.HeadersVisible = false;
tree.AllowPinning = true;
tree.RootPinAlwaysVisible = true;
tree.PinnedWatch = watch;
var location = editor.OffsetToLocation (offset);
tree.PinnedWatchLine = location.Line;
tree.PinnedWatchFile = editor.FileName;
tree.AddValue (value);
tree.Selection.UnselectAll ();
tree.SizeAllocated += OnTreeSizeChanged;
tree.PinStatusChanged += OnPinStatusChanged;
sw.ShowAll ();
tree.StartEditing += OnStartEditing;
tree.EndEditing += OnEndEditing;
ShowArrow = true;
Theme.CornerRadius = 3;
}
示例7: DebugValueWindow
public DebugValueWindow (Mono.TextEditor.TextEditor editor, int offset, StackFrame frame, ObjectValue value, PinnedWatch watch)
{
TransientFor = (Gtk.Window) editor.Toplevel;
// Avoid getting the focus when the window is shown. We'll get it when the mouse enters the window
AcceptFocus = false;
sw = new ScrolledWindow ();
sw.HscrollbarPolicy = PolicyType.Never;
sw.VscrollbarPolicy = PolicyType.Never;
tree = new ObjectValueTreeView ();
sw.Add (tree);
Add (sw);
tree.Frame = frame;
tree.CompactView = true;
tree.AllowAdding = false;
tree.AllowEditing = true;
tree.HeadersVisible = false;
tree.AllowPinning = true;
tree.PinnedWatch = watch;
DocumentLocation location = editor.Document.OffsetToLocation (offset);
tree.PinnedWatchLine = location.Line + 1;
tree.PinnedWatchFile = ((ExtensibleTextEditor)editor).View.ContentName;
tree.AddValue (value);
tree.Selection.UnselectAll ();
tree.SizeAllocated += OnTreeSizeChanged;
tree.PinStatusChanged += delegate {
Destroy ();
};
sw.ShowAll ();
tree.StartEditing += delegate {
Modal = true;
};
tree.EndEditing += delegate {
Modal = false;
};
}
示例8: PinnedWatchWidget
public PinnedWatchWidget (TextEditor editor, PinnedWatch watch)
{
objectValue = watch.Value;
Editor = editor;
Watch = watch;
valueTree = new ObjectValueTreeView ();
valueTree.AllowAdding = false;
valueTree.AllowEditing = true;
valueTree.AllowPinning = true;
valueTree.HeadersVisible = false;
valueTree.CompactView = true;
valueTree.PinnedWatch = watch;
if (objectValue != null)
valueTree.AddValue (objectValue);
valueTree.ButtonPressEvent += HandleValueTreeButtonPressEvent;
valueTree.ButtonReleaseEvent += HandleValueTreeButtonReleaseEvent;
valueTree.MotionNotifyEvent += HandleValueTreeMotionNotifyEvent;
valueTree.SizeAllocated += OnTreeSizeChanged;
sw = new ScrolledWindow ();
sw.HscrollbarPolicy = PolicyType.Never;
sw.VscrollbarPolicy = PolicyType.Never;
sw.Add (valueTree);
Frame fr = new Frame ();
fr.ShadowType = ShadowType.Out;
fr.Add (sw);
Add (fr);
ShowAll ();
DebuggingService.PausedEvent += HandleDebuggingServicePausedEvent;
DebuggingService.ResumedEvent += HandleDebuggingServiceResumedEvent;
}
示例9: SetLiveUpdateMode
public static void SetLiveUpdateMode (PinnedWatch watch, bool liveUpdate)
{
if (watch.LiveUpdate == liveUpdate)
return;
watch.LiveUpdate = liveUpdate;
if (liveUpdate) {
Breakpoint bp = new Breakpoint (watch.File, watch.Line);
bp.TraceExpression = "{" + watch.Expression + "}";
bp.HitAction = HitAction.PrintExpression;
breakpoints.Add (bp);
pinnedWatches.Bind (watch, bp);
} else {
pinnedWatches.Bind (watch, null);
breakpoints.Remove (watch.BoundTracer);
}
}
示例10: AddWatch
void AddWatch (PinnedWatch w)
{
DocumentLine line = widget.TextEditor.Document.GetLine (w.Line);
if (line == null)
return;
PinnedWatchInfo wi = new PinnedWatchInfo ();
wi.Line = line;
if (w.OffsetX < 0) {
w.OffsetY = (int)widget.TextEditor.LineToY (w.Line);
int lw, lh;
widget.TextEditor.TextViewMargin.GetLayout (line).Layout.GetPixelSize (out lw, out lh);
w.OffsetX = (int)widget.TextEditor.TextViewMargin.XOffset + lw + 4;
}
wi.Widget = new PinnedWatchWidget (widget.TextEditorContainer, w);
// wi.Marker = new DebugValueMarker (widget.TextEditor, line, w);
wi.Watch = w;
pinnedWatches.Add (wi);
// if (w.Value != null)
// wi.Marker.AddValue (w.Value);
widget.TextEditorContainer.AddTopLevelWidget (wi.Widget, w.OffsetX, w.OffsetY);
// widget.TextEditor.QueueDraw ();
}
示例11: PinnedWatchEventArgs
public PinnedWatchEventArgs (PinnedWatch watch)
{
this.watch = watch;
}
示例12: NotifyWatchChanged
internal void NotifyWatchChanged (PinnedWatch watch)
{
OnWatchChanged (watch);
OnChanged ();
}
示例13: OnWatchChanged
void OnWatchChanged (PinnedWatch watch)
{
if (batchUpdate > 0) {
if (batchChanged == null)
batchChanged = new List<PinnedWatch> ();
if (!batchChanged.Contains (watch))
batchChanged.Add (watch);
return;
}
DispatchService.GuiDispatch (() => {
if (WatchChanged != null)
WatchChanged (this, new PinnedWatchEventArgs (watch));
});
}
示例14: OnWatchRemoved
void OnWatchRemoved (PinnedWatch watch)
{
if (batchUpdate > 0) {
if (batchRemoved == null)
batchRemoved = new List<PinnedWatch> ();
if (!batchRemoved.Contains (watch))
batchRemoved.Add (watch);
return;
}
if (WatchRemoved != null)
WatchRemoved (this, new PinnedWatchEventArgs (watch));
}
示例15: OnWatchChanged
void OnWatchChanged (PinnedWatch watch)
{
if (batchUpdate > 0) {
if (batchChanged == null)
batchChanged = new List<PinnedWatch> ();
if (!batchChanged.Contains (watch))
batchChanged.Add (watch);
return;
}
Runtime.RunInMainThread (() => {
if (WatchChanged != null)
WatchChanged (this, new PinnedWatchEventArgs (watch));
});
}