Example #1
0
        public void CreateNewLevel( )
        {
            if (Level != null)
            {
                if (OnBeforeUnloadingModel != null)
                {
                    var args = new ModelUnloadingEventArgs(Level);

                    OnBeforeUnloadingModel(this, args);

                    if (args.Cancelled)
                    {
                        return;
                    }
                }
            }

            var newLevel = new LevelEditor();

            LoadLevel(newLevel);

            if (NewModelLoaded != null)
            {
                NewModelLoaded(this, EventArgs.Empty);
            }
        }
Example #2
0
        void modelUnloading( object sender, ModelUnloadingEventArgs e )
        {
            DialogResult r = promptToSaveIfDirty( ) ;

            if( r == DialogResult.Cancel )
            {
                e.Cancelled = true ;
            }
        }
Example #3
0
        public void CreateNewLevel( )
        {
            if( Level != null )
            {
                if( OnBeforeUnloadingModel != null )
                {
                    var args = new ModelUnloadingEventArgs( Level ) ;

                    OnBeforeUnloadingModel( this, args ) ;

                    if( args.Cancelled )
                    {
                        return ;
                    }
                }
            }

            var newLevel = new LevelEditor();

            LoadLevel( newLevel ) ;

            if( NewModelLoaded != null )
            {
                NewModelLoaded( this, EventArgs.Empty ) ;
            }
        }