KWD 3 months ago
parent
commit
052cef3e1d

+ 22 - 22
TeamAAS-VM/App.xaml

@@ -1,35 +1,37 @@
-<prism:PrismApplication x:Class="TeamAAS_VP.App"
-                        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-                        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-                        xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
-                        xmlns:c="clr-namespace:TeamAAS_VP.ValueConverter"
-                        xmlns:wpf="clr-namespace:MaterialDesignThemes.Wpf;assembly=MaterialDesignThemes.Wpf"
-                        xmlns:local="clr-namespace:TeamAAS_VP"
-                        xmlns:prism="http://prismlibrary.com/">
+<prism:PrismApplication
+    x:Class="TeamAAS_VP.App"
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:c="clr-namespace:TeamAAS_VP.ValueConverter"
+    xmlns:local="clr-namespace:TeamAAS_VP"
+    xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+    xmlns:prism="http://prismlibrary.com/"
+    xmlns:wpf="clr-namespace:MaterialDesignThemes.Wpf;assembly=MaterialDesignThemes.Wpf">
     <Application.Resources>
         <ResourceDictionary>
             <ResourceDictionary.MergedDictionaries>
-                
+
                 <!--<ResourceDictionary Source="Resources/Languages1/Chinese.xaml" />-->
                 <ResourceDictionary Source="Resources\Styles\DefaultColors.xaml" />
 
                 <ResourceDictionary Source="Resources/FontSize/DefaultFontSize.xaml" />
 
-                <materialDesign:BundledTheme BaseTheme="Inherit"
-                                             PrimaryColor="DeepPurple"
-                                             SecondaryColor="Purple" />
-                <!-- MahApps.Metro resource dictionaries. Make sure that all file names are Case Sensitive! -->
+                <materialDesign:BundledTheme
+                    BaseTheme="Inherit"
+                    PrimaryColor="DeepPurple"
+                    SecondaryColor="Purple" />
+                <!--  MahApps.Metro resource dictionaries. Make sure that all file names are Case Sensitive!  -->
                 <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
                 <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
-                <!-- Theme setting -->
+                <!--  Theme setting  -->
                 <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Themes/Light.Blue.xaml" />
-                
-                <!--MaterialDesign-->
+
+                <!--  MaterialDesign  -->
                 <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />
                 <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesign3.Defaults.xaml" />
                 <ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.DeepPurple.xaml" />
                 <ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Secondary/MaterialDesignColor.Lime.xaml" />
-                <!--MaterialDesign-->
+                <!--  MaterialDesign  -->
 
                 <ResourceDictionary Source="pack://application:,,,/ICSharpCode.AvalonEdit;component/themes/generic.xaml" />
             </ResourceDictionary.MergedDictionaries>
@@ -38,12 +40,10 @@
             <c:StringFormatConverter x:Key="StringFormatConverter" />
             <c:InvertBooleanConverter x:Key="InvertBooleanConverter" />
             <c:ObjectToVisibilityConverter x:Key="ObjectToVisibilityConverter" />
-            <c:ObjectToVisibilityConverter x:Key="ObjectToCollapsedConverter"
-                                           Invert="True" />
+            <c:ObjectToVisibilityConverter x:Key="ObjectToCollapsedConverter" Invert="True" />
             <c:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
-            <c:BooleanToVisibilityConverter x:Key="BooleanToCollapsedConverter"
-                                            Invert="True" />
+            <c:BooleanToVisibilityConverter x:Key="BooleanToCollapsedConverter" Invert="True" />
         </ResourceDictionary>
-        
+
     </Application.Resources>
 </prism:PrismApplication>

+ 1 - 1
TeamAAS-VM/Controls/ParameterEdit.xaml.cs

@@ -85,7 +85,7 @@ namespace TeamAAS_VP.Controls
                 GlobalParamListCollection = new ObservableCollection<ProductGlobalParam>();
             }
 
-            GlobalParamListCollection.Add(new ProductGlobalParam() { Number = GlobalParamListCollection.Count });
+            GlobalParamListCollection.Add(new ProductGlobalParam() { Number= GlobalParamListCollection.Count});
         }
         #region 属性通知
         /// <summary>

+ 7 - 6
TeamAAS-VM/Resources/FontSize/DefaultFontSize.xaml

@@ -1,17 +1,18 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-                    xmlns:sys="clr-namespace:System;assembly=mscorlib">
-    <!--标题-->
+<ResourceDictionary
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:sys="clr-namespace:System;assembly=mscorlib">
+    <!--  标题  -->
     <sys:Double x:Key="Font.Size.Title1">34</sys:Double>
     <sys:Double x:Key="Font.Size.Title2">20</sys:Double>
     <sys:Double x:Key="Font.Size.Title3">18</sys:Double>
     <sys:Double x:Key="Font.Size.Title4">16</sys:Double>
-    <!--正文-->
+    <!--  正文  -->
     <sys:Double x:Key="Font.Size.Body1">18</sys:Double>
     <sys:Double x:Key="Font.Size.Body2">16</sys:Double>
     <sys:Double x:Key="Font.Size.Body3">14</sys:Double>
     <sys:Double x:Key="Font.Size.Body4">12</sys:Double>
-    <!--标注-->
+    <!--  标注  -->
     <sys:Double x:Key="Font.Size.Captions1">16</sys:Double>
     <sys:Double x:Key="Font.Size.Captions2">14</sys:Double>
     <sys:Double x:Key="Font.Size.Captions3">12</sys:Double>

+ 7 - 14
TeamAAS-VM/Resources/Styles/DefaultColors.xaml

@@ -1,15 +1,8 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
-    <SolidColorBrush x:Key="DefaultBackground"
-                     Color="#424242" />
-    <SolidColorBrush x:Key="DefaultFore"
-                     Color="#F0F0F0" />
-    <SolidColorBrush x:Key="DefaultNavigationCheckedBackground"
-                     Color="Transparent" />
-    <SolidColorBrush x:Key="DefaultNavigationCheckedFore"
-                     Color="#50ac52" />
-    <SolidColorBrush x:Key="DefaultNavigationUnCheckedBackground"
-                     Color="Transparent" />
-    <SolidColorBrush x:Key="DefaultNavigationUnCheckedFore"
-                     Color="#424242" />
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+    <SolidColorBrush x:Key="DefaultBackground" Color="#424242" />
+    <SolidColorBrush x:Key="DefaultFore" Color="#F0F0F0" />
+    <SolidColorBrush x:Key="DefaultNavigationCheckedBackground" Color="Transparent" />
+    <SolidColorBrush x:Key="DefaultNavigationCheckedFore" Color="#50ac52" />
+    <SolidColorBrush x:Key="DefaultNavigationUnCheckedBackground" Color="Transparent" />
+    <SolidColorBrush x:Key="DefaultNavigationUnCheckedFore" Color="#424242" />
 </ResourceDictionary>

+ 0 - 1
TeamAAS-VM/ViewModels/Product/ProductParamsViewModel.cs

@@ -306,7 +306,6 @@ namespace TeamAAS_VP.ViewModels.Product
             try
             {
                 SelectProduct = navigationContext.Parameters.GetValue<ProductModel>("SelectProduct");
-
                 if (SelectProduct.GlobalParamListCollection == null)
                 {
                     SelectProduct.GlobalParamListCollection = new ObservableCollection<ProductGlobalParam>();

+ 0 - 3
TeamAAS-VM/Views/Product/ProductParams.xaml.cs

@@ -1,6 +1,4 @@
 using System.Windows.Controls;
-using TeamAAS_VP.Models.Product;
-using TeamAAS_VP.ViewModels.Product;
 
 namespace TeamAAS_VP.Views.Product
 {
@@ -9,7 +7,6 @@ namespace TeamAAS_VP.Views.Product
     /// </summary>
     public partial class ProductParams : UserControl
     {
-        ProductParamsViewModel VM;
         public ProductParams()
         {
             InitializeComponent();