71 lines
2.9 KiB
Plaintext
71 lines
2.9 KiB
Plaintext
|
|
<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:u="https://irihi.tech/ursa"
|
||
|
|
xmlns:conv="using:Cowain.Base.Converters"
|
||
|
|
xmlns:vm="using:Plugin.Cowain.Driver.ViewModels"
|
||
|
|
xmlns:i18n="clr-namespace:Ke.Bee.Localization.Extensions;assembly=Ke.Bee.Localization"
|
||
|
|
Width="350" Height="700"
|
||
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||
|
|
x:Class="Plugin.Cowain.Driver.Views.DeviceEditDialog">
|
||
|
|
<UserControl.Resources>
|
||
|
|
<conv:I18nLocalizeConverter x:Key="i18nConverter" />
|
||
|
|
</UserControl.Resources>
|
||
|
|
<Grid RowDefinitions="* Auto" Margin="8 40 8 8">
|
||
|
|
<ScrollViewer>
|
||
|
|
<u:Form Margin="20 20" HorizontalAlignment="Stretch" LabelPosition="Top">
|
||
|
|
<u:Form.ItemsPanel>
|
||
|
|
<ItemsPanelTemplate>
|
||
|
|
<StackPanel Spacing="10"/>
|
||
|
|
</ItemsPanelTemplate>
|
||
|
|
</u:Form.ItemsPanel>
|
||
|
|
<u:FormItem u:FormItem.Label="{i18n:Localize DeviceManagement.DataGrid.DeviceType}">
|
||
|
|
<TextBlock u:FormItem.Label="Owner" Text="{Binding Device.DeviceType}" />
|
||
|
|
</u:FormItem>
|
||
|
|
<u:FormItem u:FormItem.Label="{i18n:Localize DeviceManagement.DataGrid.DriverName}">
|
||
|
|
<TextBlock u:FormItem.Label="Owner" Text="{Binding Device.DriverName}" />
|
||
|
|
</u:FormItem>
|
||
|
|
<u:FormItem u:FormItem.Label="{i18n:Localize DeviceManagement.DataGrid.DeviceName}">
|
||
|
|
<TextBox u:FormItem.Label="Owner" Text="{Binding Device.DeviceName}" />
|
||
|
|
</u:FormItem>
|
||
|
|
<u:FormItem u:FormItem.Label="{i18n:Localize DeviceManagement.DataGrid.Desc}">
|
||
|
|
<TextBox u:FormItem.Label="Owner" Text="{Binding Device.Desc}" />
|
||
|
|
</u:FormItem>
|
||
|
|
<u:FormItem u:FormItem.Label="{i18n:Localize DeviceManagement.DataGrid.Param}">
|
||
|
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
||
|
|
<TextBox u:FormItem.Label="Owner"
|
||
|
|
Classes="TextArea"
|
||
|
|
VerticalAlignment="Center"
|
||
|
|
Width="220"
|
||
|
|
Text="{Binding Device.Param}" />
|
||
|
|
<Button Content="{i18n:Localize DeviceManagement.DataGrid.Edit}"
|
||
|
|
Command="{Binding EditParamCommand}"
|
||
|
|
Theme="{DynamicResource SolidButton}" />
|
||
|
|
</StackPanel>
|
||
|
|
</u:FormItem>
|
||
|
|
<u:FormItem
|
||
|
|
u:FormItem.Label="{i18n:Localize DeviceManagement.DataGrid.Enable}">
|
||
|
|
<ToggleSwitch u:FormItem.Label="Owner"
|
||
|
|
IsChecked="{Binding Device.Enable}"
|
||
|
|
OnContent="{i18n:Localize Yes}"
|
||
|
|
OffContent="{i18n:Localize No}"/>
|
||
|
|
</u:FormItem>
|
||
|
|
</u:Form>
|
||
|
|
</ScrollViewer>
|
||
|
|
|
||
|
|
<StackPanel Grid.Row="1" Orientation="Horizontal"
|
||
|
|
HorizontalAlignment="Right" Spacing="12"
|
||
|
|
Margin="8">
|
||
|
|
<Button
|
||
|
|
Command="{Binding OkCommand}"
|
||
|
|
Content="{i18n:Localize OK}"
|
||
|
|
Theme="{DynamicResource SolidButton}" />
|
||
|
|
<Button
|
||
|
|
Command="{Binding CancelCommand}"
|
||
|
|
Content="{i18n:Localize Cancel}"
|
||
|
|
Theme="{DynamicResource SolidButton}" />
|
||
|
|
</StackPanel>
|
||
|
|
</Grid>
|
||
|
|
</UserControl>
|