Ejemplo n.º 1
0
 public PluginControl(System.Windows.Forms.Control control, string heading)
 {
     this.Control      = control;
     this.Heading      = heading;
     this.OutputPanel  = new LINQPad.OutputPanel(this);
     control.Disposed += new EventHandler(this.control_Disposed);
 }
Ejemplo n.º 2
0
 public PluginControl(System.Windows.Forms.Control control, string heading)
 {
     this.Control = control;
     this.Heading = heading;
     this.OutputPanel = new LINQPad.OutputPanel(this);
     control.Disposed += new EventHandler(this.control_Disposed);
 }
Ejemplo n.º 3
0
 public static bool Dump(object block, string heading)
 {
     if (block == null)
     {
         return(false);
     }
     if (string.IsNullOrEmpty(heading))
     {
         heading = block.GetType().FormatTypeName();
     }
     try
     {
         BlockWatcher watcher = new BlockWatcher(block, heading);
         OutputPanel  panel   = PanelManager.StackWpfElement(watcher, "Dataflow");
         panel.QueryEnded += delegate(object sender, EventArgs e) {
             if (panel.IsQueryCanceled)
             {
                 watcher.Cancel();
             }
         };
         panel.PanelClosed += delegate(object sender, EventArgs e) {
             watcher.Cancel();
         };
         return(true);
     }
     catch (Exception exception)
     {
         Log.Write(exception, "Dataflow Dump");
         return(false);
     }
 }
Ejemplo n.º 4
0
        public static OutputPanel StackWpfElement(UIElement e, string panelTitle)
        {
            ScrollableStackContainer wpfElement;

            if (string.IsNullOrEmpty(panelTitle))
            {
                panelTitle = "&Custom";
            }
            OutputPanel panel = GetOutputPanels(panelTitle).FirstOrDefault <OutputPanel>(c => c.GetWpfElement() is ScrollableStackContainer);

            if (panel == null)
            {
                wpfElement = new ScrollableStackContainer();
                panel      = DisplayWpfElement(wpfElement, panelTitle);
            }
            else
            {
                wpfElement = (ScrollableStackContainer)panel.GetWpfElement();
            }
            wpfElement.AddChild(e);
            return(panel);
        }