|
|
|
|
<Window x:Class="SunlightAggregationManager.UserWindow.MachineSet"
|
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
|
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:local="clr-namespace:SunlightAggregationManager.UserWindow"
|
|
|
|
|
xmlns:ConvertMoels="clr-namespace:SunlightAggregationManager.ConvertMoels"
|
|
|
|
|
xmlns:lang="clr-namespace:SunlightAggregationManager"
|
|
|
|
|
xmlns:viewmodel="clr-namespace:SunlightAggregationManager.ViewModel"
|
|
|
|
|
d:DataContext="{d:DesignInstance Type=viewmodel:MainWindowViewModel}"
|
|
|
|
|
mc:Ignorable="d"
|
|
|
|
|
Title="MachineSet"
|
|
|
|
|
Loaded="Window_Loaded"
|
|
|
|
|
ResizeMode="NoResize"
|
|
|
|
|
Height="900" Width="1440" MinHeight="900" MinWidth="1440">
|
|
|
|
|
<Grid>
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition/>
|
|
|
|
|
<RowDefinition Height="5"/>
|
|
|
|
|
<RowDefinition/>
|
|
|
|
|
<RowDefinition Height="100"/>
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
<GridSplitter Grid.Row="1" Height="5" HorizontalAlignment="Stretch" Background="#FFCECECE"/>
|
|
|
|
|
<Grid Grid.Row="0">
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="500"/>
|
|
|
|
|
<ColumnDefinition Width="5"/>
|
|
|
|
|
<ColumnDefinition/>
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<GridSplitter Grid.Column="1" Width="5" HorizontalAlignment="Stretch" Background="#FFCECECE"/>
|
|
|
|
|
<Grid Grid.Column="0">
|
|
|
|
|
<!--用户-->
|
|
|
|
|
<TextBox x:Name="_Name" Height="30" Margin="105,10,10,100" VerticalAlignment="Top" FontSize="16" MaxLines="1"/>
|
|
|
|
|
<TextBlock HorizontalAlignment="Left" Height="30" Margin="15,10,0,100" TextWrapping="Wrap"
|
|
|
|
|
Text="归属信息" VerticalAlignment="Top" Width="85" FontSize="20"/>
|
|
|
|
|
<TextBox x:Name="_Machine" Height="30" Margin="105,55,10,100" VerticalAlignment="Top" FontSize="16" MaxLines="1"/>
|
|
|
|
|
<TextBlock HorizontalAlignment="Left" Height="30" Margin="15,55,0,100" TextWrapping="Wrap"
|
|
|
|
|
Text="设备名称" VerticalAlignment="Top" Width="85" FontSize="20"/>
|
|
|
|
|
<ComboBox x:Name="GROUP" Height="30" Margin="105,100,10,100" VerticalAlignment="Top" FontSize="16" IsReadOnly="True">
|
|
|
|
|
<ComboBoxItem Content="200"></ComboBoxItem>
|
|
|
|
|
<ComboBoxItem Content="202"></ComboBoxItem>
|
|
|
|
|
<ComboBoxItem Content="242W"></ComboBoxItem>
|
|
|
|
|
<ComboBoxItem Content="252"></ComboBoxItem>
|
|
|
|
|
<ComboBoxItem Content="252-2T"></ComboBoxItem>
|
|
|
|
|
<ComboBoxItem Content="252RB"></ComboBoxItem>
|
|
|
|
|
<ComboBoxItem Content="252RDRM"></ComboBoxItem>
|
|
|
|
|
<ComboBoxItem Content="252-2T"></ComboBoxItem>
|
|
|
|
|
<ComboBoxItem Content="301"></ComboBoxItem>
|
|
|
|
|
<ComboBoxItem Content="301P"></ComboBoxItem>
|
|
|
|
|
<ComboBoxItem Content="302"></ComboBoxItem>
|
|
|
|
|
<ComboBoxItem Content="303"></ComboBoxItem>
|
|
|
|
|
<ComboBoxItem Content="303PDW"></ComboBoxItem>
|
|
|
|
|
</ComboBox>
|
|
|
|
|
<TextBlock HorizontalAlignment="Left" Height="30" Margin="15,100,0,50" TextWrapping="Wrap"
|
|
|
|
|
Text="系列型号" VerticalAlignment="Top" Width="80" FontSize="20"/>
|
|
|
|
|
<TextBox x:Name="_IP" Height="30" Margin="105,145,10,100" VerticalAlignment="Top" FontSize="16" MaxLines="1"/>
|
|
|
|
|
<TextBlock HorizontalAlignment="Left" Height="30" Margin="15,145,0,100" TextWrapping="Wrap"
|
|
|
|
|
Text="连接IP" VerticalAlignment="Top" Width="85" FontSize="20"/>
|
|
|
|
|
<TextBox x:Name="_MachineUser" Height="30" Margin="105,190,10,100" VerticalAlignment="Top" FontSize="16" MaxLines="1"/>
|
|
|
|
|
<TextBlock HorizontalAlignment="Left" Height="30" Margin="15,190,0,100" TextWrapping="Wrap"
|
|
|
|
|
Text="连接用户" VerticalAlignment="Top" Width="85" FontSize="20"/>
|
|
|
|
|
<TextBox x:Name="_MachinePassword" Height="30" Margin="105,235,10,100" VerticalAlignment="Top" FontSize="16" MaxLines="1"/>
|
|
|
|
|
<TextBlock HorizontalAlignment="Left" Height="30" Margin="15,235,0,100" TextWrapping="Wrap"
|
|
|
|
|
Text="连接密码" VerticalAlignment="Top" Width="85" FontSize="20"/>
|
|
|
|
|
<TextBox x:Name="_inf" Height="90" Margin="105,280,10,100" VerticalAlignment="Top" FontSize="16" MaxLines="1"/>
|
|
|
|
|
|
|
|
|
|
</Grid>
|
|
|
|
|
<Grid Grid.Column="2" Margin="0">
|
|
|
|
|
<ScrollViewer Margin="0" VerticalScrollBarVisibility="Auto">
|
|
|
|
|
<WrapPanel Orientation="Horizontal" x:Name="Capacity" >
|
|
|
|
|
</WrapPanel>
|
|
|
|
|
</ScrollViewer>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Grid>
|
|
|
|
|
<!--表-->
|
|
|
|
|
<DataGrid Grid.Row="2" x:Name="DataGridm" MouseDoubleClick="DataGridm_MouseDoubleClick"
|
|
|
|
|
SelectionMode="Single" AlternationCount="2" IsReadOnly="True"
|
|
|
|
|
ItemsSource="{Binding Machines.DefaultView}"
|
|
|
|
|
AutoGenerateColumns="False" MinColumnWidth="30"
|
|
|
|
|
HorizontalGridLinesBrush="#FFC9C9C9" VerticalGridLinesBrush="#FFC9C9C9"
|
|
|
|
|
GridLinesVisibility="All" BorderBrush="{x:Null}"
|
|
|
|
|
BorderThickness="1,1,1,1" ColumnHeaderHeight="40"
|
|
|
|
|
HorizontalContentAlignment="Right" Grid.ColumnSpan="2"
|
|
|
|
|
CanUserResizeRows="False" CanUserAddRows="False"
|
|
|
|
|
CanUserDeleteRows="False" CanUserReorderColumns="False"
|
|
|
|
|
CanUserResizeColumns="False" CanUserSortColumns="False"
|
|
|
|
|
HeadersVisibility ="Column" Background="{x:Null}">
|
|
|
|
|
<DataGrid.RowStyle >
|
|
|
|
|
<Style TargetType="{x:Type DataGridRow}">
|
|
|
|
|
<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">
|
|
|
|
|
</Trigger>
|
|
|
|
|
</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="#000000"/>
|
|
|
|
|
</Trigger>
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
</Style>
|
|
|
|
|
</DataGrid.CellStyle>
|
|
|
|
|
<DataGrid.Columns>
|
|
|
|
|
<DataGridTextColumn Width="0" FontSize="26" Binding="{Binding ID}" MaxWidth="0" CanUserReorder="False"/>
|
|
|
|
|
<DataGridTextColumn Header="{x:Static lang:ResourceLanguage.information}" Width="200" FontSize="26"
|
|
|
|
|
Binding="{Binding Name}" MaxWidth="200" MinWidth="200" CanUserReorder="False"/>
|
|
|
|
|
<DataGridTextColumn Header="{x:Static lang:ResourceLanguage.machine}" Width="200" FontSize="26"
|
|
|
|
|
Binding="{Binding Machine}" MaxWidth="200" MinWidth="200" CanUserReorder="False"/>
|
|
|
|
|
<DataGridTextColumn Header="{x:Static lang:ResourceLanguage.state}" Width="150" FontSize="26"
|
|
|
|
|
Binding="{Binding State}" MinWidth="150" CanUserReorder="False"/>
|
|
|
|
|
<DataGridTextColumn Header="{x:Static lang:ResourceLanguage.Mode}" Width="150" FontSize="26"
|
|
|
|
|
Binding="{Binding Model}" MinWidth="150" CanUserReorder="False"/>
|
|
|
|
|
<DataGridTextColumn Header="IP" Width="150" FontSize="26"
|
|
|
|
|
Binding="{Binding IP}" MinWidth="150" CanUserReorder="False"/>
|
|
|
|
|
<DataGridTextColumn Header="用户" Width="150" FontSize="26"
|
|
|
|
|
Binding="{Binding MachineUser}" MinWidth="150" CanUserReorder="False"/>
|
|
|
|
|
<DataGridTextColumn Header="密码" Width="150" FontSize="26"
|
|
|
|
|
Binding="{Binding MachinePassword}" MinWidth="150" CanUserReorder="False"/>
|
|
|
|
|
<DataGridTextColumn Header="{x:Static lang:ResourceLanguage.information}" Width="*" FontSize="26"
|
|
|
|
|
Binding="{Binding Information}" MinWidth="200" CanUserReorder="False"/>
|
|
|
|
|
</DataGrid.Columns>
|
|
|
|
|
</DataGrid>
|
|
|
|
|
<!--存储按钮-->
|
|
|
|
|
<Button Grid.Row="3" Content="存储" HorizontalAlignment="Right" Height="50" VerticalAlignment="Center" Width="100" FontSize="30"
|
|
|
|
|
Click="Button_Preservation" Margin="0,0,200,0">
|
|
|
|
|
</Button>
|
|
|
|
|
<!--删除按钮-->
|
|
|
|
|
<Button Grid.Row="3" Content="删除" HorizontalAlignment="Right" Height="50" VerticalAlignment="Center" Width="100" FontSize="30"
|
|
|
|
|
Click="Button_Delete" Margin="0,0,50,0">
|
|
|
|
|
</Button>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Window>
|