Files
romrepomgr/RomRepoMgr/Views/EditDat.axaml

268 lines
13 KiB
Plaintext
Raw Normal View History

<!--
// /***************************************************************************
// RomRepoMgr - ROM repository manager
//
//
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// [ License ]
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General public License for more details.
//
// You should have received a copy of the GNU General public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
//
2024-11-08 19:13:57 +00:00
// Copyright © 2020-2024 Natalia Portillo
// ****************************************************************************/
-->
2024-11-09 01:37:59 +00:00
<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"
2024-11-09 01:37:59 +00:00
xmlns:vm="clr-namespace:RomRepoMgr.ViewModels;assembly=RomRepoMgr"
xmlns:resources="clr-namespace:RomRepoMgr.Resources"
2024-11-09 01:37:59 +00:00
mc:Ignorable="d"
d:DesignWidth="800"
d:DesignHeight="450"
Width="720"
Height="480"
x:Class="RomRepoMgr.Views.EditDat"
Icon="/Assets/avalonia-logo.ico"
CanResize="False"
Title="{x:Static resources:Localization.EditDatTitle}"
2024-11-09 01:37:59 +00:00
WindowStartupLocation="CenterScreen">
<Design.DataContext>
<vm:EditDatViewModel />
</Design.DataContext>
<Border Padding="15">
<Grid RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto">
<Grid Grid.Row="0"
ColumnDefinitions="140,*">
2024-11-09 01:37:59 +00:00
<TextBlock Grid.Column="0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Text="{x:Static resources:Localization.RomSetNameLabel}"
2024-11-09 01:37:59 +00:00
FontWeight="Bold"
Padding="5" />
<TextBox Grid.Column="1"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
2025-07-08 18:14:37 +01:00
Text="{Binding Name, Mode=TwoWay}"
Padding="5" />
</Grid>
<Grid Grid.Row="1"
ColumnDefinitions="140,*">
2024-11-09 01:37:59 +00:00
<TextBlock Grid.Column="0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Text="{x:Static resources:Localization.RomSetVersionLabel}"
2024-11-09 01:37:59 +00:00
FontWeight="Bold"
Padding="5" />
<TextBox Grid.Column="1"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
2025-07-08 18:14:37 +01:00
Text="{Binding Version, Mode=TwoWay}"
2024-11-09 01:37:59 +00:00
Padding="5" />
</Grid>
<Grid Grid.Row="2"
ColumnDefinitions="140,*">
2024-11-09 01:37:59 +00:00
<TextBlock Grid.Column="0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Text="{x:Static resources:Localization.RomSetAuthorLabel}"
2024-11-09 01:37:59 +00:00
FontWeight="Bold"
Padding="5" />
<TextBox Grid.Column="1"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
2025-07-08 18:14:37 +01:00
Text="{Binding Author, Mode=TwoWay}"
2024-11-09 01:37:59 +00:00
Padding="5" />
</Grid>
<Grid Grid.Row="3"
ColumnDefinitions="140,*">
2024-11-09 01:37:59 +00:00
<TextBlock Grid.Column="0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Text="{x:Static resources:Localization.RomSetCategoryLabel}"
2024-11-09 01:37:59 +00:00
FontWeight="Bold"
Padding="5" />
<TextBox Grid.Column="1"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
2025-07-08 18:14:37 +01:00
Text="{Binding Category, Mode=TwoWay}"
2024-11-09 01:37:59 +00:00
Padding="5" />
2020-09-05 01:52:43 +01:00
</Grid>
<Grid Grid.Row="4"
ColumnDefinitions="140,*">
2024-11-09 01:37:59 +00:00
<TextBlock Grid.Column="0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Text="{x:Static resources:Localization.RomSetCommentLabel}"
2024-11-09 01:37:59 +00:00
FontWeight="Bold"
Padding="5" />
<TextBox Grid.Column="1"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
2025-07-08 18:14:37 +01:00
Text="{Binding Comment, Mode=TwoWay}"
2024-11-09 01:37:59 +00:00
Padding="5" />
</Grid>
<Grid Grid.Row="5"
ColumnDefinitions="140,*">
2024-11-09 01:37:59 +00:00
<TextBlock Grid.Column="0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Text="{x:Static resources:Localization.RomSetDateLabel}"
2024-11-09 01:37:59 +00:00
FontWeight="Bold"
Padding="5" />
<TextBox Grid.Column="1"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
2025-07-08 18:14:37 +01:00
Text="{Binding Date, Mode=TwoWay}"
Padding="5" />
</Grid>
<Grid Grid.Row="6"
ColumnDefinitions="140,*">
2024-11-09 01:37:59 +00:00
<TextBlock Grid.Column="0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Text="{x:Static resources:Localization.RomSetDescriptionLabel}"
2024-11-09 01:37:59 +00:00
FontWeight="Bold"
Padding="5" />
<TextBox Grid.Column="1"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
2025-07-08 18:14:37 +01:00
Text="{Binding Description, Mode=TwoWay}"
2024-11-09 01:37:59 +00:00
Padding="5" />
</Grid>
<Grid Grid.Row="7"
ColumnDefinitions="140,*">
2024-11-09 01:37:59 +00:00
<TextBlock Grid.Column="0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Text="{x:Static resources:Localization.HomepageLabel}"
2024-11-09 01:37:59 +00:00
FontWeight="Bold"
Padding="5" />
<TextBox Grid.Column="1"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
2025-07-08 18:14:37 +01:00
Text="{Binding Homepage, Mode=TwoWay}"
2024-11-09 01:37:59 +00:00
Padding="5" />
</Grid>
<Grid Grid.Row="8"
ColumnDefinitions="140,*">
2024-11-09 01:37:59 +00:00
<TextBlock Grid.Column="0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Text="{x:Static resources:Localization.TotalMachinesLabel}"
2024-11-09 01:37:59 +00:00
FontWeight="Bold"
Padding="5" />
<TextBlock Grid.Column="1"
HorizontalAlignment="Left"
VerticalAlignment="Center"
2025-07-08 18:14:37 +01:00
Text="{Binding TotalMachines, Mode=OneWay}"
2024-11-09 01:37:59 +00:00
Padding="5" />
</Grid>
<Grid Grid.Row="9"
ColumnDefinitions="140,*">
2024-11-09 01:37:59 +00:00
<TextBlock Grid.Column="0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Text="{x:Static resources:Localization.CompleteMachinesLabel}"
2024-11-09 01:37:59 +00:00
FontWeight="Bold"
Padding="5" />
<TextBlock Grid.Column="1"
HorizontalAlignment="Left"
VerticalAlignment="Center"
2025-07-08 18:14:37 +01:00
Text="{Binding CompleteMachines, Mode=OneWay}"
2024-11-09 01:37:59 +00:00
Padding="5" />
</Grid>
<Grid Grid.Row="10"
ColumnDefinitions="140,*">
2024-11-09 01:37:59 +00:00
<TextBlock Grid.Column="0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Text="{x:Static resources:Localization.IncompleteMachinesLabel}"
2024-11-09 01:37:59 +00:00
FontWeight="Bold"
Padding="5" />
<TextBlock Grid.Column="1"
HorizontalAlignment="Left"
VerticalAlignment="Center"
2025-07-08 18:14:37 +01:00
Text="{Binding IncompleteMachines, Mode=OneWay}"
2024-11-09 01:37:59 +00:00
Padding="5" />
</Grid>
<Grid Grid.Row="11"
ColumnDefinitions="140,*">
2024-11-09 01:37:59 +00:00
<TextBlock Grid.Column="0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Text="{x:Static resources:Localization.TotalRomsLabel}"
2024-11-09 01:37:59 +00:00
FontWeight="Bold"
Padding="5" />
<TextBlock Grid.Column="1"
HorizontalAlignment="Left"
VerticalAlignment="Center"
2025-07-08 18:14:37 +01:00
Text="{Binding TotalRoms, Mode=OneWay}"
2024-11-09 01:37:59 +00:00
Padding="5" />
</Grid>
<Grid Grid.Row="12"
ColumnDefinitions="140,*">
2024-11-09 01:37:59 +00:00
<TextBlock Grid.Column="0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Text="{x:Static resources:Localization.HaveRomsLabel}"
2024-11-09 01:37:59 +00:00
FontWeight="Bold"
Padding="5" />
<TextBlock Grid.Column="1"
HorizontalAlignment="Left"
VerticalAlignment="Center"
2025-07-08 18:14:37 +01:00
Text="{Binding HaveRoms, Mode=OneWay}"
2024-11-09 01:37:59 +00:00
Padding="5" />
</Grid>
<Grid Grid.Row="13"
ColumnDefinitions="140,*">
2024-11-09 01:37:59 +00:00
<TextBlock Grid.Column="0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Text="{x:Static resources:Localization.MissRomsLabel}"
2024-11-09 01:37:59 +00:00
FontWeight="Bold"
Padding="5" />
<TextBlock Grid.Column="1"
HorizontalAlignment="Left"
VerticalAlignment="Center"
2025-07-08 18:14:37 +01:00
Text="{Binding MissRoms, Mode=OneWay}"
2024-11-09 01:37:59 +00:00
Padding="5" />
</Grid>
2024-11-09 01:37:59 +00:00
<StackPanel Grid.Row="14"
Orientation="Horizontal"
HorizontalAlignment="Right">
<Button HorizontalAlignment="Right"
VerticalAlignment="Center"
2025-07-08 18:14:37 +01:00
Command="{Binding SaveCommand, Mode=OneWay}"
IsVisible="{Binding Modified, Mode=OneWay}">
<TextBlock Text="{x:Static resources:Localization.SaveLabel}" />
</Button>
2024-11-09 01:37:59 +00:00
<Button HorizontalAlignment="Right"
VerticalAlignment="Center"
2025-07-08 18:14:37 +01:00
Command="{Binding CancelCommand, Mode=OneWay}"
IsVisible="{Binding Modified, Mode=OneWay}">
<TextBlock Text="{x:Static resources:Localization.CancelLabel}" />
</Button>
2024-11-09 01:37:59 +00:00
<Button HorizontalAlignment="Right"
VerticalAlignment="Center"
2025-07-08 18:14:37 +01:00
Command="{Binding CloseCommand, Mode=OneWay}"
IsVisible="{Binding !Modified, Mode=OneWay}">
<TextBlock Text="{x:Static resources:Localization.CloseLabel}" />
</Button>
</StackPanel>
</Grid>
</Border>
</Window>