-
-
Notifications
You must be signed in to change notification settings - Fork 464
/
SetCloseSaveReminderDialog.cs
24 lines (21 loc) · 1.24 KB
/
SetCloseSaveReminderDialog.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// ---------------------------------------------------------------------------------------------
// Copyright (c) 2019-2024, Jiaqi (0x7c13) Liu. All rights reserved.
// See LICENSE file in the project root for license information.
// ---------------------------------------------------------------------------------------------
namespace Notepads.Controls.Dialog
{
using System;
public sealed class SetCloseSaveReminderDialog : NotepadsDialog
{
public SetCloseSaveReminderDialog(string fileNameOrPath, Action saveAction, Action skipSavingAction)
{
Title = ResourceLoader.GetString("SetCloseSaveReminderDialog_Title");
Content = string.Format(ResourceLoader.GetString("SetCloseSaveReminderDialog_Content"), fileNameOrPath);
PrimaryButtonText = ResourceLoader.GetString("SetCloseSaveReminderDialog_PrimaryButtonText");
SecondaryButtonText = ResourceLoader.GetString("SetCloseSaveReminderDialog_SecondaryButtonText");
CloseButtonText = ResourceLoader.GetString("SetCloseSaveReminderDialog_CloseButtonText");
PrimaryButtonClick += (dialog, args) => { saveAction(); };
SecondaryButtonClick += (dialog, args) => { skipSavingAction(); };
}
}
}