Exemplo n.º 1
0
        public void Initialize()
        {
            Header.LabelCount.Text         = ByInstances ? "Events" : "Volume";
            Header.LabelCount.FontWeight   = FontWeights.Bold;
            Header.LabelPercent.Text       = "Percent";
            Header.LabelPercent.FontWeight = FontWeights.Bold;

            IEnumerable <FixtureSummary> sorted;

            if (ByInstances)
            {
                sorted = Enumerable.OrderByDescending(Analysis.FixtureSummaries.Values, n => n.Count);
            }
            else
            {
                sorted = Enumerable.OrderByDescending(Analysis.FixtureSummaries.Values, n => n.Volume);
            }

            foreach (FixtureSummary fixtureSummary in sorted)
            {
                if (fixtureSummary.Count > 0)
                {
                    var fixtureSummaryReportDetail = new FixtureSummaryReportRow();
                    fixtureSummaryReportDetail.FixtureSummary = fixtureSummary;
                    fixtureSummaryReportDetail.ByInstances    = ByInstances;
                    StackPanel.Children.Add(fixtureSummaryReportDetail);
                    fixtureSummaryReportDetail.Initialize();
                }
            }
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.StackPanel = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 2:
                this.Header = ((TraceWizard.TwApp.FixtureSummaryReportRow)(target));
                return;
            }
            this._contentLoaded = true;
        }