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