Exemplo n.º 1
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void tsmi_tools_ScreenCapture_Click(object sender, EventArgs e)
 {
     if ((m_oScreenShotForm != null) && (!m_oScreenShotForm.IsDisposed))
         m_oScreenShotForm.Focus();
     else
     {
         m_oScreenShotForm = new ScreenShot();
         m_oScreenShotForm.Show();
     }
 }
        /// <summary>
        /// Cleans up all the field members that implement the IDisposable interface.
        /// (This should only be called from the forms dispose method)
        /// </summary>
        /// <param name="bDispose">True to dispose of managed resources.</param>
        /// <returns></returns>
        private void CleanUpResources(bool bDispose)
        {
            if (bDispose)
            {
                // Clean up and release the print document object.
                if (m_oPrintDocument != null)
                {
                    m_oPrintDocument.Dispose();
                    m_oPrintDocument = null;
                }

                // Clean up the ImageEditManagement object.
                if ((m_oUndoRedo != null) && (!m_oUndoRedo.IsDisposed))
                {
                    m_oUndoRedo.Dispose();
                    m_oUndoRedo = null;
                }

                // Clean up the image browser object.
                if ((m_oImageBrowser != null) && (!m_oImageBrowser.IsDisposed))
                {
                    m_oImageBrowser.Dispose();
                    m_oImageBrowser = null;
                }

                // Clean up the explorer docking window object.
                if ((m_oExplorerDockWindow != null) && (!m_oExplorerDockWindow.IsDisposed))
                {
                    m_oExplorerDockWindow.Dispose();
                    m_oExplorerDockWindow = null;
                }

                // Clean up the image list docking window object.
                if ((m_oImageListDockWindow != null) && (!m_oImageListDockWindow.IsDisposed))
                {
                    m_oImageListDockWindow.Dispose();
                    m_oImageListDockWindow = null;
                }

                // Clean up the task docking window object.
                if ((m_oTaskDockWindow != null) && (!m_oTaskDockWindow.IsDisposed))
                {
                    m_oTaskDockWindow.Dispose();
                    m_oTaskDockWindow = null;
                }

                // Clean up the screen shot form.
                if ((m_oScreenShotForm != null) && (!m_oScreenShotForm.IsDisposed))
                {
                    m_oScreenShotForm.Dispose();
                    m_oScreenShotForm = null;
                }

                // Clean up the new window form.
                if ((m_oNewWindowForm != null) && (!m_oNewWindowForm.IsDisposed))
                {
                    m_oNewWindowForm.Dispose();
                    m_oNewWindowForm = null;
                }

                // Clean up the new window list.
                if ((m_oNewWindows != null) && (m_oNewWindows.Count > 0))
                {
                    m_oNewWindows.Clear();
                    m_oNewWindows = null;
                }

                // Clean up the slide show.
                if ((m_oSlideShowForm != null) && (!m_oSlideShowForm.IsDisposed))
                {
                    m_oSlideShowForm.Close();
                    m_oSlideShowForm = null;
                }

                // Clean up the red eye panel.
                if ((m_oRedEyePanel != null) && (!m_oRedEyePanel.IsDisposed))
                {
                    m_oRedEyePanel.Dispose();
                    m_oRedEyePanel = null;
                }

                // Clean up the resize panel.
                if ((m_oResizePanel != null) && (!m_oResizePanel.IsDisposed))
                {
                    m_oResizePanel.Dispose();
                    m_oResizePanel = null;
                }

                // Clean up the properties panel.
                if ((m_oPropertiesPanel != null) && (!m_oPropertiesPanel.IsDisposed))
                {
                    m_oPropertiesPanel.Dispose();
                    m_oPropertiesPanel = null;
                }
            }
        }