示例#1
0
        private void toolStripMenuItem1_Click(object sender, EventArgs e)
        {
            ToolStripMenuItem menuItem = sender as ToolStripMenuItem;

            if (menuItem != null)
            {
                ContextMenuStrip photoMenu = menuItem.Owner as ContextMenuStrip;

                if (photoMenu != null)
                {
                    Control controlSelected = photoMenu.SourceControl;

                    if (controlSelected is PhotoIcon)
                    {
                        frmPhotoEdit al = new frmPhotoEdit((PhotoIcon)controlSelected, this);
                        al.Show();
                    }
                }
            }
        }
示例#2
0
        private void toolStripMenuItem1_Click(object sender, EventArgs e)
        {
            ToolStripMenuItem menuItem = sender as ToolStripMenuItem;
            if (menuItem != null)
            {
                ContextMenuStrip photoMenu = menuItem.Owner as ContextMenuStrip;

                if (photoMenu != null)
                {
                    Control controlSelected = photoMenu.SourceControl;

                    if (controlSelected is PhotoIcon)
                    {
                        frmPhotoEdit al = new frmPhotoEdit((PhotoIcon)controlSelected, this);
                        al.Show();
                    }
                }
            }
        }