refactor: 将Framework库和RT、UI放在同一个解决方案中。
This commit is contained in:
@@ -0,0 +1,87 @@
|
||||
<UserControl x:Class="MECF.Framework.UI.Client.Ctrlib.UnitControls.MfcSettingDialogView"
|
||||
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:unitControls="clr-namespace:MECF.Framework.UI.Client.Ctrlib.UnitControls"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:micro="clr-namespace:Caliburn.Micro"
|
||||
xmlns:controls="clr-namespace:OpenSEMI.Ctrlib.Controls"
|
||||
mc:Ignorable="d"
|
||||
KeyDown="OnEnterKeyIsHit"
|
||||
d:DesignHeight="450" d:DesignWidth="600">
|
||||
<UserControl.Resources>
|
||||
|
||||
<Style x:Key="textBoxInError" TargetType="{x:Type TextBox}">
|
||||
<Style.Triggers>
|
||||
<Trigger Property="Validation.HasError" Value="true">
|
||||
<Setter Property="ToolTip" Value="{Binding RelativeSource={x:Static RelativeSource.Self}, Path=(Validation.Errors)[0].ErrorContent}"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<unitControls:DoubleConverter x:Key="doubleConverter"/>
|
||||
</UserControl.Resources>
|
||||
<Border Height="300" Width="350" Background="{DynamicResource Color_BG_Dialog_Inner}" BorderThickness="1" BorderBrush="SteelBlue" >
|
||||
<Grid Margin="2">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="70"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="130"/>
|
||||
<ColumnDefinition Width="150"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label Grid.Row="0" Grid.Column="1" Content="DeviceName :" Margin="0,5,20,0" HorizontalAlignment="Right" />
|
||||
<Label Grid.Row="1" Grid.Column="1" Content="Unit :" Margin="0,5,20,0" HorizontalAlignment="Right" />
|
||||
<Label Grid.Row="2" Grid.Column="1" Content="Max :" Margin="0,5,20,0" HorizontalAlignment="Right" />
|
||||
<Label Grid.Row="3" Grid.Column="1" Content="Default :" Margin="0,5,20,0" HorizontalAlignment="Right" />
|
||||
<Label Grid.Row="4" Grid.Column="1" Content="Feedback :" Margin="0,5,20,0" HorizontalAlignment="Right" />
|
||||
<Label Grid.Row="5" Grid.Column="1" Content="SetPoint :" Margin="0,5,20,0" HorizontalAlignment="Right" />
|
||||
|
||||
<Label Grid.Row="0" Grid.Column="2" Content="{Binding Path=DeviceData.DisplayName}" Width="150" Height="28" HorizontalAlignment="Left" BorderThickness="0,0,0,1" BorderBrush="Black" FontSize="13" FontFamily="Arial,SimSun" VerticalContentAlignment="Center" />
|
||||
<Label Grid.Row="1" Grid.Column="2" Content="{Binding Path=DeviceData.Unit}" Width="150" BorderThickness="0,0,0,1" BorderBrush="Black" FontSize="13" FontFamily="Arial,SimSun" Height="28" VerticalContentAlignment="Center" />
|
||||
<Label Grid.Row="2" Grid.Column="2" Content="{Binding Path=DeviceData.Scale}" ContentStringFormat="F1" Width="150" BorderThickness="0,0,0,1" BorderBrush="Black" FontSize="13" FontFamily="Arial,SimSun" Height="28" VerticalContentAlignment="Center" />
|
||||
<Label Grid.Row="3" Grid.Column="2" Content="{Binding Path=DeviceData.DefaultValue}" Width="150" BorderThickness="0,0,0,1" BorderBrush="Black" FontSize="13" FontFamily="Arial,SimSun" Height="28" VerticalContentAlignment="Center" />
|
||||
<Label Grid.Row="4" Grid.Column="2" Content="{Binding Path=DeviceData.FeedBack}" ContentStringFormat="F2" Width="150" BorderThickness="0,0,0,1" BorderBrush="Black" FontSize="13" FontFamily="Arial,SimSun" Height="28" VerticalContentAlignment="Center" />
|
||||
<controls:TextBoxEx Grid.Row="5" Grid.Column="2" Text="{Binding Path=InputSetPoint, UpdateSourceTrigger=PropertyChanged}"
|
||||
x:Name="inputBox" BorderBrush="Green" BorderThickness="0,0,0,1"
|
||||
AllowBackgroundChange="False" Width="150"
|
||||
EditBoxMode="UnSignDecimal"
|
||||
TextChanged="InputTextBox_TextChanged"
|
||||
HorizontalAlignment="Stretch" FontSize="13" FontFamily="Arial,SimSun"
|
||||
Height="30" VerticalContentAlignment="Center" />
|
||||
|
||||
<StackPanel Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="4" Margin="0,10,0,0"
|
||||
VerticalAlignment="Center" Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<Button IsEnabled="{Binding IsEnableOk}" Content="OK" Width="90" Height="30">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="Click">
|
||||
<micro:ActionMessage MethodName="OK">
|
||||
</micro:ActionMessage>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</Button>
|
||||
<Button Content="Cancel" Margin="30,0,0,0" Width="90" Height="30">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="Click">
|
||||
<micro:ActionMessage MethodName="Cancel">
|
||||
</micro:ActionMessage>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</Button>
|
||||
|
||||
<!--<CheckBox Margin="20,0,0,0" Content="Stick" IsChecked="{Binding IsSticked}" VerticalAlignment="Center" ></CheckBox>-->
|
||||
|
||||
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
</UserControl>
|
||||
Reference in New Issue
Block a user