|
|
@@ -13,6 +13,7 @@ using System.Threading;
|
|
|
using UAS_DeviceMonitor.CustomerControl.PictureEditWithText;
|
|
|
using System.Windows.Forms;
|
|
|
using DevExpress.XtraEditors.Controls;
|
|
|
+using DevExpress.XtraEditors;
|
|
|
|
|
|
namespace UAS_DeviceMonitor
|
|
|
{
|
|
|
@@ -328,7 +329,7 @@ namespace UAS_DeviceMonitor
|
|
|
//更新轮询日志状态
|
|
|
sql.Clear();
|
|
|
sql.Append("update DEVICEPOLLINGLOG set dpg_status='Running',dpg_senddatasize=nvl(dpg_senddatasize,0)+" + SendCommandByteSize);
|
|
|
- sql.Append(",dpg_receivedatasize=nvl(dpg_receivedatasize,0)+" + ReceiveCommandByteSize);
|
|
|
+ sql.Append(",dpg_receivedatasize=nvl(dpg_receivedatasize,0)+" + ReceiveCommandByteSize + ",dpg_count=nvl(dpg_count,0)+1 ");
|
|
|
sql.Append(" where dpg_id=(select max(dpg_id) from DEVICEPOLLINGLOG where dpg_decode='" + Decode + "')");
|
|
|
SQL.Add(sql.ToString());
|
|
|
dh.ExecuteSQLTran(SQL.ToArray());
|
|
|
@@ -342,8 +343,9 @@ namespace UAS_DeviceMonitor
|
|
|
SQL.Add(sql.ToString());
|
|
|
//更新轮询日志状态
|
|
|
sql.Clear();
|
|
|
- sql.Append("update DEVICEPOLLINGLOG set dpg_status='Running',dpg_senddatasize=nvl(dpg_senddatasize,0)+" + SendCommandByteSize);
|
|
|
- sql.Append(" where dpg_id=(select max(dpg_id) from DEVICEPOLLINGLOG where dpg_decode='" + Decode + "')");
|
|
|
+ sql.Append("update DEVICEPOLLINGLOG set dpg_status='Running',dpg_senddatasize=nvl(dpg_senddatasize,0)+");
|
|
|
+ sql.Append(SendCommandByteSize + ",dpg_count=nvl(dpg_count,0)+1 ");
|
|
|
+ sql.Append("where dpg_id=(select max(dpg_id) from DEVICEPOLLINGLOG where dpg_decode='" + Decode + "')");
|
|
|
SQL.Add(sql.ToString());
|
|
|
dh.ExecuteSQLTran(SQL.ToArray());
|
|
|
}
|
|
|
@@ -441,18 +443,19 @@ namespace UAS_DeviceMonitor
|
|
|
for (int i = 0; i < (j == RowCount - 1 ? LastRowCount : CountPerRow); i++)
|
|
|
{
|
|
|
PictureEditWithText pic = new PictureEditWithText();
|
|
|
+ pic.Picedit.ToolTipController = CommonTipController;
|
|
|
pic.Name = dt.Rows[j * CountPerRow + i]["de_code"].ToString() + i + j;
|
|
|
pic.Anchor = AnchorStyles.Left;
|
|
|
pic.Anchor = AnchorStyles.Top;
|
|
|
+ pic.Picedit.Name = dt.Rows[j * CountPerRow + i]["de_code"].ToString();
|
|
|
+ pic.Picedit.MouseHover += Pic_MouseHover;
|
|
|
pic.Picedit.Properties.SizeMode = PictureSizeMode.Squeeze;
|
|
|
if (dt.Rows[j * CountPerRow + i]["dpc_status"].ToString() != "Running")
|
|
|
{
|
|
|
- CommonTipController.SetToolTip(pic.Picedit, "离线");
|
|
|
pic.Picedit.Image = Properties.Resources.network_offline;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- CommonTipController.SetToolTip(pic.Picedit, "在线");
|
|
|
pic.Picedit.Image = Properties.Resources.net_connected;
|
|
|
}
|
|
|
pic.Text = dt.Rows[j * CountPerRow + i]["de_code"].ToString();
|
|
|
@@ -467,6 +470,25 @@ namespace UAS_DeviceMonitor
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private void Pic_MouseHover(object sender, EventArgs e)
|
|
|
+ {
|
|
|
+ PictureEdit pic = sender as PictureEdit;
|
|
|
+ DataTable dt = (DataTable)dh.ExecuteSql("select * from DEVICEPOLLINGLOG where dpg_id=(select max(dpg_id) from DEVICEPOLLINGLOG where dpg_decode='" + pic.Name + "')", "select");
|
|
|
+ if (dt.Rows.Count > 0)
|
|
|
+ {
|
|
|
+ sql.Clear();
|
|
|
+ sql.Append("开始时间" + dt.Rows[0]["dpg_starttime"].ToString() + "\n");
|
|
|
+ sql.Append("发送数据大小"+ dt.Rows[0]["dpg_senddatasize"].ToString() + "字节\n");
|
|
|
+ sql.Append("接收数据大小" + dt.Rows[0]["dpg_receivedatasize"].ToString() + "字节\n");
|
|
|
+ sql.Append("轮询次数"+dt.Rows[0]["dpg_count"].ToString()+"次\n");
|
|
|
+ CommonTipController.ShowHint(sql.ToString(), pic.Name);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ CommonTipController.ShowHint("暂无信息", pic.Name);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
//重新展示设备图像界面
|
|
|
private void ShowDeviceStatus()
|
|
|
{
|