26 lines
1.1 KiB
C#
26 lines
1.1 KiB
C#
using System.Windows;
|
|
|
|
namespace ytLive;
|
|
|
|
/// <summary>Asked when a PRIVATE broadcast ends — the same contract as the recording's save
|
|
/// dialog (creator ruling 2026-10-09): <b>Enter keeps</b> it on YouTube as a private video,
|
|
/// <b>Escape deletes</b> it. <c>DialogResult == true</c> = keep; false (Delete, Escape, the X)
|
|
/// = delete.</summary>
|
|
public partial class KeepBroadcastDialog : Window
|
|
{
|
|
public KeepBroadcastDialog(string title)
|
|
{
|
|
InitializeComponent();
|
|
if (Application.Current?.MainWindow is { } owner && !ReferenceEquals(owner, this))
|
|
Owner = owner;
|
|
MessageText.Text = string.IsNullOrWhiteSpace(title)
|
|
? "Your private broadcast is on YouTube as a private video. Keep it, or delete it?"
|
|
: $"\u201c{title}\u201d is on YouTube as a private video. Keep it, or delete it?";
|
|
Loaded += (_, _) => KeepBroadcastButton.Focus();
|
|
}
|
|
|
|
private void Keep_Click(object sender, RoutedEventArgs e) => DialogResult = true;
|
|
|
|
private void Delete_Click(object sender, RoutedEventArgs e) => DialogResult = false;
|
|
}
|