public MetroMessageBoxViewModel(MetroMessageBoxView mmbView, string message, string title, MessageBoxButton buttons, ImageSource imageSource) { _view = mmbView; Message = message; BoxTitle = title; Buttons = buttons; NotificationImageSource = imageSource; }
private static MessageBoxResult ConstrucBox(Window owner, string message, string title, MessageBoxButton buttons, MessageBoxImage image, MessageBoxResult defaultResult, bool playSystemSound) { MetroMessageBoxView mmbView = new MetroMessageBoxView(); MetroMessageBoxViewModel mmbViewModel = new MetroMessageBoxViewModel(mmbView, message, title, buttons, MessageBoxImageToImageSource(image)); mmbView.Owner = owner; mmbView.DataContext = mmbViewModel; mmbViewModel.Result = defaultResult; MessageBoxImageToSystemSound(image).Play(); mmbView.ShowDialog(); return(mmbViewModel.Result); }
private static MessageBoxResult ConstrucBox(Window owner, string message, string title, MessageBoxButton buttons, MessageBoxImage image, MessageBoxResult defaultResult, bool playSystemSound) { MetroMessageBoxView mmbView = new MetroMessageBoxView(); MetroMessageBoxViewModel mmbViewModel = new MetroMessageBoxViewModel(mmbView, message, title, buttons, MessageBoxImageToImageSource(image)); mmbView.Owner = owner; mmbView.DataContext = mmbViewModel; mmbViewModel.Result = defaultResult; MessageBoxImageToSystemSound(image).Play(); mmbView.ShowDialog(); return mmbViewModel.Result; }