1
This commit is contained in:
30
CleanMachineHMI/Utils/DateEx.cs
Normal file
30
CleanMachineHMI/Utils/DateEx.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace System
|
||||
{
|
||||
public static class DateEx
|
||||
{
|
||||
public static DateTime StartOfTheWeek(this DateTime date)
|
||||
{
|
||||
|
||||
return date.Date.AddDays(-(int)date.DayOfWeek);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static DateTime EndOfTheWeek(this DateTime date)
|
||||
{
|
||||
|
||||
return date.Date.AddDays(7 - (int)date.DayOfWeek);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
#if DEBUG
|
||||
|
||||
//#define USE_LOCAL_TCP_DEBUG
|
||||
#define USE_LOCAL_TCP_DEBUG
|
||||
#endif
|
||||
//启用心跳检查
|
||||
|
||||
//#if RELEASE
|
||||
#if !USE_LOCAL_TCP_DEBUG
|
||||
#define UseHeartbeat
|
||||
//#endif
|
||||
#endif
|
||||
using CleanMachine.Model;
|
||||
using CleanMachine.Model.BAS;
|
||||
using CleanMachine.Model.CM;
|
||||
@@ -1195,7 +1195,7 @@ namespace CleanMachineHMI
|
||||
try
|
||||
{
|
||||
#endif
|
||||
// if (!this.IsConn) return false;
|
||||
// if (!this.IsConn) return false;
|
||||
switch (itemType)
|
||||
{
|
||||
case PlcItemTypeDesc.M:
|
||||
|
||||
Reference in New Issue
Block a user