123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132 |
- <Page x:Class="CCDCountWpf.WpfPage.SettingPage"
- 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"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:CCDCountWpf.WpfPage"
- mc:Ignorable="d"
- d:DesignHeight="550" d:DesignWidth="800"
- Title="SettingPage" Loaded="Page_Loaded">
- <Grid>
- <Grid Margin="0,0,0,0">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="330"/>
- </Grid.ColumnDefinitions>
- <Border Grid.Column="0" BorderBrush="Black" BorderThickness="1" Margin="2,2,2,2">
- <Image x:Name="ShowBox" Source="{Binding DebugImage}" Margin="0,0,0,0"/>
- </Border>
- <Grid Grid.Column="1" Margin="2,2,2,2">
- <Border BorderBrush="Black" BorderThickness="1"/>
- <Grid x:Name="HeardGrid" Height="40" VerticalAlignment="Top">
- <Border BorderBrush="Black" BorderThickness="1"/>
- <Button x:Name="Cam1Btn" HorizontalAlignment="Left" Width="60" Background="{x:Null}" Click="Cam1Btn_Click">
- <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
- <TextBlock Text="相机一" FontSize="10" FontWeight="Bold" Margin="0,0,0,0" HorizontalAlignment="Center" />
- </StackPanel>
- </Button>
- <Button x:Name="Cam2Btn" HorizontalAlignment="Left" Width="60" Margin="60,0,0,0" Background="{x:Null}" Click="Cam2Btn_Click">
- <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
- <TextBlock Text="相机二" FontSize="10" FontWeight="Bold" Margin="0,0,0,0" HorizontalAlignment="Center" />
- </StackPanel>
- </Button>
- <Button x:Name="Cam3Btn" HorizontalAlignment="Left" Width="60" Margin="120,0,0,0" Background="{x:Null}">
- <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
- <TextBlock Text="相机三" FontSize="10" FontWeight="Bold" Margin="0,0,0,0" HorizontalAlignment="Center" />
- </StackPanel>
- </Button>
- <Button x:Name="Cam4Btn" HorizontalAlignment="Left" Width="60" Margin="180,0,0,0" Background="{x:Null}">
- <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
- <TextBlock Text="相机四" FontSize="10" FontWeight="Bold" Margin="0,0,0,0" HorizontalAlignment="Center" />
- </StackPanel>
- </Button>
- <ComboBox x:Name="CamNumCoBox" HorizontalAlignment="Right" Margin="240,2,0,2" Width="90" Background="{x:Null}" FontSize="12" HorizontalContentAlignment="Center" Padding="6,12,5,3" SelectionChanged="CamNumCoBox_SelectionChanged"/>
- </Grid>
- <Grid x:Name="SettingGrid" Margin="0,40,0,44">
- <Grid x:Name ="BtnList" Height="40" VerticalAlignment="Top">
- <Button x:Name="CameraSettingBtn" Content="相机参数设置" HorizontalAlignment="Left" Margin="0,0,0,0" Width="165" Background="{x:Null}" Click="CameraSettingBtn_Click"/>
- <Button x:Name="ShuLiSettingBtn" Content="数粒参数设置" HorizontalAlignment="Left" Margin="165,0,0,0" Width="165" Background="{x:Null}" Click="ShuLiSettingBtn_Click"/>
- </Grid>
- <Grid x:Name="CameraSettingGrid" Margin="0,40,0,0" Visibility="Collapsed">
- <Label x:Name="CameraSelectLab" Content="选择相机:" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="10,10,0,0" FontSize="15" Height="30" Width="85"/>
- <ComboBox x:Name="CamSelectConBox" ItemsSource="{Binding CameraItems}" DisplayMemberPath="Name" SelectedValuePath="SNValue" Background="{x:Null}" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="105,10,0,0" Height="30" Width="180" FontSize="12" HorizontalContentAlignment="Center" Padding="6,6,5,3" SelectionChanged="CamSelectConBox_SelectionChanged" />
- <Button x:Name="CamListFlushBtn" HorizontalAlignment="Right" VerticalAlignment="Top" Width="30" Height="30" Margin="0,10,5,0" Background="#FF1709AF" Click="CamListFlushBtn_Click">
- <Button.Template>
- <ControlTemplate TargetType="Button">
- <Border CornerRadius="5"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}">
- <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
- </Border>
- </ControlTemplate>
- </Button.Template>
- <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
- <Image Source="/FromImage/刷新.png" Width="25" Height="25" />
- </StackPanel>
- </Button>
- <StackPanel Orientation="Horizontal" Margin="0,50,0,0" VerticalAlignment="Top">
- <StackPanel x:Name="CameraParameLab" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="10,10,0,0">
- <Label x:Name="ExposureTimeLab" Content="曝光:" Width="85" Height="30" FontSize="15" />
- <Label x:Name="AcquistionLineRateLab" Content="行频:" Width="85" Height="30" FontSize="15" Margin="0,10,0,0" />
- <Label x:Name="ImageWidthLab" Content="图像宽:" Width="85" Height="30" FontSize="15" Margin="0,10,0,0" />
- <Label x:Name="CamUserNameLab" Content="用户设定名:" Width="85" Height="30" FontSize="15" Margin="0,10,0,0" />
- <Label x:Name="CamOffsetXLab" Content="视野偏移:" Width="85" Height="30" FontSize="15" Margin="0,10,0,0" />
- </StackPanel>
- <StackPanel x:Name="CameraParameTbx" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="10,10,0,0">
- <TextBox x:Name="ExposureTimeTbx" Width="100" Text="{Binding ExposureTimeValue,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="30" FontSize="15" />
- <TextBox x:Name="AcquistionLineRateTbx" Text="{Binding AcquistionLineRate,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="100" Height="30" FontSize="15" Margin="0,10,0,0" />
- <TextBox x:Name="ImageWidthTbx" Text="{Binding ImageWidth,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="100" Height="30" FontSize="15" Margin="0,10,0,0" />
- <TextBox x:Name="CamUserNameTbx" Text="{Binding CamUserName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="100" Height="30" FontSize="15" Margin="0,10,0,0" />
- <TextBox x:Name="CamOffsetXTbx" Text="{Binding CamOffsetX,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="100" Height="30" FontSize="15" Margin="0,10,0,0" />
- </StackPanel>
- </StackPanel>
- </Grid>
- <Grid x:Name="ShuLiSettingGrid" Margin="0,40,0,0" Visibility="Visible">
- <StackPanel Orientation="Horizontal" Height="160" VerticalAlignment="Top">
- <StackPanel Orientation="Vertical" Margin="10,10,0,0">
- <Label Content="配方名:" Width="90" Height="30" FontSize="15" />
- <Label x:Name="RegionThresholdLab" Content="预处理阈值:" Width="90" Height="30" FontSize="15" Margin="0,10,0,0" />
- <Label x:Name="ChannelLab" Content="阀门通道数:" Width="90" Height="30" FontSize="15" Margin="0,10,0,0" />
- <Label x:Name="NoiseFilterLab" Content="噪点过滤:" Width="90" Height="30" FontSize="15" Margin="0,10,0,0" />
- </StackPanel>
- <StackPanel Orientation="Vertical" Margin="10,10,0,0">
- <TextBox x:Name="FormulationNameTbx" Width="100" Text="{Binding FormulationName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="30" FontSize="15" />
- <TextBox x:Name="RegionThresholdTbx" Width="100" Text="{Binding RegionThreshold,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="30" FontSize="15" Margin="0,10,0,0" />
- <TextBox x:Name="ChannelTbx" Width="100" Text="{Binding Channel,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="30" FontSize="15" Margin="0,10,0,0" />
- <TextBox x:Name="NoiseFilterTbx" Width="100" Text="{Binding NoiseFilter,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="30" FontSize="15" Margin="0,10,0,0" />
- </StackPanel>
- </StackPanel>
- <Label Content="合格检测类型" Margin="10,170,0,0" FontSize="15" Height="30" VerticalAlignment="Top"/>
- <RadioButton x:Name="CheckModel1RadBtn" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="40,205,0,0" Content="不检测" FontSize="15" Checked="CheckModel1RadBtn_Checked" />
- <RadioButton x:Name="CheckModel2RadBtn" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="40,235,0,0" Content="通过长度检测" FontSize="15" Checked="CheckModel2RadBtn_Checked" />
- <RadioButton x:Name="CheckModel3RadBtn" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="40,265,0,0" Content="通过面积" FontSize="15" Checked="CheckModel3RadBtn_Checked" />
- <RadioButton x:Name="CheckModel4RadBtn" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="40,295,0,0" Content="通过长度面积检测" FontSize="15" Checked="CheckModel4RadBtn_Checked" />
- <StackPanel Orientation="Vertical" Height="100" VerticalAlignment="Top" Margin="0,320,0,0">
- <StackPanel x:Name="WHParaPanel" Orientation="Horizontal">
- <Label HorizontalAlignment="Left" VerticalAlignment="Top" Height="30" Width="120" Content="合格长度范围:" FontSize="15" Margin="10,0,0,0"/>
- <TextBox x:Name="MIN_OBJECT_HEIGHT_TBX" Text="{Binding MIN_OBJECT_LENGTH,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="20" VerticalAlignment="Top" HorizontalAlignment="Left" FontSize="15" Margin="10,5,0,0" Width="70"/>
- <Label HorizontalAlignment="Left" VerticalAlignment="Top" Height="30" Width="15" Content="-" FontSize="15" Margin="10,0,0,0"/>
- <TextBox x:Name="MAX_OBJECT_HEIGHT_TBX" Text="{Binding MAX_OBJECT_LENGTH,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="20" VerticalAlignment="Top" HorizontalAlignment="Left" FontSize="15" Margin="10,5,0,0" Width="70"/>
- </StackPanel>
- <StackPanel x:Name="AreaParaPanel" Orientation="Horizontal">
- <Label HorizontalAlignment="Left" VerticalAlignment="Top" Height="30" Width="120" Content="合格粒面积范围:" FontSize="15" Margin="10,0,0,0"/>
- <TextBox x:Name="MinArea_TBX" Text="{Binding MinArea,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="20" VerticalAlignment="Top" HorizontalAlignment="Left" FontSize="15" Margin="10,4,0,0" Width="70"/>
- <Label HorizontalAlignment="Left" VerticalAlignment="Top" Height="30" Width="15" Content="-" FontSize="15" Margin="10,0,0,0"/>
- <TextBox x:Name="MaxArea_TBX" Text="{Binding MaxArea,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Height="20" VerticalAlignment="Top" HorizontalAlignment="Left" FontSize="15" Margin="10,4,0,0" Width="70"/>
- </StackPanel>
- <StackPanel x:Name="ParametricTrainingPanel" Orientation="Horizontal" HorizontalAlignment="Right">
- <Button x:Name="ParametricTrainingBtn" Content="参数训练" Width="80" Height="35" Margin="0,2,10,0" Click="ParametricTrainingBtn_Click"/>
- </StackPanel>
- </StackPanel>
- </Grid>
- </Grid>
- <Button x:Name="SaveFormulationBtn" Content="保存配方" VerticalAlignment="Bottom" Height="40" Margin="2,0,0,2" FontSize="15" Width="90" HorizontalAlignment="Left" Click="SaveFormulationBtn_Click"/>
- <Button x:Name="ReadFormulationBtn" Content="读取配方" VerticalAlignment="Bottom" Height="40" Margin="94,0,0,2" FontSize="15" Width="90" HorizontalAlignment="Left" Click="ReadFormulationBtn_Click"/>
- <ComboBox x:Name="FormulationCoBox" ItemsSource="{Binding FormulationItems}" HorizontalAlignment="Right" Margin="0,0,0,2" Width="140" Background="{x:Null}" FontSize="12" HorizontalContentAlignment="Center" Padding="6,12,5,3" Height="40" VerticalAlignment="Bottom"/>
- </Grid>
- </Grid>
- </Grid>
- </Page>
|