Esempio n. 1
0
 private void MPicBox_MouseUp(object sender, MouseEventArgs e)
 {
     mPicBox.Controls.Remove(subPB);
     MPicBoxUpdate();
     subPB.Dispose();
     subPB = null;
 }
Esempio n. 2
0
        private void CloseToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (working)
            {
                if (!saved)
                {
                    DialogResult dialog = MessageBox.Show(filename + " haven't saved yet.\nDo you want to save it", "Photo Editor",
                                                          MessageBoxButtons.YesNoCancel, MessageBoxIcon.Warning);
                    if (dialog == DialogResult.Yes)
                    {
                        SaveToolStripMenuItem_Click(sender, e);
                    }
                }

                layerPanel.Enabled = false;
                finalBmp.Dispose();
                mPicBox.Dispose();
                mPicBox = null;
                workPanel.Controls.Remove(mPicBox);
                layerContainer.Dispose();
                layerContainer = null;
                layerPanel.Controls.Remove(layerContainer);
                working = false;
            }
        }