feat: load legacy Cuts and Res runtime assets
This commit is contained in:
@@ -57,6 +57,8 @@ public sealed partial class MainWindow : Window
|
||||
var cutMenuComposition = LegacyRuntimeStockCutMenuLoader.ResolveFromCandidates(
|
||||
runtimeCutMenuOverridePath,
|
||||
AppContext.BaseDirectory);
|
||||
var runtimeUiCatalogs = LegacyRuntimeUiCatalogLoader.ResolveFromBaseDirectory(
|
||||
AppContext.BaseDirectory);
|
||||
|
||||
ILegacyStockLookup stockLookup;
|
||||
IIndustrySelectionService industrySelectionService;
|
||||
@@ -76,7 +78,8 @@ public sealed partial class MainWindow : Window
|
||||
string? initializationError = null;
|
||||
try
|
||||
{
|
||||
_databaseRuntime = DatabaseRuntime.CreateDefault();
|
||||
_databaseRuntime = DatabaseRuntime.CreateLegacyExecutableDefault(
|
||||
AppContext.BaseDirectory);
|
||||
DataQueryExecutor.Configure(_databaseRuntime.Executor);
|
||||
var databaseMutationAuthorization =
|
||||
new LaunchDatabaseMutationAuthorization(_playoutLaunchAuthorization);
|
||||
@@ -163,7 +166,9 @@ public sealed partial class MainWindow : Window
|
||||
DataQueryExecutor.Reset();
|
||||
}
|
||||
|
||||
_industryWorkflow = new LegacyIndustrySelectionWorkflow(industrySelectionService);
|
||||
_industryWorkflow = new LegacyIndustrySelectionWorkflow(
|
||||
industrySelectionService,
|
||||
actionLayout: runtimeUiCatalogs.IndustryLayout);
|
||||
var overseasWorkflow = new LegacyOverseasSelectionWorkflow(
|
||||
overseasIndustrySearchService,
|
||||
overseasStockSearchService);
|
||||
@@ -177,6 +182,7 @@ public sealed partial class MainWindow : Window
|
||||
var manualListsWorkflow = CreateManualListsWorkflow(stockLookup);
|
||||
_controller = new LegacyOperatorController(
|
||||
stockLookup,
|
||||
fixedCatalog: runtimeUiCatalogs.FixedCatalog,
|
||||
industryWorkflow: _industryWorkflow,
|
||||
themeWorkflow: new LegacyThemeWorkflow(themeSelectionService),
|
||||
expertWorkflow: new LegacyExpertWorkflowController(expertSelectionService),
|
||||
@@ -184,7 +190,8 @@ public sealed partial class MainWindow : Window
|
||||
tradingHaltSelectionService),
|
||||
comparisonWorkflow: new LegacyComparisonWorkflowController(
|
||||
new LegacyComparisonDataService(stockLookup, worldStockSearchService),
|
||||
comparisonStore),
|
||||
comparisonStore,
|
||||
runtimeUiCatalogs.ComparisonLayout),
|
||||
manualFinancialWorkflow: new LegacyManualFinancialWorkflow(
|
||||
manualFinancialService,
|
||||
manualFinancialStockSearchService),
|
||||
@@ -205,9 +212,15 @@ public sealed partial class MainWindow : Window
|
||||
{
|
||||
_controller.ReportError(initializationError);
|
||||
}
|
||||
else if (cutMenuComposition.WarningMessage is { } cutMenuWarning)
|
||||
else if (new[]
|
||||
{
|
||||
cutMenuComposition.WarningMessage,
|
||||
runtimeUiCatalogs.WarningMessage
|
||||
}
|
||||
.Where(message => message is not null)
|
||||
.ToArray() is { Length: > 0 } catalogWarnings)
|
||||
{
|
||||
_controller.ReportWarning(cutMenuWarning);
|
||||
_controller.ReportWarning(string.Join(" ", catalogWarnings));
|
||||
}
|
||||
|
||||
InitializePlayoutRuntime();
|
||||
|
||||
Reference in New Issue
Block a user