Exemplo n.º 1
0
        //internal variables
        //
        public Curve(Graph graph, CartesianTable table)
        {
            this.graph = graph;

            this.table = table;

            table.Update += new CartesianTable.TableUpdatedEventHandler(OnUpdate);

            _GeneratePoints();
        }
Exemplo n.º 2
0
        public MainWindow()
        {
            InitializeComponent();

            Loaded += delegate
            {

                Graph newGraph = new Graph("x^2");
                Console.WriteLine(newGraph.ToString());

                /*
                foreach(Point point in newGraph.GetPoints() )
                    Console.WriteLine(point.ToString()+"," );
                */

                CartesianTable table = new CartesianTable(canvas, this);
                Curve curve = new Curve(newGraph, table);

                Console.WriteLine(curve.ToString());

                table.Refresh();
            };
        }
Exemplo n.º 3
0
 public void OnUpdate(CartesianTable table, EventArgs e)
 {
     Console.WriteLine(table.XMod);
     _GeneratePoints();
     _Draw();
 }