Removed dialogs for editing equipment and points, and their related resources
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
<UserControl 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"
|
||||
xmlns:vm="using:GazpromApp.ViewModels"
|
||||
xmlns:views="using:GazpromApp.Views"
|
||||
xmlns:icons="using:Material.Icons.Avalonia"
|
||||
mc:Ignorable="d" d:DesignWidth="300" d:DesignHeight="500"
|
||||
x:Class="GazpromApp.Views.PointView"
|
||||
x:DataType="vm:PointViewModel">
|
||||
<Expander>
|
||||
<Expander.Header>
|
||||
<Grid ColumnDefinitions="Auto, Auto, *, Auto, Auto">
|
||||
<icons:MaterialIcon Kind="Location" Margin="0,0,8,0" Width="24" Height="24"/>
|
||||
<TextBlock Grid.Column="1" VerticalAlignment="Center" TextWrapping="WrapWithOverflow"
|
||||
Text="{Binding Name}"/>
|
||||
<Button Width="32" Grid.Column="3" Margin="0,0,8,0"
|
||||
Command="{Binding AddEquipmentCommand}">
|
||||
<icons:MaterialIcon Kind="Add" Width="24" Height="24"/>
|
||||
</Button>
|
||||
<Button Width="32" Grid.Column="4" Margin="0,0,8,0"
|
||||
Command="{Binding RemovePointCommand}">
|
||||
<icons:MaterialIcon Kind="Delete" Width="24" Height="24"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
</Expander.Header>
|
||||
<Grid RowDefinitions="Auto,Auto,Auto,Auto" RowSpacing="4" Margin="8,4,8,2">
|
||||
<Grid.Styles>
|
||||
<Style Selector="ItemsRepeater.empty">
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
</Style>
|
||||
<Style Selector="ItemsRepeater.not-empty">
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
</Style>
|
||||
</Grid.Styles>
|
||||
<TextBlock Text="{Binding Description}"/>
|
||||
<StackPanel Grid.Row="1" Orientation="Horizontal">
|
||||
<TextBlock Text="Оборудований: "/>
|
||||
<TextBlock Text="{Binding Equipment.Count}"/>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="2" Orientation="Horizontal">
|
||||
<TextBlock Text="Свойств: "/>
|
||||
<TextBlock Text="{Binding Properties.Count}"/>
|
||||
</StackPanel>
|
||||
<ItemsRepeater Grid.Row="3" Margin="4,8"
|
||||
ItemsSource="{Binding Images}"
|
||||
Classes.empty="{Binding !!Images.Count}"
|
||||
Classes.not-empty="{Binding !Images.Count}">
|
||||
<ItemsRepeater.Layout>
|
||||
<StackLayout Orientation="Horizontal" Spacing="4"/>
|
||||
</ItemsRepeater.Layout>
|
||||
<ItemsRepeater.ItemTemplate>
|
||||
<DataTemplate DataType="vm:ImageViewModel">
|
||||
<Image Width="64" Height="64" Source="{Binding FileName}"/>
|
||||
</DataTemplate>
|
||||
</ItemsRepeater.ItemTemplate>
|
||||
</ItemsRepeater>
|
||||
</Grid>
|
||||
</Expander>
|
||||
</UserControl>
|
||||
Reference in New Issue
Block a user