예제 #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();
        }
예제 #2
0
파일: MainForm.cs 프로젝트: Malow/NDYEditor
        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();
        }