diff --git a/BPASmartClient.SCADAControl/BPASmartClient.SCADAControl.csproj b/BPASmartClient.SCADAControl/BPASmartClient.SCADAControl.csproj index fa35891c..90ffcd71 100644 --- a/BPASmartClient.SCADAControl/BPASmartClient.SCADAControl.csproj +++ b/BPASmartClient.SCADAControl/BPASmartClient.SCADAControl.csproj @@ -23,6 +23,7 @@ + @@ -53,6 +54,7 @@ + @@ -124,6 +126,9 @@ Always + + Always + Always @@ -223,6 +228,9 @@ Always + + Always + Always diff --git a/BPASmartClient.SCADAControl/CustomerControls/TheCheckBox.xaml.cs b/BPASmartClient.SCADAControl/CustomerControls/TheCheckBox.xaml.cs index ec3c34d7..9896f911 100644 --- a/BPASmartClient.SCADAControl/CustomerControls/TheCheckBox.xaml.cs +++ b/BPASmartClient.SCADAControl/CustomerControls/TheCheckBox.xaml.cs @@ -31,10 +31,20 @@ namespace BPASmartClient.SCADAControl.CustomerControls public TheCheckBox() { InitializeComponent(); + Content = "勾选框"; 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 => "控件"; diff --git a/BPASmartClient.SCADAControl/CustomerControls/TheImage.xaml b/BPASmartClient.SCADAControl/CustomerControls/TheImage.xaml index 83869b10..363028a6 100644 --- a/BPASmartClient.SCADAControl/CustomerControls/TheImage.xaml +++ b/BPASmartClient.SCADAControl/CustomerControls/TheImage.xaml @@ -5,5 +5,5 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:BPASmartClient.SCADAControl.CustomerControls" 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"> diff --git a/BPASmartClient.SCADAControl/CustomerControls/TheImage.xaml.cs b/BPASmartClient.SCADAControl/CustomerControls/TheImage.xaml.cs index 72140c14..c475d7b1 100644 --- a/BPASmartClient.SCADAControl/CustomerControls/TheImage.xaml.cs +++ b/BPASmartClient.SCADAControl/CustomerControls/TheImage.xaml.cs @@ -29,8 +29,7 @@ namespace BPASmartClient.SCADAControl.CustomerControls public TheImage() { InitializeComponent(); - Stretch = Stretch.UniformToFill; - //SetCurrentValue(SourceProperty, new BitmapImage(new Uri("pack://application:,,,/Images/借出.png", UriKind.Absolute))); + Stretch = Stretch.Fill; Width = 80; Height = 80; } diff --git a/BPASmartClient.SCADAControl/CustomerControls/TheRadioButton.cs b/BPASmartClient.SCADAControl/CustomerControls/TheRadioButton.cs index 9fb6131b..21ed5e25 100644 --- a/BPASmartClient.SCADAControl/CustomerControls/TheRadioButton.cs +++ b/BPASmartClient.SCADAControl/CustomerControls/TheRadioButton.cs @@ -27,6 +27,16 @@ namespace BPASmartClient.SCADAControl.CustomerControls languageResDic.Source = new Uri(@"/BPASmartClient.SCADAControl;component/Themes/Generic.xaml",UriKind.RelativeOrAbsolute); this.Resources.MergedDictionaries.Add(languageResDic); 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() { diff --git a/BPASmartClient.SCADAControl/CustomerControls/TheTabControl.xaml.cs b/BPASmartClient.SCADAControl/CustomerControls/TheTabControl.xaml.cs index 4af03091..48f7a29f 100644 --- a/BPASmartClient.SCADAControl/CustomerControls/TheTabControl.xaml.cs +++ b/BPASmartClient.SCADAControl/CustomerControls/TheTabControl.xaml.cs @@ -42,7 +42,7 @@ namespace BPASmartClient.SCADAControl.CustomerControls { try { - object _header = (this.SelectedItem as TabItem).Header; + object _header = (this.SelectedItem as TabItem)?.Header; TabItems?.ToList().ForEach(par => { if (_header!=null && par.Header == (string)_header) diff --git a/BPASmartClient.SCADAControl/DLL/BPASmartClient.Compiler.dll b/BPASmartClient.SCADAControl/DLL/BPASmartClient.Compiler.dll index c77b1d4f..d7bb62ee 100644 Binary files a/BPASmartClient.SCADAControl/DLL/BPASmartClient.Compiler.dll and b/BPASmartClient.SCADAControl/DLL/BPASmartClient.Compiler.dll differ diff --git a/BPASmartClient.SCADAControl/Images/Image_32x32.png b/BPASmartClient.SCADAControl/Images/Image_32x32.png new file mode 100644 index 00000000..c272ba4a Binary files /dev/null and b/BPASmartClient.SCADAControl/Images/Image_32x32.png differ diff --git a/BPASmartClient.SCADAControl/Images/暂无图片.png b/BPASmartClient.SCADAControl/Images/暂无图片.png new file mode 100644 index 00000000..d4db00b0 Binary files /dev/null and b/BPASmartClient.SCADAControl/Images/暂无图片.png differ diff --git a/BPASmartClient.SCADAControl/Themes/Generic.xaml b/BPASmartClient.SCADAControl/Themes/Generic.xaml index 1eb6d38d..305b450b 100644 --- a/BPASmartClient.SCADAControl/Themes/Generic.xaml +++ b/BPASmartClient.SCADAControl/Themes/Generic.xaml @@ -395,7 +395,7 @@ - + @@ -427,20 +427,12 @@ - - - - - - + + - - - - - - + + @@ -500,7 +492,7 @@