Winify – Diff between revs 49 and 55
?pathlinks?
Rev 49 | Rev 55 | |||
---|---|---|---|---|
Line 153... | Line 153... | |||
153 | } |
153 | } |
|
154 | } |
154 | } |
|
Line 155... | Line 155... | |||
155 | |
155 | |
|
156 | private async void SettingsForm_Save(object sender, SettingsSavedEventArgs e) |
156 | private async void SettingsForm_Save(object sender, SettingsSavedEventArgs e) |
|
- | 157 | { |
||
- | 158 | // Save the configuration. |
||
- | 159 | Miscellaneous.LaunchOnBootSet(Configuration.LaunchOnBoot); |
||
- | 160 | ChangedConfigurationContinuation.Schedule(TimeSpan.FromSeconds(1), |
||
- | 161 | async () => { await SaveConfiguration(); }, _cancellationToken); |
||
157 | { |
162 | |
|
158 | // Save the servers. |
163 | // Save the servers. |
|
Line 159... | Line 164... | |||
159 | await Task.WhenAll(SaveServers(e.Servers), SaveAnnouncements(e.Announcements)); |
164 | await Task.WhenAll(SaveServers(e.Servers), SaveAnnouncements(e.Announcements)); |
|
160 | |
165 | |
|
Line 190... | Line 195... | |||
190 | Application.Run(configuredNotification); |
195 | Application.Run(configuredNotification); |
|
Line 191... | Line 196... | |||
191 | |
196 | |
|
192 | return; |
197 | return; |
|
Line -... | Line 198... | |||
- | 198 | } |
||
- | 199 | |
||
- | 200 | if (Configuration.InfiniteToastDuration) |
||
- | 201 | { |
||
- | 202 | var infiniteToastForm = new ToastForm( |
||
- | 203 | $"{e.Notification.Title} ({e.Notification.Server.Name}/{e.Notification.AppId})", |
||
- | 204 | e.Notification.Message, e.Image); |
||
- | 205 | |
||
- | 206 | Application.Run(infiniteToastForm); |
||
- | 207 | |
||
- | 208 | return; |
||
193 | } |
209 | } |
|
194 | |
210 | |
|
195 | var notification = new ToastForm( |
211 | var toastForm = new ToastForm( |
|
Line 196... | Line 212... | |||
196 | $"{e.Notification.Title} ({e.Notification.Server.Name}/{e.Notification.AppId})", |
212 | $"{e.Notification.Title} ({e.Notification.Server.Name}/{e.Notification.AppId})", |
|
197 | e.Notification.Message, 5000, e.Image); |
213 | e.Notification.Message, Configuration.ToastDuration, e.Image); |
|
Line 198... | Line 214... | |||
198 | |
214 | |
|
199 | Application.Run(notification); |
215 | Application.Run(toastForm); |
|
200 | } |
216 | } |