Пример #1
0
        private void WorldWindow_MouseMove(object sender, MouseEventArgs e)
        {
            if (DragCorner == Corner.None)
            {
                return;
            }

            if (SelectedOverlay == null)
            {
                return;
            }

            SelectedOverlay.MouseMove(e);
        }
Пример #2
0
        /// <summary>
        /// Removes an image from our overlay list
        /// </summary>
        private void Menu_Remove(object sender, EventArgs e)
        {
            if (SelectedOverlay == null)
            {
                return;
            }

            string msg = "Are you sure you want to remove " + SelectedOverlay.Name + "?";

            if (MessageBox.Show(msg, "Remove image",
                                MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes)
            {
                return;
            }

            // Remove the image
            ChildObjects.Remove(SelectedOverlay);
            SelectedOverlay.Dispose();
            SelectedOverlay = null;
        }