Modifying equipment works
This commit is contained in:
@@ -2,8 +2,78 @@
|
||||
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"
|
||||
xmlns:vm="using:GazpromApp.ViewModels"
|
||||
x:Name="Window"
|
||||
mc:Ignorable="d" d:DesignWidth="1000" d:DesignHeight="600"
|
||||
Width="1000" Height="600"
|
||||
x:Class="GazpromApp.Views.EditEquipmentDialog"
|
||||
Title="EditEquipmentDialog">
|
||||
Welcome to Avalonia!
|
||||
x:DataType="vm:EditEquipmentDialogViewModel"
|
||||
Title="EditEquipmentDialog"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
Closing="Window_OnClosing"
|
||||
Closed="Window_OnClosed">
|
||||
<Design.DataContext>
|
||||
<vm:EditEquipmentDialogViewModel/>
|
||||
</Design.DataContext>
|
||||
<Grid RowDefinitions="70,150,*,Auto" ColumnDefinitions="*,100,220" x:Name="Root">
|
||||
<TextBlock Grid.Column="0" Grid.Row="0" FontSize="28" Margin="20,4,0,4"
|
||||
Text="{Binding Name}"
|
||||
IsVisible="{Binding !IsNameEditing}"/>
|
||||
<TextBox Grid.Column="0" Grid.Row="0" Margin="12,12,0,4"
|
||||
Text="{Binding Name}"
|
||||
IsVisible="{Binding IsNameEditing}"/>
|
||||
<Button Grid.Column="1" Grid.Row="0" HorizontalAlignment="Center" Margin="10"
|
||||
Command="{Binding EditNameCommand}">
|
||||
<Image Width="24" Height="24" Source="avares://GazpromApp/Assets/ic_fluent_edit_24_filled (Custom).png"/>
|
||||
</Button>
|
||||
|
||||
<TextBlock Grid.Column="0" Grid.Row="1" Margin="20,4,0,4"
|
||||
Text="{Binding Description}"
|
||||
IsVisible="{Binding !IsDescriptionEditing}"/>
|
||||
<TextBox Grid.Column="0" Grid.Row="1" Margin="12,4,0,4"
|
||||
Text="{Binding Description}"
|
||||
IsVisible="{Binding IsDescriptionEditing}"/>
|
||||
<Button Grid.Column="1" Grid.Row="1" HorizontalAlignment="Center" Margin="10"
|
||||
Command="{Binding EditDescriptionCommand}">
|
||||
<Image Width="24" Height="24" Source="avares://GazpromApp/Assets/ic_fluent_edit_24_filled (Custom).png"/>
|
||||
</Button>
|
||||
|
||||
<Grid Grid.Row="0" Grid.RowSpan="2" Grid.Column="2"
|
||||
ColumnDefinitions="*,20,4,20,8" RowDefinitions="8,20,*"
|
||||
IsVisible="{Binding IsImageSelected}">
|
||||
|
||||
<Image Grid.ColumnSpan="5" Grid.RowSpan="3"
|
||||
Source="{Binding Image.FileName, FallbackValue=null}"/>
|
||||
<Button Grid.Row="1" Grid.Column="1" Width="20" Height="20"
|
||||
Command="{Binding ViewImageCommand}">
|
||||
<Image Width="16" Height="16" Source="avares://GazpromApp/Assets/ic_fluent_eye_show_24_filled (Custom) 16.png"/>
|
||||
</Button>
|
||||
<Button Grid.Row="1" Grid.Column="3" Width="20" Height="20"
|
||||
Command="{Binding DeleteImageCommand}">
|
||||
<Image Width="16" Height="16" Source="avares://GazpromApp/Assets/ic_fluent_delete_24_filled (Custom) 16.png"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
<Button Grid.Row="0" Grid.RowSpan="2" Grid.Column="2" HorizontalAlignment="Center"
|
||||
IsVisible="{Binding !IsImageSelected}"
|
||||
Command="{Binding AddImageCommand}"
|
||||
CommandParameter="{Binding #Window}">
|
||||
<Image Width="24" Height="24"
|
||||
Source="avares://GazpromApp/Assets/ic_fluent_camera_add_24_filled (Custom).png"/>
|
||||
</Button>
|
||||
|
||||
<TabControl Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="2">
|
||||
<TabItem Header="Тех. осмотры">
|
||||
|
||||
</TabItem>
|
||||
<TabItem Header="Свойства">
|
||||
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
|
||||
<Button Grid.Column="0" Grid.Row="3" Margin="8" Content="Отменить"
|
||||
Command="{Binding CancelEditCommand}"
|
||||
CommandParameter="{Binding #Window}"/>
|
||||
<Button Grid.Column="2" Grid.Row="3" Margin="8" Content="Сохранить" HorizontalAlignment="Right"
|
||||
Command="{Binding CompleteEditCommand}"/>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
||||
Reference in New Issue
Block a user