@@ -23,6 +23,7 @@ | |||||
<None Remove="Images\Cb_HalfChecked.png" /> | <None Remove="Images\Cb_HalfChecked.png" /> | ||||
<None Remove="Images\databj.png" /> | <None Remove="Images\databj.png" /> | ||||
<None Remove="Images\Exp.png" /> | <None Remove="Images\Exp.png" /> | ||||
<None Remove="Images\Image_32x32.png" /> | |||||
<None Remove="Images\leftImage.png" /> | <None Remove="Images\leftImage.png" /> | ||||
<None Remove="Images\mqtt.png" /> | <None Remove="Images\mqtt.png" /> | ||||
<None Remove="Images\mqttrun.png" /> | <None Remove="Images\mqttrun.png" /> | ||||
@@ -53,6 +54,7 @@ | |||||
<None Remove="Images\拉出.png" /> | <None Remove="Images\拉出.png" /> | ||||
<None Remove="Images\收缩.png" /> | <None Remove="Images\收缩.png" /> | ||||
<None Remove="Images\日期1.png" /> | <None Remove="Images\日期1.png" /> | ||||
<None Remove="Images\暂无图片.png" /> | |||||
<None Remove="Images\矩形边框.png" /> | <None Remove="Images\矩形边框.png" /> | ||||
<None Remove="Images\矩形边框1.png" /> | <None Remove="Images\矩形边框1.png" /> | ||||
<None Remove="Images\系统名称.png" /> | <None Remove="Images\系统名称.png" /> | ||||
@@ -124,6 +126,9 @@ | |||||
<Resource Include="Images\Exp.png"> | <Resource Include="Images\Exp.png"> | ||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> | <CopyToOutputDirectory>Always</CopyToOutputDirectory> | ||||
</Resource> | </Resource> | ||||
<Resource Include="Images\Image_32x32.png"> | |||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> | |||||
</Resource> | |||||
<Resource Include="Images\leftImage.png"> | <Resource Include="Images\leftImage.png"> | ||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> | <CopyToOutputDirectory>Always</CopyToOutputDirectory> | ||||
</Resource> | </Resource> | ||||
@@ -223,6 +228,9 @@ | |||||
<Resource Include="Images\日期1.png"> | <Resource Include="Images\日期1.png"> | ||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> | <CopyToOutputDirectory>Always</CopyToOutputDirectory> | ||||
</Resource> | </Resource> | ||||
<Resource Include="Images\暂无图片.png"> | |||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> | |||||
</Resource> | |||||
<Resource Include="Images\矩形边框.png"> | <Resource Include="Images\矩形边框.png"> | ||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> | <CopyToOutputDirectory>Always</CopyToOutputDirectory> | ||||
</Resource> | </Resource> | ||||
@@ -31,10 +31,20 @@ namespace BPASmartClient.SCADAControl.CustomerControls | |||||
public TheCheckBox() | public TheCheckBox() | ||||
{ | { | ||||
InitializeComponent(); | InitializeComponent(); | ||||
Content = "勾选框"; | Content = "勾选框"; | ||||
VerticalContentAlignment = VerticalAlignment.Center; | VerticalContentAlignment = VerticalAlignment.Center; | ||||
this.Loaded += TheButton_Loaded; | |||||
} | |||||
private void TheButton_Loaded(object sender, RoutedEventArgs e) | |||||
{ | |||||
if (this.ActualWidth == 54 && this.Content.ToString()== "勾选框") | |||||
{ | |||||
Content = "勾选框"; | |||||
Width = 60; | |||||
Height = 30; | |||||
} | |||||
} | } | ||||
public string ControlType => "控件"; | public string ControlType => "控件"; | ||||
@@ -5,5 +5,5 @@ | |||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||||
xmlns:local="clr-namespace:BPASmartClient.SCADAControl.CustomerControls" | xmlns:local="clr-namespace:BPASmartClient.SCADAControl.CustomerControls" | ||||
mc:Ignorable="d" | mc:Ignorable="d" | ||||
d:DesignHeight="450" d:DesignWidth="800" Source="/BPASmartClient.SCADAControl;component/Images/State0.png"> | |||||
d:DesignHeight="450" d:DesignWidth="800" Source="/BPASmartClient.SCADAControl;component/Images/暂无图片.png" Stretch="Fill"> | |||||
</Image> | </Image> |
@@ -29,8 +29,7 @@ namespace BPASmartClient.SCADAControl.CustomerControls | |||||
public TheImage() | public TheImage() | ||||
{ | { | ||||
InitializeComponent(); | InitializeComponent(); | ||||
Stretch = Stretch.UniformToFill; | |||||
//SetCurrentValue(SourceProperty, new BitmapImage(new Uri("pack://application:,,,/Images/借出.png", UriKind.Absolute))); | |||||
Stretch = Stretch.Fill; | |||||
Width = 80; | Width = 80; | ||||
Height = 80; | Height = 80; | ||||
} | } | ||||
@@ -27,6 +27,16 @@ namespace BPASmartClient.SCADAControl.CustomerControls | |||||
languageResDic.Source = new Uri(@"/BPASmartClient.SCADAControl;component/Themes/Generic.xaml",UriKind.RelativeOrAbsolute); | languageResDic.Source = new Uri(@"/BPASmartClient.SCADAControl;component/Themes/Generic.xaml",UriKind.RelativeOrAbsolute); | ||||
this.Resources.MergedDictionaries.Add(languageResDic); | this.Resources.MergedDictionaries.Add(languageResDic); | ||||
SetCurrentValue(ContentProperty, "单选按钮"); | SetCurrentValue(ContentProperty, "单选按钮"); | ||||
this.Loaded += TheButton_Loaded; | |||||
} | |||||
private void TheButton_Loaded(object sender, RoutedEventArgs e) | |||||
{ | |||||
if (this.ActualWidth <= 70 && this.Content.ToString() == "单选按钮") | |||||
{ | |||||
Content = "单选按钮"; | |||||
Width = 78; | |||||
Height = 24; | |||||
} | |||||
} | } | ||||
static TheRadioButton() | static TheRadioButton() | ||||
{ | { | ||||
@@ -42,7 +42,7 @@ namespace BPASmartClient.SCADAControl.CustomerControls | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
object _header = (this.SelectedItem as TabItem).Header; | |||||
object _header = (this.SelectedItem as TabItem)?.Header; | |||||
TabItems?.ToList().ForEach(par => | TabItems?.ToList().ForEach(par => | ||||
{ | { | ||||
if (_header!=null && par.Header == (string)_header) | if (_header!=null && par.Header == (string)_header) | ||||
@@ -395,7 +395,7 @@ | |||||
<Setter Property="BorderBrush" Value="Transparent" /> | <Setter Property="BorderBrush" Value="Transparent" /> | ||||
<Setter Property="Background"> | <Setter Property="Background"> | ||||
<Setter.Value> | <Setter.Value> | ||||
<ImageBrush ImageSource="../Images/button2.png" /> | |||||
<ImageBrush ImageSource="../Images/button1.png" /> | |||||
</Setter.Value> | </Setter.Value> | ||||
</Setter> | </Setter> | ||||
<Setter Property="Foreground" Value="{DynamicResource ButtonSelectForeground}" /> | <Setter Property="Foreground" Value="{DynamicResource ButtonSelectForeground}" /> | ||||
@@ -427,20 +427,12 @@ | |||||
</Border> | </Border> | ||||
<ControlTemplate.Triggers> | <ControlTemplate.Triggers> | ||||
<Trigger Property="IsChecked" Value="true"> | <Trigger Property="IsChecked" Value="true"> | ||||
<Setter TargetName="BD" Property="Background"> | |||||
<Setter.Value> | |||||
<ImageBrush ImageSource="../Images/button2.png" /> | |||||
</Setter.Value> | |||||
</Setter> | |||||
<Setter TargetName="textBlock" Property="Foreground" Value="{DynamicResource MeunSelectForeground}" /> | |||||
<Setter TargetName="BD" Property="Opacity" Value="1"/> | |||||
<Setter TargetName="textBlock" Property="Opacity" Value="1" /> | |||||
</Trigger> | </Trigger> | ||||
<Trigger Property="IsChecked" Value="False"> | <Trigger Property="IsChecked" Value="False"> | ||||
<Setter TargetName="BD" Property="Background"> | |||||
<Setter.Value> | |||||
<ImageBrush ImageSource="../Images/button1.png" /> | |||||
</Setter.Value> | |||||
</Setter> | |||||
<Setter TargetName="textBlock" Property="Foreground" Value="{DynamicResource ButtonSelectForeground}" /> | |||||
<Setter TargetName="BD" Property="Opacity" Value="0.5"/> | |||||
<Setter TargetName="textBlock" Property="Opacity" Value="0.5" /> | |||||
</Trigger> | </Trigger> | ||||
<Trigger Property="IsEnabled" Value="False"> | <Trigger Property="IsEnabled" Value="False"> | ||||
<Setter TargetName="textBlock" Property="Foreground" Value="{DynamicResource ButtonUnSelectForeground}" /> | <Setter TargetName="textBlock" Property="Foreground" Value="{DynamicResource ButtonUnSelectForeground}" /> | ||||
@@ -500,7 +492,7 @@ | |||||
</Style> | </Style> | ||||
<Style TargetType="{x:Type ctrl:NumberBox}"> | <Style TargetType="{x:Type ctrl:NumberBox}"> | ||||
<Setter Property="BorderBrush" Value="{x:Static Themes1:ClassicBorderDecorator.ClassicBorderBrush}" /> | |||||
<Setter Property="BorderBrush" Value="{DynamicResource borderBrush}" /> | |||||
<Setter Property="BorderThickness" Value="1" /> | <Setter Property="BorderThickness" Value="1" /> | ||||
<Setter Property="Padding" Value="0" /> | <Setter Property="Padding" Value="0" /> | ||||
<Setter Property="Foreground" Value="{DynamicResource foreground}" /> | <Setter Property="Foreground" Value="{DynamicResource foreground}" /> | ||||
@@ -519,9 +511,10 @@ | |||||
<ControlTemplate TargetType="{x:Type TextBox}"> | <ControlTemplate TargetType="{x:Type TextBox}"> | ||||
<Themes1:ClassicBorderDecorator | <Themes1:ClassicBorderDecorator | ||||
x:Name="Bd" | x:Name="Bd" | ||||
BorderBrush="{DynamicResource borderBrush}" | |||||
BorderStyle="None" | BorderStyle="None" | ||||
BorderThickness="1"> | |||||
Background="{TemplateBinding Background}" | |||||
BorderBrush="{TemplateBinding BorderBrush}" | |||||
BorderThickness="{TemplateBinding BorderThickness}"> | |||||
<ScrollViewer x:Name="PART_ContentHost" /> | <ScrollViewer x:Name="PART_ContentHost" /> | ||||
</Themes1:ClassicBorderDecorator> | </Themes1:ClassicBorderDecorator> | ||||
<ControlTemplate.Triggers> | <ControlTemplate.Triggers> | ||||
@@ -758,14 +751,10 @@ | |||||
SnapsToDevicePixels="True"> | SnapsToDevicePixels="True"> | ||||
<Grid> | <Grid> | ||||
<Image | <Image | ||||
Width="12" | |||||
Height="14" | |||||
Source="../Images/Cb_HalfChecked.png" /> | |||||
Source="../Images/Cb_HalfChecked.png" Margin="0,8,2,8" VerticalAlignment="Center" /> | |||||
<Image | <Image | ||||
x:Name="image1" | x:Name="image1" | ||||
Width="12" | |||||
Height="14" | |||||
Source="../Images/Cb_HalfChecked.png" /> | |||||
Source="../Images/Cb_HalfChecked.png" Margin="0,8,2,8" VerticalAlignment="Center" /> | |||||
</Grid> | </Grid> | ||||
<ContentPresenter | <ContentPresenter | ||||
Margin="{TemplateBinding Padding}" | Margin="{TemplateBinding Padding}" | ||||
@@ -1505,23 +1494,13 @@ | |||||
<ControlTemplate TargetType="{x:Type RadioButton}"> | <ControlTemplate TargetType="{x:Type RadioButton}"> | ||||
<BulletDecorator VerticalAlignment="Center" Background="Transparent"> | <BulletDecorator VerticalAlignment="Center" Background="Transparent"> | ||||
<BulletDecorator.Bullet> | <BulletDecorator.Bullet> | ||||
<Grid> | |||||
<Ellipse | |||||
x:Name="Border" | |||||
Width="10" | |||||
Height="10" | |||||
Fill="{TemplateBinding Background}" /> | |||||
<Ellipse | |||||
x:Name="Dot" | |||||
Width="5" | |||||
Height="5" | |||||
Fill="#ff8a03" | |||||
Visibility="Hidden" /> | |||||
<Grid Height="{TemplateBinding Height}" Width="{TemplateBinding Height}"> | |||||
<Ellipse x:Name="Border" Margin="0,5,10,5" Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{TemplateBinding BorderThickness}"/> | |||||
<Ellipse x:Name="Dot" Width="{Binding Width,ElementName=Border}" Height="{Binding Height,ElementName=Border}" Margin="0,5,10,5" Fill="{TemplateBinding Foreground}" /> | |||||
</Grid> | </Grid> | ||||
</BulletDecorator.Bullet> | </BulletDecorator.Bullet> | ||||
<ContentPresenter | <ContentPresenter | ||||
Margin="{TemplateBinding Padding}" | |||||
Margin="-5,0,0,0" | |||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" | HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" | ||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" | VerticalAlignment="{TemplateBinding VerticalContentAlignment}" | ||||
RecognizesAccessKey="True" /> | RecognizesAccessKey="True" /> | ||||
@@ -472,7 +472,7 @@ | |||||
<!--代码绑定模块--> | <!--代码绑定模块--> | ||||
<mypro:EditorTemplateDefinition TargetProperties="ClickExec,ValueChangedExecute,TikcExecute,CheckedExec,UnCheckedExec,ChuLiaoExecute,StopChuLiaoExecute" > | |||||
<mypro:EditorTemplateDefinition TargetProperties="ClickStr,ClickExec,ValueChangedExecute,TikcExecute,CheckedExec,UnCheckedExec,ChuLiaoExecute,StopChuLiaoExecute" > | |||||
<mypro:EditorTemplateDefinition.EditingTemplate> | <mypro:EditorTemplateDefinition.EditingTemplate> | ||||
<DataTemplate> | <DataTemplate> | ||||
<Grid> | <Grid> | ||||