Skip to content

Commit

Permalink
[DYN-2316] Fix what's broken (#15242)
Browse files Browse the repository at this point in the history
  • Loading branch information
QilongTang authored May 23, 2024
1 parent e223c97 commit 47297b5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 35 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,4 @@ dynamods-splash-screen-*.tgz
/src/Notifications/dynamods-notifications-center-*.tgz
/src/DynamoCoreWpf/.npmrc
/src/Notifications/.npmrc
src/LibraryViewExtensionWebView2/.npmrc
35 changes: 0 additions & 35 deletions src/DynamoCoreWpf/UI/Prompts/DynamoMessageBox.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -266,41 +266,6 @@ public static MessageBoxResult Show(Window owner, string messageBoxText, string
return dynamoMessageBox.CustomDialogResult;
}

/// <summary>
/// Displays a dialog to the user and returns their choice as a MessageBoxResult.
/// </summary>
/// <param name="owner">owning window of the messagebox</param>
/// <param name="messageBoxText">Content of the message</param>
/// <param name="caption">MessageBox title</param>
/// <param name="flags">Provide a list of flags that can be used to customize the dialog box, e.g Scrollable</param>
/// <param name="button">Type of button shown in the MessageBox: Ok, OkCancel; etc</param>
/// <param name="icon">Type of message: Warning, Error</param>
/// <returns></returns>
public static MessageBoxResult Show(Window owner, string messageBoxText, string caption, Dictionary<DialogFlags, bool> flags, MessageBoxButton button,
MessageBoxImage icon)
{
var dynamoMessageBox = new DynamoMessageBox
{
BodyText = messageBoxText,
TitleText = caption,
MessageBoxButton = button,
MessageBoxImage = icon
};
if (owner != null && owner.IsLoaded)
{
dynamoMessageBox.Owner = owner;
}

if (flags.TryGetValue(DialogFlags.Scrollable, out bool scrollable) && scrollable)
{
dynamoMessageBox.BodyTextBlock.Visibility = Visibility.Collapsed;
dynamoMessageBox.ScrollableBodyTextBlock.Visibility = Visibility.Visible;
}
dynamoMessageBox.ConfigureButtons(button);
dynamoMessageBox.ShowDialog();
return dynamoMessageBox.CustomDialogResult;
}

/// <summary>
/// Displays a dialog to the user and returns their choice as a MessageBoxResult.
/// </summary>
Expand Down

0 comments on commit 47297b5

Please sign in to comment.