[chore:] removed NamePromtWindow which was useless
This commit is contained in:
@@ -1,13 +0,0 @@
|
|||||||
<Window xmlns="https://github.com/avaloniaui"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
x:Class="Logof_Client.Wiki.NamePromptWindow"
|
|
||||||
Width="400" Height="120" Title="Input">
|
|
||||||
<StackPanel Margin="8">
|
|
||||||
<TextBlock Name="LblPrompt" />
|
|
||||||
<TextBox Name="TbInput" Margin="0,6,0,6" />
|
|
||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Spacing="8">
|
|
||||||
<Button Name="BtnOk" Content="OK" />
|
|
||||||
<Button Name="BtnCancel" Content="Cancel" />
|
|
||||||
</StackPanel>
|
|
||||||
</StackPanel>
|
|
||||||
</Window>
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
using Avalonia.Controls;
|
|
||||||
using Avalonia.Interactivity;
|
|
||||||
|
|
||||||
namespace Logof_Client.Wiki;
|
|
||||||
|
|
||||||
public partial class NamePromptWindow : Window
|
|
||||||
{
|
|
||||||
private void InitializeComponent()
|
|
||||||
{
|
|
||||||
Avalonia.Markup.Xaml.AvaloniaXamlLoader.Load(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
public NamePromptWindow(string prompt)
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
LblPrompt.Text = prompt;
|
|
||||||
BtnOk.Click += BtnOk_Click;
|
|
||||||
BtnCancel.Click += (_, __) => Close(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void BtnOk_Click(object? sender, RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
Close(TbInput.Text);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user