Ejemplo n.º 1
0
 /// <summary>
 /// Raises the Zoomed event.
 /// </summary>
 public virtual void OnZoomed(ZoomedEventArgs zoomArgs)
 {
     if (Zoomed != null)
     {
         Zoomed(this, zoomArgs);
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Loads PostData from a zooming operation
        /// </summary>
        /// <param name="key">The name of the first input field</param>
        /// <param name="form">The form values</param>
        public virtual bool LoadPostData(string key, NameValueCollection form)
        {
            string zoom = form[key];
            int    x = -1, y = -1, w = -1, h = -1;

            scrollX = -1;
            scrollY = -1;
            if (zoom != "-1")
            {
                int.TryParse(form[key + "_x"], out x);
                int.TryParse(form[key + "_y"], out y);
                int.TryParse(form[key + "_w"], out w);
                int.TryParse(form[key + "_h"], out h);
                int.TryParse(form[key + "_scrollX"], out scrollX);
                int.TryParse(form[key + "_scrollY"], out scrollY);

                zoomArgs = new ZoomedEventArgs(zoom == "0", new Rectangle(x, y, w, h));
                if (EnableViewState && Plot != null && Plot is Plot2D)
                {
                    ((Plot2D)Plot).Zoom(zoomArgs.zoomedIn, zoomArgs.zoomRect);
                }

                return(true);
            }
            return(false);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Raises the PostDataChanged event.
 /// </summary>
 public virtual void RaisePostDataChangedEvent()
 {
     OnZoomed(zoomArgs);
     zoomArgs = null;
 }