Fixed another copy paste bug, changed speaker icon to button
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using Filtration.Common.Services;
|
||||
using Filtration.ObjectModel;
|
||||
using Filtration.ObjectModel.BlockItemBaseTypes;
|
||||
using Filtration.ObjectModel.BlockItemTypes;
|
||||
@@ -16,6 +17,13 @@ namespace Filtration.ThemeEditor.Services
|
||||
|
||||
public class ThemeService : IThemeService
|
||||
{
|
||||
private readonly IMessageBoxService _messageBoxService;
|
||||
|
||||
public ThemeService(IMessageBoxService messageBoxService)
|
||||
{
|
||||
_messageBoxService = messageBoxService;
|
||||
}
|
||||
|
||||
public void ApplyThemeToScript(Theme theme, ItemFilterScript script)
|
||||
{
|
||||
var mismatchedComponents = false;
|
||||
@@ -58,9 +66,9 @@ namespace Filtration.ThemeEditor.Services
|
||||
|
||||
if (mismatchedComponents)
|
||||
{
|
||||
MessageBox.Show(
|
||||
_messageBoxService.Show("Possible Theme Mismatch",
|
||||
"Not all theme components had matches - are you sure this theme is designed for this script?",
|
||||
"Possible Theme Mismatch", MessageBoxButton.OK, MessageBoxImage.Exclamation);
|
||||
MessageBoxButton.OK, MessageBoxImage.Exclamation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ using System.IO;
|
||||
using System.Windows;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Media.Imaging;
|
||||
using Filtration.Common.Services;
|
||||
using Filtration.Common.ViewModels;
|
||||
using Filtration.Interface;
|
||||
using Filtration.ThemeEditor.Providers;
|
||||
@@ -27,12 +28,15 @@ namespace Filtration.ThemeEditor.ViewModels
|
||||
private static readonly Logger _logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
private readonly IThemeProvider _themeProvider;
|
||||
private readonly IMessageBoxService _messageBoxService;
|
||||
private bool _filenameIsFake;
|
||||
private string _filePath;
|
||||
|
||||
public ThemeViewModel(IThemeProvider themeProvider)
|
||||
public ThemeViewModel(IThemeProvider themeProvider,
|
||||
IMessageBoxService messageBoxService)
|
||||
{
|
||||
_themeProvider = themeProvider;
|
||||
_messageBoxService = messageBoxService;
|
||||
|
||||
Components = new ObservableCollection<ThemeComponentViewModel>();
|
||||
|
||||
@@ -93,8 +97,7 @@ namespace Filtration.ThemeEditor.ViewModels
|
||||
_logger.Error(e);
|
||||
}
|
||||
|
||||
MessageBox.Show(@"Error saving filter theme - " + e.Message, @"Save Error", MessageBoxButton.OK,
|
||||
MessageBoxImage.Error);
|
||||
_messageBoxService.Show("Save Error", "Error saving filter theme - " + e.Message, MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,7 +128,7 @@ namespace Filtration.ThemeEditor.ViewModels
|
||||
_logger.Error(e);
|
||||
}
|
||||
|
||||
MessageBox.Show(@"Error saving theme file - " + e.Message, @"Save Error", MessageBoxButton.OK,
|
||||
_messageBoxService.Show("Save Error", "Error saving theme file - " + e.Message, MessageBoxButton.OK,
|
||||
MessageBoxImage.Error);
|
||||
FilePath = previousFilePath;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user