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(); } } }
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"); } }
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); } } }