DB integration added, multiple images for equipment

This commit is contained in:
retr0volkov
2025-07-15 11:14:28 +03:00 Unverified
parent 7a34fc2dbb
commit 8ddce4005f
38 changed files with 627 additions and 297 deletions
+18 -8
View File
@@ -2,9 +2,10 @@
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"
xmlns:anim="https://github.com/whistyun/AnimatedImage.Avalonia"
xmlns:vm="using:GazpromApp.ViewModels"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
Width="1436" Height="720"
mc:Ignorable="d" d:DesignWidth="1024" d:DesignHeight="600"
Width="1024" Height="600"
x:Class="GazpromApp.Views.MainWindow"
x:DataType="vm:MainWindowViewModel"
x:Name="Window"
@@ -70,8 +71,11 @@
</Grid.RowDefinitions>
<ScrollViewer Grid.ColumnSpan="3">
<StackPanel Orientation="Vertical">
<ItemsControl ItemsSource="{Binding Points}">
<ItemsControl.ItemTemplate>
<ItemsRepeater ItemsSource="{Binding Points}">
<ItemsRepeater.Layout>
<StackLayout Orientation="Vertical"/>
</ItemsRepeater.Layout>
<ItemsRepeater.ItemTemplate>
<DataTemplate DataType="vm:PointViewModel">
<Border CornerRadius="4" BorderThickness="1" Margin="6"
Background="{DynamicResource BackgroundBrush}"
@@ -84,8 +88,8 @@
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock FontSize="24" Margin="4" VerticalAlignment="Center"
Grid.Column="0"
Text="{Binding Name}"/>
Grid.Column="0"
Text="{Binding Name}"/>
<TextBlock Margin="4" VerticalAlignment="Center"
Grid.Column="1"
Text="{Binding Description}"/>
@@ -104,10 +108,16 @@
</Grid>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ItemsRepeater.ItemTemplate>
</ItemsRepeater>
</StackPanel>
</ScrollViewer>
<Image Width="100" Height="100" VerticalAlignment="Center"
IsVisible="{Binding IsLoading}"
HorizontalAlignment="Center"
Grid.Row="0" Grid.Column="0"
Grid.ColumnSpan="3" Grid.RowSpan="2"
anim:ImageBehavior.AnimatedSource="avares://GazpromApp/Assets/loading.gif"/>
</Grid>
</DockPanel>
</Window>