Last change
on this file since 2299 was
2266,
checked in by mkommend, 15 years ago
|
added ability to cancel form close;
removed mistakenly commited csproj.user file (ticket #716)
|
File size:
932 bytes
|
Rev | Line | |
---|
[2250] | 1 | using System;
|
---|
| 2 | using System.Collections.Generic;
|
---|
| 3 | using System.ComponentModel;
|
---|
| 4 | using System.Drawing;
|
---|
| 5 | using System.Data;
|
---|
| 6 | using System.Linq;
|
---|
| 7 | using System.Text;
|
---|
| 8 | using System.Windows.Forms;
|
---|
| 9 |
|
---|
| 10 | namespace HeuristicLab.MainForm.Test {
|
---|
| 11 | public partial class EditorView : ViewBase {
|
---|
| 12 | public EditorView() {
|
---|
| 13 | InitializeComponent();
|
---|
| 14 | }
|
---|
| 15 |
|
---|
| 16 | public EditorView(IMainForm mainform)
|
---|
| 17 | : base(mainform) {
|
---|
| 18 | }
|
---|
[2254] | 19 |
|
---|
| 20 | private void ChangeStateButton_Click(object sender, EventArgs e) {
|
---|
| 21 | this.OnStateChanged();
|
---|
| 22 | }
|
---|
[2266] | 23 |
|
---|
| 24 | public override void FormClosing(object sender, FormClosingEventArgs e) {
|
---|
| 25 | if (DialogResult.Yes != MessageBox.Show(
|
---|
| 26 | "Recent changes have not been saved. Close the editor anyway?", "Close editor?",
|
---|
| 27 | MessageBoxButtons.YesNo, MessageBoxIcon.Question,
|
---|
| 28 | MessageBoxDefaultButton.Button2)) {
|
---|
| 29 |
|
---|
| 30 | e.Cancel = true;
|
---|
| 31 |
|
---|
| 32 | }
|
---|
| 33 | }
|
---|
[2250] | 34 | }
|
---|
| 35 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.