Ejemplo n.º 1
0
        private void panelRegionSelectionToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ThumbnailPanel panel    = (ThumbnailPanel)panelContextMenuStrip.SourceControl;
            RegionSelector selector = new RegionSelector();

            selector.Load += (eventSender, eventArgs) =>
            {
                selector.SetWindow(panel.GetWindow(), panel.ClientAreaOnly);
                selector.DrawnRegion = panel.DrawnRegion;
            };
            if (selector.ShowDialog(this) == DialogResult.OK)
            {
                panel.DrawnRegion = selector.DrawnRegion;
            }
        }