-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathSaveChangesPrompt.cs
More file actions
33 lines (28 loc) · 923 Bytes
/
SaveChangesPrompt.cs
File metadata and controls
33 lines (28 loc) · 923 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace MyNotepad {
public partial class SaveChangesPrompt : Form {
public SaveChangesPrompt(string Filename) {
InitializeComponent();
labelMessage.Text = labelMessage.Text.FormatUsingObject(new { Filename = Filename ?? "Untitled" });
}
private void buttonSave_Click(object sender, EventArgs e) {
DialogResult = DialogResult.Yes;
Close();
}
private void buttonDontSave_Click(object sender, EventArgs e) {
DialogResult = DialogResult.No;
Close();
}
private void buttonCancel_Click(object sender, EventArgs e) {
DialogResult = DialogResult.Cancel;
Close();
}
}
}