Exemplo n.º 1
0
        protected override bool OnExecute()
        {
            if (ExoEngine.ActiveWorld.Dirty == true)
            {
                DialogResult result = ExoEngine.MessageBox("Current world has been modified.  Do you want to save your changes to '" + ExoEngine.ActiveWorld.FileName + "'?",
                                                           "Close World", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
                switch (result)
                {
                case DialogResult.Yes:
                    if (ExoEngine.Commands.Execute(typeof(FileSave)) != true)
                    {
                        return(false);
                    }
                    break;

                case DialogResult.No:
                    break;

                case DialogResult.Cancel:
                    return(false);
                }
            }

            World world = ExoEngine.ActiveWorld;

            ExoEngine.ActiveWorld = null;
            world.Dispose();
            ExoEngine.UpdateAll();

            return(true);
        }
Exemplo n.º 2
0
 protected override bool OnExecute()
 {
     ExoEngine.MessageBox(
         "Copyright (c) 2001, 2002, Ben Houston\n" +
         "Questions, comments, bugs?  Send them to [email protected]",
         "About " + Application.ProductName,
         MessageBoxButtons.OK,
         MessageBoxIcon.Information);
     return(true);
 }