Exemplo n.º 1
0
        private void NDYEditor_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (!worldSavedAndNotEdited)
            {
                ExitForm form = new ExitForm();
                form.ShowDialog();

                string temp = form.GetText();
                if (temp == "Close")
                {
                    e.Cancel = true;
                }
                else if (temp == "Save")
                {
                    if (!this.filePathKnown)
                    {
                        this.saveAsToolStripMenuItem_Click(sender, e);
                    }
                    else
                    {
                        this.toolStripStatusLabel1.Text = "Saving!";
                        Application.DoEvents();
                        m_GameEngine.SaveWorld();
                    }
                }
            }
            Save_Settings();
        }
Exemplo n.º 2
0
        private void NDYEditor_FormClosing(object sender, FormClosingEventArgs e)
        {
            if ( !worldSavedAndNotEdited )
            {
                ExitForm form = new ExitForm();
                form.ShowDialog();

                string temp = form.GetText();
                if (temp == "Close")
                {
                    e.Cancel = true;
                }
                else if (temp == "Save")
                {
                    if (!this.filePathKnown)
                    {
                        this.saveAsToolStripMenuItem_Click(sender, e);
                    }
                    else
                    {
                        this.toolStripStatusLabel1.Text = "Saving!";
                        Application.DoEvents();
                        m_GameEngine.SaveWorld();
                    }
                }
            }
            Save_Settings();
        }