diff --git a/guidescreen/GuideScreen/.vs/GuideScreen/FileContentIndex/5cc6e797-00ca-4b7c-9429-8012ee0b4537.vsidx b/guidescreen/GuideScreen/.vs/GuideScreen/FileContentIndex/1c416271-e1e8-4c5e-9532-4e153668d51f.vsidx
similarity index 66%
rename from guidescreen/GuideScreen/.vs/GuideScreen/FileContentIndex/5cc6e797-00ca-4b7c-9429-8012ee0b4537.vsidx
rename to guidescreen/GuideScreen/.vs/GuideScreen/FileContentIndex/1c416271-e1e8-4c5e-9532-4e153668d51f.vsidx
index 7c3d4a9..1ce2c6b 100644
Binary files a/guidescreen/GuideScreen/.vs/GuideScreen/FileContentIndex/5cc6e797-00ca-4b7c-9429-8012ee0b4537.vsidx and b/guidescreen/GuideScreen/.vs/GuideScreen/FileContentIndex/1c416271-e1e8-4c5e-9532-4e153668d51f.vsidx differ
diff --git a/guidescreen/GuideScreen/.vs/GuideScreen/FileContentIndex/6fdf6a7d-3e0a-498e-8889-a2b6cfb98a03.vsidx b/guidescreen/GuideScreen/.vs/GuideScreen/FileContentIndex/6fdf6a7d-3e0a-498e-8889-a2b6cfb98a03.vsidx
new file mode 100644
index 0000000..e6f0e2f
Binary files /dev/null and b/guidescreen/GuideScreen/.vs/GuideScreen/FileContentIndex/6fdf6a7d-3e0a-498e-8889-a2b6cfb98a03.vsidx differ
diff --git a/guidescreen/GuideScreen/.vs/GuideScreen/FileContentIndex/fc9c286f-c74c-4c4f-abc8-2862a4d2a7dc.vsidx b/guidescreen/GuideScreen/.vs/GuideScreen/FileContentIndex/fc9c286f-c74c-4c4f-abc8-2862a4d2a7dc.vsidx
deleted file mode 100644
index 00d2cd4..0000000
Binary files a/guidescreen/GuideScreen/.vs/GuideScreen/FileContentIndex/fc9c286f-c74c-4c4f-abc8-2862a4d2a7dc.vsidx and /dev/null differ
diff --git a/guidescreen/GuideScreen/.vs/GuideScreen/v17/.suo b/guidescreen/GuideScreen/.vs/GuideScreen/v17/.suo
index 33207dd..dc805a8 100644
Binary files a/guidescreen/GuideScreen/.vs/GuideScreen/v17/.suo and b/guidescreen/GuideScreen/.vs/GuideScreen/v17/.suo differ
diff --git a/guidescreen/GuideScreen/GuideScreen.Common/Common/DIManager.cs b/guidescreen/GuideScreen/GuideScreen.Common/Common/DIManager.cs
index e37365c..772cd5a 100644
--- a/guidescreen/GuideScreen/GuideScreen.Common/Common/DIManager.cs
+++ b/guidescreen/GuideScreen/GuideScreen.Common/Common/DIManager.cs
@@ -1,4 +1,5 @@
using Autofac;
+using Masuit.Tools;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -11,7 +12,6 @@ namespace GuideScreen.Common.Common
public static class DIManager
{
private static IContainer container = null;
-
///
/// 自动注册包含 IDependency 接口的实例
///
@@ -35,9 +35,8 @@ namespace GuideScreen.Common.Common
/* 3、获取所有程序集
* 当CLR COM服务器初始化时,它会创建一个AppDomain。 AppDomain是一组程序集的逻辑容器
*/
- //var assemblies = AppDomain.CurrentDomain.GetAssemblies();//这种写法AppDomain重新启动后会丢失程序集
- var assemblies = Assembly.GetAssembly(baseType);
-
+ var assemblies = AppDomain.CurrentDomain.GetAssemblies();//这种写法AppDomain重新启动后会丢失程序集
+ //var assemblies = Assembly.GetAssembly(baseType);
/* 4、自动注册接口
* 筛选出对应条件的接口
* IsAssignableFrom:返回true的条件:是否直接或间接实现了IDependency
@@ -47,6 +46,9 @@ namespace GuideScreen.Common.Common
*/
builder.RegisterAssemblyTypes(assemblies).Where(type => baseType.IsAssignableFrom(type) && !type.IsAbstract).AsImplementedInterfaces().SingleInstance();
+ //注册 命名空间以"GuideScreen" 开头的 类名以"Controller" 结尾的类型
+ builder.RegisterAssemblyTypes(assemblies).Where(type => !type.Namespace.IsNullOrEmpty() && type.Namespace.StartsWith("GuideScreen") && type.Name.EndsWith("Controller") && !type.IsAbstract).SingleInstance();
+
/*5、自动注册MVC与api控制器
*/
//builder.RegisterControllers(Assembly.GetExecutingAssembly());
diff --git a/guidescreen/GuideScreen/GuideScreen.Common/Common/SystemConfigKey.cs b/guidescreen/GuideScreen/GuideScreen.Common/Common/SystemConfigKey.cs
index ea43e16..ed8a0a5 100644
--- a/guidescreen/GuideScreen/GuideScreen.Common/Common/SystemConfigKey.cs
+++ b/guidescreen/GuideScreen/GuideScreen.Common/Common/SystemConfigKey.cs
@@ -31,5 +31,45 @@ namespace GuideScreen.Common.Common
/// 日期保留天数
///
LogRetentionDays,
+
+ ///
+ /// 获取气象 key
+ ///
+ WeatherKey,
+
+ ///
+ /// 获取气象 地区编号
+ ///
+ WeatherLocation,
+
+ ///
+ /// 客流统计设备IP地址
+ ///
+ PassengerFlowDeviceIP,
+
+ ///
+ /// 客流统计设备端口
+ ///
+ PassengerFlowDevicePort,
+
+ ///
+ /// 客流统计设备登录用户名
+ ///
+ PassengerFlowDeviceLoginUser,
+
+ ///
+ /// 客流统计设备登录用户密码
+ ///
+ PassengerFlowDeviceLoginPassword,
+
+ ///
+ /// 客流统计监控IP地址
+ ///
+ PassengerFlowListenIP,
+
+ ///
+ /// 客流统计监控端口号
+ ///
+ PassengerFlowListenPort,
}
}
diff --git a/guidescreen/GuideScreen/GuideScreen.Common/Common/WebClientHelper.cs b/guidescreen/GuideScreen/GuideScreen.Common/Common/WebClientHelper.cs
new file mode 100644
index 0000000..fe2d815
--- /dev/null
+++ b/guidescreen/GuideScreen/GuideScreen.Common/Common/WebClientHelper.cs
@@ -0,0 +1,86 @@
+using System;
+using System.Collections.Generic;
+using System.IO.Compression;
+using System.IO;
+using System.Linq;
+using System.Net;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace GuideScreen.Common.Common
+{
+ public class WebClientHelper
+ {
+ ///
+ /// 获取webAPI 数据
+ ///
+ ///
+ ///
+ public static string GetWebClient(string url)
+ {
+ string str = string.Empty;
+ try
+ {
+
+ using (WebClient clinet = new WebClient())
+ {
+ var bytes = clinet.DownloadData(url);
+ str = GzipDecompress(bytes);
+ return str;
+ }
+ }
+ catch (Exception ex)
+ {
+ ex.WriteErrorLog();
+ }
+ return str;
+
+ }
+
+ ///
+ /// 获取webAPI 数据 异步
+ ///
+ ///
+ ///
+ public static async Task GetWebClientAsync(string url)
+ {
+ string str = string.Empty;
+ try
+ {
+
+ using (WebClient clinet = new WebClient())
+ {
+ var bytes = await clinet.DownloadDataTaskAsync(url);
+ str = GzipDecompress(bytes);
+ return str;
+ }
+ }
+ catch (Exception ex)
+ {
+ ex.WriteErrorLog();
+ }
+ return str;
+
+ }
+
+ ///
+ /// GZip 解压
+ ///
+ ///
+ ///
+ private static string GzipDecompress(byte[] bytes)
+ {
+ string retValue = string.Empty;
+ using (MemoryStream stream = new MemoryStream(bytes))
+ {
+ byte[] byte1 = new byte[bytes.Length];
+ using (GZipStream gzip = new GZipStream(stream, CompressionMode.Decompress, true))
+ {
+ StreamReader streamR = new StreamReader(gzip, Encoding.UTF8);
+ retValue = streamR.ReadToEnd();
+ }
+ }
+ return retValue;
+ }
+ }
+}
diff --git a/guidescreen/GuideScreen/GuideScreen.Common/GuideScreen.Common.csproj b/guidescreen/GuideScreen/GuideScreen.Common/GuideScreen.Common.csproj
index 0487bc0..33aa02d 100644
--- a/guidescreen/GuideScreen/GuideScreen.Common/GuideScreen.Common.csproj
+++ b/guidescreen/GuideScreen/GuideScreen.Common/GuideScreen.Common.csproj
@@ -53,6 +53,9 @@
..\packages\Microsoft.Bcl.AsyncInterfaces.1.1.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll
+
+ ..\packages\Newtonsoft.Json.13.0.2\lib\net45\Newtonsoft.Json.dll
+
..\packages\SQLite.CodeFirst.1.7.0.34\lib\net45\SQLite.CodeFirst.dll
@@ -103,6 +106,7 @@
+
@@ -116,14 +120,18 @@
+
+
+
+
@@ -132,6 +140,9 @@
+
+
+
@@ -166,6 +177,9 @@
+
+
+
diff --git a/guidescreen/GuideScreen/GuideScreen.Common/Repositories/Entities/GSDBContext.cs b/guidescreen/GuideScreen/GuideScreen.Common/Repositories/Entities/GSDBContext.cs
index bd9d71e..e0f13c8 100644
--- a/guidescreen/GuideScreen/GuideScreen.Common/Repositories/Entities/GSDBContext.cs
+++ b/guidescreen/GuideScreen/GuideScreen.Common/Repositories/Entities/GSDBContext.cs
@@ -95,14 +95,38 @@ namespace GuideScreen.Common.Repositories
//初始化系統参数
var plcIPAddress = new SystemConfigEntity { ConfigName = "PLC通信IP地址", ConfigKey = SystemConfigKeys.PLCAddress.ToString(), ConfigValue = "192.168.1.3", Enabled = true };
var plcPort = new SystemConfigEntity { ConfigName = "PLC通信端口", ConfigKey = SystemConfigKeys.PLCPort.ToString(), ConfigValue = "502", Enabled = true };
+
var adminPassword = new SystemConfigEntity { ConfigName = "管理员密码", ConfigKey = SystemConfigKeys.AdminPwd.ToString(), ConfigValue = "6543210", Enabled = true };
+
var logRetention = new SystemConfigEntity { ConfigName = "日志保留天数", ConfigKey = SystemConfigKeys.LogRetentionDays.ToString(), ConfigValue = "30", Enabled = true };
+
+ var weatherKey = new SystemConfigEntity { ConfigName = "气象信息key", ConfigKey = SystemConfigKeys.WeatherKey.ToString(), ConfigValue = "3ac6b1fdfcc74db7a1e9b94fc5647361", Enabled = true };
+ var weatherLocation = new SystemConfigEntity { ConfigName = "气象区域编号", ConfigKey = SystemConfigKeys.WeatherLocation.ToString(), ConfigValue = "101250301", Remarks = "株洲", Enabled = true };
+
+ var passengerFlowDeviceIP = new SystemConfigEntity { ConfigName = "客流统计设备IP地址", ConfigKey = SystemConfigKeys.PassengerFlowDeviceIP.ToString(), ConfigValue = "192.168.1.64", Enabled = true };
+ var passengerFlowDevicePort = new SystemConfigEntity { ConfigName = "客流统计设备端口", ConfigKey = SystemConfigKeys.PassengerFlowDevicePort.ToString(), ConfigValue = "8000", Enabled = true };
+ var passengerFlowDeviceLoginUser = new SystemConfigEntity { ConfigName = "客流统计设备登录用户名", ConfigKey = SystemConfigKeys.PassengerFlowDeviceLoginUser.ToString(), ConfigValue = "admin", Enabled = true };
+ var passengerFlowDeviceLoginPassword = new SystemConfigEntity { ConfigName = "客流统计设备登录用户密码", ConfigKey = SystemConfigKeys.PassengerFlowDeviceLoginPassword.ToString(), ConfigValue = "1q@w3e$r", Enabled = true };
+ var passengerFlowListenIP = new SystemConfigEntity { ConfigName = "客流统计监控IP地址", ConfigKey = SystemConfigKeys.PassengerFlowListenIP.ToString(), ConfigValue = "192.168.1.100", Remarks="本地IP地址(与摄像头所在网络)",Enabled = true };
+ var passengerFlowListenPort = new SystemConfigEntity { ConfigName = "客流统计监控端口号", ConfigKey = SystemConfigKeys.PassengerFlowListenPort.ToString(), ConfigValue = "7200", Enabled = true };
context.SystemConfigEntities.AddRange(new SystemConfigEntity[]
{
plcIPAddress,
plcPort,
+
adminPassword,
+
logRetention,
+
+ weatherKey,
+ weatherLocation,
+
+ passengerFlowDeviceIP,
+ passengerFlowDevicePort,
+ passengerFlowDeviceLoginUser,
+ passengerFlowDeviceLoginPassword,
+ passengerFlowListenIP,
+ passengerFlowListenPort,
});
context.SaveChanges();
}
diff --git a/guidescreen/GuideScreen/GuideScreen.Common/Repositories/IPassengerFlowStatisticsRepository.cs b/guidescreen/GuideScreen/GuideScreen.Common/Repositories/IPassengerFlowStatisticsRepository.cs
index ed61955..c6f09d6 100644
--- a/guidescreen/GuideScreen/GuideScreen.Common/Repositories/IPassengerFlowStatisticsRepository.cs
+++ b/guidescreen/GuideScreen/GuideScreen.Common/Repositories/IPassengerFlowStatisticsRepository.cs
@@ -52,5 +52,11 @@ namespace GuideScreen.Common.Repositories
///
///
List GetPassengerFlowStatisticsWeekTotal(DateTime date);
+
+ ///
+ /// 获取客流总统计 (只获取进入的数量)
+ ///
+ ///
+ int GetPassengerFlowStatisticsTotal();
}
}
diff --git a/guidescreen/GuideScreen/GuideScreen.Common/Repositories/Impl/PassengerFlowStatisticsRepository.cs b/guidescreen/GuideScreen/GuideScreen.Common/Repositories/Impl/PassengerFlowStatisticsRepository.cs
index 9acd1ca..f6c5dbd 100644
--- a/guidescreen/GuideScreen/GuideScreen.Common/Repositories/Impl/PassengerFlowStatisticsRepository.cs
+++ b/guidescreen/GuideScreen/GuideScreen.Common/Repositories/Impl/PassengerFlowStatisticsRepository.cs
@@ -193,6 +193,23 @@ namespace GuideScreen.Common.Repositories.Impl
}
}
+ ///
+ /// 获取客流总统计 (只获取进入的数量)
+ ///
+ ///
+ public int GetPassengerFlowStatisticsTotal()
+ {
+ using (var context=GSDBContext.GetDbContext())
+ {
+ if (context.PassengerFlowStatisticsDayEntites.Count() == 0)
+ {
+ return 0;
+ }
+ var total = context.PassengerFlowStatisticsDayEntites.Select(f=>f.EnterNum).Sum();
+ return total;
+ }
+ }
+
private string ConvertDayOfWeek(DayOfWeek dayOfWeek)
{
var value = string.Empty;
diff --git a/guidescreen/GuideScreen/GuideScreen.Common/Services/IPassengerFlowStatisticsDataService.cs b/guidescreen/GuideScreen/GuideScreen.Common/Services/IPassengerFlowStatisticsDataService.cs
new file mode 100644
index 0000000..6a74f8b
--- /dev/null
+++ b/guidescreen/GuideScreen/GuideScreen.Common/Services/IPassengerFlowStatisticsDataService.cs
@@ -0,0 +1,64 @@
+using GuideScreen.Common.Common;
+using GuideScreen.Common.Services.Models;
+using GuideScreen.SDK.Monitoring;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Threading.Tasks;
+using static GuideScreen.SDK.Monitoring.CHCNetSDK;
+
+namespace GuideScreen.Common.Services
+{
+ ///
+ /// 客流统计服务 接口
+ ///
+ public interface IPassengerFlowStatisticsDataService : IDependency
+ {
+ ///
+ /// 获取每日客流信息
+ ///
+ ///
+ ///
+ ///
+ ///
+ PageModel> GetPassengerFlowStatisticsDayList(DateTime begDate, DateTime endDate, int pageSize, int pageIndex);
+
+ ///
+ /// 获取客流明细信息
+ ///
+ ///
+ ///
+ ///
+ ///
+ PageModel> GetPassengerFlowStatisticsList(DateTime begDate, DateTime endDate, int pageSize, int pageIndex);
+
+ ///
+ /// 添加客流信息
+ ///
+ ///
+ void AddPassengerFlowStatistics(PassengerFlowStatisticsModel entity);
+
+ ///
+ /// 获取当天客流量统计
+ ///
+ ///
+ ///
+ PassengerFlowStatisticsDayModel GetPassengerFlowStatisticsDayTotal(DateTime date);
+
+ ///
+ /// 获取周客流量统计
+ ///
+ ///
+ ///
+ List GetPassengerFlowStatisticsWeekTotal(DateTime date);
+
+ ///
+ /// 获取客流量总统计 (只获取进入如数量)
+ ///
+ ///
+ int GetPassengerFlowStatisticsTotal();
+ }
+}
diff --git a/guidescreen/GuideScreen/GuideScreen.Common/Services/IPassengerFlowStatisticsService.cs b/guidescreen/GuideScreen/GuideScreen.Common/Services/IPassengerFlowStatisticsService.cs
index d7fc207..3e2df4d 100644
--- a/guidescreen/GuideScreen/GuideScreen.Common/Services/IPassengerFlowStatisticsService.cs
+++ b/guidescreen/GuideScreen/GuideScreen.Common/Services/IPassengerFlowStatisticsService.cs
@@ -19,8 +19,6 @@ namespace GuideScreen.Common.Services
{
event EventHandler ActionEvent;
- event EventHandler ExceptionEvent;
-
///
/// 视频设备SDK初始化
@@ -67,44 +65,7 @@ namespace GuideScreen.Common.Services
///
/// 关闭监听
///
- void CloseListen(string ListenIpAddress);
+ void CloseListen();
- ///
- /// 获取每日客流信息
- ///
- ///
- ///
- ///
- ///
- PageModel> GetPassengerFlowStatisticsDayList(DateTime begDate, DateTime endDate, int pageSize, int pageIndex);
-
- ///
- /// 获取客流明细信息
- ///
- ///
- ///
- ///
- ///
- PageModel> GetPassengerFlowStatisticsList(DateTime begDate, DateTime endDate, int pageSize, int pageIndex);
-
- ///
- /// 添加客流信息
- ///
- ///
- void AddPassengerFlowStatistics(PassengerFlowStatisticsModel entity);
-
- ///
- /// 获取当天客流量统计
- ///
- ///
- ///
- PassengerFlowStatisticsDayModel GetPassengerFlowStatisticsDayTotal(DateTime date);
-
- ///
- /// 获取周客流量统计
- ///
- ///
- ///
- List GetPassengerFlowStatisticsWeekTotal(DateTime date);
}
}
diff --git a/guidescreen/GuideScreen/GuideScreen.Common/Services/IWeatherService.cs b/guidescreen/GuideScreen/GuideScreen.Common/Services/IWeatherService.cs
new file mode 100644
index 0000000..91d9f40
--- /dev/null
+++ b/guidescreen/GuideScreen/GuideScreen.Common/Services/IWeatherService.cs
@@ -0,0 +1,41 @@
+using GuideScreen.Common.Common;
+using GuideScreen.Common.Models;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace GuideScreen.Common.Services
+{
+ ///
+ /// 气象服务
+ ///
+ public interface IWeatherService : IDependency
+ {
+ ///
+ /// 获取城市实时天气
+ ///
+ /// 城市编号
+ ///
+ ///
+ Task GetWeatherNowAsync(string location, string key);
+
+ ///
+ /// 获取城市天气质量
+ ///
+ /// 城市编号
+ ///
+ ///
+ Task GetWeatherAirAsync(string location, string key);
+
+ ///
+ /// 获取城市天气指数
+ ///
+ /// 城市编号
+ ///
+ ///
+ Task GetWeatherIndicesAsync(string location, string key);
+ }
+}
diff --git a/guidescreen/GuideScreen/GuideScreen.Common/Services/Impl/PassengerFlowStatisticsDataService.cs b/guidescreen/GuideScreen/GuideScreen.Common/Services/Impl/PassengerFlowStatisticsDataService.cs
new file mode 100644
index 0000000..e12d9fc
--- /dev/null
+++ b/guidescreen/GuideScreen/GuideScreen.Common/Services/Impl/PassengerFlowStatisticsDataService.cs
@@ -0,0 +1,97 @@
+using GuideScreen.Common.Common;
+using GuideScreen.Common.Repositories;
+using GuideScreen.Common.Repositories.Impl;
+using GuideScreen.Common.Services.Models;
+using GuideScreen.SDK.Monitoring;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics.Tracing;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Input;
+using static GuideScreen.SDK.Monitoring.CHCNetSDK;
+
+namespace GuideScreen.Common.Services.Impl
+{
+ ///
+ /// 客流统计服务 实现
+ ///
+ internal class PassengerFlowStatisticsDataService : IPassengerFlowStatisticsDataService
+ {
+ private IPassengerFlowStatisticsRepository passengerFlowStatisticsRepository;
+ public PassengerFlowStatisticsDataService(IPassengerFlowStatisticsRepository repository)
+ {
+ passengerFlowStatisticsRepository = repository;
+ }
+
+ ///
+ /// 获取每日客流信息
+ ///
+ ///
+ ///
+ ///
+ ///
+ public PageModel> GetPassengerFlowStatisticsDayList(DateTime begDate, DateTime endDate, int pageSize, int pageIndex)
+ {
+ var pageModel = passengerFlowStatisticsRepository.GetPassengerFlowStatisticsDayList(begDate, endDate, pageSize, pageIndex);
+ return pageModel;
+ }
+
+ ///
+ /// 获取客流明细信息
+ ///
+ ///
+ ///
+ ///
+ ///
+ public PageModel> GetPassengerFlowStatisticsList(DateTime begDate, DateTime endDate, int pageSize, int pageIndex)
+ {
+ var pageModel = passengerFlowStatisticsRepository.GetPassengerFlowStatisticsList(begDate, endDate, pageSize, pageIndex);
+ return pageModel;
+ }
+
+ ///
+ /// 添加客流信息
+ ///
+ ///
+ public void AddPassengerFlowStatistics(PassengerFlowStatisticsModel entity)
+ {
+ passengerFlowStatisticsRepository.AddPassengerFlowStatistics(entity);
+ }
+
+ ///
+ /// 获取当天客流量统计
+ ///
+ ///
+ ///
+ public PassengerFlowStatisticsDayModel GetPassengerFlowStatisticsDayTotal(DateTime date)
+ {
+ var model = passengerFlowStatisticsRepository.GetPassengerFlowStatisticsDayTotal(date);
+ return model;
+ }
+
+ ///
+ /// 获取周客流量统计
+ ///
+ ///
+ ///
+ public List GetPassengerFlowStatisticsWeekTotal(DateTime date)
+ {
+ var models = passengerFlowStatisticsRepository.GetPassengerFlowStatisticsWeekTotal(date);
+ return models;
+ }
+
+ ///
+ /// 获取客流量总统计 (只获取进入如数量)
+ ///
+ ///
+ public int GetPassengerFlowStatisticsTotal()
+ {
+ var total = passengerFlowStatisticsRepository.GetPassengerFlowStatisticsTotal();
+ return total;
+ }
+ }
+}
diff --git a/guidescreen/GuideScreen/GuideScreen.Common/Services/Impl/PassengerFlowStatisticsService.cs b/guidescreen/GuideScreen/GuideScreen.Common/Services/Impl/PassengerFlowStatisticsService.cs
index c8e66aa..3ae24e0 100644
--- a/guidescreen/GuideScreen/GuideScreen.Common/Services/Impl/PassengerFlowStatisticsService.cs
+++ b/guidescreen/GuideScreen/GuideScreen.Common/Services/Impl/PassengerFlowStatisticsService.cs
@@ -21,11 +21,6 @@ namespace GuideScreen.Common.Services.Impl
///
internal class PassengerFlowStatisticsServiceByHikvision : IPassengerFlowStatisticsService
{
- private IPassengerFlowStatisticsRepository passengerFlowStatisticsRepository;
- public PassengerFlowStatisticsServiceByHikvision(IPassengerFlowStatisticsRepository repository)
- {
- passengerFlowStatisticsRepository = repository;
- }
private CHCNetSDK.UNION_STATTIME m_struStatTime = new CHCNetSDK.UNION_STATTIME();
private CHCNetSDK.UNION_STATFRAME m_struStatFrame = new CHCNetSDK.UNION_STATFRAME();
@@ -36,7 +31,7 @@ namespace GuideScreen.Common.Services.Impl
private CHCNetSDK.MSGCallBack m_falarmData = null;
public event EventHandler ActionEvent;
- public event EventHandler ExceptionEvent;
+
private int lUserID;
private int lAlarmHandle;
@@ -233,7 +228,6 @@ namespace GuideScreen.Common.Services.Impl
{
m_falarmData = new CHCNetSDK.MSGCallBack(MsgCallback);
}
-
iListenHandle = CHCNetSDK.NET_DVR_StartListen_V30(listenIpAddress, (ushort)port, m_falarmData, IntPtr.Zero);
if (iListenHandle < 0)
{
@@ -250,7 +244,7 @@ namespace GuideScreen.Common.Services.Impl
///
/// 关闭监听
///
- public void CloseListen(string ListenIpAddress)
+ public void CloseListen()
{
if (iListenHandle < 0)
{
@@ -310,16 +304,16 @@ namespace GuideScreen.Common.Services.Impl
m_struStatTime = (CHCNetSDK.UNION_STATTIME)Marshal.PtrToStructure(ptrPDCUnion, typeof(CHCNetSDK.UNION_STATTIME));
//开始时间
- strStartTime = string.Format("{0:D4}", m_struStatTime.tmStart.dwYear) +
- string.Format("{0:D2}", m_struStatTime.tmStart.dwMonth) +
+ strStartTime = string.Format("{0:D4}-", m_struStatTime.tmStart.dwYear) +
+ string.Format("{0:D2}-", m_struStatTime.tmStart.dwMonth) +
string.Format("{0:D2}", m_struStatTime.tmStart.dwDay) + " "
+ string.Format("{0:D2}", m_struStatTime.tmStart.dwHour) + ":"
+ string.Format("{0:D2}", m_struStatTime.tmStart.dwMinute) + ":"
+ string.Format("{0:D2}", m_struStatTime.tmStart.dwSecond);
//结束时间
- strEndTime = string.Format("{0:D4}", m_struStatTime.tmEnd.dwYear) +
- string.Format("{0:D2}", m_struStatTime.tmEnd.dwMonth) +
+ strEndTime = string.Format("{0:D4}-", m_struStatTime.tmEnd.dwYear) +
+ string.Format("{0:D2}-", m_struStatTime.tmEnd.dwMonth) +
string.Format("{0:D2}", m_struStatTime.tmEnd.dwDay) + " "
+ string.Format("{0:D2}", m_struStatTime.tmEnd.dwHour) + ":"
+ string.Format("{0:D2}", m_struStatTime.tmEnd.dwMinute) + ":"
@@ -335,75 +329,18 @@ namespace GuideScreen.Common.Services.Impl
//报警设备IP地址
string strIP = Encoding.UTF8.GetString(pAlarmer.sDeviceIP).TrimEnd('\0');
+ DateTime.TryParse(strStartTime,out var begDate);
+ DateTime.TryParse(strEndTime, out var endDate);
var model = new PassengerFlowStatisticsModel
{
EnterNum = (int)struPDCInfo.dwEnterNum,
LeaveNum = (int)struPDCInfo.dwLeaveNum,
- StartTime = DateTime.Parse(strStartTime),
- EndTime = DateTime.Parse(strEndTime),
+ StartTime = begDate,
+ EndTime = endDate,
};
ActionEvent?.Invoke(this, model);
- passengerFlowStatisticsRepository.AddPassengerFlowStatistics(model);
-
return true;
}
-
- ///
- /// 获取每日客流信息
- ///
- ///
- ///
- ///
- ///
- public PageModel> GetPassengerFlowStatisticsDayList(DateTime begDate, DateTime endDate, int pageSize, int pageIndex)
- {
- var pageModel = passengerFlowStatisticsRepository.GetPassengerFlowStatisticsDayList(begDate, endDate, pageSize, pageIndex);
- return pageModel;
- }
-
- ///
- /// 获取客流明细信息
- ///
- ///
- ///
- ///
- ///
- public PageModel> GetPassengerFlowStatisticsList(DateTime begDate, DateTime endDate, int pageSize, int pageIndex)
- {
- var pageModel = passengerFlowStatisticsRepository.GetPassengerFlowStatisticsList(begDate, endDate, pageSize, pageIndex);
- return pageModel;
- }
-
- ///
- /// 添加客流信息
- ///
- ///
- public void AddPassengerFlowStatistics(PassengerFlowStatisticsModel entity)
- {
- passengerFlowStatisticsRepository.AddPassengerFlowStatistics(entity);
- }
-
- ///
- /// 获取当天客流量统计
- ///
- ///
- ///
- public PassengerFlowStatisticsDayModel GetPassengerFlowStatisticsDayTotal(DateTime date)
- {
- var model = passengerFlowStatisticsRepository.GetPassengerFlowStatisticsDayTotal(date);
- return model;
- }
-
- ///
- /// 获取周客流量统计
- ///
- ///
- ///
- public List GetPassengerFlowStatisticsWeekTotal(DateTime date)
- {
- var models = passengerFlowStatisticsRepository.GetPassengerFlowStatisticsWeekTotal(date);
- return models;
- }
}
}
diff --git a/guidescreen/GuideScreen/GuideScreen.Common/Services/Impl/WeatherService.cs b/guidescreen/GuideScreen/GuideScreen.Common/Services/Impl/WeatherService.cs
new file mode 100644
index 0000000..e644120
--- /dev/null
+++ b/guidescreen/GuideScreen/GuideScreen.Common/Services/Impl/WeatherService.cs
@@ -0,0 +1,63 @@
+using System;
+using System.Collections.Generic;
+using System.IO.Compression;
+using System.IO;
+using System.Linq;
+using System.Net;
+using System.Text;
+using System.Threading.Tasks;
+using GuideScreen.Common.Models;
+using Newtonsoft.Json;
+using GuideScreen.Common.Common;
+
+namespace GuideScreen.Common.Services.Impl
+{
+ ///
+ /// 获取气象信息 (基于和风天气开发服务)
+ ///
+ internal class WeatherServiceByQweather: IWeatherService
+ {
+ ///和风天气开发服务
+ //获取城市信息 https://geoapi.qweather.com/v2/city/lookup?location=zhuzhou&adm=hunan&key=3ac6b1fdfcc74db7a1e9b94fc5647361
+
+ ///
+ /// 获取城市实时天气
+ ///
+ /// 城市编号
+ ///
+ ///
+ public async Task GetWeatherNowAsync(string location,string key)
+ {
+ var str = await WebClientHelper.GetWebClientAsync($"https://devapi.qweather.com/v7/weather/now?location={location}&lang=zh&key={key}");
+ var weatherModel = JsonConvert.DeserializeObject(str);
+ return weatherModel;
+ }
+
+ ///
+ /// 获取城市天气质量
+ ///
+ /// 城市编号
+ ///
+ ///
+ public async Task GetWeatherAirAsync(string location, string key)
+ {
+ var str = await WebClientHelper.GetWebClientAsync($"https://devapi.qweather.com/v7/air/now?location={location}&key={key}");
+ var airModel = JsonConvert.DeserializeObject(str);
+ return airModel;
+ }
+
+ ///
+ /// 获取城市天气指数
+ ///
+ /// 城市编号
+ ///
+ ///
+ public async Task GetWeatherIndicesAsync(string location, string key)
+ {
+ var str = await WebClientHelper.GetWebClientAsync("https://devapi.qweather.com/v7/indices/1d?type=5,8&location=101250301&key=3ac6b1fdfcc74db7a1e9b94fc5647361");
+ var levelModel = JsonConvert.DeserializeObject(str);
+ return levelModel;
+ }
+ }
+
+}
diff --git a/guidescreen/GuideScreen/GuideScreen.UI/Models/WeatherAirModel.cs b/guidescreen/GuideScreen/GuideScreen.Common/Services/Models/WeatherAirModel.cs
similarity index 97%
rename from guidescreen/GuideScreen/GuideScreen.UI/Models/WeatherAirModel.cs
rename to guidescreen/GuideScreen/GuideScreen.Common/Services/Models/WeatherAirModel.cs
index 0225f04..006158c 100644
--- a/guidescreen/GuideScreen/GuideScreen.UI/Models/WeatherAirModel.cs
+++ b/guidescreen/GuideScreen/GuideScreen.Common/Services/Models/WeatherAirModel.cs
@@ -7,7 +7,7 @@ using System.Globalization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
-namespace GuideScreen.UI.Models
+namespace GuideScreen.Common.Models
{
public partial class WeatherAirModel
{
diff --git a/guidescreen/GuideScreen/GuideScreen.UI/Models/WeatherLevelModel.cs b/guidescreen/GuideScreen/GuideScreen.Common/Services/Models/WeatherLevelModel.cs
similarity index 97%
rename from guidescreen/GuideScreen/GuideScreen.UI/Models/WeatherLevelModel.cs
rename to guidescreen/GuideScreen/GuideScreen.Common/Services/Models/WeatherLevelModel.cs
index b955294..49a3eb6 100644
--- a/guidescreen/GuideScreen/GuideScreen.UI/Models/WeatherLevelModel.cs
+++ b/guidescreen/GuideScreen/GuideScreen.Common/Services/Models/WeatherLevelModel.cs
@@ -7,7 +7,7 @@ using System.Globalization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
-namespace GuideScreen.UI.Models
+namespace GuideScreen.Common.Models
{
public partial class WeatherLevelModel
{
diff --git a/guidescreen/GuideScreen/GuideScreen.UI/Models/WeatherModel.cs b/guidescreen/GuideScreen/GuideScreen.Common/Services/Models/WeatherModel.cs
similarity index 86%
rename from guidescreen/GuideScreen/GuideScreen.UI/Models/WeatherModel.cs
rename to guidescreen/GuideScreen/GuideScreen.Common/Services/Models/WeatherModel.cs
index 796e002..d72766d 100644
--- a/guidescreen/GuideScreen/GuideScreen.UI/Models/WeatherModel.cs
+++ b/guidescreen/GuideScreen/GuideScreen.Common/Services/Models/WeatherModel.cs
@@ -1,13 +1,5 @@
-//
-//
-// To parse this JSON data, add NuGet 'Newtonsoft.Json' then do:
-//
-// using QuickType;
-//
-// var weatherModel = WeatherModel.FromJson(jsonString);
-// generate by https://app.quicktype.io/
-
-namespace GuideScreen.UI.Models
+
+namespace GuideScreen.Common.Models
{
using System;
using System.Collections.Generic;
diff --git a/guidescreen/GuideScreen/GuideScreen.Common/app.config b/guidescreen/GuideScreen/GuideScreen.Common/app.config
index 38022c9..edf7ad8 100644
--- a/guidescreen/GuideScreen/GuideScreen.Common/app.config
+++ b/guidescreen/GuideScreen/GuideScreen.Common/app.config
@@ -14,6 +14,10 @@
+
+
+
+
diff --git a/guidescreen/GuideScreen/GuideScreen.Common/packages.config b/guidescreen/GuideScreen/GuideScreen.Common/packages.config
index a354753..d40c4e1 100644
--- a/guidescreen/GuideScreen/GuideScreen.Common/packages.config
+++ b/guidescreen/GuideScreen/GuideScreen.Common/packages.config
@@ -4,6 +4,7 @@
+
diff --git a/guidescreen/GuideScreen/GuideScreen.Control/GuideScreen.Control.csproj b/guidescreen/GuideScreen/GuideScreen.Control/GuideScreen.Control.csproj
index ef3c2f5..45796ad 100644
--- a/guidescreen/GuideScreen/GuideScreen.Control/GuideScreen.Control.csproj
+++ b/guidescreen/GuideScreen/GuideScreen.Control/GuideScreen.Control.csproj
@@ -21,7 +21,7 @@
true
full
false
- bin\Debug\
+ bin\
DEBUG;TRACE
prompt
4
@@ -35,6 +35,26 @@
prompt
4
+
+ true
+ bin\x64\Debug\
+ DEBUG;TRACE
+ full
+ x64
+ 7.3
+ prompt
+ true
+
+
+ bin\x64\Release\
+ TRACE
+ true
+ pdbonly
+ x64
+ 7.3
+ prompt
+ true
+
..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll
diff --git a/guidescreen/GuideScreen/GuideScreen.Control/PassengerFlowStatistics.cs b/guidescreen/GuideScreen/GuideScreen.Control/PassengerFlowStatistics.cs
index 35a0b44..27ebbb6 100644
--- a/guidescreen/GuideScreen/GuideScreen.Control/PassengerFlowStatistics.cs
+++ b/guidescreen/GuideScreen/GuideScreen.Control/PassengerFlowStatistics.cs
@@ -15,13 +15,13 @@ namespace GuideScreen.Control
{
public partial class PassengerFlowStatistics : UIPage
{
- private IPassengerFlowStatisticsService passengerFlowStatisticsService;
+ private IPassengerFlowStatisticsDataService passengerFlowStatisticsDataService;
public PassengerFlowStatistics()
{
InitializeComponent();
- passengerFlowStatisticsService = DIManager.GetContainerObject();
+ passengerFlowStatisticsDataService = DIManager.GetContainerObject();
Load += PassengerFlowStatistics_Load;
}
@@ -33,7 +33,7 @@ namespace GuideScreen.Control
public void Query()
{
- var pageModel = passengerFlowStatisticsService.GetPassengerFlowStatisticsList(begDateTime.Value, endDateTime.Value, pagination.PageSize, pagination.ActivePage);
+ var pageModel = passengerFlowStatisticsDataService.GetPassengerFlowStatisticsList(begDateTime.Value, endDateTime.Value, pagination.PageSize, pagination.ActivePage);
pagination.PageSize = pageModel.PageSize;
pagination.TotalCount = pageModel.TotalRows;
dgv.DataSource = pageModel.Content;
diff --git a/guidescreen/GuideScreen/GuideScreen.Control/PassengerFlowStatisticsDay.cs b/guidescreen/GuideScreen/GuideScreen.Control/PassengerFlowStatisticsDay.cs
index 1856ca2..8b92802 100644
--- a/guidescreen/GuideScreen/GuideScreen.Control/PassengerFlowStatisticsDay.cs
+++ b/guidescreen/GuideScreen/GuideScreen.Control/PassengerFlowStatisticsDay.cs
@@ -15,7 +15,7 @@ namespace GuideScreen.Control
{
public partial class PassengerFlowStatisticsDay : UIPage
{
- private IPassengerFlowStatisticsService passengerFlowStatisticsService;
+ private IPassengerFlowStatisticsDataService passengerFlowStatisticsDataService;
public PassengerFlowStatisticsDay()
{
@@ -23,13 +23,13 @@ namespace GuideScreen.Control
Load += PassengerFlowStatisticsDay_Load;
- passengerFlowStatisticsService = DIManager.GetContainerObject();
+ passengerFlowStatisticsDataService = DIManager.GetContainerObject();
}
public void Query()
{
- var pageModel = passengerFlowStatisticsService.GetPassengerFlowStatisticsDayList(begDate.Value, endDate.Value, pagination.PageSize, pagination.ActivePage);
+ var pageModel = passengerFlowStatisticsDataService.GetPassengerFlowStatisticsDayList(begDate.Value, endDate.Value, pagination.PageSize, pagination.ActivePage);
pagination.PageSize = pageModel.PageSize;
pagination.TotalCount = pageModel.TotalRows;
dgv.DataSource = pageModel.Content;
diff --git a/guidescreen/GuideScreen/GuideScreen.UI/Controller/PassengerFlowStatisticsController.cs b/guidescreen/GuideScreen/GuideScreen.UI/Controller/PassengerFlowStatisticsController.cs
new file mode 100644
index 0000000..7f68a8c
--- /dev/null
+++ b/guidescreen/GuideScreen/GuideScreen.UI/Controller/PassengerFlowStatisticsController.cs
@@ -0,0 +1,164 @@
+using GuideScreen.Common.Common;
+using GuideScreen.Common.Services;
+using GuideScreen.Common.Services.Models;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace GuideScreen.UI.Controller
+{
+
+ ///
+ /// 客流统计
+ ///
+ public class PassengerFlowStatisticsController
+ {
+ private IPassengerFlowStatisticsService passengerFlowStatisticsService;
+ private IPassengerFlowStatisticsDataService passengerFlowStatisticsDataService;
+ private ISystemService systemService;
+
+ ///
+ /// 客流统计设备IP地址
+ ///
+ private string deviceIP;
+ ///
+ /// 客流统计设备端口
+ ///
+ private string devicePort;
+ ///
+ /// 客流统计设备登录用户名
+ ///
+ private string deviceLoginUser;
+ ///
+ /// 客流统计设备登录用户密码
+ ///
+ private string deviceLoginPassword;
+ ///
+ /// 客流统计监控IP地址
+ ///
+ private string listenIP;
+ ///
+ /// 客流统计监控端口号
+ ///
+ private string listenPort;
+
+ public event EventHandler Action;
+
+ public event EventHandler ErrorMessage;
+
+ public PassengerFlowStatisticsController(
+ IPassengerFlowStatisticsService passengerFlowStatisticsService,
+ IPassengerFlowStatisticsDataService passengerFlowStatisticsDataService ,
+ ISystemService systemService)
+ {
+ this.passengerFlowStatisticsService = passengerFlowStatisticsService;
+ this.passengerFlowStatisticsDataService = passengerFlowStatisticsDataService;
+ this.systemService= systemService;
+
+ passengerFlowStatisticsService.ActionEvent += PassengerFlowStatisticsService_ActionEvent;
+ }
+
+ private void PassengerFlowStatisticsService_ActionEvent(object sender, PassengerFlowStatisticsModel e)
+ {
+ passengerFlowStatisticsDataService.AddPassengerFlowStatistics(e);
+
+ Action?.Invoke(this, e);
+ }
+
+ ///
+ /// 开始监控
+ ///
+ public void StartMonitoring()
+ {
+ GetSystemConfigVal();
+
+ Task.Run(() =>
+ {
+ while (true)
+ {
+ try
+ {
+
+ passengerFlowStatisticsService.Init();
+ int.TryParse(devicePort, out int port);
+ passengerFlowStatisticsService.Login(deviceIP, port, deviceLoginUser, deviceLoginPassword);
+ int.TryParse(listenPort, out int port1);
+ passengerFlowStatisticsService.StartListen(listenIP, port1);
+ passengerFlowStatisticsService.OpenAlarm();
+ return;
+ }
+ catch (Exception ex)
+ {
+ ErrorMessage?.Invoke(this, "人流服务错误:" + ex.Message);
+ }
+
+ Thread.Sleep(3000);
+ }
+
+ });
+
+
+ }
+
+ ///
+ /// 关闭监控
+ ///
+ public void StopMonitoring()
+ {
+ passengerFlowStatisticsService.CloseAlarm();
+ passengerFlowStatisticsService.CloseListen();
+ passengerFlowStatisticsService.Logout();
+ }
+
+ ///
+ /// 今日数量
+ ///
+ ///
+ ///
+ public int GetDayCount(DateTime date)
+ {
+ var model = passengerFlowStatisticsDataService.GetPassengerFlowStatisticsDayTotal(date);
+ return model.EnterNum;
+ }
+
+ ///
+ /// 本周数量
+ ///
+ ///
+ ///
+ public List GetWeekCount(DateTime date)
+ {
+ var model = passengerFlowStatisticsDataService.GetPassengerFlowStatisticsWeekTotal(date);
+ return model;
+ }
+
+ ///
+ /// 总数量
+ ///
+ ///
+ public int GetTotalCount()
+ {
+ var model = passengerFlowStatisticsDataService.GetPassengerFlowStatisticsTotal();
+ return model;
+ }
+
+ private void GetSystemConfigVal()
+ {
+ var passengerFlowModel = systemService.GetSystemConfig(SystemConfigKeys.PassengerFlowDeviceIP.ToString());
+ deviceIP = passengerFlowModel.ConfigValue;
+ passengerFlowModel = systemService.GetSystemConfig(SystemConfigKeys.PassengerFlowDevicePort.ToString());
+ devicePort = passengerFlowModel.ConfigValue;
+ passengerFlowModel = systemService.GetSystemConfig(SystemConfigKeys.PassengerFlowDeviceLoginUser.ToString());
+ deviceLoginUser = passengerFlowModel.ConfigValue;
+ passengerFlowModel = systemService.GetSystemConfig(SystemConfigKeys.PassengerFlowDeviceLoginPassword.ToString());
+ deviceLoginPassword = passengerFlowModel.ConfigValue;
+ passengerFlowModel = systemService.GetSystemConfig(SystemConfigKeys.PassengerFlowListenIP.ToString());
+ listenIP = passengerFlowModel.ConfigValue;
+ passengerFlowModel = systemService.GetSystemConfig(SystemConfigKeys.PassengerFlowListenPort.ToString());
+ listenPort = passengerFlowModel.ConfigValue;
+ }
+ }
+}
diff --git a/guidescreen/GuideScreen/GuideScreen.UI/Controller/WeatherController.cs b/guidescreen/GuideScreen/GuideScreen.UI/Controller/WeatherController.cs
new file mode 100644
index 0000000..c3854fe
--- /dev/null
+++ b/guidescreen/GuideScreen/GuideScreen.UI/Controller/WeatherController.cs
@@ -0,0 +1,68 @@
+using GuideScreen.Common.Common;
+using GuideScreen.Common.Models;
+using GuideScreen.Common.Services;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace GuideScreen.UI.Controller
+{
+ ///
+ /// 获取气象信息
+ ///
+ public class WeatherController
+ {
+ private IWeatherService weatherService;
+ private ISystemService systemService;
+ private string weatherKey;
+ private string weatherLocation;
+ public WeatherController(IWeatherService weatherService,ISystemService systemService)
+ {
+ this.weatherService = weatherService;
+ this.systemService = systemService;
+ }
+
+ ///
+ /// 获取城市实时天气
+ ///
+ ///
+ public async Task GetWeatherNowAsync()
+ {
+ GetSystemConfigVal();
+ var retModel = await weatherService.GetWeatherNowAsync(weatherLocation, weatherKey);
+ return retModel;
+ }
+
+ ///
+ /// 获取城市天气质量
+ ///
+ ///
+ public async Task GetWeatherAirAsync()
+ {
+ GetSystemConfigVal();
+ var retModel = await weatherService.GetWeatherAirAsync(weatherLocation, weatherKey);
+ return retModel;
+ }
+
+ ///
+ /// 获取城市天气指数
+ ///
+ ///
+ public async Task GetWeatherIndicesAsync()
+ {
+ GetSystemConfigVal();
+ var retModel = await weatherService.GetWeatherIndicesAsync(weatherLocation, weatherKey);
+ return retModel;
+ }
+
+ private void GetSystemConfigVal()
+ {
+ var weatherKeyModel = systemService.GetSystemConfig(SystemConfigKeys.WeatherKey.ToString());
+ weatherKey = weatherKeyModel.ConfigValue;
+ var weatherLocationModel = systemService.GetSystemConfig(SystemConfigKeys.WeatherLocation.ToString());
+ weatherLocation = weatherLocationModel.ConfigValue;
+ }
+ }
+}
diff --git a/guidescreen/GuideScreen/GuideScreen.UI/FormScreen.Designer.cs b/guidescreen/GuideScreen/GuideScreen.UI/FormScreen.Designer.cs
index d5ecae8..d314620 100644
--- a/guidescreen/GuideScreen/GuideScreen.UI/FormScreen.Designer.cs
+++ b/guidescreen/GuideScreen/GuideScreen.UI/FormScreen.Designer.cs
@@ -107,7 +107,7 @@ namespace GuideScreen.UI
this.uiPanel7 = new Sunny.UI.UIPanel();
this.uiLabel17 = new Sunny.UI.UILabel();
this.lblPassengerFlowHistoryCount = new Sunny.UI.UILabel();
- this.lblPassengerFlowWoman = new Sunny.UI.UILabel();
+ this.lblPassengerFlow = new Sunny.UI.UILabel();
this.uiLabel13 = new Sunny.UI.UILabel();
this.lblCurrentManNum = new Sunny.UI.UILabel();
this.lblCurrentWomanNum = new Sunny.UI.UILabel();
@@ -127,6 +127,7 @@ namespace GuideScreen.UI
this.timer2 = new System.Windows.Forms.Timer(this.components);
this.contextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
this.toolStripMenuIClose = new System.Windows.Forms.ToolStripMenuItem();
+ this.timer3 = new System.Windows.Forms.Timer(this.components);
this.uiPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox10)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox9)).BeginInit();
@@ -198,13 +199,13 @@ namespace GuideScreen.UI
this.uiPanel1.Controls.Add(this.uiLabel4);
this.uiPanel1.FillColor = System.Drawing.Color.Empty;
this.uiPanel1.Font = new System.Drawing.Font("微软雅黑", 12F);
- this.uiPanel1.Location = new System.Drawing.Point(9, 128);
+ this.uiPanel1.Location = new System.Drawing.Point(9, 93);
this.uiPanel1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.uiPanel1.MinimumSize = new System.Drawing.Size(1, 1);
this.uiPanel1.Name = "uiPanel1";
this.uiPanel1.RectColor = System.Drawing.Color.Empty;
this.uiPanel1.RectSize = 2;
- this.uiPanel1.Size = new System.Drawing.Size(358, 338);
+ this.uiPanel1.Size = new System.Drawing.Size(358, 373);
this.uiPanel1.Style = Sunny.UI.UIStyle.Custom;
this.uiPanel1.TabIndex = 5;
this.uiPanel1.Text = null;
@@ -215,7 +216,7 @@ namespace GuideScreen.UI
//
this.lblWaterMeter.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Bold);
this.lblWaterMeter.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(65)))), ((int)(((byte)(128)))), ((int)(((byte)(195)))));
- this.lblWaterMeter.Location = new System.Drawing.Point(206, 277);
+ this.lblWaterMeter.Location = new System.Drawing.Point(206, 295);
this.lblWaterMeter.Name = "lblWaterMeter";
this.lblWaterMeter.Size = new System.Drawing.Size(79, 38);
this.lblWaterMeter.Style = Sunny.UI.UIStyle.Custom;
@@ -229,7 +230,7 @@ namespace GuideScreen.UI
//
this.uiLabel21.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Bold);
this.uiLabel21.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(65)))), ((int)(((byte)(128)))), ((int)(((byte)(195)))));
- this.uiLabel21.Location = new System.Drawing.Point(216, 246);
+ this.uiLabel21.Location = new System.Drawing.Point(216, 264);
this.uiLabel21.Name = "uiLabel21";
this.uiLabel21.Size = new System.Drawing.Size(61, 38);
this.uiLabel21.Style = Sunny.UI.UIStyle.Custom;
@@ -243,7 +244,7 @@ namespace GuideScreen.UI
//
this.lblElectricityMeter.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Bold);
this.lblElectricityMeter.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(65)))), ((int)(((byte)(128)))), ((int)(((byte)(195)))));
- this.lblElectricityMeter.Location = new System.Drawing.Point(65, 277);
+ this.lblElectricityMeter.Location = new System.Drawing.Point(65, 295);
this.lblElectricityMeter.Name = "lblElectricityMeter";
this.lblElectricityMeter.Size = new System.Drawing.Size(79, 38);
this.lblElectricityMeter.Style = Sunny.UI.UIStyle.Custom;
@@ -257,7 +258,7 @@ namespace GuideScreen.UI
//
this.uiLabel18.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Bold);
this.uiLabel18.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(65)))), ((int)(((byte)(128)))), ((int)(((byte)(195)))));
- this.uiLabel18.Location = new System.Drawing.Point(75, 246);
+ this.uiLabel18.Location = new System.Drawing.Point(75, 264);
this.uiLabel18.Name = "uiLabel18";
this.uiLabel18.Size = new System.Drawing.Size(61, 38);
this.uiLabel18.Style = Sunny.UI.UIStyle.Custom;
@@ -270,7 +271,7 @@ namespace GuideScreen.UI
// pictureBox10
//
this.pictureBox10.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox10.Image")));
- this.pictureBox10.Location = new System.Drawing.Point(215, 191);
+ this.pictureBox10.Location = new System.Drawing.Point(215, 209);
this.pictureBox10.Name = "pictureBox10";
this.pictureBox10.Size = new System.Drawing.Size(61, 52);
this.pictureBox10.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
@@ -280,7 +281,7 @@ namespace GuideScreen.UI
// pictureBox9
//
this.pictureBox9.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox9.Image")));
- this.pictureBox9.Location = new System.Drawing.Point(75, 191);
+ this.pictureBox9.Location = new System.Drawing.Point(75, 209);
this.pictureBox9.Name = "pictureBox9";
this.pictureBox9.Size = new System.Drawing.Size(61, 52);
this.pictureBox9.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
@@ -290,7 +291,7 @@ namespace GuideScreen.UI
// pictureBox8
//
this.pictureBox8.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox8.Image")));
- this.pictureBox8.Location = new System.Drawing.Point(31, 126);
+ this.pictureBox8.Location = new System.Drawing.Point(31, 144);
this.pictureBox8.Name = "pictureBox8";
this.pictureBox8.Size = new System.Drawing.Size(27, 34);
this.pictureBox8.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
@@ -300,7 +301,7 @@ namespace GuideScreen.UI
// pictureBox6
//
this.pictureBox6.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox6.Image")));
- this.pictureBox6.Location = new System.Drawing.Point(31, 60);
+ this.pictureBox6.Location = new System.Drawing.Point(31, 78);
this.pictureBox6.Name = "pictureBox6";
this.pictureBox6.Size = new System.Drawing.Size(27, 44);
this.pictureBox6.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
@@ -311,7 +312,7 @@ namespace GuideScreen.UI
//
this.uiLabel6.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Bold);
this.uiLabel6.ForeColor = System.Drawing.Color.DodgerBlue;
- this.uiLabel6.Location = new System.Drawing.Point(63, 123);
+ this.uiLabel6.Location = new System.Drawing.Point(63, 141);
this.uiLabel6.Name = "uiLabel6";
this.uiLabel6.Size = new System.Drawing.Size(292, 41);
this.uiLabel6.Style = Sunny.UI.UIStyle.Custom;
@@ -326,7 +327,7 @@ namespace GuideScreen.UI
this.lblElectricity.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Bold);
this.lblElectricity.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
this.lblElectricity.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
- this.lblElectricity.Location = new System.Drawing.Point(63, 63);
+ this.lblElectricity.Location = new System.Drawing.Point(63, 81);
this.lblElectricity.Name = "lblElectricity";
this.lblElectricity.Size = new System.Drawing.Size(292, 41);
this.lblElectricity.Style = Sunny.UI.UIStyle.Custom;
@@ -341,7 +342,7 @@ namespace GuideScreen.UI
this.uiLabel4.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.uiLabel4.ForeColor = System.Drawing.Color.White;
this.uiLabel4.Image = ((System.Drawing.Image)(resources.GetObject("uiLabel4.Image")));
- this.uiLabel4.Location = new System.Drawing.Point(0, -2);
+ this.uiLabel4.Location = new System.Drawing.Point(0, 16);
this.uiLabel4.Name = "uiLabel4";
this.uiLabel4.Size = new System.Drawing.Size(360, 46);
this.uiLabel4.Style = Sunny.UI.UIStyle.Custom;
@@ -383,7 +384,7 @@ namespace GuideScreen.UI
this.uiPanel3.Controls.Add(this.lblTime);
this.uiPanel3.FillColor = System.Drawing.Color.Empty;
this.uiPanel3.Font = new System.Drawing.Font("微软雅黑", 12F);
- this.uiPanel3.Location = new System.Drawing.Point(9, 8);
+ this.uiPanel3.Location = new System.Drawing.Point(9, 0);
this.uiPanel3.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.uiPanel3.MinimumSize = new System.Drawing.Size(1, 1);
this.uiPanel3.Name = "uiPanel3";
@@ -435,13 +436,13 @@ namespace GuideScreen.UI
this.uiPanel4.Controls.Add(this.uiLabel7);
this.uiPanel4.FillColor = System.Drawing.Color.Empty;
this.uiPanel4.Font = new System.Drawing.Font("微软雅黑", 12F);
- this.uiPanel4.Location = new System.Drawing.Point(8, 485);
+ this.uiPanel4.Location = new System.Drawing.Point(8, 450);
this.uiPanel4.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.uiPanel4.MinimumSize = new System.Drawing.Size(1, 1);
this.uiPanel4.Name = "uiPanel4";
this.uiPanel4.RectColor = System.Drawing.Color.Empty;
this.uiPanel4.RectSize = 2;
- this.uiPanel4.Size = new System.Drawing.Size(358, 192);
+ this.uiPanel4.Size = new System.Drawing.Size(358, 227);
this.uiPanel4.Style = Sunny.UI.UIStyle.Custom;
this.uiPanel4.TabIndex = 13;
this.uiPanel4.Text = null;
@@ -538,13 +539,13 @@ namespace GuideScreen.UI
this.uiPanel5.Controls.Add(this.uiLabel8);
this.uiPanel5.FillColor = System.Drawing.Color.Empty;
this.uiPanel5.Font = new System.Drawing.Font("微软雅黑", 12F);
- this.uiPanel5.Location = new System.Drawing.Point(9, 691);
+ this.uiPanel5.Location = new System.Drawing.Point(9, 656);
this.uiPanel5.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.uiPanel5.MinimumSize = new System.Drawing.Size(1, 1);
this.uiPanel5.Name = "uiPanel5";
this.uiPanel5.RectColor = System.Drawing.Color.Empty;
this.uiPanel5.RectSize = 2;
- this.uiPanel5.Size = new System.Drawing.Size(358, 380);
+ this.uiPanel5.Size = new System.Drawing.Size(358, 415);
this.uiPanel5.Style = Sunny.UI.UIStyle.Custom;
this.uiPanel5.TabIndex = 14;
this.uiPanel5.Text = null;
@@ -740,13 +741,13 @@ namespace GuideScreen.UI
this.uiPanel2.Controls.Add(this.uiLabel2);
this.uiPanel2.FillColor = System.Drawing.Color.Empty;
this.uiPanel2.Font = new System.Drawing.Font("微软雅黑", 12F);
- this.uiPanel2.Location = new System.Drawing.Point(1551, 130);
+ this.uiPanel2.Location = new System.Drawing.Point(1551, 109);
this.uiPanel2.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.uiPanel2.MinimumSize = new System.Drawing.Size(1, 1);
this.uiPanel2.Name = "uiPanel2";
this.uiPanel2.RectColor = System.Drawing.Color.Empty;
this.uiPanel2.RectSize = 2;
- this.uiPanel2.Size = new System.Drawing.Size(358, 276);
+ this.uiPanel2.Size = new System.Drawing.Size(358, 297);
this.uiPanel2.Style = Sunny.UI.UIStyle.Custom;
this.uiPanel2.TabIndex = 13;
this.uiPanel2.Text = null;
@@ -757,7 +758,7 @@ namespace GuideScreen.UI
//
this.uiLabel45.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.uiLabel45.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
- this.uiLabel45.Location = new System.Drawing.Point(268, 231);
+ this.uiLabel45.Location = new System.Drawing.Point(268, 239);
this.uiLabel45.Name = "uiLabel45";
this.uiLabel45.Size = new System.Drawing.Size(82, 26);
this.uiLabel45.Style = Sunny.UI.UIStyle.Custom;
@@ -771,7 +772,7 @@ namespace GuideScreen.UI
//
this.lblWeatherFeelsLike.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblWeatherFeelsLike.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
- this.lblWeatherFeelsLike.Location = new System.Drawing.Point(273, 205);
+ this.lblWeatherFeelsLike.Location = new System.Drawing.Point(273, 213);
this.lblWeatherFeelsLike.Name = "lblWeatherFeelsLike";
this.lblWeatherFeelsLike.Size = new System.Drawing.Size(73, 30);
this.lblWeatherFeelsLike.Style = Sunny.UI.UIStyle.Custom;
@@ -785,7 +786,7 @@ namespace GuideScreen.UI
//
this.uiLabel43.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.uiLabel43.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
- this.uiLabel43.Location = new System.Drawing.Point(190, 231);
+ this.uiLabel43.Location = new System.Drawing.Point(190, 239);
this.uiLabel43.Name = "uiLabel43";
this.uiLabel43.Size = new System.Drawing.Size(82, 26);
this.uiLabel43.Style = Sunny.UI.UIStyle.Custom;
@@ -799,7 +800,7 @@ namespace GuideScreen.UI
//
this.lblWeatherUltravioletRay.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblWeatherUltravioletRay.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
- this.lblWeatherUltravioletRay.Location = new System.Drawing.Point(195, 205);
+ this.lblWeatherUltravioletRay.Location = new System.Drawing.Point(195, 213);
this.lblWeatherUltravioletRay.Name = "lblWeatherUltravioletRay";
this.lblWeatherUltravioletRay.Size = new System.Drawing.Size(73, 30);
this.lblWeatherUltravioletRay.Style = Sunny.UI.UIStyle.Custom;
@@ -813,7 +814,7 @@ namespace GuideScreen.UI
//
this.uiLabel41.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.uiLabel41.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
- this.uiLabel41.Location = new System.Drawing.Point(102, 231);
+ this.uiLabel41.Location = new System.Drawing.Point(102, 239);
this.uiLabel41.Name = "uiLabel41";
this.uiLabel41.Size = new System.Drawing.Size(82, 26);
this.uiLabel41.Style = Sunny.UI.UIStyle.Custom;
@@ -827,7 +828,7 @@ namespace GuideScreen.UI
//
this.lblWeatherHumidity.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblWeatherHumidity.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
- this.lblWeatherHumidity.Location = new System.Drawing.Point(107, 205);
+ this.lblWeatherHumidity.Location = new System.Drawing.Point(107, 213);
this.lblWeatherHumidity.Name = "lblWeatherHumidity";
this.lblWeatherHumidity.Size = new System.Drawing.Size(73, 30);
this.lblWeatherHumidity.Style = Sunny.UI.UIStyle.Custom;
@@ -841,7 +842,7 @@ namespace GuideScreen.UI
//
this.lblWeatherWindDir.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblWeatherWindDir.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
- this.lblWeatherWindDir.Location = new System.Drawing.Point(26, 231);
+ this.lblWeatherWindDir.Location = new System.Drawing.Point(26, 239);
this.lblWeatherWindDir.Name = "lblWeatherWindDir";
this.lblWeatherWindDir.Size = new System.Drawing.Size(70, 26);
this.lblWeatherWindDir.Style = Sunny.UI.UIStyle.Custom;
@@ -855,7 +856,7 @@ namespace GuideScreen.UI
//
this.lblWeatherWindScale.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblWeatherWindScale.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
- this.lblWeatherWindScale.Location = new System.Drawing.Point(31, 205);
+ this.lblWeatherWindScale.Location = new System.Drawing.Point(31, 213);
this.lblWeatherWindScale.Name = "lblWeatherWindScale";
this.lblWeatherWindScale.Size = new System.Drawing.Size(61, 30);
this.lblWeatherWindScale.Style = Sunny.UI.UIStyle.Custom;
@@ -870,7 +871,7 @@ namespace GuideScreen.UI
this.lblLevelText.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblLevelText.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
this.lblLevelText.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
- this.lblLevelText.Location = new System.Drawing.Point(20, 138);
+ this.lblLevelText.Location = new System.Drawing.Point(20, 146);
this.lblLevelText.Name = "lblLevelText";
this.lblLevelText.Size = new System.Drawing.Size(323, 63);
this.lblLevelText.Style = Sunny.UI.UIStyle.Custom;
@@ -884,7 +885,7 @@ namespace GuideScreen.UI
//
this.lblWeatherText.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblWeatherText.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
- this.lblWeatherText.Location = new System.Drawing.Point(146, 82);
+ this.lblWeatherText.Location = new System.Drawing.Point(127, 90);
this.lblWeatherText.Name = "lblWeatherText";
this.lblWeatherText.Size = new System.Drawing.Size(52, 39);
this.lblWeatherText.Style = Sunny.UI.UIStyle.Custom;
@@ -898,7 +899,7 @@ namespace GuideScreen.UI
//
this.lblWeatherTemp.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Bold);
this.lblWeatherTemp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
- this.lblWeatherTemp.Location = new System.Drawing.Point(146, 44);
+ this.lblWeatherTemp.Location = new System.Drawing.Point(127, 52);
this.lblWeatherTemp.Name = "lblWeatherTemp";
this.lblWeatherTemp.Size = new System.Drawing.Size(83, 39);
this.lblWeatherTemp.Style = Sunny.UI.UIStyle.Custom;
@@ -911,7 +912,7 @@ namespace GuideScreen.UI
// pBoxWeatherIcon
//
this.pBoxWeatherIcon.Image = ((System.Drawing.Image)(resources.GetObject("pBoxWeatherIcon.Image")));
- this.pBoxWeatherIcon.Location = new System.Drawing.Point(72, 53);
+ this.pBoxWeatherIcon.Location = new System.Drawing.Point(53, 61);
this.pBoxWeatherIcon.Name = "pBoxWeatherIcon";
this.pBoxWeatherIcon.Size = new System.Drawing.Size(68, 68);
this.pBoxWeatherIcon.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
@@ -924,7 +925,7 @@ namespace GuideScreen.UI
this.btnAQI.FillColor = System.Drawing.Color.DarkGoldenrod;
this.btnAQI.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAQI.ForeColor = System.Drawing.Color.WhiteSmoke;
- this.btnAQI.Location = new System.Drawing.Point(251, 53);
+ this.btnAQI.Location = new System.Drawing.Point(232, 61);
this.btnAQI.MinimumSize = new System.Drawing.Size(1, 1);
this.btnAQI.Name = "btnAQI";
this.btnAQI.Radius = 23;
@@ -942,7 +943,7 @@ namespace GuideScreen.UI
this.uiLabel2.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.uiLabel2.ForeColor = System.Drawing.Color.White;
this.uiLabel2.Image = ((System.Drawing.Image)(resources.GetObject("uiLabel2.Image")));
- this.uiLabel2.Location = new System.Drawing.Point(-2, -1);
+ this.uiLabel2.Location = new System.Drawing.Point(-1, -1);
this.uiLabel2.Name = "uiLabel2";
this.uiLabel2.Size = new System.Drawing.Size(361, 46);
this.uiLabel2.Style = Sunny.UI.UIStyle.Custom;
@@ -974,13 +975,13 @@ namespace GuideScreen.UI
this.uiPanel6.Controls.Add(this.uiLabel3);
this.uiPanel6.FillColor = System.Drawing.Color.Empty;
this.uiPanel6.Font = new System.Drawing.Font("微软雅黑", 12F);
- this.uiPanel6.Location = new System.Drawing.Point(1551, 427);
+ this.uiPanel6.Location = new System.Drawing.Point(1551, 392);
this.uiPanel6.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.uiPanel6.MinimumSize = new System.Drawing.Size(1, 1);
this.uiPanel6.Name = "uiPanel6";
this.uiPanel6.RectColor = System.Drawing.Color.Empty;
this.uiPanel6.RectSize = 2;
- this.uiPanel6.Size = new System.Drawing.Size(358, 644);
+ this.uiPanel6.Size = new System.Drawing.Size(358, 679);
this.uiPanel6.Style = Sunny.UI.UIStyle.Custom;
this.uiPanel6.TabIndex = 14;
this.uiPanel6.Text = null;
@@ -1187,7 +1188,7 @@ namespace GuideScreen.UI
| System.Windows.Forms.AnchorStyles.Right)));
this.uiPanel7.Controls.Add(this.uiLabel17);
this.uiPanel7.Controls.Add(this.lblPassengerFlowHistoryCount);
- this.uiPanel7.Controls.Add(this.lblPassengerFlowWoman);
+ this.uiPanel7.Controls.Add(this.lblPassengerFlow);
this.uiPanel7.Controls.Add(this.uiLabel13);
this.uiPanel7.Controls.Add(this.lblCurrentManNum);
this.uiPanel7.Controls.Add(this.lblCurrentWomanNum);
@@ -1205,13 +1206,13 @@ namespace GuideScreen.UI
this.uiPanel7.Controls.Add(this.ChartPassengerFlow);
this.uiPanel7.FillColor = System.Drawing.Color.Empty;
this.uiPanel7.Font = new System.Drawing.Font("微软雅黑", 12F);
- this.uiPanel7.Location = new System.Drawing.Point(375, 130);
+ this.uiPanel7.Location = new System.Drawing.Point(375, 120);
this.uiPanel7.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.uiPanel7.MinimumSize = new System.Drawing.Size(1, 1);
this.uiPanel7.Name = "uiPanel7";
this.uiPanel7.RectColor = System.Drawing.Color.Empty;
this.uiPanel7.RectSize = 2;
- this.uiPanel7.Size = new System.Drawing.Size(1167, 940);
+ this.uiPanel7.Size = new System.Drawing.Size(1167, 950);
this.uiPanel7.Style = Sunny.UI.UIStyle.Custom;
this.uiPanel7.TabIndex = 15;
this.uiPanel7.Text = null;
@@ -1222,7 +1223,7 @@ namespace GuideScreen.UI
//
this.uiLabel17.Font = new System.Drawing.Font("微软雅黑", 15.75F, System.Drawing.FontStyle.Bold);
this.uiLabel17.ForeColor = System.Drawing.Color.White;
- this.uiLabel17.Location = new System.Drawing.Point(811, 892);
+ this.uiLabel17.Location = new System.Drawing.Point(811, 905);
this.uiLabel17.Name = "uiLabel17";
this.uiLabel17.Size = new System.Drawing.Size(133, 46);
this.uiLabel17.Style = Sunny.UI.UIStyle.Custom;
@@ -1236,7 +1237,7 @@ namespace GuideScreen.UI
//
this.lblPassengerFlowHistoryCount.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Bold);
this.lblPassengerFlowHistoryCount.ForeColor = System.Drawing.Color.Yellow;
- this.lblPassengerFlowHistoryCount.Location = new System.Drawing.Point(943, 893);
+ this.lblPassengerFlowHistoryCount.Location = new System.Drawing.Point(943, 906);
this.lblPassengerFlowHistoryCount.Name = "lblPassengerFlowHistoryCount";
this.lblPassengerFlowHistoryCount.Size = new System.Drawing.Size(221, 45);
this.lblPassengerFlowHistoryCount.Style = Sunny.UI.UIStyle.Custom;
@@ -1246,25 +1247,25 @@ namespace GuideScreen.UI
this.lblPassengerFlowHistoryCount.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.lblPassengerFlowHistoryCount.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
//
- // lblPassengerFlowWoman
+ // lblPassengerFlow
//
- this.lblPassengerFlowWoman.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.lblPassengerFlowWoman.ForeColor = System.Drawing.Color.PaleGreen;
- this.lblPassengerFlowWoman.Location = new System.Drawing.Point(221, 45);
- this.lblPassengerFlowWoman.Name = "lblPassengerFlowWoman";
- this.lblPassengerFlowWoman.Size = new System.Drawing.Size(137, 41);
- this.lblPassengerFlowWoman.Style = Sunny.UI.UIStyle.Custom;
- this.lblPassengerFlowWoman.StyleCustomMode = true;
- this.lblPassengerFlowWoman.TabIndex = 13;
- this.lblPassengerFlowWoman.Text = " 0 0 0 1 3 2 ";
- this.lblPassengerFlowWoman.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- this.lblPassengerFlowWoman.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+ this.lblPassengerFlow.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.lblPassengerFlow.ForeColor = System.Drawing.Color.PaleGreen;
+ this.lblPassengerFlow.Location = new System.Drawing.Point(229, 23);
+ this.lblPassengerFlow.Name = "lblPassengerFlow";
+ this.lblPassengerFlow.Size = new System.Drawing.Size(137, 41);
+ this.lblPassengerFlow.Style = Sunny.UI.UIStyle.Custom;
+ this.lblPassengerFlow.StyleCustomMode = true;
+ this.lblPassengerFlow.TabIndex = 13;
+ this.lblPassengerFlow.Text = " 0 0 0 1 3 2 ";
+ this.lblPassengerFlow.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ this.lblPassengerFlow.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
//
// uiLabel13
//
this.uiLabel13.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Bold);
this.uiLabel13.ForeColor = System.Drawing.Color.White;
- this.uiLabel13.Location = new System.Drawing.Point(114, 40);
+ this.uiLabel13.Location = new System.Drawing.Point(122, 18);
this.uiLabel13.Name = "uiLabel13";
this.uiLabel13.Size = new System.Drawing.Size(101, 46);
this.uiLabel13.Style = Sunny.UI.UIStyle.Custom;
@@ -1279,7 +1280,7 @@ namespace GuideScreen.UI
this.lblCurrentManNum.BackColor = System.Drawing.Color.Transparent;
this.lblCurrentManNum.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Bold);
this.lblCurrentManNum.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(65)))), ((int)(((byte)(128)))), ((int)(((byte)(195)))));
- this.lblCurrentManNum.Location = new System.Drawing.Point(57, 435);
+ this.lblCurrentManNum.Location = new System.Drawing.Point(65, 409);
this.lblCurrentManNum.Name = "lblCurrentManNum";
this.lblCurrentManNum.Size = new System.Drawing.Size(59, 46);
this.lblCurrentManNum.Style = Sunny.UI.UIStyle.Custom;
@@ -1294,7 +1295,7 @@ namespace GuideScreen.UI
this.lblCurrentWomanNum.BackColor = System.Drawing.Color.Transparent;
this.lblCurrentWomanNum.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Bold);
this.lblCurrentWomanNum.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(65)))), ((int)(((byte)(128)))), ((int)(((byte)(195)))));
- this.lblCurrentWomanNum.Location = new System.Drawing.Point(1057, 435);
+ this.lblCurrentWomanNum.Location = new System.Drawing.Point(1065, 409);
this.lblCurrentWomanNum.Name = "lblCurrentWomanNum";
this.lblCurrentWomanNum.Size = new System.Drawing.Size(59, 46);
this.lblCurrentWomanNum.Style = Sunny.UI.UIStyle.Custom;
@@ -1307,7 +1308,7 @@ namespace GuideScreen.UI
// pBoxUrinateMan3
//
this.pBoxUrinateMan3.Image = ((System.Drawing.Image)(resources.GetObject("pBoxUrinateMan3.Image")));
- this.pBoxUrinateMan3.Location = new System.Drawing.Point(512, 601);
+ this.pBoxUrinateMan3.Location = new System.Drawing.Point(520, 575);
this.pBoxUrinateMan3.Name = "pBoxUrinateMan3";
this.pBoxUrinateMan3.Size = new System.Drawing.Size(36, 48);
this.pBoxUrinateMan3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
@@ -1317,7 +1318,7 @@ namespace GuideScreen.UI
// pBoxUrinateMan2
//
this.pBoxUrinateMan2.Image = ((System.Drawing.Image)(resources.GetObject("pBoxUrinateMan2.Image")));
- this.pBoxUrinateMan2.Location = new System.Drawing.Point(512, 504);
+ this.pBoxUrinateMan2.Location = new System.Drawing.Point(520, 478);
this.pBoxUrinateMan2.Name = "pBoxUrinateMan2";
this.pBoxUrinateMan2.Size = new System.Drawing.Size(36, 48);
this.pBoxUrinateMan2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
@@ -1327,7 +1328,7 @@ namespace GuideScreen.UI
// pBoxUrinateMan1
//
this.pBoxUrinateMan1.Image = ((System.Drawing.Image)(resources.GetObject("pBoxUrinateMan1.Image")));
- this.pBoxUrinateMan1.Location = new System.Drawing.Point(512, 409);
+ this.pBoxUrinateMan1.Location = new System.Drawing.Point(520, 383);
this.pBoxUrinateMan1.Name = "pBoxUrinateMan1";
this.pBoxUrinateMan1.Size = new System.Drawing.Size(36, 48);
this.pBoxUrinateMan1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
@@ -1337,7 +1338,7 @@ namespace GuideScreen.UI
// pBoxManPit2
//
this.pBoxManPit2.Image = ((System.Drawing.Image)(resources.GetObject("pBoxManPit2.Image")));
- this.pBoxManPit2.Location = new System.Drawing.Point(449, 297);
+ this.pBoxManPit2.Location = new System.Drawing.Point(457, 271);
this.pBoxManPit2.Name = "pBoxManPit2";
this.pBoxManPit2.Size = new System.Drawing.Size(85, 59);
this.pBoxManPit2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
@@ -1348,7 +1349,7 @@ namespace GuideScreen.UI
//
this.pictureBox2.BackColor = System.Drawing.Color.Transparent;
this.pictureBox2.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox2.Image")));
- this.pictureBox2.Location = new System.Drawing.Point(48, 295);
+ this.pictureBox2.Location = new System.Drawing.Point(56, 269);
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new System.Drawing.Size(68, 124);
this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
@@ -1358,7 +1359,7 @@ namespace GuideScreen.UI
// pBoxManPit1
//
this.pBoxManPit1.Image = ((System.Drawing.Image)(resources.GetObject("pBoxManPit1.Image")));
- this.pBoxManPit1.Location = new System.Drawing.Point(449, 182);
+ this.pBoxManPit1.Location = new System.Drawing.Point(457, 156);
this.pBoxManPit1.Name = "pBoxManPit1";
this.pBoxManPit1.Size = new System.Drawing.Size(85, 59);
this.pBoxManPit1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
@@ -1368,7 +1369,7 @@ namespace GuideScreen.UI
// pBoxPitWoman3
//
this.pBoxPitWoman3.Image = ((System.Drawing.Image)(resources.GetObject("pBoxPitWoman3.Image")));
- this.pBoxPitWoman3.Location = new System.Drawing.Point(633, 414);
+ this.pBoxPitWoman3.Location = new System.Drawing.Point(641, 388);
this.pBoxPitWoman3.Name = "pBoxPitWoman3";
this.pBoxPitWoman3.Size = new System.Drawing.Size(85, 59);
this.pBoxPitWoman3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
@@ -1378,7 +1379,7 @@ namespace GuideScreen.UI
// pBoxPitWoman2
//
this.pBoxPitWoman2.Image = ((System.Drawing.Image)(resources.GetObject("pBoxPitWoman2.Image")));
- this.pBoxPitWoman2.Location = new System.Drawing.Point(633, 297);
+ this.pBoxPitWoman2.Location = new System.Drawing.Point(641, 271);
this.pBoxPitWoman2.Name = "pBoxPitWoman2";
this.pBoxPitWoman2.Size = new System.Drawing.Size(85, 59);
this.pBoxPitWoman2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
@@ -1388,7 +1389,7 @@ namespace GuideScreen.UI
// pBoxPitWoman1
//
this.pBoxPitWoman1.Image = ((System.Drawing.Image)(resources.GetObject("pBoxPitWoman1.Image")));
- this.pBoxPitWoman1.Location = new System.Drawing.Point(633, 183);
+ this.pBoxPitWoman1.Location = new System.Drawing.Point(641, 157);
this.pBoxPitWoman1.Name = "pBoxPitWoman1";
this.pBoxPitWoman1.Size = new System.Drawing.Size(85, 59);
this.pBoxPitWoman1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
@@ -1399,7 +1400,7 @@ namespace GuideScreen.UI
//
this.pictureBox3.BackColor = System.Drawing.Color.Transparent;
this.pictureBox3.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox3.Image")));
- this.pictureBox3.Location = new System.Drawing.Point(1048, 297);
+ this.pictureBox3.Location = new System.Drawing.Point(1056, 271);
this.pictureBox3.Name = "pictureBox3";
this.pictureBox3.Size = new System.Drawing.Size(80, 125);
this.pictureBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
@@ -1411,7 +1412,7 @@ namespace GuideScreen.UI
this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.pictureBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(13)))), ((int)(((byte)(24)))), ((int)(((byte)(80)))));
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
- this.pictureBox1.Location = new System.Drawing.Point(168, 122);
+ this.pictureBox1.Location = new System.Drawing.Point(176, 101);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(835, 586);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
@@ -1423,7 +1424,7 @@ namespace GuideScreen.UI
this.ChartPassengerFlow.FillColor = System.Drawing.Color.Empty;
this.ChartPassengerFlow.Font = new System.Drawing.Font("微软雅黑", 12F);
this.ChartPassengerFlow.LegendFont = new System.Drawing.Font("微软雅黑", 9F);
- this.ChartPassengerFlow.Location = new System.Drawing.Point(18, 648);
+ this.ChartPassengerFlow.Location = new System.Drawing.Point(22, 649);
this.ChartPassengerFlow.Margin = new System.Windows.Forms.Padding(0);
this.ChartPassengerFlow.MinimumSize = new System.Drawing.Size(1, 1);
this.ChartPassengerFlow.Name = "ChartPassengerFlow";
@@ -1458,8 +1459,8 @@ namespace GuideScreen.UI
//
// FormScreen
//
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.AllowShowTitle = false;
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(7)))), ((int)(((byte)(43)))), ((int)(((byte)(82)))));
this.ClientSize = new System.Drawing.Size(1920, 1080);
this.ContextMenuStrip = this.contextMenuStrip;
@@ -1470,14 +1471,17 @@ namespace GuideScreen.UI
this.Controls.Add(this.uiPanel4);
this.Controls.Add(this.uiPanel3);
this.Controls.Add(this.uiPanel1);
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Margin = new System.Windows.Forms.Padding(1);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "FormScreen";
+ this.Padding = new System.Windows.Forms.Padding(0);
this.ShowIcon = false;
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.ShowTitle = false;
+ this.Style = Sunny.UI.UIStyle.Custom;
this.Text = "引导屏";
+ this.ZoomScaleRect = new System.Drawing.Rectangle(15, 15, 1920, 1080);
+ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FormScreen_FormClosing);
this.uiPanel1.ResumeLayout(false);
this.uiPanel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox10)).EndInit();
@@ -1553,7 +1557,7 @@ namespace GuideScreen.UI
private Sunny.UI.UILabel uiLabel12;
private Sunny.UI.UIProcessBar processBarPage;
private Sunny.UI.UILabel uiLabel13;
- private Sunny.UI.UILabel lblPassengerFlowWoman;
+ private Sunny.UI.UILabel lblPassengerFlow;
private Sunny.UI.UILabel uiLabel17;
private Sunny.UI.UILabel lblPassengerFlowHistoryCount;
private Sunny.UI.UIBarChart ChartPassengerFlow;
@@ -1611,5 +1615,6 @@ namespace GuideScreen.UI
private Sunny.UI.UILabel uiLabel10;
private Sunny.UI.UILabel uiLabel5;
private Sunny.UI.UILabel uiLabel23;
+ private Timer timer3;
}
}
\ No newline at end of file
diff --git a/guidescreen/GuideScreen/GuideScreen.UI/FormScreen.cs b/guidescreen/GuideScreen/GuideScreen.UI/FormScreen.cs
index a499a7a..e135758 100644
--- a/guidescreen/GuideScreen/GuideScreen.UI/FormScreen.cs
+++ b/guidescreen/GuideScreen/GuideScreen.UI/FormScreen.cs
@@ -11,7 +11,6 @@ using System.IO.Compression;
using System.IO;
using System.Text;
using Newtonsoft.Json;
-using GuideScreen.UI.Models;
using GuideScreen.UI.Properties;
using System.Resources;
using System.Threading.Tasks;
@@ -19,36 +18,55 @@ using Sunny.UI;
using GuideScreen.Common;
using GuideScreen.Common.Common;
using GuideScreen.Common.Services;
+using GuideScreen.Common.Models;
+using GuideScreen.UI.Controller;
+using GuideScreen.Common.Services.Models;
namespace GuideScreen.UI
{
- public partial class FormScreen : Form
+ public partial class FormScreen : UIForm
{
+ //
+ private PassengerFlowStatisticsController passengerFlowStatisticsController;
+ //
+ private WeatherController weatherController;
+
+ private int passengerFlowDayCount = 0;
+
public FormScreen()
{
- InitializeComponent();
-
+ InitializeComponent();
pBoxManPit1.Image.RotateFlip(RotateFlipType.Rotate180FlipNone);
pBoxManPit2.Image.RotateFlip(RotateFlipType.Rotate180FlipNone);
+ weatherController = DIManager.GetContainerObject();
+ passengerFlowStatisticsController = DIManager.GetContainerObject();
+ passengerFlowStatisticsController.Action += PassengerFlowStatisticsController_Action;
+ passengerFlowStatisticsController.ErrorMessage += PassengerFlowStatisticsController_ErrorMessage;
+
Load += FormScreen_Load;
}
+
private void timer1_Tick(object sender, EventArgs e)
{
lblTime.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
}
- private void timer2_Tick(object sender, EventArgs e)
+
+ private async void FormScreen_Load(object sender, EventArgs e)
{
- Task.Run(() =>
- {
- GetWeather();
+
- }).ConfigureAwait(false);
- }
+ //
+ passengerFlowStatisticsController.StartMonitoring();
- private void FormScreen_Load(object sender, EventArgs e)
- {
+ //ȡտ
+ passengerFlowDayCount = passengerFlowStatisticsController.GetDayCount(DateTime.Now);
+
+ //¿
+ PassengerFlowUpdate();
+
+
ToileUseChange(true, 1, true);
ToileUseChange(true, 4, true);
@@ -57,22 +75,20 @@ namespace GuideScreen.UI
ToileUseChange(false, 2, true);
- //ȡϢ
- GetWeather();
- //
- PassengerFlowChart();
+ //ȡϢ
+ await GetWeather();
//
VacuumData();
var system = DIManager.GetContainerObject();
var menus = system.GetMenuList();
- //System.Data.SQLite.SQLiteFactory
}
+
#region Ƿ
- private void ToileUseChange(bool isMan,int num,bool use)
+ private void ToileUseChange(bool isMan, int num, bool use)
{
if (isMan)
{
@@ -120,31 +136,31 @@ namespace GuideScreen.UI
#region
- public void GetWeather()
+ //ʱ
+ private async void timer2_Tick(object sender, EventArgs e)
{
- //ͷ
- //ȡϢ https://geoapi.qweather.com/v2/city/lookup?location=zhuzhou&adm=hunan&key=3ac6b1fdfcc74db7a1e9b94fc5647361
- //ȡУޣ ʵʱ https://devapi.qweather.com/v7/weather/now?location=101250301&lang=zh&key=3ac6b1fdfcc74db7a1e9b94fc5647361
- //ָ https://devapi.qweather.com/v7/indices/1d?type=0&location=101250301&key=3ac6b1fdfcc74db7a1e9b94fc5647361
- //ʵʱ https://devapi.qweather.com/v7/air/now?location=101250301&key=3ac6b1fdfcc74db7a1e9b94fc5647361
+ await GetWeather();
+ }
- //101250301 ()
+ ///
+ /// ȡϢ
+ ///
+ ///
+ private async Task GetWeather()
+ {
//ȡʵʱ
- var str = GetWebClient("https://devapi.qweather.com/v7/weather/now?location=101250301&lang=zh&key=3ac6b1fdfcc74db7a1e9b94fc5647361");
- var weatherModel = JsonConvert.DeserializeObject(str);
+ var weatherModel = await weatherController.GetWeatherNowAsync();
//ȡ
- str = GetWebClient("https://devapi.qweather.com/v7/air/now?location=101250301&key=3ac6b1fdfcc74db7a1e9b94fc5647361");
- var airModel = JsonConvert.DeserializeObject(str);
+ var airModel = await weatherController.GetWeatherAirAsync();
//ȡָ
- str = GetWebClient("https://devapi.qweather.com/v7/indices/1d?type=5,8&location=101250301&key=3ac6b1fdfcc74db7a1e9b94fc5647361");
- var levelModel = JsonConvert.DeserializeObject(str);
+ var levelModel = await weatherController.GetWeatherIndicesAsync();
- this.Invoke(new Action(() =>
+ this.Invoke(new Action(() =>
{
//óʵʱ
- if (weatherModel != null)
+ if (weatherModel != null)
{
DateTime.TryParse(weatherModel.UpdateTime, out DateTime dt);
//lblWeatherUpdateTime.Text = dt.ToString("yyyy-MM-dd HH:mm:ss");
@@ -154,7 +170,12 @@ namespace GuideScreen.UI
lblWeatherHumidity.Text = weatherModel.Now.Humidity.ToString() + "%";
lblWeatherFeelsLike.Text = weatherModel.Now.FeelsLike.ToString() + "C";
lblWeatherTemp.Text = weatherModel.Now.Temp.ToString() + "C";
- pBoxWeatherIcon.Image = (Image)(Resources.ResourceManager.GetObject($"_{weatherModel.Now.Icon}"));
+ var icon = weatherModel.Now.Icon;
+ if (icon == 151)
+ {
+ icon = 153;
+ }
+ pBoxWeatherIcon.Image = (Image)(Resources.ResourceManager.GetObject($"_{icon}"));
}
//ó
if (airModel != null)
@@ -162,19 +183,20 @@ namespace GuideScreen.UI
WeatherAir(airModel);
}
//óָ
- if (levelModel!=null && levelModel.Daily.Length == 2)
+ if (levelModel != null && levelModel.Daily.Length == 2)
{
lblWeatherUltravioletRay.Text = levelModel.Daily[0].Category;
lblLevelText.Text = levelModel.Daily[1].Text;
}
-
+
}));
}
+
///
/// ʾ
///
///
- public void WeatherAir(WeatherAirModel model)
+ private void WeatherAir(WeatherAirModel model)
{
Color color = Color.White;
switch (model.Now.Level)
@@ -201,7 +223,7 @@ namespace GuideScreen.UI
break;
}
btnAQI.FillColor = color;
- btnAQI.Text = "AQI "+model.Now.Category;
+ btnAQI.Text = "AQI " + model.Now.Category;
}
///
@@ -209,7 +231,7 @@ namespace GuideScreen.UI
///
///
///
- public string GetWebClient(string url)
+ private string GetWebClient(string url)
{
string str = string.Empty;
try
@@ -252,8 +274,83 @@ namespace GuideScreen.UI
#endregion
+ #region ͳ
+
+ ///
+ /// Ϣ
+ ///
+ ///
+ ///
+ private void PassengerFlowStatisticsController_ErrorMessage(object sender, string e)
+ {
+ ShowErrorNotifier(e);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ private void PassengerFlowStatisticsController_Action(object sender, Common.Services.Models.PassengerFlowStatisticsModel e)
+ {
+ passengerFlowDayCount++;
+
+ PassengerFlowUpdate();
+ }
+ private void PassengerFlowUpdate()
+ {
+ //ͳ
+ var dayStr = passengerFlowDayCount.ToString("D6");
+ lblPassengerFlow.Text = dayStr.Aggregate(string.Empty, (c, i) => c + i + " ");
+
+ //ͳ
+ var weekModel = passengerFlowStatisticsController.GetWeekCount(DateTime.Now);
+ PassengerFlowChart(weekModel);
+
+ //ʷͳ
+ var totalStr = passengerFlowStatisticsController.GetTotalCount().ToString("D8");
+ lblPassengerFlowHistoryCount.Text = totalStr.Aggregate(string.Empty, (c, i) => c + i + " ");
+ }
+ #endregion
+
#region ͼ
+ ///
+ ///
+ ///
+ private void PassengerFlowChart(List list)
+ {
+ UIBarOption option = new UIBarOption();
+ option.Title = new UITitle();
+ option.Title.Text = string.Empty;
+ option.Title.SubText = string.Empty;
+
+ var series = new UIBarSeries();
+
+ list.ForEach(item =>
+ {
+ series.AddData(item.EnterNum);
+ option.XAxis.Data.Add(item.XTypeName);
+ });
+
+ option.ToolTip.Visible = true;
+ option.YAxis.Scale = true;
+ option.XAxis.Name = "";
+ option.XAxis.AxisLabel.Angle = 60;//(0 ~ 90)
+ option.YAxis.Name = "ֵ";
+
+ //ʾСλ
+ series.DecimalPlaces = 0;
+ option.Series.Add(series);
+
+ //ʾСλ
+ option.YAxis.AxisLabel.DecimalPlaces = 0;
+ option.XAxis.AxisLabel.DecimalPlaces = 0;
+ option.ToolTip.AxisPointer.Type = UIAxisPointerType.Shadow;
+ option.ShowValue = true;
+ ChartPassengerFlow.SetOption(option);
+ }
+
///
///
///
@@ -313,7 +410,7 @@ namespace GuideScreen.UI
///
private void VacuumData()
{
-
+
cartesianChart1.Series.Add(new LineSeries
{
Values = new ChartValues { -42, -52, -48, -65, -38, -46, -41 },
@@ -324,14 +421,14 @@ namespace GuideScreen.UI
{
Foreground = System.Windows.Media.Brushes.DarkOliveGreen,
//Title = "ն",
- Labels = new string[]
- {
+ Labels = new string[]
+ {
DateTime.Now.AddDays(-6).ToString("yyyy-MM-dd"),
- DateTime.Now.AddDays(-5).ToString("yyyy-MM-dd"),
- DateTime.Now.AddDays(-4).ToString("yyyy-MM-dd"),
- DateTime.Now.AddDays(-3).ToString("yyyy-MM-dd"),
- DateTime.Now.AddDays(-2).ToString("yyyy-MM-dd"),
- DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd"),
+ DateTime.Now.AddDays(-5).ToString("yyyy-MM-dd"),
+ DateTime.Now.AddDays(-4).ToString("yyyy-MM-dd"),
+ DateTime.Now.AddDays(-3).ToString("yyyy-MM-dd"),
+ DateTime.Now.AddDays(-2).ToString("yyyy-MM-dd"),
+ DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd"),
DateTime.Now.ToString("yyyy-MM-dd")
},
//Position = AxisPosition.LeftBottom
@@ -347,5 +444,11 @@ namespace GuideScreen.UI
Close();
}
}
+
+ private void FormScreen_FormClosing(object sender, FormClosingEventArgs e)
+ {
+ passengerFlowStatisticsController.StopMonitoring();
+ }
+
}
}
\ No newline at end of file
diff --git a/guidescreen/GuideScreen/GuideScreen.UI/FormScreen.resx b/guidescreen/GuideScreen/GuideScreen.UI/FormScreen.resx
index 76f0308..0877613 100644
--- a/guidescreen/GuideScreen/GuideScreen.UI/FormScreen.resx
+++ b/guidescreen/GuideScreen/GuideScreen.UI/FormScreen.resx
@@ -4713,7 +4713,7 @@
iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL
- DQAACw0B7QfALAAA/7JJREFUeF7svXd01NYeLayxqen95qb3EBJ6772Y4g42YLDpGGPA3bRACiEhgZAQ
+ DAAACwwBP0AiyAAA/7JJREFUeF7svXd01NYeLayxqen95qb3EBJ6772Y4g42YLDpGGPA3bRACiEhgZAQ
Qmih9x5q6L33Xoy7PX3UpWm2vv3T2PfmvTXr+X3vvZvAjf/Y60hHGo3MYu/f3uccaRhN0ypRiUr8TeG3
sxKVqMTfA347K1GJSvw94LezEpWoxN8DfjsrUYlK/D3gt7MSlajE3wN+OytRiUr8PeC3sxKVqMTfA347
K1GJSvw94LezEpWoxN8DfjsrUYlK/D3gt7MSlajE3wN+OytRiUr8PeC3sxKVqMTfA347K1GJSvw94Lez
@@ -9161,4 +9161,7 @@
342, 17
+
+ 500, 17
+
\ No newline at end of file
diff --git a/guidescreen/GuideScreen/GuideScreen.UI/GuideScreen.UI.csproj b/guidescreen/GuideScreen/GuideScreen.UI/GuideScreen.UI.csproj
index c4b7cd9..cfa19db 100644
--- a/guidescreen/GuideScreen/GuideScreen.UI/GuideScreen.UI.csproj
+++ b/guidescreen/GuideScreen/GuideScreen.UI/GuideScreen.UI.csproj
@@ -21,7 +21,7 @@
true
full
false
- bin\Debug\
+ bin\
DEBUG;TRACE
prompt
4
@@ -80,7 +80,7 @@
-
+
..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.117.0\lib\net46\System.Data.SQLite.dll
@@ -116,17 +116,16 @@
+
+
Form
FormScreen.cs
-
-
-
FormScreen.cs
diff --git a/guidescreen/GuideScreen/GuideScreen.sln b/guidescreen/GuideScreen/GuideScreen.sln
index b925c7c..73cd62b 100644
--- a/guidescreen/GuideScreen/GuideScreen.sln
+++ b/guidescreen/GuideScreen/GuideScreen.sln
@@ -12,21 +12,35 @@ EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
+ Debug|x64 = Debug|x64
Release|Any CPU = Release|Any CPU
+ Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{503D3466-8CE8-466E-9F1E-FF596D3F3E36}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{503D3466-8CE8-466E-9F1E-FF596D3F3E36}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {503D3466-8CE8-466E-9F1E-FF596D3F3E36}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {503D3466-8CE8-466E-9F1E-FF596D3F3E36}.Debug|x64.Build.0 = Debug|Any CPU
{503D3466-8CE8-466E-9F1E-FF596D3F3E36}.Release|Any CPU.ActiveCfg = Release|Any CPU
{503D3466-8CE8-466E-9F1E-FF596D3F3E36}.Release|Any CPU.Build.0 = Release|Any CPU
+ {503D3466-8CE8-466E-9F1E-FF596D3F3E36}.Release|x64.ActiveCfg = Release|Any CPU
+ {503D3466-8CE8-466E-9F1E-FF596D3F3E36}.Release|x64.Build.0 = Release|Any CPU
{16B36FF4-1295-49F0-9827-4507EB32035A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{16B36FF4-1295-49F0-9827-4507EB32035A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {16B36FF4-1295-49F0-9827-4507EB32035A}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {16B36FF4-1295-49F0-9827-4507EB32035A}.Debug|x64.Build.0 = Debug|Any CPU
{16B36FF4-1295-49F0-9827-4507EB32035A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{16B36FF4-1295-49F0-9827-4507EB32035A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {16B36FF4-1295-49F0-9827-4507EB32035A}.Release|x64.ActiveCfg = Release|Any CPU
+ {16B36FF4-1295-49F0-9827-4507EB32035A}.Release|x64.Build.0 = Release|Any CPU
{1E368B26-B584-4C1E-A159-608828A7A725}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1E368B26-B584-4C1E-A159-608828A7A725}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1E368B26-B584-4C1E-A159-608828A7A725}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {1E368B26-B584-4C1E-A159-608828A7A725}.Debug|x64.Build.0 = Debug|Any CPU
{1E368B26-B584-4C1E-A159-608828A7A725}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1E368B26-B584-4C1E-A159-608828A7A725}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1E368B26-B584-4C1E-A159-608828A7A725}.Release|x64.ActiveCfg = Release|x64
+ {1E368B26-B584-4C1E-A159-608828A7A725}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE