Ejemplo n.º 1
0
        static void ChainOfResponsibility()
        {
            var fileLoad = new FromFileLoader();
            var webload  = new FromWebLoader();

            fileLoad.SetNext(webload);
            Console.WriteLine("Chain: File->Web");
            Client.ClientLoader(fileLoad);
        }
Ejemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            var     op = new OpenFileDialog();
            var     dr = op.ShowDialog();
            ILoader _loader;

            if (dr == DialogResult.OK)
            {
                _loader = new FromFileLoader(op.FileName);
                var points = _loader.Load();

                var list = new List <PointF>();

                foreach (var point in points)
                {
                    list.Add(Bpoint.Apply(point));
                }
                beziers.Add(new BezierCurve(list.ToArray(), pB.Invalidate, Cursor));
                pB.Refresh();
            }
        }