注释掉无用代码
This commit is contained in:
parent
e4d32570e6
commit
d05801a802
|
@ -464,21 +464,21 @@ namespace DM_Weight.ViewModels
|
|||
}
|
||||
}
|
||||
|
||||
public void FindDrawerCount()
|
||||
{
|
||||
int count = 0;
|
||||
if (ConfigurationManager.AppSettings["MultiBatch"].ToString().Equals("1"))
|
||||
{
|
||||
count = SqlSugarHelper.Db.Queryable<ChannelList>().Where(cs => cs.DrawerType != 3)
|
||||
.Where(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1")).GroupBy(cs => cs.DrawerNo).Select(cs => SqlFunc.AggregateCount(cs.DrawerNo)).Count();
|
||||
}
|
||||
else
|
||||
{
|
||||
count = SqlSugarHelper.Db.Queryable<ChannelStock>().Where(cs => cs.DrawerType != 3)
|
||||
.Where(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1")).GroupBy(cs => cs.DrawerNo).Select(cs => SqlFunc.AggregateCount(cs.DrawerNo)).Count();
|
||||
}
|
||||
Is16Drawer = count == 16;
|
||||
}
|
||||
//public void FindDrawerCount()
|
||||
//{
|
||||
// int count = 0;
|
||||
// if (ConfigurationManager.AppSettings["MultiBatch"].ToString().Equals("1"))
|
||||
// {
|
||||
// count = SqlSugarHelper.Db.Queryable<ChannelList>().Where(cs => cs.DrawerType != 3)
|
||||
// .Where(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1")).GroupBy(cs => cs.DrawerNo).Select(cs => SqlFunc.AggregateCount(cs.DrawerNo)).Count();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// count = SqlSugarHelper.Db.Queryable<ChannelStock>().Where(cs => cs.DrawerType != 3)
|
||||
// .Where(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1")).GroupBy(cs => cs.DrawerNo).Select(cs => SqlFunc.AggregateCount(cs.DrawerNo)).Count();
|
||||
// }
|
||||
// Is16Drawer = count == 16;
|
||||
//}
|
||||
/// <summary>
|
||||
/// 获取温度信息
|
||||
/// </summary>
|
||||
|
@ -586,7 +586,7 @@ namespace DM_Weight.ViewModels
|
|||
//接收导航传过来的参数
|
||||
public void OnNavigatedTo(NavigationContext navigationContext)
|
||||
{
|
||||
_eventAggregator.GetEvent<LoginOutEvent>().Subscribe(SetLoginOut);
|
||||
//_eventAggregator.GetEvent<LoginOutEvent>().Subscribe(SetLoginOut);
|
||||
//_portUtil.dateTime = DateTime.Now;
|
||||
//取出user
|
||||
UserList = navigationContext.Parameters.GetValue<UserList>("operator");
|
||||
|
@ -623,7 +623,7 @@ namespace DM_Weight.ViewModels
|
|||
SelectedMenu = premissions[0];
|
||||
SelectedChildMenu = premissions[0].Children[0];
|
||||
_regionManager.RequestNavigate("ContentRegion", premissions[0].Children[0].PremissionPath);
|
||||
FindDrawerCount();
|
||||
//FindDrawerCount();
|
||||
|
||||
#region 温度查询定时
|
||||
//int interval = Convert.ToInt32(ConfigurationManager.AppSettings["Interval"]);
|
||||
|
@ -721,37 +721,37 @@ namespace DM_Weight.ViewModels
|
|||
public void OnNavigatedFrom(NavigationContext navigationContext)
|
||||
{
|
||||
//退了登录
|
||||
_eventAggregator.GetEvent<LoginOutEvent>().Unsubscribe(SetLoginOut);
|
||||
//_eventAggregator.GetEvent<LoginOutEvent>().Unsubscribe(SetLoginOut);
|
||||
}
|
||||
private void SetLoginOut()
|
||||
{
|
||||
//_chkFunction.HIKStopDVRRecord();
|
||||
Operator = null;
|
||||
Reviewer = null;
|
||||
try
|
||||
{
|
||||
//if (_socketHelper.IsMultiThread)
|
||||
//{
|
||||
// Application.Current.Dispatcher.BeginInvoke(() =>
|
||||
// {
|
||||
// _regionManager.RequestNavigate("MainRegion", "LoginWindow");
|
||||
// });
|
||||
//}
|
||||
//else
|
||||
{
|
||||
//private void SetLoginOut()
|
||||
//{
|
||||
// //_chkFunction.HIKStopDVRRecord();
|
||||
// Operator = null;
|
||||
// Reviewer = null;
|
||||
// try
|
||||
// {
|
||||
// //if (_socketHelper.IsMultiThread)
|
||||
// //{
|
||||
// // Application.Current.Dispatcher.BeginInvoke(() =>
|
||||
// // {
|
||||
// // _regionManager.RequestNavigate("MainRegion", "LoginWindow");
|
||||
// // });
|
||||
// //}
|
||||
// //else
|
||||
// {
|
||||
|
||||
|
||||
Application.Current.Dispatcher.Invoke(() =>
|
||||
{
|
||||
_regionManager.RequestNavigate("MainRegion", "LoginWindow");
|
||||
});
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logger.Info($"自动退出异常:{ex.Message}");
|
||||
}
|
||||
}
|
||||
// Application.Current.Dispatcher.Invoke(() =>
|
||||
// {
|
||||
// _regionManager.RequestNavigate("MainRegion", "LoginWindow");
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// logger.Info($"自动退出异常:{ex.Message}");
|
||||
// }
|
||||
//}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,12 +30,12 @@ namespace DM_Weight.Views
|
|||
/// </summary>
|
||||
public partial class HomeWindow : UserControl
|
||||
{
|
||||
private readonly ILog logger = LogManager.GetLogger(typeof(HomeWindow));
|
||||
int autoExit = Convert.ToInt32(ConfigurationManager.AppSettings["autoExit"] ?? "0");
|
||||
//public static System.Timers.Timer idleTimer;//= new System.Timers.Timer(60000);
|
||||
IEventAggregator _eventAggregator;
|
||||
SocketHelper _socketHelper;
|
||||
public HomeWindow(IEventAggregator eventAggregator, SocketHelper socketHelper)
|
||||
//private readonly ILog logger = LogManager.GetLogger(typeof(HomeWindow));
|
||||
//int autoExit = Convert.ToInt32(ConfigurationManager.AppSettings["autoExit"] ?? "0");
|
||||
////public static System.Timers.Timer idleTimer;//= new System.Timers.Timer(60000);
|
||||
//IEventAggregator _eventAggregator;
|
||||
//SocketHelper _socketHelper;
|
||||
public HomeWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
//if (autoExit > 0)
|
||||
|
@ -50,7 +50,7 @@ namespace DM_Weight.Views
|
|||
// idleTimer.Start();
|
||||
// _eventAggregator = eventAggregator;
|
||||
//}
|
||||
_socketHelper = socketHelper;
|
||||
//_socketHelper = socketHelper;
|
||||
}
|
||||
//private void OnUserActivity(object sender, EventArgs e)
|
||||
//{
|
||||
|
|
Loading…
Reference in New Issue