Winify
/trunk/Winify/MainForm.cs |
@@ -155,6 +155,11 @@ |
|
private async void SettingsForm_Save(object sender, SettingsSavedEventArgs e) |
{ |
// Save the configuration. |
Miscellaneous.LaunchOnBootSet(Configuration.LaunchOnBoot); |
ChangedConfigurationContinuation.Schedule(TimeSpan.FromSeconds(1), |
async () => { await SaveConfiguration(); }, _cancellationToken); |
|
// Save the servers. |
await Task.WhenAll(SaveServers(e.Servers), SaveAnnouncements(e.Announcements)); |
|
@@ -192,11 +197,22 @@ |
return; |
} |
|
var notification = new ToastForm( |
if (Configuration.InfiniteToastDuration) |
{ |
var infiniteToastForm = new ToastForm( |
$"{e.Notification.Title} ({e.Notification.Server.Name}/{e.Notification.AppId})", |
e.Notification.Message, e.Image); |
|
Application.Run(infiniteToastForm); |
|
return; |
} |
|
var toastForm = new ToastForm( |
$"{e.Notification.Title} ({e.Notification.Server.Name}/{e.Notification.AppId})", |
e.Notification.Message, 5000, e.Image); |
e.Notification.Message, Configuration.ToastDuration, e.Image); |
|
Application.Run(notification); |
Application.Run(toastForm); |
} |
|
private void SettingsForm_Closing(object sender, CancelEventArgs e) |