示例#1
0
        private void ImageForm__FormClosing(object sender, FormClosingEventArgs e)
        {
            GifFinder parent = (GifFinder)this.MdiParent;

            parent.closeAllToolStripMenuItem.Click -= new EventHandler(CloseAllToolStripMenuItem__Click);
            parent.saveToolStripMenuItem.Click     -= new EventHandler(SaveToolStripMenuItem__Click);
        }
示例#2
0
        public ImageForm(GifFinder parent, string url, string title)
        {
            InitializeComponent();

            this.MdiParent = parent;
            this.Text      = title;
            this.title     = title;

            parent.closeAllToolStripMenuItem.Click += new EventHandler(CloseAllToolStripMenuItem__Click);
            parent.saveToolStripMenuItem.Click     += new EventHandler(SaveToolStripMenuItem__Click);

            this.FormClosing += new FormClosingEventHandler(ImageForm__FormClosing);

            pictureBox1.ImageLocation = url;
        }