Ejemplo n.º 1
0
 public CellProperty(ViewerResultGraph vqg)
 {
     InitializeComponent();
     InitializeLayout();
     CellProperTable cpt = new CellProperTable(vqg);
     FillData(cpt);
 }
 public CellProperTable(ViewerResultGraph vrg, List<string> propertyList = null)
 {
     m_PropertyNameList = new List<string>();
     if (propertyList != null)
     {
         m_PropertyNameList.AddRange(propertyList);
     }
     m_KeyValueTable = new Dictionary<string, List<string>>();
     Initial(vrg);
 }
 private void Initial(ViewerResultGraph vrg)
 {
     m_IDList = new List<int>();
     m_CellIDList = new List<long>();
     m_KeyValueTable.Add("ID", new List<string>());
     m_KeyValueTable.Add("CellID", new List<string>());
     m_KeyValueTable.Add("Label", new List<string>());
     List<ViewerResultNode> nodeList = vrg.GetSortedIDNodeList();
     for (int i = 0; i < nodeList.Count; ++i)
     {
         m_IDList.Add(nodeList[i].ID);
         m_CellIDList.Add(nodeList[i].MatchID);
         m_KeyValueTable["ID"].Add(nodeList[i].ID.ToString());
         m_KeyValueTable["CellID"].Add(nodeList[i].MatchID.ToString());
         m_KeyValueTable["Label"].Add(nodeList[i].Label);
     }
     m_Row = m_IDList.Count;
     m_Col = m_KeyValueTable.Keys.Count;
 }
Ejemplo n.º 4
0
 private void ConstructAllResultGraph(ISubGraphViewerDrawer drawer, List<Match> matches, ViewerQueryGraph vqg)
 {
     int width = ViewerConfig.QueryResultWidth;
     int margin = ViewerConfig.QueryResultMargin;
     Rectangle queryRegion = vqg.Region;
     int col = (width - margin) / (queryRegion.Width + margin);
     int count = matches.Count;
     int row = count / col;
     int index = 0;
     Point rowStartLocation = new Point();
     for (int i = 0; i < row; ++i)
     {
         rowStartLocation.X = margin;
         rowStartLocation.Y = margin + i * (queryRegion.Height + margin);
         for (int j = 0; j < col; ++j)
         {
             Point myLocation = new Point();
             myLocation.X = rowStartLocation.X + j * (queryRegion.Width + margin);
             myLocation.Y = rowStartLocation.Y;
             ViewerResultGraph vrg = new ViewerResultGraph(index, drawer, myLocation, vqg, matches[index]);
             index += 1;
             m_AllResultGraph.Add(vrg);
         }
     }
     //last row
     rowStartLocation.X = margin;
     rowStartLocation.Y = margin + row * (queryRegion.Height + margin);
     int left = count % col;
     for (int j = 0; j < left; ++j)
     {
         Point myLocation = new Point();
         myLocation.X = rowStartLocation.X + j * (queryRegion.Width + margin);
         myLocation.Y = rowStartLocation.Y;
         ViewerResultGraph vrg = new ViewerResultGraph(index, drawer, myLocation, vqg, matches[index]);
         index += 1;
         m_AllResultGraph.Add(vrg);
     }
 }