Пример #1
0
        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
        private void InitForm()
        {
            Controls.Clear();
            if (controlCollection != null)
            {
                controlCollection.Controls.Clear();
            }
            InitializeComponent();
            defaultFont = new Font(new FontFamily("Tahoma"), 8);

            DiffTreeListView treeView = new DiffTreeListView(this);

            treeView.Dock = DockStyle.Fill;
            treeView.Font = defaultFont;

            SortingBehaviour sort      = new SortingBehaviour();
            SortingBehaviour highlight = new SortingBehaviour();

            sort.sortingOrder   = highlight.sortingOrder = -1;
            sort.counterId      = -1;
            highlight.counterId = 2;

            /* add columns */
            treeView.AddColumn(new ColumnInformation(-1, "Function name", ColumnInformation.ColumnTypes.Tree), 250);
            foreach (int counter in DiffStatistics.DefaultCounters)
            {
                AddColumn(treeView, counter);
            }

            treeView.ColumnClick += new EventHandler(SortOn);

            treeView.TokenObject = new ViewState(sort, highlight);
            treeView.Root        = Root;


            treeView.Size    = new System.Drawing.Size(332, 108);
            treeView.Visible = true;
            controlCollection.Controls.Add(treeView);
            SetcallTreeView();
            this.Visible = true;
        }
Пример #3
0
        private void SetcallTreeView()
        {
            foreach (Control c in controlCollection.Controls)
            {
                DiffTreeListView v = null;
                try
                {
                    v = (DiffTreeListView)c;
                }
                catch
                {
                    /* not interested in exceptions */
                }

                if (v != null)
                {
                    diffCallTreeView = v;
                    viewState        = (ViewState)v.TokenObject;
                    return;
                }
            }
            Debug.Fail("Cannot find tree view on the tab page");
        }
Пример #4
0
        public DiffCallTreeForm([NotNull] TreeNodeBase root, [NotNull] AllocationDiff allocDiff)
        {
            this.Root       = root;
            this._allocDiff = allocDiff;

            Controls.Clear();
            controlCollection?.Controls.Clear();
            InitializeComponent();
            defaultFont = new Font(new FontFamily("Tahoma"), 8);

            var treeView = new DiffTreeListView(this);

            treeView.Dock = DockStyle.Fill;
            treeView.Font = defaultFont;

            var sort      = new SortingBehaviour(sortingOrder: -1, counterId: -1);
            var highlight = new SortingBehaviour(sortingOrder: -1, counterId: 2);

            /* add columns */
            treeView.AddColumn(new ColumnInformation(-1, "Function name", ColumnInformation.ColumnTypes.Tree), 250);
            foreach (int counter in DiffStatistics.DefaultCounters)
            {
                AddColumn(treeView, counter);
            }

            treeView.ColumnClick += new EventHandler(SortOn);

            treeView.ViewState = new ViewState(sort, highlight);
            treeView.Root      = Root;


            treeView.Size    = new System.Drawing.Size(332, 108);
            treeView.Visible = true;
            controlCollection.Controls.Add(treeView);
            SetcallTreeView();
            this.Visible = true;
        }
Пример #5
0
		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;
		}
Пример #6
0
		private void InitForm()
		{
			Controls.Clear();
			if (controlCollection != null)
			{
				controlCollection.Controls.Clear();
			}
			InitializeComponent();
			defaultFont = new Font(new FontFamily("Tahoma"), 8);
			
			DiffTreeListView treeView = new DiffTreeListView(this);
			treeView.Dock = DockStyle.Fill;
			treeView.Font = defaultFont;

			SortingBehaviour sort = new SortingBehaviour();
			SortingBehaviour highlight = new SortingBehaviour();
			sort.sortingOrder = highlight.sortingOrder = -1;
			sort.counterId = -1;
			highlight.counterId = 2;

			/* add columns */
			treeView.AddColumn(new ColumnInformation(-1, "Function name", ColumnInformation.ColumnTypes.Tree), 250);
			foreach(int counter in DiffStatistics.DefaultCounters)
			{
				AddColumn(treeView, counter);
			}

			treeView.ColumnClick += new EventHandler(SortOn);
			
			treeView.TokenObject = new ViewState(sort, highlight);
			treeView.Root = Root;
			
			
			treeView.Size = new System.Drawing.Size(332, 108);
			treeView.Visible = true;
			controlCollection.Controls.Add(treeView);
			SetcallTreeView();
			this.Visible = true;
		}