34 lines
988 B
C#
34 lines
988 B
C#
using System.Windows;
|
|
|
|
namespace CtrEditor.PopUps
|
|
{
|
|
public partial class RenameImageWindow : Window
|
|
{
|
|
public string? NewImageName { get; private set; }
|
|
public bool IsOkClicked { get; private set; }
|
|
|
|
public RenameImageWindow(string originalName, string currentCustomName = null)
|
|
{
|
|
InitializeComponent();
|
|
OriginalNameTextBlock.Text = originalName;
|
|
NewNameTextBox.Text = currentCustomName ?? string.Empty;
|
|
NewNameTextBox.SelectAll();
|
|
NewNameTextBox.Focus();
|
|
}
|
|
|
|
private void OkButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
NewImageName = NewNameTextBox.Text?.Trim();
|
|
IsOkClicked = true;
|
|
DialogResult = true;
|
|
Close();
|
|
}
|
|
|
|
private void CancelButton_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
IsOkClicked = false;
|
|
DialogResult = false;
|
|
Close();
|
|
}
|
|
}
|
|
} |