-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
d751680
commit c081763
Showing
8 changed files
with
40 additions
and
50 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
12 changes: 6 additions & 6 deletions
12
ShortcutsGrid/Services/StringExtensions.cs → ShortcutsGrid/Extensions/StringExtensions.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
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
namespace ShortcutsGrid.Windows; | ||
|
||
using System.Windows; | ||
|
||
public interface IMessageBoxWrapper | ||
{ | ||
MessageBoxResult Show(string messageBoxText, string caption, MessageBoxButton button, MessageBoxImage icon); | ||
} | ||
public class MessageBoxWrapper : IMessageBoxWrapper | ||
{ | ||
public MessageBoxResult Show(string messageBoxText, string caption, MessageBoxButton button, MessageBoxImage icon) | ||
{ | ||
return MessageBox.Show(messageBoxText, caption, button, icon); | ||
} | ||
} | ||
public class MessageDialogs(IMessageBoxWrapper? messageBox = null) | ||
{ | ||
private readonly IMessageBoxWrapper _messageBox = messageBox ?? new MessageBoxWrapper(); | ||
public bool IsErrorDisplayed(string error) | ||
{ | ||
if (!string.IsNullOrWhiteSpace(error)) | ||
{ | ||
_messageBox.Show(error, "Error", MessageBoxButton.OK, MessageBoxImage.Error); | ||
return true; | ||
} | ||
return false; | ||
} | ||
} |