-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
96 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 16 additions & 16 deletions
32
src/Shiny.Mediator.Uno/Infrastructure/AlertDialogService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
using Microsoft.Extensions.Logging; | ||
using Microsoft.UI.Xaml.Controls; | ||
using Uno.Extensions.Navigation; | ||
|
||
namespace Shiny.Mediator.Infrastructure; | ||
|
||
|
||
public class AlertDialogService(ILogger<AlertDialogService> logger) : IAlertDialogService | ||
public class AlertDialogService(INavigator navigator) : IAlertDialogService | ||
{ | ||
public void Display(string title, string message) | ||
public async void Display(string title, string message) | ||
{ | ||
// TODO: could use acr userdialogs | ||
// ContentDialog deleteFileDialog = new ContentDialog | ||
// { | ||
// Title = "Delete file permanently?", | ||
// Content = "If you delete this file, you won't be able to recover it. Do you want to delete it?", | ||
// PrimaryButtonText = "Delete", | ||
// CloseButtonText = "Cancel" | ||
// }; | ||
// | ||
// deleteFileDialog.XamlRoot = anyLoadedControl.XamlRoot; | ||
// | ||
// ContentDialogResult result = await deleteFileDialog.ShowAsync(); | ||
try | ||
{ | ||
await navigator.ShowMessageDialogAsync( | ||
this, | ||
title: title, | ||
content: message | ||
); | ||
|
||
} | ||
catch (Exception ex) | ||
{ | ||
Console.WriteLine(ex); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters