Beispiel #1
0
 private void Pct_Resize(object sender, EventArgs e)
 {
     this.Graph = this.NewGraph();
     ////////////int height = this.Pct.ClientSize.Height;
     ////////////int width = this.Pct.ClientSize.Width;
     ////////////this.ResolutionX = Math.Abs((this.XMax - this.XMin) / (float)width);
     ////////////this.ResolutionY = Math.Abs((this.YMax - this.YMin) / (float)height);
 }
Beispiel #2
0
        /// <summary>
        /// Stores the provided parameter and assigns a 'this.NewGraph' to the field 'this.Grap'
        /// </summary>
        /// <param name="pct">The container of the graph of the diagram (only the graph, without axes, label, ... </param>
        /// <param name="xMin">The minimum value for the x coordinate.</param>
        /// <param name="xMax">The maximum value for the x coordinate.</param>
        /// <param name="yMin">The minimum value for the y coordinate.</param>
        /// <param name="yMax">The maximum value for the y coordinate.</param>
        public Cartesian(System.Windows.Forms.PictureBox pct, float xMin, float xMax, float yMin, float yMax)
        {
            this.XMin = xMin;
            this.XMax = xMax;

            this.YMin = yMin;
            this.YMax = yMax;

            this.Pct             = pct;
            this.Pct.Resize     += Pct_Resize;
            this.Pct.MouseMove  += Pct_MouseMove;
            this.Pct.MouseLeave += Pct_MouseLeave;

            this.Graph = this.NewGraph();
        }