提交记录修改UI/Base/Color/Colors.cs+5 −1看文件
修改UI/ViewModels/CategoryPageVM.cs+1 −1看文件
| @@ -35,7 +35,7 @@ namespace UI.Base.Color | ||
| 35 | 35 | |
| 36 | 36 | }; |
| 37 | 37 | |
| 38 | 删除: public static string[] MainColors = { "#00FFAB", "#A761FF", "#ff587f", "#fff323", "#DAEAF1", "#2B20D9", "#FF5C01", "#9EB23C", "#FF9999", "#998CEB", "#77E4D4", "#FD5E5E", "#B4FF9F", "#07FF01", "#FFE162", "#C70B80", "#590696", "#97DBAE", "#ff1801" }; | |
| 38 | 新增: public static string[] MainColors = { "#00FFAB", "#A761FF", "#ff587f", "#fff323", "#DAEAF1", "#2B20D9", "#FF5C01", "#9EB23C", "#FF9999", "#998CEB", "#77E4D4", "#FD5E5E", "#B4FF9F", "#07FF01", "#FFE162", "#C70B80", "#590696", "#97DBAE", "#ff1801" }; | |
| 39 | 39 | |
| 40 | 40 | public static IColor Get(ColorTypes color) |
| 41 | 41 | { |
| @@ -47,6 +47,10 @@ namespace UI.Base.Color | ||
| 47 | 47 | } |
| 48 | 48 | public static SolidColorBrush GetFromString(string color, double opacity = 1) |
| 49 | 49 | { |
| 50 | 新增: if (string.IsNullOrEmpty(color)) | |
| 51 | 新增: { | |
| 52 | 新增: return null; | |
| 53 | 新增: } | |
| 50 | 54 | return new SolidColorBrush((System.Windows.Media.Color)ColorConverter.ConvertFromString(color)) |
| 51 | 55 | { |
| 52 | 56 | Opacity = opacity |
| @@ -230,7 +230,7 @@ namespace UI.ViewModels | ||
| 230 | 230 | var select = obj as CategoryModel; |
| 231 | 231 | EditName = select.Data.Name; |
| 232 | 232 | EditIconFile = select.Data.IconFile; |
| 233 | 删除: EditColor = select.Data.Color; | |
| 233 | 新增: EditColor = string.IsNullOrEmpty(select.Data.Color) ? "#00FFAB" : select.Data.Color; | |
| 234 | 234 | } |
| 235 | 235 | else |
| 236 | 236 | { |

