private DiffColumn AddColumn(DiffTreeListView treeView, int counterId)
        {
            DiffColumn c = treeView.AddColumn(new ColumnInformation(counterId,
                                                                    DiffStatistics.GetCounterName(counterId),
                                                                    ColumnInformation.ColumnTypes.String),
                                              60);

            if (DiffStatistics.IsInclusive(counterId))
            {
                c.Font = new Font(c.Font, FontStyle.Bold);
            }
            return(c);
        }
示例#2
0
        override protected void OnMouseMove(MouseEventArgs e)
        {
            if (track != -1)
            {
                DiffColumn left = (DiffColumn)columns[track];

                int ll = left.Left;
                if (e.X < ll + 15)
                {
                    return;
                }
                left.Width = e.X - left.Left;

                ((DiffTreeListView)Parent).RepaintTreeView();
            }
        }
示例#3
0
        internal DiffColumn AddColumn(ColumnInformation ci, int defaultWidth)
        {
            DiffColumn c = new DiffColumn(ci, resizeBar, columns);

            c.Width     = defaultWidth;
            c.Parent    = this;
            c.TextAlign = ContentAlignment.MiddleLeft;
            c.Click    += new EventHandler(DiffColumn_Click);
            c.Font      = Font;
            columns.Add(c);

            RedoColumnLayout();

            treeListBox.SuspendLayout();
            treeListBox.Location = new Point(0, c.Height);
            treeListBox.Size     = new Size(ClientSize.Width, ClientSize.Height - c.Height);
            treeListBox.ResumeLayout();

            return(c);
        }
示例#4
0
        void RedoColumnLayout()
        {
            int position = -leftEdge;
            int height   = Font.Height + 5;

            for (IEnumerator e = columns.GetEnumerator(); e.MoveNext();)
            {
                DiffColumn current = (DiffColumn)e.Current;
                current.SuspendLayout();
                current.Location = new Point(position, 0);
                if (height > 0)
                {
                    current.Height = height;
                }
                current.ResumeLayout();
                position += current.Width;
            }

            position += leftEdge;
            treeListBox.HorizontalScrollbar = (position > treeListBox.ClientSize.Width);
            treeListBox.HorizontalExtent    = position;
        }
		internal DiffColumn AddColumn(ColumnInformation ci, int defaultWidth)
		{
			DiffColumn c = new DiffColumn(ci, resizeBar, columns);

			c.Width = defaultWidth;
			c.Parent = this;
			c.TextAlign = ContentAlignment.MiddleLeft;
			c.Click += new EventHandler(DiffColumn_Click);
			c.Font = Font;
			columns.Add(c);

			RedoColumnLayout();

			treeListBox.SuspendLayout();
			treeListBox.Location = new Point(0, c.Height);
			treeListBox.Size = new Size(ClientSize.Width, ClientSize.Height - c.Height);
			treeListBox.ResumeLayout();

			return c;
		}