중간저장 04.20
This commit is contained in:
@@ -4,6 +4,7 @@ using System.Text.Json.Serialization;
|
||||
using Microsoft.UI;
|
||||
using Microsoft.UI.Xaml.Media;
|
||||
using Tornado3_2026Election.Common;
|
||||
using Tornado3_2026Election.Services;
|
||||
|
||||
namespace Tornado3_2026Election.Domain;
|
||||
|
||||
@@ -13,6 +14,9 @@ public sealed class ChannelScheduleItem : ObservableObject
|
||||
private string _lastError = string.Empty;
|
||||
private DateTimeOffset? _lastPlayedAt;
|
||||
private string _currentRegionLabel = string.Empty;
|
||||
private double _defaultCutDurationSeconds;
|
||||
private int _totalCuts;
|
||||
private ImageSource? _thumbnailSource;
|
||||
|
||||
public Guid Id { get; set; } = Guid.NewGuid();
|
||||
|
||||
@@ -26,9 +30,17 @@ public sealed class ChannelScheduleItem : ObservableObject
|
||||
|
||||
public required bool RequiresImage { get; init; }
|
||||
|
||||
public required double DefaultCutDurationSeconds { get; init; }
|
||||
public required double DefaultCutDurationSeconds
|
||||
{
|
||||
get => _defaultCutDurationSeconds;
|
||||
set => SetProperty(ref _defaultCutDurationSeconds, value);
|
||||
}
|
||||
|
||||
public required int TotalCuts { get; init; }
|
||||
public required int TotalCuts
|
||||
{
|
||||
get => _totalCuts;
|
||||
set => SetProperty(ref _totalCuts, value);
|
||||
}
|
||||
|
||||
public ScheduleRegionScope RegionScope { get; set; } = ScheduleRegionScope.All;
|
||||
|
||||
@@ -122,6 +134,23 @@ public sealed class ChannelScheduleItem : ObservableObject
|
||||
[JsonIgnore]
|
||||
public string DisplayName => $"{FormatName} / {DisplayRegionLabel}";
|
||||
|
||||
[JsonIgnore]
|
||||
public ImageSource? ThumbnailSource => _thumbnailSource ??= CutThumbnailAssetCatalog.CreateImageSource(FormatId);
|
||||
|
||||
[JsonIgnore]
|
||||
public bool HasThumbnail => CutThumbnailAssetCatalog.HasThumbnail(FormatId);
|
||||
|
||||
[JsonIgnore]
|
||||
public string ThumbnailStatusLabel => HasThumbnail ? "등록 썸네일" : "기본 아이콘";
|
||||
|
||||
public void RefreshThumbnail()
|
||||
{
|
||||
_thumbnailSource = CutThumbnailAssetCatalog.CreateImageSource(FormatId);
|
||||
OnPropertyChanged(nameof(ThumbnailSource));
|
||||
OnPropertyChanged(nameof(HasThumbnail));
|
||||
OnPropertyChanged(nameof(ThumbnailStatusLabel));
|
||||
}
|
||||
|
||||
public static ChannelScheduleItem FromTemplate(FormatTemplateDefinition template, ScheduleRegionOption? regionOption = null)
|
||||
{
|
||||
var selectedRegion = regionOption ?? new ScheduleRegionOption
|
||||
|
||||
Reference in New Issue
Block a user