<Window x:Class="MeterVision.Dlg.EditStationDlg2"
        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:MeterVision.Dlg"
        xmlns:mark="clr-namespace:MeterVision.Mark"
        mc:Ignorable="d"
        Background="WhiteSmoke"
        ResizeMode="CanResizeWithGrip"
        WindowStartupLocation="CenterOwner"
        ShowInTaskbar="False"
        Title="站点参数" Height="600" Width="900">
    <Grid Margin="10 10 10 0">
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="40" />
        </Grid.RowDefinitions>
        
        <Border Grid.Row="0" BorderBrush="#D3D3D3" BorderThickness="1" Background="White">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="280" />
                    <ColumnDefinition Width="10" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                
                <Border Grid.Column="0" BorderBrush="#D3D3D3" BorderThickness="0 0 1 0" Background="White" Padding="0 0 5 0">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="*" />
                            <RowDefinition Height="*" />
                            <RowDefinition Height="*" />
                            <RowDefinition Height="*" />
                            <RowDefinition Height="*" />
                            <RowDefinition Height="*" />
                            <RowDefinition Height="*" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>
                        
                        <StackPanel Grid.Row="0" >
                            <StackPanel Orientation="Horizontal" Margin="5 5 5 0">
                                <TextBlock Text="站点ID:"  FontSize="14px" />
                                <!--<TextBlock Text="*" FontSize="14px" Foreground="Red" />-->
                            </StackPanel>
                            <TextBox x:Name="txtStationId" FontSize="14px"  Margin="5" Padding="2"                              
                             PreviewTextInput="TextBox_PreviewTextInput" />
                        </StackPanel>

                        <StackPanel Grid.Row="1">
                            <StackPanel Orientation="Horizontal" Margin="5 5 5 0">
                                <TextBlock Text="表类型:"  FontSize="14px" />
                                <!--<TextBlock Text="*" FontSize="14px" Foreground="Red" />-->
                            </StackPanel>
                            <ComboBox x:Name="cmbMeterType" Margin="5" FontSize="14px"
                              SelectionChanged="CmbMeterType_SelectionChanged" 
                              SelectedValuePath="Key" DisplayMemberPath="Value" />
                        </StackPanel>

                        <Grid Grid.Row="2">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="*" />
                            </Grid.ColumnDefinitions>
                            <StackPanel Grid.Column="0" >
                                <StackPanel Orientation="Horizontal" Margin="5 5 5 0">
                                    <TextBlock Text="每小时流量:"  FontSize="14px" />
                                    <!--<TextBlock Text="*" FontSize="14px" Foreground="Red" />-->
                                </StackPanel>
                                <ComboBox x:Name="cmbFlowRate" Margin="5" FontSize="14px"
                                      IsEditable="True" PreviewTextInput="CmbFlowRate_PreviewTextInput"                              
                                      SelectionChanged="CmbFlowRate_SelectionChanged"
                                      SelectedValuePath="Key" DisplayMemberPath="Value" />
                            </StackPanel>
                            <StackPanel Grid.Column="1" >
                                <StackPanel Orientation="Horizontal" Margin="5 5 5 0">
                                    <TextBlock Text="图片亮度:" FontSize="14px" />
                                    <!--<TextBlock Text="*" FontSize="14px" Foreground="Red" />-->
                                </StackPanel>
                                <TextBox x:Name="txtBrightVal" Margin="5" Padding="2" FontSize="14px"/>
                            </StackPanel>
                        </Grid>

                        <Grid Grid.Row="3">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*" x:Name="grdNumCount" />
                                <ColumnDefinition Width="*" x:Name="grdIndCount" />
                            </Grid.ColumnDefinitions>
                            <StackPanel x:Name="pnlNumCount" Grid.Column="0" >
                                <StackPanel Orientation="Horizontal" Margin="5 5 5 0">
                                    <TextBlock Text="数字个数:" FontSize="14px" />
                                    <!--<TextBlock Text="*" FontSize="14px" Foreground="Red" />-->
                                </StackPanel>
                                <TextBox x:Name="txtNumCount"  MaxLength="2" Margin="5" Padding="2" FontSize="14px" PreviewTextInput="TextBox_PreviewTextInput" />
                            </StackPanel>

                            <StackPanel x:Name="pnlIndCount" Grid.Column="1">
                                <StackPanel Orientation="Horizontal" Margin="5 5 5 0">
                                    <TextBlock Text="指针个数:" FontSize="14px" />
                                    <!--<TextBlock Text="*" FontSize="14px" Foreground="Red" />-->
                                </StackPanel>
                                <TextBox x:Name="txtIndCount"  MaxLength="2" Margin="5" Padding="2" FontSize="14px" PreviewTextInput="TextBox_PreviewTextInput"/>
                            </StackPanel>
                        </Grid>
                        
                        <StackPanel x:Name="pnlLastNumUnit" Grid.Row="4">
                            <StackPanel  Orientation="Horizontal" Margin="5 5 5 0">
                                <TextBlock x:Name="txtLastUnitTitle" Text="尾数单位:" FontSize="14px" />
                                <!--<TextBlock Text="*" FontSize="14px" Foreground="Red" />-->
                                <TextBlock Text="" FontSize="13px" />
                            </StackPanel>
                            <ComboBox x:Name="cmbLastUnit" Margin="5" FontSize="14px"/>
                        </StackPanel>

                        <StackPanel Grid.Row="5">
                            <StackPanel Orientation="Horizontal" Margin="5 5 5 0">
                                <TextBlock Text="表盘坐标:" FontSize="14px" />
                                <!--<TextBlock Text="*" FontSize="14px" Foreground="Red" />-->
                                <TextBlock Text=" (左上、右下)" FontSize="13px" />
                                <Button x:Name="btnWholeMeter" Content="整个表盘" Width="80" Margin="10 0 0 0" Click="BtnWholeMeter_Click"  FontSize="14px"/>
                            </StackPanel>
                            <TextBox x:Name="txtDialRegion" Margin="5" Padding="2" FontSize="14px" />
                        </StackPanel>

                        <StackPanel x:Name="pnlFeatureRegion" Grid.Row="6">
                            <StackPanel Orientation="Horizontal" Margin="5 5 5 0">
                                <TextBlock x:Name="txtFeatureRegionTitle" Text="数字区域\首尾指针坐标:" FontSize="14px" />
                                <!--<TextBlock Text="*" FontSize="14px" Foreground="Red" />-->
                                <TextBlock Text="" FontSize="13px" />
                            </StackPanel>
                            <TextBox x:Name="txtFeatureRegion" Margin="5" Padding="2" FontSize="14px" />
                        </StackPanel>

                        <StackPanel Grid.Row="7">
                            <StackPanel Orientation="Horizontal" Margin="5 5 5 0">
                                <TextBlock Text="表底读数:" FontSize="14px" />
                                <TextBlock Text="" FontSize="14px" Foreground="Red" />
                                <TextBlock Text="" FontSize="13px" />
                            </StackPanel>
                            <TextBox x:Name="txtLastValue" Margin="5" Padding="2" FontSize="14px" />
                        </StackPanel>

                        <StackPanel Grid.Row="8" >
                            <StackPanel Orientation="Horizontal" Margin="5 5 5 0">
                                <TextBlock Text="读数对应的时间:" FontSize="14px" />
                                <TextBlock Text="" FontSize="14px" Foreground="Red" />
                                <TextBlock Text="" FontSize="13px" />
                            </StackPanel>
                            <TextBox x:Name="txtLastTime" Margin="5" Padding="2" FontSize="14px" IsEnabled="True" />
                        </StackPanel>
                    </Grid>    
                </Border>

                <Border Grid.Column="2" Margin="0" BorderBrush="#D3D3D3" BorderThickness="1 0 0 0" Background="White">
                    <mark:UCMark x:Name="ucMark" />
                </Border>

            </Grid>
        </Border>

        <!--按钮区域-->
        <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center">
            <Button x:Name="btnOK" Content="确定" Width="80" Height="26" FontSize="14px"
                    HorizontalAlignment="Center" Margin="0 0 20 0" Click="BtnOK_Click"/>
            <Button x:Name="btnClose" Content="取消" Width="80" Height="26" FontSize="14px"
                    VerticalAlignment="Center" HorizontalAlignment="Center" Click="BtnClose_Click"/>
        </StackPanel>

    </Grid>
</Window>
