ImageGlass.ImageBox.OnSelected C# (CSharp) Method

OnSelected() protected method

Raises the Selected event.
protected OnSelected ( EventArgs e ) : void
e System.EventArgs /// The instance containing the event data. ///
return void
        protected virtual void OnSelected(EventArgs e)
        {
            EventHandler<EventArgs> handler;

            switch (SelectionMode)
            {
                case ImageBoxSelectionMode.Zoom:
                    if (SelectionRegion.Width > SelectionDeadZone && SelectionRegion.Height > SelectionDeadZone)
                    {
                        ZoomToRegion(SelectionRegion);
                        SelectNone();
                    }
                    break;
            }

            handler = Selected;

            if (handler != null)
            {
                handler(this, e);
            }
        }
ImageBox