예제 #1
0
        private void clusterStatsResponse(ClusterStatsResponse resp, bool ok)
        {
            if (!ok)
            {
                ++_clusterReportsGenerated;
                if (ClustersAndLinksDone())
                {
                    finalizeReport();
                }
                return;
            }

            //generate list of ArgPoints
            var argPoints = new ArgPoint[resp.points.Length];

            for (int i = 0; i < resp.points.Length; i++)
            {
                var pointId = resp.points[i];
                argPoints[i] = _ctx.ArgPoint.FirstOrDefault(ap0 => ap0.Id == pointId);
            }

            var topic        = _ctx.Topic.FirstOrDefault(t0 => t0.Id == resp.topicId);
            var initialOwner = _ctx.Person.FirstOrDefault(p0 => p0.Id == resp.initialOwnerId);
            var report       = new ClusterReport(topic, resp.clusterId, resp.clusterShId, resp.clusterTextTitle, argPoints,
                                                 initialOwner);

            _clusterReports.Add(report);

            ++_clusterReportsGenerated;
            if (ClustersAndLinksDone())
            {
                finalizeReport();
            }
        }
예제 #2
0
        private TreeViewItem GetCluster(ClusterReport report)
        {
            var res = new TreeViewItem();

            res.Header = GetHeader(report.initialOwner, " - cluster " + report.clusterTitle);

            var argPoints = WrapNode("Arg. points");

            foreach (var ap in report.points)
            {
                argPoints.Items.Add(GetPointReport(ap));
            }

            res.Items.Add(argPoints);

            return(res);
        }
예제 #3
0
        private TreeViewItem GetCluster(ClusterReport report)
        {
            var res = new TreeViewItem();
            res.Header = GetHeader(report.initialOwner, " - cluster " + report.clusterTitle);

            var argPoints = WrapNode("Arg. points");
            foreach (var ap in report.points)
                argPoints.Items.Add(GetPointReport(ap));

            res.Items.Add(argPoints);

            return res;
        }
예제 #4
0
        private void clusterStatsResponse(ClusterStatsResponse resp, bool ok)
        {
            if (!ok)
            {
                ++_clusterReportsGenerated;
                if (ClustersAndLinksDone())
                    finalizeReport();
                return;
            }

            //generate list of ArgPoints
            var argPoints = new ArgPoint[resp.points.Length];
            for (int i = 0; i < resp.points.Length; i++)
            {
                var pointId = resp.points[i];
                argPoints[i] = _ctx.ArgPoint.FirstOrDefault(ap0 => ap0.Id == pointId);
            }

            var topic = _ctx.Topic.FirstOrDefault(t0 => t0.Id == resp.topicId);
            var initialOwner = _ctx.Person.FirstOrDefault(p0 => p0.Id == resp.initialOwnerId);
            var report = new ClusterReport(topic, resp.clusterId, resp.clusterShId, resp.clusterTextTitle, argPoints,
                                           initialOwner);
            _clusterReports.Add(report);

            ++_clusterReportsGenerated;
            if (ClustersAndLinksDone())
                finalizeReport();
        }