去掉冰箱设备页面功能

This commit is contained in:
maqiao 2024-09-26 10:34:28 +08:00
parent a94eaeed2e
commit 1547b03914
4 changed files with 22 additions and 22 deletions

View File

@ -62,7 +62,7 @@
<!--是否有冰箱抽屉0无1有一个2两个-->
<add key="hasFridge" value="0"/>
<add key="hasFridge" value="1"/>
<!-- 冰箱的串口号 -->
<add key="FridgePortPath" value="COM7" />

View File

@ -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");
}

View File

@ -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
{

View File

@ -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<SettingPage>(SqlSugarHelper.Db.Queryable<SettingPage>().Where(p=>p.Id!="2").ToList());
}
else
{
SettingPages = new ObservableCollection<SettingPage>(SqlSugarHelper.Db.Queryable<SettingPage>().Where(p => p.Id != "3").ToList());
}
//else
//{
// SettingPages = new ObservableCollection<SettingPage>(SqlSugarHelper.Db.Queryable<SettingPage>().Where(p => p.Id != "3").ToList());
//}
if (SettingPages.Count > 0)
{
if (string.IsNullOrEmpty(defaultView))