feat: complete legacy UI and playout parity migration
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user