Beispiel #1
0
        private void OnWindowTreeAfterSelect(object sender, TreeViewEventArgs e)
        {
            IntPtr hwnd = NativeMethods.GetWindow(this.PropertiesViewContainer.Handle, (int)GetWindowCmd.GW_CHILD);
            if (hwnd != IntPtr.Zero)
            {
                NativeMethods.SendMessage(hwnd, NativeMethods.WM_CLOSEVIEW, IntPtr.Zero, IntPtr.Zero);
            }

            if (e.Node.Tag != null)
            {
                PropertyGridEx grid = new PropertyGridEx();
                grid.Dock = DockStyle.Fill;
                this.PropertiesViewContainer.Controls.Clear();
                this.PropertiesViewContainer.Controls.Add(grid);

                grid.SelectedObject = e.Node.Tag;
            }
            else
            {
                SypHookHelper.Hook((e.Node as WindowTreeNode).Hwnd, this.PropertiesViewContainer.Handle);
            }
        }
 /// <summary> 
 /// Required method for Designer support - do not modify 
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WindowPropertiesView));
     this.propertyGrid = new DotNetSpy.PropertyGridEx();
     this.tabControl = new System.Windows.Forms.TabControl();
     this.tpgProperty = new System.Windows.Forms.TabPage();
     this.tpgEvent = new System.Windows.Forms.TabPage();
     this.splitContainer3 = new System.Windows.Forms.SplitContainer();
     this.tvwEvent = new System.Windows.Forms.TreeView();
     this.il = new System.Windows.Forms.ImageList(this.components);
     this.splitContainer4 = new System.Windows.Forms.SplitContainer();
     this.tvwFiredEvent = new System.Windows.Forms.TreeView();
     this.ppgEventArgs = new System.Windows.Forms.PropertyGrid();
     this.tabControl.SuspendLayout();
     this.tpgProperty.SuspendLayout();
     this.tpgEvent.SuspendLayout();
     this.splitContainer3.Panel1.SuspendLayout();
     this.splitContainer3.Panel2.SuspendLayout();
     this.splitContainer3.SuspendLayout();
     this.splitContainer4.Panel1.SuspendLayout();
     this.splitContainer4.Panel2.SuspendLayout();
     this.splitContainer4.SuspendLayout();
     this.SuspendLayout();
     //
     // propertyGrid
     //
     this.propertyGrid.Dock = System.Windows.Forms.DockStyle.Fill;
     this.propertyGrid.LineColor = System.Drawing.SystemColors.ScrollBar;
     this.propertyGrid.Location = new System.Drawing.Point(3, 3);
     this.propertyGrid.Name = "propertyGrid";
     this.propertyGrid.PropertySort = System.Windows.Forms.PropertySort.Alphabetical;
     this.propertyGrid.Size = new System.Drawing.Size(266, 351);
     this.propertyGrid.TabIndex = 0;
     //
     // tabControl
     //
     this.tabControl.Controls.Add(this.tpgProperty);
     this.tabControl.Controls.Add(this.tpgEvent);
     this.tabControl.Dock = System.Windows.Forms.DockStyle.Fill;
     this.tabControl.HotTrack = true;
     this.tabControl.ImageList = this.il;
     this.tabControl.Location = new System.Drawing.Point(0, 0);
     this.tabControl.Name = "tabControl";
     this.tabControl.SelectedIndex = 0;
     this.tabControl.Size = new System.Drawing.Size(280, 384);
     this.tabControl.TabIndex = 1;
     //
     // tpgProperty
     //
     this.tpgProperty.Controls.Add(this.propertyGrid);
     this.tpgProperty.ImageIndex = 0;
     this.tpgProperty.Location = new System.Drawing.Point(4, 23);
     this.tpgProperty.Name = "tpgProperty";
     this.tpgProperty.Padding = new System.Windows.Forms.Padding(3);
     this.tpgProperty.Size = new System.Drawing.Size(272, 357);
     this.tpgProperty.TabIndex = 0;
     this.tpgProperty.Text = "Properties";
     this.tpgProperty.UseVisualStyleBackColor = true;
     //
     // tpgEvent
     //
     this.tpgEvent.Controls.Add(this.splitContainer3);
     this.tpgEvent.ImageIndex = 2;
     this.tpgEvent.Location = new System.Drawing.Point(4, 23);
     this.tpgEvent.Name = "tpgEvent";
     this.tpgEvent.Padding = new System.Windows.Forms.Padding(3);
     this.tpgEvent.Size = new System.Drawing.Size(272, 357);
     this.tpgEvent.TabIndex = 1;
     this.tpgEvent.Text = "Events";
     this.tpgEvent.UseVisualStyleBackColor = true;
     //
     // splitContainer3
     //
     this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill;
     this.splitContainer3.Location = new System.Drawing.Point(3, 3);
     this.splitContainer3.Name = "splitContainer3";
     //
     // splitContainer3.Panel1
     //
     this.splitContainer3.Panel1.Controls.Add(this.tvwEvent);
     //
     // splitContainer3.Panel2
     //
     this.splitContainer3.Panel2.Controls.Add(this.splitContainer4);
     this.splitContainer3.Size = new System.Drawing.Size(266, 351);
     this.splitContainer3.SplitterDistance = 144;
     this.splitContainer3.TabIndex = 12;
     this.splitContainer3.Text = "splitContainer3";
     //
     // tvwEvent
     //
     this.tvwEvent.CheckBoxes = true;
     this.tvwEvent.Dock = System.Windows.Forms.DockStyle.Fill;
     this.tvwEvent.ImageIndex = 2;
     this.tvwEvent.ImageList = this.il;
     this.tvwEvent.Location = new System.Drawing.Point(0, 0);
     this.tvwEvent.Name = "tvwEvent";
     this.tvwEvent.SelectedImageIndex = 2;
     this.tvwEvent.Size = new System.Drawing.Size(144, 351);
     this.tvwEvent.TabIndex = 1;
     this.tvwEvent.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.OnTvwEventAfterCheck);
     //
     // il
     //
     this.il.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("il.ImageStream")));
     this.il.TransparentColor = System.Drawing.Color.Transparent;
     this.il.Images.SetKeyName(0, "");
     this.il.Images.SetKeyName(1, "");
     this.il.Images.SetKeyName(2, "");
     this.il.Images.SetKeyName(3, "");
     this.il.Images.SetKeyName(4, "");
     this.il.Images.SetKeyName(5, "LegendHS.png");
     this.il.Images.SetKeyName(6, "DisplayInColorHS.png");
     this.il.Images.SetKeyName(7, "HtmlBalanceBracesHS.png");
     //
     // splitContainer4
     //
     this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill;
     this.splitContainer4.Location = new System.Drawing.Point(0, 0);
     this.splitContainer4.Name = "splitContainer4";
     this.splitContainer4.Orientation = System.Windows.Forms.Orientation.Horizontal;
     //
     // splitContainer4.Panel1
     //
     this.splitContainer4.Panel1.Controls.Add(this.tvwFiredEvent);
     //
     // splitContainer4.Panel2
     //
     this.splitContainer4.Panel2.Controls.Add(this.ppgEventArgs);
     this.splitContainer4.Size = new System.Drawing.Size(118, 351);
     this.splitContainer4.SplitterDistance = 173;
     this.splitContainer4.TabIndex = 0;
     this.splitContainer4.Text = "splitContainer4";
     //
     // tvwFiredEvent
     //
     this.tvwFiredEvent.Dock = System.Windows.Forms.DockStyle.Fill;
     this.tvwFiredEvent.ImageIndex = 0;
     this.tvwFiredEvent.ImageList = this.il;
     this.tvwFiredEvent.Location = new System.Drawing.Point(0, 0);
     this.tvwFiredEvent.Name = "tvwFiredEvent";
     this.tvwFiredEvent.SelectedImageIndex = 0;
     this.tvwFiredEvent.Size = new System.Drawing.Size(118, 173);
     this.tvwFiredEvent.TabIndex = 2;
     this.tvwFiredEvent.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.OnTvwFiredEventAfterSelect);
     this.tvwFiredEvent.KeyDown += new System.Windows.Forms.KeyEventHandler(this.OnTvwFiredEventKeyDown);
     //
     // ppgEventArgs
     //
     this.ppgEventArgs.Dock = System.Windows.Forms.DockStyle.Fill;
     this.ppgEventArgs.HelpVisible = false;
     this.ppgEventArgs.LineColor = System.Drawing.SystemColors.ScrollBar;
     this.ppgEventArgs.Location = new System.Drawing.Point(0, 0);
     this.ppgEventArgs.Name = "ppgEventArgs";
     this.ppgEventArgs.PropertySort = System.Windows.Forms.PropertySort.Alphabetical;
     this.ppgEventArgs.Size = new System.Drawing.Size(118, 174);
     this.ppgEventArgs.TabIndex = 3;
     this.ppgEventArgs.ToolbarVisible = false;
     //
     // WindowPropertiesView
     //
     this.Controls.Add(this.tabControl);
     this.Name = "WindowPropertiesView";
     this.Size = new System.Drawing.Size(280, 384);
     this.tabControl.ResumeLayout(false);
     this.tpgProperty.ResumeLayout(false);
     this.tpgEvent.ResumeLayout(false);
     this.splitContainer3.Panel1.ResumeLayout(false);
     this.splitContainer3.Panel2.ResumeLayout(false);
     this.splitContainer3.ResumeLayout(false);
     this.splitContainer4.Panel1.ResumeLayout(false);
     this.splitContainer4.Panel2.ResumeLayout(false);
     this.splitContainer4.ResumeLayout(false);
     this.ResumeLayout(false);
 }