WinTest.xaml 16.7 KB
<Window
    x:Class="RCS.WinClient.Views.Pages.WinTest"
    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:local="clr-namespace:RCS.WinClient.Views.Pages"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    Title="手动任务"
    Width="500"
    Height="500"
    AllowsTransparency="True"
    Background="Transparent"
    Loaded="Window_Loaded"
    ResizeMode="CanResizeWithGrip"
    WindowStartupLocation="CenterScreen"
    WindowStyle="None"
    mc:Ignorable="d">

    <WindowChrome.WindowChrome>
        <WindowChrome CaptionHeight="0" ResizeBorderThickness="2" />
    </WindowChrome.WindowChrome>
    <Window.Resources>
        <Style x:Key="NoMouseOverButtonStyle" TargetType="{x:Type Button}">
            <Setter Property="BorderThickness" Value="1" />
            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
            <Setter Property="HorizontalContentAlignment" Value="Center" />
            <Setter Property="VerticalContentAlignment" Value="Center" />
            <Setter Property="Padding" Value="1" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <Border
                            x:Name="Chrome"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            SnapsToDevicePixels="true">
                            <ContentPresenter
                                Margin="{TemplateBinding Padding}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                RecognizesAccessKey="True"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

    </Window.Resources>
    <Border
        Background="White"
        BorderBrush="{StaticResource HHLGRed}"
        BorderThickness="1">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="auto" />
                <RowDefinition Height="auto" />
                <RowDefinition />
                <RowDefinition Height="auto" />
                <RowDefinition Height="auto" />
            </Grid.RowDefinitions>
            <Grid
                Name="Spl_title"
                Grid.Row="0"
                Grid.ColumnSpan="2">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="auto" />
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="auto" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition />
                </Grid.RowDefinitions>

                <Border
                    x:Name="Btn_Nail"
                    Grid.Column="0"
                    Width="30">
                    <Image
                        Width="30"
                        HorizontalAlignment="Left"
                        MouseLeftButtonDown="Btn_Nail_MouseLeftButtonDown"
                        Source="/RCS.WinClient;component/Page/Top.png" />
                </Border>

                <!--<Button
                    x:Name="Btn_Nail"
                    Grid.Column="0"
                    Width="30"
                    HorizontalAlignment="Left"
                    BorderThickness="0"
                    Click="Button_Click"
                    Style="{StaticResource NoMouseOverButtonStyle}">
                    <Button.Background>
                        <ImageBrush ImageSource="/RCS.WinClient;component/Page/Top.png" />
                    </Button.Background>
                    <Button.Foreground>
                        <SolidColorBrush Color="Black" />
                    </Button.Foreground>
                -->
                <!--<Button.Style>
                        <Style BasedOn="{StaticResource {x:Type Button}}" TargetType="Button">
                            <Style.Triggers>
                -->
                <!--  覆盖默认的鼠标悬停样式  -->
                <!--
                                <Trigger Property="IsMouseOver" Value="True">
                -->
                <!--  这里不设置任何属性,或者设置为你希望鼠标悬停时的样式  -->
                <!--  例如,保持背景色不变  -->
                <!--<Setter Property="Background" Value="{TemplateBinding Background}" />-->
                <!--
                                    <Setter Property="Background" Value="White" />
                                    <Setter Property="Foreground" Value="{TemplateBinding Foreground}" />
                                </Trigger>
                            </Style.Triggers>
                        </Style>
                    </Button.Style>-->
                <!--
                </Button>-->
                <TextBlock
                    Grid.Column="1"
                    Grid.ColumnSpan="2"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Bottom"
                    FontSize="20"
                    Foreground="{StaticResource HHAst2}"
                    MouseLeftButtonDown="TextBlock_MouseLeftButtonDown"
                    TextAlignment="Center">
                    手 动 任 务
                </TextBlock>
                <Button
                    Name="BtnClose"
                    Grid.Column="3"
                    Width="20"
                    Margin="2"
                    Background="{StaticResource HHLGRed}"
                    Click="BtnClose_Click"
                    Foreground="White">
                    X
                </Button>
            </Grid>
            <StackPanel
                Grid.Row="1"
                Height="2"
                Background="{StaticResource HHLGRed}" />
            <TabControl Grid.Row="2" FontSize="16">
                <TabItem
                    Height="26"
                    Margin="-2,0,-2,0"
                    VerticalAlignment="Bottom"
                    BorderBrush="Green"
                    BorderThickness="2"
                    Header="单步任务">
                    <StackPanel>
                        <TextBlock>任务类型</TextBlock>
                        <ComboBox
                            x:Name="ComBox_ManualTask"
                            SelectedIndex="-1"
                            SelectionChanged="ComBox_ManualTask_SelectionChanged" />
                        <TextBlock Margin="0,10,0,0">AGV编号</TextBlock>
                        <ComboBox
                            Name="Tbox_Agv"
                            SelectedIndex="-1"
                            SelectionChanged="Tbox_Agv_SelectionChanged" />
                        <!--<TextBlock Margin="0,10,0,0">起点(选填:默认当前点):</TextBlock>
                <TextBox Name="Tbox_Spoint"></TextBox>-->
                        <TextBlock Margin="0,10,0,0">目标:</TextBlock>
                        <ComboBox Name="ComBox_Position" IsEditable="True" />
                        <TextBlock Margin="0,10,0,0">高度或角度:</TextBlock>
                        <TextBox Name="Tbx_HeightAngle" />
                        <WrapPanel Margin="0,10,120,0" Visibility="Collapsed">
                            <Viewbox Height="20">
                                <RadioButton
                                    x:Name="YesRadio"
                                    HorizontalAlignment="Left"
                                    GroupName="cycle" />
                            </Viewbox>
                            <TextBlock Margin="0,0,20,0">循环</TextBlock>
                            <Viewbox Height="20">
                                <RadioButton x:Name="NoRadio" GroupName="cycle" />
                            </Viewbox>
                            <TextBlock>不循环</TextBlock>
                        </WrapPanel>
                        <Button
                            x:Name="Btn_OK"
                            Height="52"
                            Margin="120,50,120,0"
                            Background="{StaticResource HHLGRed}"
                            Click="Btn_OK_Click"
                            Content="单步任务发送"
                            Foreground="White" />
                    </StackPanel>
                </TabItem>
                <TabItem
                    Height="26"
                    Margin="-2,0,-2,0"
                    VerticalAlignment="Bottom"
                    BorderBrush="Green"
                    BorderThickness="2"
                    Header="复合任务">
                    <StackPanel>
                        <TextBlock Height="26">任务类型选择</TextBlock>
                        <ComboBox
                            Name="ComBox_TaskType"
                            SelectedIndex="-1"
                            SelectionChanged="ComBox_TaskType_SelectionChanged" />
                        <TextBlock Margin="0,10,0,0">起点</TextBlock>
                        <ComboBox
                            Name="ComBox_StartStation"
                            Height="26"
                            IsEditable="True"
                            KeyUp="ComBox_KeyUp" />
                        <TextBlock Margin="0,10,0,0">终点</TextBlock>
                        <ComboBox
                            Name="ComBox_EndStation"
                            Height="26"
                            IsEditable="True"
                            KeyUp="ComBox_KeyUp" />
                        <WrapPanel Margin="0,10,120,0" Visibility="Collapsed">
                            <Viewbox Height="20">
                                <RadioButton
                                    x:Name="YesTaskRadio"
                                    HorizontalAlignment="Left"
                                    GroupName="cycle" />
                            </Viewbox>
                            <TextBlock Margin="0,0,20,0">循环</TextBlock>
                            <Viewbox Height="20">
                                <RadioButton x:Name="NoTaskRadio" GroupName="cycle" />
                            </Viewbox>
                            <TextBlock>不循环</TextBlock>
                        </WrapPanel>
                        <Button
                            Name="Btn_Task"
                            Height="52"
                            Margin="120,50,120,0"
                            Background="{StaticResource HHLGRed}"
                            Click="Btn_Task_Click"
                            Content="复合任务发送"
                            Foreground="White" />
                    </StackPanel>
                </TabItem>

                <TabItem
                    Height="26"
                    Margin="-2,0,-2,0"
                    VerticalAlignment="Bottom"
                    BorderBrush="Green"
                    BorderThickness="2"
                    Header="循环测试">
                    <StackPanel>
                        <TextBlock>任务类型</TextBlock>
                        <ComboBox x:Name="ComBox_ManualTask1" />
                        <TextBlock Margin="0,10,0,0">AGV编号</TextBlock>
                        <ComboBox Name="Tbox_Agv1" />
                        <Button
                            Name="Btn_StartManualTask"
                            Height="52"
                            Margin="120,20,120,0"
                            Background="{StaticResource HHLGRed}"
                            Click="Btn_StartManualTask_Click"
                            Foreground="White">
                            开始循环任务
                        </Button>
                        <Button
                            Name="Btn_StopManualTask"
                            Height="52"
                            Margin="120,20,120,0"
                            Background="{StaticResource HHLGRed}"
                            Click="Btn_StopManualTask_Click"
                            Foreground="White">
                            结束循环任务
                        </Button>
                    </StackPanel>
                </TabItem>

                <TabItem
                    Height="26"
                    Margin="-2,0,-2,0"
                    VerticalAlignment="Bottom"
                    BorderBrush="Green"
                    BorderThickness="2"
                    Header="循环随机测试">
                    <StackPanel>
                        <TextBlock Margin="0,10,0,0">并发任务数量:</TextBlock>
                        <TextBox Name="Tbox_RadomCount" Text="4" />
                        <TextBlock Margin="0,10,0,0">任务类型:</TextBlock>
                        <StackPanel
                            x:Name="Panel_TaskType"
                            MinHeight="20"
                            Orientation="Horizontal" />

                        <Button
                            Name="Btn_StartRadomTask"
                            Height="52"
                            Margin="120,20,120,0"
                            Background="{StaticResource HHLGRed}"
                            Click="Btn_StartRadomTask_Click"
                            Foreground="White">
                            开始随机循环任务
                        </Button>
                        <Button
                            Name="Btn_StopRadomTask"
                            Height="52"
                            Margin="120,20,120,0"
                            Background="{StaticResource HHLGRed}"
                            Click="Btn_StopRadomTask_Click"
                            Foreground="White">
                            结束随机循环任务
                        </Button>
                    </StackPanel>
                </TabItem>
                <!--<TabItem
            BorderBrush="Green"
            BorderThickness="2"
            Header="结束循环"
            Visibility="Collapsed">
            <StackPanel Visibility="Collapsed">
                <TextBlock>任务类型</TextBlock>
                <ComboBox x:Name="ComBox_ManualTask1" />
                <TextBlock Margin="0,10,0,0">AGV编号</TextBlock>
                <ComboBox Name="Tbox_Agv1" />
                <Button
                    Name="Btn_StopManualTask"
                    Height="52"
                    Margin="120,20,120,0"
                    Background="{StaticResource HHLGRed}"
                    Click="Btn_StopManualTask_Click"
                    Foreground="White">
                    循环任务结束
                </Button>
            </StackPanel>
        </TabItem>-->
            </TabControl>
            <!--<TabControl Grid.Row="2">
                <TabItem FontSize="16" Header="单步任务">

                </TabItem>
                <TabItem
                    BorderBrush="Green"
                    BorderThickness="2"
                    FontSize="16"
                    Header="一键关机"
                    Visibility="Collapsed">
                    <StackPanel>
                        <TextBlock>关机选择</TextBlock>
                        <ComboBox Name="Combo_offType">
                            <ComboBoxItem>单独关机</ComboBoxItem>
                            <ComboBoxItem>全部关机</ComboBoxItem>
                        </ComboBox>
                        <TextBlock Height="29">小车号</TextBlock>
                        <TextBox Name="TBox_offAgvNo">A22_61</TextBox>
                        <Button
                            Name="Btn_Off"
                            Height="52"
                            Margin="120,20"
                            Background="{StaticResource HHLGRed}"
                            Click="Btn_Off_Click"
                            Foreground="White">
                            关 机
                        </Button>

                    </StackPanel>
                </TabItem>
            </TabControl>-->
            <StackPanel
                Grid.Row="3"
                Height="2"
                Background="{StaticResource HHLGRed}" />
            <TextBlock
                Grid.Row="4"
                HorizontalAlignment="Center"
                FontSize="20"
                Foreground="{StaticResource HHAst2}">
                控制台系统
            </TextBlock>
        </Grid>
    </Border>
</Window>