Пример #1
0
        /// <summary>
        /// Notifies that we are about to close an entry
        /// </summary>
        /// <param name="entry"></param>
        private bool NotifyClosingEntry(GUIProjectEntry entry)
        {
            if (OnClosingEntry != null)
            {
                ProjectEntryActionEventArgs args = new ProjectEntryActionEventArgs(entry);
                OnClosingEntry(this, args);

                return(args.CancelAction);
            }

            return(false);
        }
Пример #2
0
        /// <summary>
        /// Notifies that we are about to close an entry
        /// </summary>
        /// <param name="entry"></param>
        private bool NotifyClosingEntry(GUIProjectEntry entry)
        {
            if (OnClosingEntry != null)
            {
                ProjectEntryActionEventArgs args = new ProjectEntryActionEventArgs(entry);
                OnClosingEntry(this, args);

                return args.CancelAction;
            }

            return false;
        }
Пример #3
0
        /// <summary>
        /// Called when an entry is about to be closed.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        void ProjectView_OnClosingEntry(object sender, ProjectEntryActionEventArgs args)
        {
            // TODO - Check to see if we need to save anything here

            GUIProjectScene projectScene = args.Entry as GUIProjectScene;
            if (projectScene != null && projectScene.Scene != null)
            {
                // Find the view associated with the scene
                foreach (SceneView view in mDockPanel.Documents)
                {
                    if (view.Scene == projectScene.Scene)
                    {
                        view.Close();
                        break;
                    }
                }
            }            
        }