Esempio n. 1
0
        private static void WriteUnitTestStepObjectModification(UnitTestStepObjectModificationViewModel step, DocX doc)
        {
            Paragraph p;

            p           = doc.InsertParagraph();
            p.StyleName = "Heading2";
            p.InsertText(string.Format("Step {0}: {1}", step.ParentIndex + 1, step.DisplayName));

            p           = doc.InsertParagraph();
            p.StyleName = "Heading3";
            p.InsertText(string.Format("Attribute modifications"));

            Table t = doc.InsertTable(step.AttributeChanges.Count + 1, 3);

            t.Alignment = Alignment.left;
            t.Design    = TableDesign.LightListAccent1;

            t.Rows[0].Cells[0].Paragraphs.First().Append("Attribute");
            t.Rows[0].Cells[1].Paragraphs.First().Append("Modification type");
            t.Rows[0].Cells[2].Paragraphs.First().Append("Value");

            for (int i = 0; i < step.AttributeChanges.Count; i++)
            {
                t.Rows[i + 1].Cells[0].Paragraphs.First().Append(step.AttributeChanges[i].Name);
                t.Rows[i + 1].Cells[1].Paragraphs.First().Append(step.AttributeChanges[i].ModificationType.ToString());
                t.Rows[i + 1].Cells[2].Paragraphs.First().Append(step.AttributeChanges[i].ValueChangesString);
            }
        }
Esempio n. 2
0
 private BitmapSource GetIcon(UnitTestStepObjectModificationViewModel item)
 {
     return(new BitmapImage(new Uri("pack://application:,,,/Lithnet.Acma.Presentation;component/Resources/EditObject.png", UriKind.Absolute)));
 }