Example #1
0
	private void LinkTable(Reporter.ReportCollector hardReport, LinkReportResponse link, string image)
    {
		
        
        #line default
        #line hidden
        
        #line 402 "C:\Users\User\Documents\Visual Studio 2013\Projects\TDS4\discussions\DiscSvc2\Reporting\Report.tt"
this.Write("\t\t\r\n\t\t<div class=\"link\" style=\"border-left-color:");

        
        #line default
        #line hidden
        
        #line 404 "C:\Users\User\Documents\Visual Studio 2013\Projects\TDS4\discussions\DiscSvc2\Reporting\Report.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(Helpers.IntToHtml(link.initOwner.Color)));

        
        #line default
        #line hidden
        
        #line 404 "C:\Users\User\Documents\Visual Studio 2013\Projects\TDS4\discussions\DiscSvc2\Reporting\Report.tt"
this.Write("\">\r\n\t\t\t<div class=\"boldCaption\">\r\n\t\t\t\t");

        
        #line default
        #line hidden
        
        #line 406 "C:\Users\User\Documents\Visual Studio 2013\Projects\TDS4\discussions\DiscSvc2\Reporting\Report.tt"

				if (string.IsNullOrEmpty(link.Caption))
				{   
        
        #line default
        #line hidden
        
        #line 408 "C:\Users\User\Documents\Visual Studio 2013\Projects\TDS4\discussions\DiscSvc2\Reporting\Report.tt"
this.Write("\t\t\t\t\tLink\r\n\t\t\t\t");

        
        #line default
        #line hidden
        
        #line 410 "C:\Users\User\Documents\Visual Studio 2013\Projects\TDS4\discussions\DiscSvc2\Reporting\Report.tt"
}
				else
				{
        
        #line default
        #line hidden
        
        #line 412 "C:\Users\User\Documents\Visual Studio 2013\Projects\TDS4\discussions\DiscSvc2\Reporting\Report.tt"
this.Write("\t\t\t\t\t");

        
        #line default
        #line hidden
        
        #line 413 "C:\Users\User\Documents\Visual Studio 2013\Projects\TDS4\discussions\DiscSvc2\Reporting\Report.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(string.Format("Link \"{0}\"", link.Caption)));

        
        #line default
        #line hidden
        
        #line 413 "C:\Users\User\Documents\Visual Studio 2013\Projects\TDS4\discussions\DiscSvc2\Reporting\Report.tt"
this.Write(" \r\n\t\t\t\t");

        
        #line default
        #line hidden
        
        #line 414 "C:\Users\User\Documents\Visual Studio 2013\Projects\TDS4\discussions\DiscSvc2\Reporting\Report.tt"
}
        
        #line default
        #line hidden
        
        #line 414 "C:\Users\User\Documents\Visual Studio 2013\Projects\TDS4\discussions\DiscSvc2\Reporting\Report.tt"
this.Write("\t\t\t</div>\r\n\t\t\r\n\t\t\t<table>\r\n\t\t\t\t");

        
        #line default
        #line hidden
        
        #line 418 "C:\Users\User\Documents\Visual Studio 2013\Projects\TDS4\discussions\DiscSvc2\Reporting\Report.tt"


			    if (link.EndpointArgPoint1)
					EmitCommentOrArgPointLine(link.ArgPoint1.Person, Helpers.ArgPointToStr(link.ArgPoint1), 
											 new DiscLink{Id=link.ArgPoint1.Id, LinkObject=LinkObject.ArgPoint, EmitType=EmitType.Ref});			
				else
                {
					var idOfCluster = link.IdOfCluster1;
					var cluster = hardReport.ClusterReports.Single(c=>c.clusterId==idOfCluster);
					EmitCommentOrArgPointLine(cluster.initialOwner, strClusterTableLine(link.ClusterCaption1, link.IdOfCluster1), 
												new DiscLink{Id=link.IdOfCluster1, LinkObject=LinkObject.Cluster, EmitType=EmitType.Ref});
                }
				
			    if (link.EndpointArgPoint2)
					EmitCommentOrArgPointLine(link.ArgPoint2.Person, Helpers.ArgPointToStr(link.ArgPoint2),
										     new DiscLink{Id=link.ArgPoint2.Id, LinkObject=LinkObject.ArgPoint, EmitType=EmitType.Ref});			
				else
                {
					var idOfCluster = link.IdOfCluster2;
					var cluster = hardReport.ClusterReports.Single(c=>c.clusterId==idOfCluster);
					EmitCommentOrArgPointLine(cluster.initialOwner, strClusterTableLine(link.ClusterCaption2, link.IdOfCluster2),
											 new DiscLink{Id=link.IdOfCluster2, LinkObject=LinkObject.Cluster, EmitType=EmitType.Ref});				
                }
				
        
        #line default
        #line hidden
        
        #line 441 "C:\Users\User\Documents\Visual Studio 2013\Projects\TDS4\discussions\DiscSvc2\Reporting\Report.tt"
this.Write("\t\t\t</table>\r\n\t\t</div> \r\n\t\t");

        
        #line default
        #line hidden
        
        #line 444 "C:\Users\User\Documents\Visual Studio 2013\Projects\TDS4\discussions\DiscSvc2\Reporting\Report.tt"

    }
Example #2
0
        private void linkStatsResponse(LinkReportResponse resp, bool ok)
        {
            if (!ok)
            {
                ++_linkReportsGenerated;
                if (ClustersAndLinksDone())
                    finalizeReport();
                return;
            }

            if (resp.EndpointArgPoint1)
                resp.ArgPoint1 = _ctx.ArgPoint.FirstOrDefault(ap0 => ap0.Id == resp.ArgPointId1);

            if (resp.EndpointArgPoint2)
                resp.ArgPoint2 = _ctx.ArgPoint.FirstOrDefault(ap0 => ap0.Id == resp.ArgPointId2);

            var topic = _ctx.Topic.FirstOrDefault(t0 => t0.Id == resp.topicId);
            resp.initOwner = _ctx.Person.FirstOrDefault(p0 => p0.Id == resp.initialOwner);
            _linkReports.Add(resp);

            ++_linkReportsGenerated;
            if (ClustersAndLinksDone())
                finalizeReport();
        }
Example #3
0
        private TreeViewItem GetLink(LinkReportResponse report, ReportCollector collector)
        {
            var res = new TreeViewItem();
            res.Header = GetHeader(report.initOwner, " - link");
            var endpoints = WrapNode("Endpoints");

            if (report.EndpointArgPoint1)
                endpoints.Items.Add(GetPointReport(report.ArgPoint1));
            else
                endpoints.Items.Add(
                    GetCluster(collector.ClusterReports.FirstOrDefault(c0 => c0.clusterId == report.IdOfCluster1)));

            if (report.EndpointArgPoint2)
                endpoints.Items.Add(GetPointReport(report.ArgPoint2));
            else
                endpoints.Items.Add(
                    GetCluster(collector.ClusterReports.FirstOrDefault(c0 => c0.clusterId == report.IdOfCluster2)));

            res.Items.Add(endpoints);

            return res;
        }
Example #4
0
        private void LinkTable(Section s, LinkReportResponse link, byte[] image)
        {
            var t = s.AddTable().TableDefaults();
            t.AddColumn(ContentWidth());

            var hdrRow = t.AddRow();
            hdrRow.Cells[0].Shading.Color = link.initOwner.PersonToColor();
            hdrRow.Cells[0].AddParagraph().AddBold("Link");

            if (!string.IsNullOrEmpty(link.Caption))
            {
                var r = t.AddRow();
                r.Cells[0].Shading.Color = link.initOwner.PersonToColor();
                r.Cells[0].AddParagraph(string.Format("Link \"{0}\"", link.Caption));
            }

            if (link.EndpointArgPoint1)
                ArgPointTableLine(t, link.ArgPoint1, true);
            else
                ClusterTableLine(t, link.ClusterCaption1, link.IdOfCluster1, true, null);

            if (link.EndpointArgPoint2)
                ArgPointTableLine(t, link.ArgPoint2, true);
            else
                ClusterTableLine(t, link.ClusterCaption2, link.IdOfCluster2, true, null);

            //AddLinkOrClusterImg(s, pathname);           
        }