|
@@ -79,9 +79,16 @@ BOOL CDlgService::OnInitDialog()
|
|
|
p->m_listDevices.SetItemText(nIndex, 2, it->szName);
|
|
|
|
|
|
if (it->nStatus == 0)
|
|
|
- p->m_listDevices.SetItemText(nIndex, 3, "空闲");
|
|
|
- else
|
|
|
- p->m_listDevices.SetItemText(nIndex, 3, "繁忙");
|
|
|
+ p->m_listDevices.SetItemText(nIndex, 3, "在线");
|
|
|
+ else if (it->nStatus == 1)
|
|
|
+ p->m_listDevices.SetItemText(nIndex, 3, "离线");
|
|
|
+ else if ( it->nStatus == 2 )
|
|
|
+ p->m_listDevices.SetItemText(nIndex, 3, "掉线");
|
|
|
+
|
|
|
+ if (it->nUsageState == 0)
|
|
|
+ p->m_listDevices.SetItemText(nIndex, 4, "空闲");
|
|
|
+ else if (it->nUsageState == 1)
|
|
|
+ p->m_listDevices.SetItemText(nIndex, 4, "繁忙");
|
|
|
nIndex++;
|
|
|
}
|
|
|
}
|
|
@@ -151,11 +158,13 @@ void CDlgService::InitCtrl()
|
|
|
m_listDevices.InsertColumn(0, "No");
|
|
|
m_listDevices.SetColumnWidth(0, 25);
|
|
|
m_listDevices.InsertColumn(1, "类型");
|
|
|
- m_listDevices.SetColumnWidth(1, 45);
|
|
|
+ m_listDevices.SetColumnWidth(1, 39);
|
|
|
m_listDevices.InsertColumn(2, "名称");
|
|
|
- m_listDevices.SetColumnWidth(2, 130);
|
|
|
+ m_listDevices.SetColumnWidth(2, 125);
|
|
|
m_listDevices.InsertColumn(3, "状态");
|
|
|
- m_listDevices.SetColumnWidth(3, 55);
|
|
|
+ m_listDevices.SetColumnWidth(3, 39);
|
|
|
+ m_listDevices.InsertColumn(4, "使用");
|
|
|
+ m_listDevices.SetColumnWidth(4, 39);
|
|
|
m_listDevices.SetExtendedStyle(m_listDevices.GetExtendedStyle() | LVS_EX_GRIDLINES | LVS_EX_FULLROWSELECT);
|
|
|
|
|
|
// 初始化任务列表;
|