Created frame for FindWindow, shortened CoinCollection
This commit is contained in:
1 parent
f298296471
commit
3234b12184
11 files changed
+70
-19
No files matched your search
@@ -3,7 +3,6 @@ using Avalonia.ReactiveUI;
|
||||
using ReactiveUI;
|
||||
using System;
|
||||
|
||||
|
||||
namespace PcgsInvUi.Views;
|
||||
|
||||
public partial class DeleteWindow : ReactiveWindow<DeleteWindowViewModel>
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<Window xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="PcgsInvUi.Views.FindWindow"
|
||||
Title="FindWindow">
|
||||
<Grid ColumnDefinitions="Auto, *" RowDefinitions="*, *">
|
||||
<Label Content="PCGS #:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5"/>
|
||||
<TextBox Grid.Row="0" Grid.Column="1" Margin="5"/>
|
||||
<Button Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Content="Find"
|
||||
HorizontalAlignment="Center" Margin="5" Width="75"/>
|
||||
</Grid>
|
||||
</Window>
|
||||
@@ -0,0 +1,15 @@
|
||||
using Avalonia.ReactiveUI;
|
||||
using PcgsInvUi.ViewModels;
|
||||
using ReactiveUI;
|
||||
using System;
|
||||
|
||||
namespace PcgsInvUi.Views;
|
||||
|
||||
public partial class FindWindow : ReactiveWindow<FindWindowViewModel>
|
||||
{
|
||||
public FindWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.WhenActivated(d => d(ViewModel!.OkCommand.Subscribe(Close)));
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
<Grid RowDefinitions="*, Auto" ShowGridLines="False">
|
||||
<DataGrid Grid.Row="0" HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
ItemsSource="{Binding CoinCollection}"
|
||||
ItemsSource="{Binding DisplayedList}"
|
||||
SelectedItem="{Binding SelectedCoin, Mode=TwoWay}"
|
||||
AutoGenerateColumns="False"
|
||||
CanUserResizeColumns="True">
|
||||
|
||||
@@ -22,4 +22,13 @@ public partial class MainWindow : ReactiveWindow<MainWindowViewModel>
|
||||
var result = await window.ShowDialog<bool>(this);
|
||||
interaction.SetOutput(result);
|
||||
}
|
||||
|
||||
public async Task ShowFindWindowAsync(InteractionContext<FindWindowViewModel, int> interaction)
|
||||
{
|
||||
var window = new FindWindow();
|
||||
window.DataContext = interaction.Input;
|
||||
|
||||
var result = await window.ShowDialog<int>(this);
|
||||
interaction.SetOutput(result);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user