@ -6,9 +6,9 @@
xmlns:local="clr-namespace:SlnMesnac.WPF"
xmlns:local="clr-namespace:SlnMesnac.WPF"
mc:Ignorable="d"
mc:Ignorable="d"
Title="MainWindow" Height="1080" Width="1920"
Title="MainWindow" Height="1080" Width="1920"
WindowState="Maximized" WindowStyle="None" ResizeMode="NoResize" Topmost="False">
WindowState="Normal" WindowStyle="SingleBorderWindow" ResizeMode="NoResize" Topmost="False">
<Window.Background>
<Window.Background>
<ImageBrush ImageSource="/Templates/image/ background.j pg" />
<ImageBrush ImageSource="/background.pn g" />
</Window.Background>
</Window.Background>
<Border Margin="5" Background="Transparent" CornerRadius="10">
<Border Margin="5" Background="Transparent" CornerRadius="10">
@ -24,42 +24,22 @@
<RowDefinition Height="0.7*"/>
<RowDefinition Height="0.7*"/>
</Grid.RowDefinitions>
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderBrush="Red" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="2,2">
<Border Grid.Row="0" BorderBrush="Red" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="2,2">
<Grid>
<StackPanel Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center">
<Grid.ColumnDefinitions>
<TextBlock Text="行李空框调度系统" FontSize="50" Foreground="White" FontWeight="Bold"/>
<ColumnDefinition Width="2*"/>
</StackPanel>
<ColumnDefinition Width="7*"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="行李空框调度系统" FontSize="50" Foreground="White" FontWeight="Bold"/>
</StackPanel>
<StackPanel Grid.Column="2" VerticalAlignment="Center" HorizontalAlignment="Right">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<!-- <TextBlock Grid.Column="0" Text="白班" FontSize="25" Foreground="White" FontWeight="Bold" Margin="0,0,30,0"/> -->
<!-- <TextBlock Grid.Column="1" Text="|" FontSize="25" Foreground="White" FontWeight="Bold" Margin="0,0,30,0"/> -->
<!-- <TextBlock Grid.Column="2" Text="SCADA" FontSize="25" Foreground="White" FontWeight="Bold" Margin="0,0,10,0"/> -->
</Grid>
</StackPanel>
</Grid>
</Border>
</Border>
<Border Grid.Row="2" BorderBrush="Red" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="2,5,2,2">
<Border Grid.Row="2" BorderBrush="Red" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="2,5,2,2">
<ContentControl Content="{Binding UserContent}"/>
<ContentControl Content="{Binding UserContent}"/>
</Border>
</Border>
<!-- 按钮状态栏 -->
<Border Grid.Row="3" BorderBrush="#1254AB" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="6,0,6,7">
<Border Grid.Row="3" BorderBrush="#1254AB" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="6,0,6,7">
<Border.Effect>
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
</Border.Effect>
<Grid>
<Grid>
<Grid.ColumnDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="122 7*"/>
<ColumnDefinition Width="7*"/>
<ColumnDefinition Width="671 *"/>
<ColumnDefinition Width="3*"/>
</Grid.ColumnDefinitions>
</Grid.ColumnDefinitions>
<StackPanel VerticalAlignment="Center" Orientation="Horizontal" Height="30" Margin="10,0,10,0">
<StackPanel VerticalAlignment="Center" Orientation="Horizontal" Height="30" Margin="10,0,10,0">
<Button Content="首 页" x:Name="Index" Command="{Binding ControlOnClickCommand}" CommandParameter="{Binding Name,ElementName=Index}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="10,0,10,0"/>
<Button Content="首 页" x:Name="Index" Command="{Binding ControlOnClickCommand}" CommandParameter="{Binding Name,ElementName=Index}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="10,0,10,0"/>
@ -68,115 +48,15 @@
<Button Content="控 制" x:Name="Control" Command="{Binding ControlOnClickCommand}" CommandParameter="{Binding Name,ElementName=Control}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="Green" BorderBrush="#FF36B5C1" Margin="0,0,10,0"/>
<Button Content="控 制" x:Name="Control" Command="{Binding ControlOnClickCommand}" CommandParameter="{Binding Name,ElementName=Control}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="Green" BorderBrush="#FF36B5C1" Margin="0,0,10,0"/>
<Button Content="最小化" x:Name="Minimized" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Minimized}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#FF9900" BorderBrush="#FF9900" Margin="0,0,10,0"/>
<Button Content="最小化" x:Name="Minimized" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Minimized}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#FF9900" BorderBrush="#FF9900" Margin="0,0,10,0"/>
<Button Content="退 出" x:Name="Exit" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Exit}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#FF0033" BorderBrush="#FF0033" Margin="0,0,10,0"/>
<Button Content="退 出" x:Name="Exit" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Exit}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#FF0033" BorderBrush="#FF0033" Margin="0,0,10,0"/>
<!--<Button Content="发送开始抓取" x:Name="TestButton1" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=TestButton1}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="0,0,10,0" Click="Button_Click_1"/>
<Button Content="D无定抓取" x:Name="TestButton11" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=TestButton11}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="0,0,10,0" Click="Button_Click_1"/>
<Button Content="A无定抓取" x:Name="TestButton12" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=TestButton12}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="0,0,10,0" Click="Button_Click_1"/>
<Button Content="发送结束抓取" x:Name="TestButton2" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=TestButton2}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="0,0,10,0" Click="Button_Click_2"/>
<Button Content="调用800小车" x:Name="TestButton3" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=TestButton3}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="0,0,10,0" Click="Button_Click_3"/>
<Button Content="入库800小车" x:Name="TestButton4" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=TestButton4}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="0,0,10,0" Click="Button_Click_4"/>
<Button Content="调用1000小车" x:Name="TestButton8" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=TestButton8}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="0,0,10,0" Click="Button_Click_3"/>
<Button Content="入库1000小车" x:Name="TestButton9" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=TestButton9}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="0,0,10,0" Click="Button_Click_4"/>
<Button Content="复位1000小车" x:Name="TestButton10" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=TestButton10}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="0,0,10,0" Click="Button_Click_4"/>
<Button Content="手动停止任务" x:Name="TestButton5" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=TestButton5}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="0,0,10,0" Click="Button_Click_5"/>
<Button Content="手动清除报警" x:Name="TestButton6" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=TestButton6}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="0,0,10,0" Click="Button_Click_6"/>
<Button Content="流程开始" x:Name="TestButton7" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=TestButton7}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="0,0,10,0" Click="Button_Click_7"/>-->
</StackPanel>
</StackPanel>
<StackPanel Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Left" Orientation="Horizontal" Height="50" Margin="376,0,0,0" Width="253">
<!-- 状态显示 -->
<StackPanel Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Right" Orientation="Horizontal" Height="50" Margin="10,10,10,10" Width="253" FlowDirection="RightToLeft">
<!--多行状态显示-->
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Margin="0,0,0,0" VerticalAlignment="Center">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="1">
<TextBlock Text="连接状态" FontSize="15" Foreground="Black" Margin="2,0,10,0"/>
</StackPanel>
<StackPanel Grid.Column="0">
<Ellipse Width="20" Height="20">
<Ellipse.Style>
<Style TargetType="Ellipse">
<Style.Triggers>
<DataTrigger Binding="{Binding PresentColor}" Value="0">
<Setter Property="Shape.Fill" Value="Orange"/>
</DataTrigger>
<DataTrigger Binding="{Binding PresentColor}" Value="1">
<Setter Property="Shape.Fill" Value="Green"/>
</DataTrigger>
<DataTrigger Binding="{Binding PresentColor}" Value="2">
<Setter Property="Shape.Fill" Value="Red"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Ellipse.Style>
</Ellipse>
</StackPanel>
</Grid>
</StackPanel>
</Grid>
</StackPanel>
<StackPanel Grid.Row="1" Margin="0,10,0,0" VerticalAlignment="Center">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="1">
<TextBlock Text="连接状态" FontSize="15" Foreground="Black" Margin="2,0,10,0"/>
</StackPanel>
<StackPanel Grid.Column="0">
<Ellipse Width="20" Height="20">
<Ellipse.Style>
<Style TargetType="Ellipse">
<Style.Triggers>
<DataTrigger Binding="{Binding PresentColor}" Value="0">
<Setter Property="Shape.Fill" Value="Orange"/>
</DataTrigger>
<DataTrigger Binding="{Binding PresentColor}" Value="1">
<Setter Property="Shape.Fill" Value="Green"/>
</DataTrigger>
<DataTrigger Binding="{Binding PresentColor}" Value="2">
<Setter Property="Shape.Fill" Value="Red"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Ellipse.Style>
</Ellipse>
</StackPanel>
</Grid>
</StackPanel>
</Grid>
</StackPanel>
</Grid>
<!--单行状态显示-->
<Grid>
<Grid>
<Grid.ColumnDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<!--<ColumnDefinition Width="*"/>-->
</Grid.ColumnDefinitions>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" VerticalAlignment="Center" FlowDirection="LeftToRight">
<StackPanel Grid.Column="0">
<Grid>
<Grid>
<Grid.ColumnDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
@ -187,13 +67,13 @@
<Ellipse.Style>
<Ellipse.Style>
<Style TargetType="Ellipse">
<Style TargetType="Ellipse">
<Style.Triggers>
<Style.Triggers>
<DataTrigger Binding="{Binding ShellScanner Status}" Value="0">
<DataTrigger Binding="{Binding Vision Status}" Value="0">
<Setter Property="Shape.Fill" Value="Orange"/>
<Setter Property="Shape.Fill" Value="Orange"/>
</DataTrigger>
</DataTrigger>
<DataTrigger Binding="{Binding ShellScanner Status}" Value="1">
<DataTrigger Binding="{Binding Vision Status}" Value="1">
<Setter Property="Shape.Fill" Value="Green"/>
<Setter Property="Shape.Fill" Value="Green"/>
</DataTrigger>
</DataTrigger>
<DataTrigger Binding="{Binding ShellScanner Status}" Value="2">
<DataTrigger Binding="{Binding Vision Status}" Value="2">
<Setter Property="Shape.Fill" Value="Red"/>
<Setter Property="Shape.Fill" Value="Red"/>
</DataTrigger>
</DataTrigger>
</Style.Triggers>
</Style.Triggers>
@ -202,12 +82,11 @@
</Ellipse>
</Ellipse>
</StackPanel>
</StackPanel>
<StackPanel Grid.Column="1" VerticalAlignment="Center">
<StackPanel Grid.Column="1" VerticalAlignment="Center">
<TextBlock Text="机械臂 " FontSize="15" Foreground="#FFFFFF" Margin="2,0,10,0"/>
<TextBlock Text="视觉 " FontSize="15" Foreground="#FFFFFF" Margin="2,0,10,0"/>
</StackPanel>
</StackPanel>
</Grid>
</Grid>
</StackPanel>
</StackPanel>
<StackPanel Grid.Column="1" VerticalAlignment="Center" FlowDirection="LeftToRight">
<StackPanel Grid.Column="1">
<Grid>
<Grid>
<Grid.ColumnDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
@ -218,13 +97,13 @@
<Ellipse.Style>
<Ellipse.Style>
<Style TargetType="Ellipse">
<Style TargetType="Ellipse">
<Style.Triggers>
<Style.Triggers>
<DataTrigger Binding="{Binding BoldScanner Status}" Value="0">
<DataTrigger Binding="{Binding AGV Status}" Value="0">
<Setter Property="Shape.Fill" Value="Orange"/>
<Setter Property="Shape.Fill" Value="Orange"/>
</DataTrigger>
</DataTrigger>
<DataTrigger Binding="{Binding BoldScanner Status}" Value="1">
<DataTrigger Binding="{Binding AGV Status}" Value="1">
<Setter Property="Shape.Fill" Value="Green"/>
<Setter Property="Shape.Fill" Value="Green"/>
</DataTrigger>
</DataTrigger>
<DataTrigger Binding="{Binding BoldScanner Status}" Value="2">
<DataTrigger Binding="{Binding AGV Status}" Value="2">
<Setter Property="Shape.Fill" Value="Red"/>
<Setter Property="Shape.Fill" Value="Red"/>
</DataTrigger>
</DataTrigger>
</Style.Triggers>
</Style.Triggers>
@ -233,49 +112,14 @@
</Ellipse>
</Ellipse>
</StackPanel>
</StackPanel>
<StackPanel Grid.Column="1" VerticalAlignment="Center">
<StackPanel Grid.Column="1" VerticalAlignment="Center">
<TextBlock Text="AGV" FontSize="15" Foreground="#FFFFFF" Margin="2,0,10,0"/>
<TextBlock Text="AGV服务器 " FontSize="15" Foreground="#FFFFFF" Margin="2,0,10,0"/>
</StackPanel>
</StackPanel>
</Grid>
</Grid>
</StackPanel>
</StackPanel>
<!--<StackPanel Grid.Column="2">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0">
<Ellipse Width="30" Height="30">
<Ellipse.Style>
<Style TargetType="Ellipse">
<Style.Triggers>
<DataTrigger Binding="{Binding PlcStatus}" Value="0">
<Setter Property="Shape.Fill" Value="Orange"/>
</DataTrigger>
<DataTrigger Binding="{Binding PlcStatus}" Value="1">
<Setter Property="Shape.Fill" Value="Green"/>
</DataTrigger>
<DataTrigger Binding="{Binding PlcStatus}" Value="2">
<Setter Property="Shape.Fill" Value="Red"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Ellipse.Style>
</Ellipse>
</StackPanel>
<StackPanel Grid.Column="1" VerticalAlignment="Center">
<TextBlock Text="PLC状态" FontSize="15" Foreground="#FFFFFF" Margin="2,0,10,0"/>
</StackPanel>
</Grid>
</StackPanel>-->
</Grid>
</Grid>
</StackPanel>
</StackPanel>
</Grid>
</Grid>
</Border>
</Border>
</Grid>
</Grid>
</Border>
</Border>
</Window>
</Window>