Exemplo n.º 1
0
        public void Test1()
        {
            sut.Load(@"Data\d1.txt");

            Assert.AreEqual(3, canvas.Commands.Count);
            CollectionAssert.AreEqual(new[]
            {
                "XY Line (10, 20), (40, 50)",
                "XY Line (20, 30), (50, 60)",
            }, canvas.Commands[0]);
            CollectionAssert.AreEqual(new[]
            {
                "XZ Line (10, 30), (40, 60)",
                "XZ Line (20, 40), (50, 70)",
            }, canvas.Commands[1]);
            CollectionAssert.AreEqual(new[]
            {
                "YZ Line (20, 30), (50, 60)",
                "YZ Line (30, 40), (60, 70)",
            }, canvas.Commands[2]);
        }
Exemplo n.º 2
0
        private void FileOpenMenu_Click(object sender, EventArgs e)
        {
            var filename = GetFilename();

            if (filename == null)
            {
                return;
            }

            var canvas = new ImageCanvas(XYImage, XZImage, YZImage);
            var app    = new DrawingApp(fileParser, projector, canvas);

            app.Load(filename);
        }