示例#1
0
        internal DiffTreeListView(IDiffTreeOwner in_treeOwner)
        {
            // This call is required by the Windows.Forms Form Designer.
            InitializeComponent();

            treeOwner = in_treeOwner;

            hoverPopup        = new PlacedToolTip();
            hoverPopup.Parent = FindForm();

            treeListBox                       = new ListBox();
            treeListBox.Parent                = this;
            treeListBox.BorderStyle           = System.Windows.Forms.BorderStyle.None;
            treeListBox.DrawMode              = System.Windows.Forms.DrawMode.OwnerDrawFixed;
            treeListBox.IntegralHeight        = false;
            treeListBox.Name                  = "treeListBox";
            treeListBox.KeyDown              += new System.Windows.Forms.KeyEventHandler(this.treeListBox_KeyDown);
            treeListBox.MouseDown            += new System.Windows.Forms.MouseEventHandler(this.treeListBox_MouseDown);
            treeListBox.MouseMove            += new System.Windows.Forms.MouseEventHandler(this.treeListBox_MouseMove);
            treeListBox.DoubleClick          += new System.EventHandler(this.treeListBox_DoubleClick);
            treeListBox.DrawItem             += new System.Windows.Forms.DrawItemEventHandler(this.treeListBox_DrawItem);
            treeListBox.SelectedIndexChanged += new System.EventHandler(this.treeListBox_SelectedIndexChanged);

            columns = new ArrayList();

            // must be created before calling `AddColumn`
            resizeBar         = new DiffResizeBarCapture(columns);
            resizeBar.Visible = false;
            resizeBar.Parent  = this;

            leftEdge = 0;

            OnResize(null);

            // log = new StreamWriter("test.log");

            // Create a blank context menu.  We'll fill it in when the user right clicks
            ContextMenu contextMenu = new ContextMenu();

            ContextMenu = contextMenu;
        }
		internal DiffTreeListView(IDiffTreeOwner in_treeOwner)
		{
			// This call is required by the Windows.Forms Form Designer.
			InitializeComponent();

			treeOwner = in_treeOwner;

			hoverPopup = new PlacedToolTip();
			hoverPopup.Parent = FindForm();

			treeListBox = new ListBox();
			treeListBox.Parent = this;
			treeListBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
			treeListBox.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
			treeListBox.IntegralHeight = false;
			treeListBox.Name = "treeListBox";
			treeListBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.treeListBox_KeyDown);
			treeListBox.MouseDown += new System.Windows.Forms.MouseEventHandler(this.treeListBox_MouseDown);
			treeListBox.MouseMove += new System.Windows.Forms.MouseEventHandler(this.treeListBox_MouseMove);
			treeListBox.DoubleClick += new System.EventHandler(this.treeListBox_DoubleClick);
			treeListBox.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.treeListBox_DrawItem);
			treeListBox.SelectedIndexChanged += new System.EventHandler(this.treeListBox_SelectedIndexChanged);

			columns = new ArrayList();

			// must be created before calling `AddColumn`
			resizeBar = new DiffResizeBarCapture(columns);
			resizeBar.Visible = false;
			resizeBar.Parent = this;

			leftEdge = 0;

			OnResize(null);

			// log = new StreamWriter("test.log");

			// Create a blank context menu.  We'll fill it in when the user right clicks
			ContextMenu contextMenu = new ContextMenu();
			ContextMenu = contextMenu;
		}