示例#1
0
        private void ShowRandomSceneWindow(object sender, EventArgs e)
        {
            if (ImageControler.IsLoadScene())
            {
                var randScene = new RandomSceneWindow(this, InputControler, ImageControler);
                randScene.Show();
            }
            else
            {
                string            message = "You have load scene, do you want save and create new?";
                string            caption = "Exist scene";
                MessageBoxButtons buttons = MessageBoxButtons.YesNoCancel;
                DialogResult      result  = MessageBox.Show(message, caption, buttons);

                if (result == DialogResult.Yes)
                {
                    ImageControler.SaveSceneControl();
                    var randScene = new RandomSceneWindow(this, InputControler, ImageControler);
                    randScene.Show();
                }
                else if (result == DialogResult.No)
                {
                    var randScene = new RandomSceneWindow(this, InputControler, ImageControler);
                    randScene.Show();
                }
            }
        }
示例#2
0
 private void EditScene_Click(object sender, EventArgs e)
 {
     if (!ImageControler.IsLoadScene())
     {
         var editScene = new SceneEditWindow(this, InputControler, ImageControler);
         editScene.Show();
     }
     else
     {
         ShowErrorMessage("You do not load scene for edit", "Edit Scene problem");
     }
 }
示例#3
0
        private void LoadSceneButton_Click(object sender, EventArgs e)
        {
            if (ImageControler.IsLoadScene())
            {
                ShowLoadSceneDialog(sender, e);
            }
            else
            {
                string            message = "You have load scene, do you want save and create new?";
                string            caption = "Exist scene";
                MessageBoxButtons buttons = MessageBoxButtons.YesNoCancel;
                DialogResult      result  = MessageBox.Show(message, caption, buttons);

                if (result == DialogResult.Yes)
                {
                    ImageControler.SaveSceneControl();
                    ShowLoadSceneDialog(sender, e);
                }
                else if (result == DialogResult.No)
                {
                    ShowLoadSceneDialog(sender, e);
                }
            }
        }