feat: complete legacy UI and playout parity migration

This commit is contained in:
2026-07-15 13:11:38 +09:00
parent f14800656b
commit 6e0c275fdd
108 changed files with 43738 additions and 560 deletions

View File

@@ -0,0 +1,52 @@
using MBN_STOCK_WEBVIEW.Core.Playout.Scenes;
namespace MBN_STOCK_WEBVIEW.Playout.Configuration;
public sealed record LegacyParityStartupCompositionResolution(
LegacySceneCueCompositionOptions Composition,
string WarningMessage)
{
public bool HasWarning => WarningMessage.Length > 0;
}
/// <summary>
/// Resolves the startup-only MainForm background behavior used by LegacyParityApp.
/// An explicit local file remains authoritative; only an absent file enables the
/// validated legacy 기본.vrv fallback.
/// </summary>
public static class LegacyParityStartupCompositionResolver
{
public const string MissingLegacyDefaultWarning =
"신뢰 배경 폴더에서 기본.vrv를 확인할 수 없어 배경없음으로 시작했습니다.";
public static LegacyParityStartupCompositionResolution Resolve(
PlayoutOptions options,
bool explicitLocalConfigurationExists)
{
ArgumentNullException.ThrowIfNull(options);
var configured = PlayoutSceneCompositionFactory.Create(options);
if (explicitLocalConfigurationExists ||
configured.BackgroundKind != LegacySceneBackgroundKind.None)
{
return new LegacyParityStartupCompositionResolution(configured, string.Empty);
}
try
{
return new LegacyParityStartupCompositionResolution(
PlayoutSceneCompositionFactory.CreateLegacyDefault(
options,
configured.FadeDuration),
string.Empty);
}
catch (PlayoutConfigurationException)
{
// Missing/invalid external media is not an application-startup failure.
// Keep the already validated None composition and expose one bounded,
// path-free warning through the native state projection.
return new LegacyParityStartupCompositionResolution(
configured,
MissingLegacyDefaultWarning);
}
}
}