PgCustom.xaml 13.6 KB
Newer Older
1
<Page x:Class="FLY.Thick.Blowing.UI.Fix.Client.PgCustom"
潘栩锋's avatar
潘栩锋 committed
2 3 4
      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" 
潘栩锋's avatar
潘栩锋 committed
5 6
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
潘栩锋's avatar
潘栩锋 committed
7 8
      mc:Ignorable="d" 
      d:DesignHeight="874" d:DesignWidth="905"
潘栩锋's avatar
潘栩锋 committed
9
      Background="WhiteSmoke"
潘栩锋's avatar
潘栩锋 committed
10 11 12 13 14 15 16
	Title="Page_Custom" Loaded="Page_Loaded">
    <Page.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
                <ResourceDictionary Source="pack://application:,,,/ThickTcpUiInWindow;component/Converter/Dictionary_MyConv.xaml"/>
            </ResourceDictionary.MergedDictionaries>
潘栩锋's avatar
潘栩锋 committed
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43

            <Style TargetType="Control" x:Key="iconPackInSideStyle">
                <Setter Property="Width" Value="25"/>
                <Setter Property="Height" Value="25"/>
                <Setter Property="VerticalAlignment" Value="Center"/>
                <Setter Property="HorizontalAlignment" Value="Center"/>
            </Style>
            <Style TargetType="Control" x:Key="iconPackOutSideStyle">
                <Setter Property="Width" Value="36"/>
                <Setter Property="Height" Value="36"/>
                <Setter Property="VerticalAlignment" Value="Center"/>
                <Setter Property="HorizontalAlignment" Value="Center"/>
            </Style>
            <Style TargetType="FrameworkElement" x:Key="backPackStyle">
                <Setter Property="Width" Value="50"/>
                <Setter Property="Height" Value="50"/>
            </Style>
            <Style TargetType="TextBlock" x:Key="titlePackStyle">
                <Setter Property="Margin" Value="2"/>
                <Setter Property="FontSize" Value="16"/>
                <Setter Property="HorizontalAlignment" Value="Center"/>
                <Setter Property="Foreground" Value="White"/>
            </Style>
            <Style TargetType="Button" x:Key="buttonStyle" BasedOn="{StaticResource ButtonStyle_empty}">
                <Setter Property="Margin" Value="20,0"/>
            </Style>
            
潘栩锋's avatar
潘栩锋 committed
44 45 46 47 48 49 50 51
        </ResourceDictionary>
    </Page.Resources>
    <Grid >
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition Height="496*" />
            <RowDefinition Height="auto" />
        </Grid.RowDefinitions>
潘栩锋's avatar
潘栩锋 committed
52
        <StackPanel Orientation="Horizontal" Background="{StaticResource Background_Title}" >
潘栩锋's avatar
潘栩锋 committed
53
            <Button Style="{StaticResource ButtonStyle_back2}" Command="BrowseBack"/>
潘栩锋's avatar
潘栩锋 committed
54
            <TextBlock Style="{StaticResource TextBlockStyle_Title}"  Text="客户端设置"/>
潘栩锋's avatar
潘栩锋 committed
55
        </StackPanel>
潘栩锋's avatar
潘栩锋 committed
56
       
潘栩锋's avatar
潘栩锋 committed
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
        <ScrollViewer CanContentScroll="True" PanningMode="Both" Grid.Row="1" >
            <StackPanel Orientation="Vertical" >
                <StackPanel Orientation="Horizontal" >
                    <Border Background="{StaticResource Color_theme_activity}" Width="150" Margin="0,5,5,5">
                        <TextBlock Style="{StaticResource TextBlockStyle_ItemHeader}" Text="服务器" />
                    </Border>
                    <StackPanel Orientation="Vertical">
                        <StackPanel Orientation="Vertical" Margin="5">
                            <TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeaderEditable}" Text="服务器地址" />
                            <StackPanel Orientation="Horizontal">
                                <TextBox Style="{StaticResource ResourceKey=TextBoxStyle_FieldContent}" Text="{Binding ServerIPEP, Converter={StaticResource ResourceKey=ipepconv}}" Tag="Full" />
                            </StackPanel>
                        </StackPanel>
                    </StackPanel>
                </StackPanel>
                <StackPanel Orientation="Horizontal" >
                    <Border Width="150" Background="{StaticResource Color_theme_activity}" Margin="0,5,5,5">
                        <TextBlock Style="{StaticResource TextBlockStyle_ItemHeader}" Text="配置" />
                    </Border>
                    <StackPanel Orientation="Vertical">
                        <StackPanel Orientation="Horizontal"></StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <StackPanel Orientation="Vertical" Margin="5">
                                <TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeaderEditable}" Text="虚拟键盘" />
                                <ToggleButton Style="{StaticResource ToggleButtonStyle1}" HorizontalAlignment="Left" IsChecked="{Binding HaveOSK}" />
                            </StackPanel>
                            <StackPanel Orientation="Vertical" Margin="5" Visibility="{Binding HaveOSK, Converter={StaticResource visbilityconv}}">
                                <TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeaderEditable}" Text="支持鼠标" />
                                <ToggleButton Style="{StaticResource ToggleButtonStyle1}" HorizontalAlignment="Left" IsChecked="{Binding HaveOSK_mouse}" />
                            </StackPanel>
                        </StackPanel>
                    </StackPanel>
                </StackPanel>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="auto"/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
        
                    <Border Width="150" Background="{StaticResource Color_theme_activity}" Margin="0,5,5,5">
                        <TextBlock Style="{StaticResource TextBlockStyle_ItemHeader}" Text="报警提示" />
                    </Border>
潘栩锋's avatar
潘栩锋 committed
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
                    <StackPanel Grid.Column="1">
                        <GroupBox Style="{x:Null}" Margin="5">
                            <GroupBox.Header>
                                <TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="音乐" VerticalAlignment="Bottom"/>
                            </GroupBox.Header>
                            <StackPanel>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="auto"/>
                                        <ColumnDefinition/>
                                    </Grid.ColumnDefinitions>
                                    <StackPanel Orientation="Horizontal">
                                        <StackPanel Orientation="Vertical" Margin="5">
                                            <TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="持续时间" />
                                            <StackPanel Orientation="Horizontal">
                                                <TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="5" MaxWidth="120" HorizontalAlignment="Left"/>
                                                <TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" >
潘栩锋's avatar
潘栩锋 committed
116
                                        <Run Text="秒" />
潘栩锋's avatar
潘栩锋 committed
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
                                                </TextBlock>
                                            </StackPanel>
                                        </StackPanel>
                                        <Button Style="{StaticResource buttonStyle}" Click="button_play_Click" >
                                            <Grid Style="{StaticResource GridStyle_ButtonShadow}">
                                                <Rectangle Style="{StaticResource backPackStyle}" Fill="{StaticResource Color_theme_activity}"/>
                                                <iconPacks:PackIconMaterial Kind="Play" Style="{StaticResource iconPackInSideStyle}" Foreground="White" />
                                            </Grid>
                                        </Button>
                                    </StackPanel>
                                    <Grid Grid.Column="1">
                                        <StackPanel Grid.Column="1" Orientation="Vertical" Margin="5">
                                            <StackPanel Orientation="Horizontal">
                                                <TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="音乐文件路径" VerticalAlignment="Bottom"/>
                                                <Button Style="{StaticResource buttonStyle}" Click="button_open_Click" >
                                                    <Grid Style="{StaticResource GridStyle_ButtonShadow}">
                                                        <iconPacks:PackIconMaterial Kind="FolderOpen" Style="{StaticResource iconPackOutSideStyle}" Foreground="{StaticResource Color_theme_activity}"/>
                                                    </Grid>
                                                </Button>
                                            </StackPanel>
                                            <Viewbox Height="36" HorizontalAlignment="Left" >
                                                <TextBlock Style="{StaticResource TextBlockStyle_FieldContent}" Text="{Binding WarningTipPath}" />
                                            </Viewbox>
                                            
                                        </StackPanel>
                                    </Grid>
                                </Grid>
潘栩锋's avatar
潘栩锋 committed
144 145
                                

潘栩锋's avatar
潘栩锋 committed
146 147
                                
                            </StackPanel>
潘栩锋's avatar
潘栩锋 committed
148

潘栩锋's avatar
潘栩锋 committed
149 150 151 152 153 154
                        </GroupBox>
                        <GroupBox Style="{x:Null}" Margin="5">
                            <GroupBox.Header>
                                <TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="USB继电器" VerticalAlignment="Bottom"/>
                            </GroupBox.Header>
                            <StackPanel>
潘栩锋's avatar
潘栩锋 committed
155
                                <StackPanel Orientation="Horizontal">
潘栩锋's avatar
潘栩锋 committed
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179
                                    <StackPanel Margin="5">
                                        <TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeaderEditable}" Text="使能" />
                                        <ToggleButton Style="{StaticResource ToggleButtonStyle1}" HorizontalAlignment="Left" IsChecked="{Binding EnableLCUS1}" />
                                    </StackPanel>
                                    <StackPanel Margin="5">
                                        <TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="串口地址" />
                                        <StackPanel Orientation="Horizontal">
                                            <TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="{Binding LCUS1_PortName}" HorizontalAlignment="Left" Tag="Full"/>
                                        </StackPanel>
                                    </StackPanel>
                                    <StackPanel Orientation="Horizontal">
                                        <Button Style="{StaticResource buttonStyle}" Click="button_bellring_Click" >
                                            <Grid Style="{StaticResource GridStyle_ButtonShadow}">
                                                <Rectangle Style="{StaticResource backPackStyle}" Fill="{StaticResource Color_theme_activity}"/>
                                                <iconPacks:PackIconMaterial Kind="BellRing" Style="{StaticResource iconPackInSideStyle}" Foreground="White" />
                                            </Grid>
                                        </Button>
                                        <Button Style="{StaticResource buttonStyle}" Click="button_belloff_Click" >
                                            <Grid Style="{StaticResource GridStyle_ButtonShadow}">
                                                <Rectangle Style="{StaticResource backPackStyle}" Fill="{StaticResource Color_theme_noact}"/>
                                                <iconPacks:PackIconMaterial Kind="BellOff" Style="{StaticResource iconPackInSideStyle}" Foreground="White" />
                                            </Grid>
                                        </Button>
                                    </StackPanel>
潘栩锋's avatar
潘栩锋 committed
180
                                </StackPanel>
潘栩锋's avatar
潘栩锋 committed
181 182
                                <TextBlock x:Name="textblock_lcus" Style="{StaticResource TextBlockStyle_FieldContent}" Text="{Binding ErrMsg}" />
                            </StackPanel>
潘栩锋's avatar
潘栩锋 committed
183

潘栩锋's avatar
潘栩锋 committed
184
                        </GroupBox>
潘栩锋's avatar
潘栩锋 committed
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205
                    </StackPanel>
                
                </Grid>
                <StackPanel Orientation="Horizontal" >
                    <Border Width="150" Background="{StaticResource Color_theme_activity}" Margin="0,5,5,5">
                        <TextBlock Style="{StaticResource TextBlockStyle_ItemHeader}" Text="调试" />
                    </Border>
                    <StackPanel Orientation="Vertical">
                        <StackPanel Orientation="Horizontal">
                            <Button Content="清空bulk" Style="{StaticResource ResourceKey=ButtonStyle2}" Click="button_bulkdata_Click" />
                        </StackPanel>

                    </StackPanel>
                </StackPanel>
            </StackPanel>
        </ScrollViewer>
        <StackPanel Orientation="Horizontal"  Grid.Row="2" FlowDirection="RightToLeft" Margin="0,10,0,10">
            <Button Content="应用" Style="{StaticResource ResourceKey=ButtonStyle2}" Click="button_apply_Click" />
        </StackPanel>
    </Grid>
</Page>