Elwig: Add InteractionService to centrally manage MessageBox and SaveFileDialogs
Test / Run tests (push) Successful in 2m50s
Test / Run tests (push) Successful in 2m50s
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
using Elwig.Models.Dtos;
|
||||
using Elwig.Models.Entities;
|
||||
using Elwig.Services;
|
||||
using Microsoft.Data.Sqlite;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using ScottPlot.TickGenerators.Financial;
|
||||
using ScottPlot.TickGenerators.TimeUnits;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
@@ -12,8 +11,6 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Media.Converters;
|
||||
|
||||
namespace Elwig.Helpers {
|
||||
|
||||
@@ -162,8 +159,8 @@ namespace Elwig.Helpers {
|
||||
LogFile = new(file) {
|
||||
AutoFlush = true
|
||||
};
|
||||
} catch (Exception e) {
|
||||
MessageBox.Show($"Unable to open database log file:\n\n{e.Message}", "Database Log", MessageBoxButton.OK, MessageBoxImage.Error);
|
||||
} catch (Exception exc) {
|
||||
InteractionService.ShowException("Database Log", $"Unable to open database log file", exc);
|
||||
}
|
||||
}
|
||||
SavedLastWriteTime = LastWriteTime;
|
||||
|
||||
Reference in New Issue
Block a user