Пример #1
0
        public void WrongData()
        {
            DrawingTool cnv    = new DrawingTool(20, 4);
            string      result = string.Empty;

            while (true)
            {
                if (!cnv.DrawCanvas())
                {
                    break;
                }
                if (!cnv.DrawLine(new string[] { "1", "2", "6", "2" }))
                {
                    break;
                }
                if (!cnv.DrawLine(new string[] { "6", "3", "25", "4" }))
                {
                    break;
                }
                if (!cnv.DrawRectangle(new string[] { "16", "1", "20", "50" }))
                {
                    break;
                }
                if (!cnv.FillCanvas(10, 3, "o"))
                {
                    break;
                }
            }

            Console.WriteLine(cnv.dtObj.Result);
        }
Пример #2
0
        public void ValidData()
        {
            DrawingTool cnv    = new DrawingTool(20, 4);
            string      result = string.Empty;

            cnv.DrawCanvas();
            cnv.DrawLine(new string[] { "1", "2", "6", "2" });
            cnv.DrawLine(new string[] { "6", "3", "6", "4" });
            cnv.DrawRectangle(new string[] { "16", "1", "20", "3" });
            cnv.FillCanvas(10, 3, "o");

            Console.WriteLine(cnv.DrawArray(cnv.Canvas));
        }