You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
94 lines
7.8 KiB
94 lines
7.8 KiB
<UserControl x:Class="SunlightCentralizedControlManagement_SCCM_.View.DispenseMachinesSet"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:local="clr-namespace:SunlightCentralizedControlManagement_SCCM_.View"
|
|
xmlns:lang="clr-namespace:SunlightCentralizedControlManagement_SCCM_.Properties"
|
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
xmlns:ConvertMoels="clr-namespace:SunlightCentralizedControlManagement_SCCM_.ConvertMoels"
|
|
mc:Ignorable="d"
|
|
Loaded="UserControl_Loaded"
|
|
d:DesignHeight="900" d:DesignWidth="1200">
|
|
<UserControl.Resources>
|
|
<ConvertMoels:StateToColorConvert x:Key="StateToColorConvert"/>
|
|
</UserControl.Resources>
|
|
<Grid>
|
|
<DataGrid x:Name="Griddata" AlternationCount="2" IsReadOnly="True" d:ItemsSource="{d:SampleData ItemCount=999}"
|
|
Background="#FFC7C7C7" HorizontalGridLinesBrush="{x:Null}" VerticalGridLinesBrush="#FFC9C9C9"
|
|
GridLinesVisibility="All" ColumnHeaderHeight="40" HorizontalContentAlignment="Right" FontSize="15"
|
|
Grid.ColumnSpan="2" CanUserResizeRows="False" AutoGenerateColumns="False" MinColumnWidth="30"
|
|
CanUserAddRows="False" CanUserDeleteRows="False" HeadersVisibility ="Column" SelectionMode="Single"
|
|
HorizontalAlignment="Right" Width="500" MouseDoubleClick="Griddata_MouseDoubleClick">
|
|
<DataGrid.RowStyle >
|
|
<Style TargetType="{x:Type DataGridRow}">
|
|
<Setter Property="Height" Value="30" />
|
|
<Setter Property="FontSize" Value="25" />
|
|
<Style.Triggers>
|
|
<Trigger Property="ItemsControl.AlternationIndex" Value="0">
|
|
<Setter Property="Background" Value="#FFFFFFFF" />
|
|
</Trigger>
|
|
<Trigger Property="ItemsControl.AlternationIndex" Value="1">
|
|
<Setter Property="Background" Value="#FFF0F0F0" />
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="False"/>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</DataGrid.RowStyle>
|
|
<DataGrid.CellStyle>
|
|
<Style TargetType="DataGridCell">
|
|
<Setter Property="BorderThickness" Value="0"/>
|
|
<Setter Property="MinWidth" Value="20"/>
|
|
<Style.Triggers>
|
|
<Trigger Property="IsSelected" Value="True">
|
|
<Setter Property="Background" Value="#FFC0C0C0"/>
|
|
<Setter Property="BorderBrush" Value="#FFC0C0C0"/>
|
|
<Setter Property="Foreground" Value="Black"/>
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</DataGrid.CellStyle>
|
|
<DataGrid.Columns>
|
|
<!--列信息绑定-->
|
|
<DataGridTemplateColumn Width="70" Header="{x:Static lang:Resources.State}">
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<materialDesign:PackIcon Kind="StateMachine" Width="25" Height="30" VerticalAlignment="Center" HorizontalAlignment="Center"
|
|
Foreground="{Binding Path=State,Converter={StaticResource StateToColorConvert}}"/>
|
|
</DataTemplate>
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
</DataGridTemplateColumn>
|
|
<DataGridTextColumn Header="{x:Static lang:Resources.Machine}" Binding="{Binding Name}" Width="210" IsReadOnly="True"/>
|
|
<DataGridTextColumn Header="{x:Static lang:Resources.Group}" Binding="{Binding Groups}" Width="210" IsReadOnly="True"/>
|
|
<DataGridTextColumn Binding="{Binding IP}" Width="0" IsReadOnly="True"/>
|
|
<DataGridTextColumn Binding="{Binding PORT}" Width="0" IsReadOnly="True"/>
|
|
<DataGridTextColumn Binding="{Binding User}" Width="0" IsReadOnly="True"/>
|
|
<DataGridTextColumn Binding="{Binding Passsword}" Width="0" IsReadOnly="True"/>
|
|
<DataGridTextColumn Binding="{Binding LOCK}" Width="0" IsReadOnly="True"/>
|
|
</DataGrid.Columns>
|
|
</DataGrid>
|
|
|
|
<Image HorizontalAlignment="Left" x:Name="IMAGE" VerticalAlignment="Bottom" Width="400" Height="400" Margin="10,200,0,100" />
|
|
<TextBox HorizontalAlignment="Left" Height="30" Margin="150,10,0,0" x:Name="comboBoxMachine" VerticalAlignment="Top" Width="270" FontSize="20" />
|
|
<TextBlock HorizontalAlignment="Left" Height="40" Margin="10,10,0,0" TextWrapping="Wrap" Text="{x:Static lang:Resources.Machine}" VerticalAlignment="Top" Width="120" FontSize="25"/>
|
|
<TextBox HorizontalAlignment="Left" Height="30" Margin="150,150,0,0" x:Name="User" VerticalAlignment="Top" Width="270" FontSize="20" />
|
|
<TextBlock HorizontalAlignment="Left" Height="40" Margin="10,150,0,0" TextWrapping="Wrap" Text="{x:Static lang:Resources.USER}" VerticalAlignment="Top" Width="120" FontSize="25"/>
|
|
<TextBox HorizontalAlignment="Left" Height="30" Margin="150,200,0,0" x:Name="Password" VerticalAlignment="Top" Width="270" FontSize="20" />
|
|
<TextBlock HorizontalAlignment="Left" Height="40" Margin="10,200,0,0" TextWrapping="Wrap" Text="{x:Static lang:Resources.Password}" VerticalAlignment="Top" Width="120" FontSize="25"/>
|
|
<CheckBox x:Name="dLICK" Content="{x:Static lang:Resources._lock}" HorizontalAlignment="Left" Height="35 " Margin="10,250,0,0" VerticalAlignment="Top" Width="200" FontSize="20"/>
|
|
<ComboBox HorizontalAlignment="Left" Height="30" Margin="150,50,0,0" x:Name="TextMachineGroup" VerticalAlignment="Top" Width="270" FontSize="20"
|
|
DropDownClosed="TextMachineGroup_DropDownClosed" TextBoxBase.TextChanged="TextMachineGroup_DropDownClosed"/>
|
|
<TextBlock HorizontalAlignment="Left" Height="40" Margin="10,50,0,0" TextWrapping="Wrap" Text="{x:Static lang:Resources.MachineGroup}" VerticalAlignment="Top" Width="120" FontSize="25"/>
|
|
<TextBox HorizontalAlignment="Left" Height="30" Margin="150,100,0,0" x:Name="IP" VerticalAlignment="Top" Width="200" FontSize="20" MaxLines="1"/>
|
|
<TextBlock HorizontalAlignment="Left" Height="40" Margin="350,100,0,0" TextWrapping="Wrap" Text=":" VerticalAlignment="Top" Width="20" FontSize="25"/>
|
|
<TextBox HorizontalAlignment="Left" Height="30" Margin="360,100,0,0" x:Name="PORT" VerticalAlignment="Top" Width="60" FontSize="20" MaxLines="1" Text="5901"/>
|
|
<TextBlock HorizontalAlignment="Left" Height="40" Margin="10,100,0,0" TextWrapping="Wrap" Text="IP/PORT" VerticalAlignment="Top" Width="120" FontSize="25"/>
|
|
<TextBlock HorizontalAlignment="Left" Height="40" Margin="10,600,0,15" x:Name="textlog" TextWrapping="Wrap" Text="------------" VerticalAlignment="Bottom" Width="140" FontSize="20"/>
|
|
<Button Content="{x:Static lang:Resources.Save}" HorizontalAlignment="Left" Height="35" Margin="250,600,0,15" VerticalAlignment="Bottom" Width="80" Click="Save_Click"/>
|
|
<Button Content="{x:Static lang:Resources.Delete}" HorizontalAlignment="Left" Height="35" Margin="340,600,0,15" VerticalAlignment="Bottom" Width="80" Click="Delete_Click"/>
|
|
<Button Content="{x:Static lang:Resources.Test}" HorizontalAlignment="Left" Height="35" Margin="160,600,50,15" VerticalAlignment="Bottom" Width="80" Click="Test_Click"/>
|
|
|
|
|
|
|
|
</Grid>
|
|
</UserControl>
|
|
|