From 1547b03914c04293b93f3c7d7fa17a2f275d71ef Mon Sep 17 00:00:00 2001 From: maqiao <625215135@qq.com> Date: Thu, 26 Sep 2024 10:34:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E5=86=B0=E7=AE=B1=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E9=A1=B5=E9=9D=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DM_Weight/App.config | 2 +- DM_Weight/ViewModels/HomeWindowViewModel.cs | 10 ++++----- .../ViewModels/RoleManagerWindowViewModel.cs | 22 +++++++++---------- .../ViewModels/SettingMainWindowViewModel.cs | 10 ++++----- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/DM_Weight/App.config b/DM_Weight/App.config index d9ffd44..328ded2 100644 --- a/DM_Weight/App.config +++ b/DM_Weight/App.config @@ -62,7 +62,7 @@ - + diff --git a/DM_Weight/ViewModels/HomeWindowViewModel.cs b/DM_Weight/ViewModels/HomeWindowViewModel.cs index efd9efd..9e91a17 100644 --- a/DM_Weight/ViewModels/HomeWindowViewModel.cs +++ b/DM_Weight/ViewModels/HomeWindowViewModel.cs @@ -130,11 +130,11 @@ namespace DM_Weight.ViewModels } else if (value.PremissionPath.Equals("SettingMainWindow") || value.PremissionPath.Equals("SettingWindow")) { - if (Convert.ToInt32(ConfigurationManager.AppSettings["hasFridge"])>0) - { - _regionManager.RequestNavigate("ContentRegion", "SettingMainWindow"); - } - else + //if (Convert.ToInt32(ConfigurationManager.AppSettings["hasFridge"])>0) + //{ + // _regionManager.RequestNavigate("ContentRegion", "SettingMainWindow"); + //} + //else { _regionManager.RequestNavigate("ContentRegion", "SettingWindow"); } diff --git a/DM_Weight/ViewModels/RoleManagerWindowViewModel.cs b/DM_Weight/ViewModels/RoleManagerWindowViewModel.cs index df2ea15..2331619 100644 --- a/DM_Weight/ViewModels/RoleManagerWindowViewModel.cs +++ b/DM_Weight/ViewModels/RoleManagerWindowViewModel.cs @@ -424,18 +424,18 @@ namespace DM_Weight.ViewModels PremissionPath = "RoleManagerWindow", }; PremissionDm sysset3; - if (Convert.ToInt32(ConfigurationManager.AppSettings["hasFridge"]) > 0) - { - //有冰箱,需要冰箱设置(两个冰箱) - sysset3 = new PremissionDm - { - Id = 53, - PremissionName = "设置", - PremissionPath = "SettingMainWindow", - }; + //if (Convert.ToInt32(ConfigurationManager.AppSettings["hasFridge"]) > 0) + //{ + // //有冰箱,需要冰箱设置(两个冰箱) + // sysset3 = new PremissionDm + // { + // Id = 53, + // PremissionName = "设置", + // PremissionPath = "SettingMainWindow", + // }; - } - else + //} + //else { sysset3 = new PremissionDm { diff --git a/DM_Weight/ViewModels/SettingMainWindowViewModel.cs b/DM_Weight/ViewModels/SettingMainWindowViewModel.cs index 871a80c..513c5ff 100644 --- a/DM_Weight/ViewModels/SettingMainWindowViewModel.cs +++ b/DM_Weight/ViewModels/SettingMainWindowViewModel.cs @@ -60,14 +60,14 @@ namespace DM_Weight.ViewModels { if (SettingPages is null || SettingPages.Count <= 0) { - if (Convert.ToInt32(ConfigurationManager.AppSettings["hasFridge"]) <= 1) + //if (Convert.ToInt32(ConfigurationManager.AppSettings["hasFridge"]) <= 1) { SettingPages = new ObservableCollection(SqlSugarHelper.Db.Queryable().Where(p=>p.Id!="2").ToList()); } - else - { - SettingPages = new ObservableCollection(SqlSugarHelper.Db.Queryable().Where(p => p.Id != "3").ToList()); - } + //else + //{ + // SettingPages = new ObservableCollection(SqlSugarHelper.Db.Queryable().Where(p => p.Id != "3").ToList()); + //} if (SettingPages.Count > 0) { if (string.IsNullOrEmpty(defaultView))