123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195 |
- <Window
- x:Class="Aitex.Core.UI.Control.InputDialogBox"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:my="clr-namespace:Aitex.Core.UI.Control"
- Title="{Binding DeviceTitle}"
- Width="260"
- MinWidth="300"
- MinHeight="265"
- MaxWidth="300"
- KeyDown="OnEnterKeyIsHit"
- SizeToContent="Height"
- WindowStartupLocation="CenterOwner"
- WindowStyle="ToolWindow">
- <Window.Resources>
- <Style TargetType="Button">
- <Setter Property="FontSize" Value="12" />
- <Setter Property="Height" Value="23" />
- <Setter Property="HorizontalAlignment" Value="Left" />
- <Setter Property="VerticalAlignment" Value="Center" />
- <Setter Property="Width" Value="50" />
- </Style>
- <Style TargetType="Label">
- <Setter Property="FontFamily" Value="Arial,SimSun" />
- <Setter Property="FontSize" Value="13" />
- <Setter Property="HorizontalAlignment" Value="Right" />
- <Setter Property="VerticalAlignment" Value="Top" />
- <Setter Property="Height" Value="25" />
- </Style>
- <my:DoubleConverter x:Key="doubleConverter" />
- </Window.Resources>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition MinHeight="35" />
- <RowDefinition MinHeight="35" />
- <RowDefinition MinHeight="35" />
- <RowDefinition MinHeight="35" />
- <RowDefinition Height="0" />
- <RowDefinition MinHeight="35" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="45" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="1*" />
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="1*" />
- </Grid.ColumnDefinitions>
- <Label
- Grid.Row="0"
- Grid.Column="1"
- Content="DeviceName" />
- <Label
- Grid.Row="1"
- Grid.Column="1"
- Content="Unit" />
- <Label
- Grid.Row="2"
- Grid.Column="1"
- Content="Max" />
- <Label
- Grid.Row="3"
- Grid.Column="1"
- Content="Default" />
- <Label
- Grid.Row="4"
- Grid.Column="1"
- Content="Feedback" />
- <Label
- Grid.Row="5"
- Grid.Column="1"
- Content="SetPoint" />
- <Label
- Grid.Row="6"
- Grid.Column="1"
- Content="Ramp"
- Visibility="{Binding RampVisibility}" />
- <Label
- Grid.Row="0"
- Grid.Column="2"
- Width="150"
- Height="28"
- HorizontalAlignment="Left"
- VerticalContentAlignment="Center"
- BorderBrush="Black"
- BorderThickness="0,0,0,1"
- Content="{Binding Path=DeviceName}"
- FontFamily="Arial,SimSun"
- FontSize="13" />
- <Label
- Grid.Row="1"
- Grid.Column="2"
- Width="150"
- Height="28"
- VerticalContentAlignment="Center"
- BorderBrush="Black"
- BorderThickness="0,0,0,1"
- Content="{Binding Path=Unit}"
- FontFamily="Arial,SimSun"
- FontSize="13" />
- <Label
- Grid.Row="2"
- Grid.Column="2"
- Width="150"
- Height="28"
- VerticalContentAlignment="Center"
- BorderBrush="Black"
- BorderThickness="0,0,0,1"
- Content="{Binding Path=MaxValue}"
- ContentStringFormat="F1"
- FontFamily="Arial,SimSun"
- FontSize="13" />
- <Label
- Grid.Row="3"
- Grid.Column="2"
- Width="150"
- Height="28"
- VerticalContentAlignment="Center"
- BorderBrush="Black"
- BorderThickness="0,0,0,1"
- Content="{Binding Path=DefaultValue}"
- FontFamily="Arial,SimSun"
- FontSize="13" />
- <Label
- Grid.Row="4"
- Grid.Column="2"
- Width="150"
- Height="28"
- VerticalContentAlignment="Center"
- BorderBrush="Black"
- BorderThickness="0,0,0,1"
- Content="{Binding Path=RealValue}"
- FontFamily="Arial,SimSun"
- FontSize="13" />
- <TextBox
- x:Name="inputBox"
- Grid.Row="5"
- Grid.Column="2"
- Width="150"
- Height="30"
- HorizontalAlignment="Left"
- VerticalContentAlignment="Center"
- BorderThickness="0,0,0,1"
- FontFamily="Arial,SimSun"
- FontSize="13"
- Style="{DynamicResource Err_TextBox}"
- Tag="{Binding Path=TagName}"
- TextChanged="InputTextBox_TextChanged" />
- <Grid
- Grid.Row="6"
- Grid.Column="2"
- MinHeight="35"
- Visibility="{Binding RampVisibility}">
- <TextBox
- x:Name="inputRampBox"
- Width="150"
- Height="30"
- HorizontalAlignment="Left"
- VerticalContentAlignment="Center"
- BorderThickness="0,0,0,1"
- FontFamily="Arial,SimSun"
- FontSize="13"
- Style="{DynamicResource Err_TextBox}"
- Tag="{Binding Path=TagName}"
- TextChanged="inputRampBox_TextChanged" />
- </Grid>
- <StackPanel
- Grid.Row="7"
- Grid.ColumnSpan="4"
- HorizontalAlignment="Center"
- Orientation="Horizontal">
- <Button
- x:Name="buttonSet"
- Width="120"
- Height="35"
- Margin="0,3,5,0"
- VerticalAlignment="Top"
- Click="ButtonSet_Click"
- Content="Set"
- PreviewTouchUp="button_PreviewTouchUp"
- Stylus.IsTouchFeedbackEnabled="False" />
- <Button
- Grid.Column="1"
- Width="120"
- Height="35"
- Margin="5,3,0,0"
- VerticalAlignment="Top"
- Click="ButtonCancel_Click"
- Content="Cancel"
- PreviewTouchUp="button_PreviewCancelTouchUp"
- Stylus.IsTouchFeedbackEnabled="False" />
- </StackPanel>
- </Grid>
- </Window>
|