示例#1
0
            /// <summary>
            /// 关闭Sdsite网站
            /// </summary>
            static public void CloseSdsite()
            {
                OnSdsiteClosing(EventArgs.Empty);

                CurrentDocument.Save();
                DesignDataDocument.Save();
                CurrentDocument.Close();
                CurrentDocument    = null;
                DesignDataDocument = null;

                OnSdsiteClosed(EventArgs.Empty);
            }
        /// <summary>
        /// Handle the "File|Exit" menu item.
        /// </summary>
        private void FileExitAction()
        {
            // If the document is in a pristine state with no changes, exit the application
            if (CurrentDocument.IsNew)
            {
                Shell.Close();
                return;
            }

            // Close will return false if the user cancels the document close
            if (!CurrentDocument.Close())
            {
                return;
            }

            Shell.Close();
        }