public void Container_PerformLayoutBeforeRender()
        {
            // Purpose: Verify that if PerformLayout is NOT called before Render()
            // is called then an exception will be thrown

            bool caught = false;
            var layout = new CONMODEL.ContainerLayout();
            var doc = this.GetNewDoc();
            try
            {
                var c1 = layout.AddContainer("A");
                var i1 = c1.Add("A1");
                // layout.PerformLayout();
                IVisio.Page page = layout.Render(doc);
                page.Delete(0);
            }
            catch (VA.AutomationException)
            {
                caught = true;
            }

            doc.Close(true);

            if (caught == false)
            {
                Assert.Fail("Did not catch expected exception");
            }
        }
Ejemplo n.º 2
0
        public void Container_PerformLayoutBeforeRender()
        {
            // Purpose: Verify that if PerformLayout is NOT called before Render()
            // is called then an exception will be thrown

            bool caught = false;
            var  layout = new CONMODEL.ContainerLayout();
            var  doc    = this.GetNewDoc();

            try
            {
                var c1 = layout.AddContainer("A");
                var i1 = c1.Add("A1");
                // layout.PerformLayout();
                IVisio.Page page = layout.Render(doc);
                page.Delete(0);
            }
            catch (VA.AutomationException)
            {
                caught = true;
            }

            doc.Close(true);

            if (caught == false)
            {
                Assert.Fail("Did not catch expected exception");
            }
        }
        public void Container_Diagram2()
        {
            // Make sure that empty containers can be drawn
            var doc = this.GetNewDoc();

            var layout1 = new CONMODEL.ContainerLayout();
            var l1_c1 = layout1.AddContainer("L1/C1");
            var l1_c1_i1 = l1_c1.Add("L1/C1/I1");
            var l1_c2 = layout1.AddContainer("L1/C2"); // this is the empty container

            layout1.PerformLayout();
            var page1 = layout1.Render(doc);

            page1.Delete(0);
            doc.Close(true);
        }
Ejemplo n.º 4
0
        public void Container_Diagram2()
        {
            // Make sure that empty containers can be drawn
            var doc = this.GetNewDoc();

            var layout1  = new CONMODEL.ContainerLayout();
            var l1_c1    = layout1.AddContainer("L1/C1");
            var l1_c1_i1 = l1_c1.Add("L1/C1/I1");
            var l1_c2    = layout1.AddContainer("L1/C2"); // this is the empty container

            layout1.PerformLayout();
            var page1 = layout1.Render(doc);

            page1.Delete(0);
            doc.Close(true);
        }
        public void Container_Diagram1()
        {
            // Purpose: Simple test to make sure that both Containers and Non-Container
            // rendering are supported. The diagram is a single container having a single
            // container item

            var doc = this.GetNewDoc();

            var layout1 = new CONMODEL.ContainerLayout();
            var l1_c1 = layout1.AddContainer("L1/C1");
            var l1_c1_i1 = l1_c1.Add("L1/C1/I1");

            layout1.PerformLayout();
            var page1 = layout1.Render(doc);

            page1.Delete(0);

            doc.Close(true);
        }
Ejemplo n.º 6
0
        public void Container_Diagram1()
        {
            // Purpose: Simple test to make sure that both Containers and Non-Container
            // rendering are supported. The diagram is a single container having a single
            // container item

            var doc = this.GetNewDoc();

            var layout1  = new CONMODEL.ContainerLayout();
            var l1_c1    = layout1.AddContainer("L1/C1");
            var l1_c1_i1 = l1_c1.Add("L1/C1/I1");

            layout1.PerformLayout();
            var page1 = layout1.Render(doc);

            page1.Delete(0);

            doc.Close(true);
        }
Ejemplo n.º 7
0
        public static void SimpleContainer()
        {
            var m = new CONTMODEL.ContainerLayout();

            var c1 = m.AddContainer("Container 1");
            var c2 = m.AddContainer("Container 2");

            c1.Add("A");

            c1.Add("B");
            c1.Add("C");

            c2.Add("1");
            c2.Add("2");
            c2.Add("3");

            m.LayoutOptions = new CONTMODEL.LayoutOptions();
            m.LayoutOptions.ContainerFormatting.FormatCells.FillForegnd     = "rgb(0,176,240)";
            m.LayoutOptions.ContainerItemFormatting.FormatCells.FillForegnd = "rgb(250,250,250)";
            m.LayoutOptions.ContainerItemFormatting.FormatCells.LinePattern = "0";

            m.PerformLayout();
            m.Render(SampleEnvironment.Application.ActiveDocument);
        }
        public static void SimpleContainer()
        {
            var m = new CONTMODEL.ContainerLayout();

            var c1 = m.AddContainer("Container 1");
            var c2 = m.AddContainer("Container 2");

            c1.Add("A");

            c1.Add("B");
            c1.Add("C");

            c2.Add("1");
            c2.Add("2");
            c2.Add("3");

            m.LayoutOptions = new CONTMODEL.LayoutOptions();
            m.LayoutOptions.ContainerFormatting.FormatCells.FillForegnd = "rgb(0,176,240)";
            m.LayoutOptions.ContainerItemFormatting.FormatCells.FillForegnd = "rgb(250,250,250)";
            m.LayoutOptions.ContainerItemFormatting.FormatCells.LinePattern= "0";

            m.PerformLayout();
            m.Render(SampleEnvironment.Application.ActiveDocument);
        }