예제 #1
0
        /// <summary>
        /// 窗体关闭事件
        /// </summary>
        /// <param name="e"></param>
        protected override void OnFormClosing(FormClosingEventArgs e)
        {
            base.OnFormClosing(e);
            List <FCView> controls       = m_native.getControls();
            List <FCView> removeControls = new List <FCView>();
            int           controlsSize   = controls.Count;

            for (int i = 0; i < controlsSize; i++)
            {
                removeControls.Add(controls[i]);
            }
            for (int i = 0; i < controlsSize; i++)
            {
                m_native.removeMirror(removeControls[i]);
            }
            removeControls.Clear();
            if (m_native != null)
            {
                m_native.delete();
                m_native = null;
            }
            if (m_window != null)
            {
                WindowXmlEx window = m_window;
                m_window = null;
                window.close();
            }
        }
예제 #2
0
        /// <summary>
        /// 窗体关闭事件
        /// </summary>
        /// <param name="e"></param>
        protected override void OnFormClosing(FormClosingEventArgs e)
        {
            base.OnFormClosing(e);
            List <FCView> controls     = m_native.getControls();
            int           controlsSize = controls.Count;

            for (int i = 0; i < controlsSize; i++)
            {
                m_native.removeMirror(controls[i]);
            }
            if (m_native != null)
            {
                m_native.delete();
                m_native = null;
            }
        }