Exemple #1
0
 public TreeViewExpertModal(SaveClass sc, TreeViewExpertModal ppar)
 {
     naim   = sc.Naim;
     parent = ppar;
     foreach (SaveClass cur in sc.Children)
     {
         children.Add(new TreeViewExpertModal(cur, this));
     }
 }
Exemple #2
0
 void ExpandTree(TreeViewExpertModal tree, Table table, string space)
 {
     table.Cell(table.Rows.Count, 1).Range.Text = space + tree.Naim;
     table.Cell(table.Rows.Count, 2).Range.Text = tree.ExpertOpinion.ToString();
     table.Rows.Add();
     foreach (TreeViewExpertModal child in tree.Children)
     {
         ExpandTree(child, table, space + "    ");
     }
 }
Exemple #3
0
 public TreeViewExpertModal(SaveClassExpert sc, TreeViewExpertModal ppar)
 {
     naim           = sc.Naim;
     expert_opinion = sc.ExpertOpinion;
     admin_coeff    = sc.AdminCoeff;
     parent         = ppar;
     foreach (SaveClassExpert cur in sc.Children)
     {
         children.Add(new TreeViewExpertModal(cur, this));
     }
     if (WorkMode.IsExpert)
     {
         if (expert_opinion != -1)
         {
             Is_Ready = true;
         }
     }
     else
     {
         UpdateValues();
     }
 }
Exemple #4
0
 public void PrintDocument(TreeViewExpertModal tree)
 {
     application = new Application();
     fileName    = Path.GetTempFileName();
     document    = application.Documents.Open(fileName);
     i           = 1;
     selection   = application.Selection;
     foreach (TreeViewExpertModal child in tree.Children)
     {
         document.Tables.Add(selection.Range, 1, 2);
         table = document.Tables[i];
         table.Borders.InsideLineStyle  = WdLineStyle.wdLineStyleSingle;
         table.Borders.OutsideLineStyle = WdLineStyle.wdLineStyleSingle;
         ExpandTree(child, table, "");
         table.Rows.Last.Delete();
         i++;
         selection.EndKey(6);
         if (child.ExpertOpinion > 50)
         {
             selection.TypeText("Критерий '" + child.Naim + "' удовлетворяет требованиям нормативных документов");
         }
         else
         {
             selection.TypeText("Критерий '" + child.Naim + "' не удовлетворяет требованиям нормативных документов");
         }
         selection.TypeText("\r  ");
     }
     foreach (Paragraph paragraph in document.Paragraphs)
     {
         if (paragraph.Range.Text.Trim() == string.Empty)
         {
             paragraph.Range.Select();
             application.Selection.Delete();
         }
     }
     application.Visible = true;
 }