-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d927bf2
commit eaa9e5e
Showing
8 changed files
with
184 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
// DlgDataGroupProperty.cpp : 实现文件 | ||
// | ||
|
||
#include "stdafx.h" | ||
#include "Edislab Pro.h" | ||
#include "DlgDataGroupProperty.h" | ||
#include "Utility.h" | ||
|
||
// CDlgDataGroupProperty 对话框 | ||
|
||
IMPLEMENT_DYNAMIC(CDlgDataGroupProperty, CBaseDialog) | ||
|
||
CDlgDataGroupProperty::CDlgDataGroupProperty(const CString& strGroupName,CWnd* pParent /*=NULL*/) | ||
: CBaseDialog(CDlgDataGroupProperty::IDD, pParent), | ||
m_strGroupName(strGroupName) | ||
{ | ||
|
||
} | ||
|
||
CDlgDataGroupProperty::~CDlgDataGroupProperty() | ||
{ | ||
} | ||
|
||
void CDlgDataGroupProperty::DoDataExchange(CDataExchange* pDX) | ||
{ | ||
CBaseDialog::DoDataExchange(pDX); | ||
} | ||
|
||
|
||
BEGIN_MESSAGE_MAP(CDlgDataGroupProperty, CBaseDialog) | ||
ON_BN_CLICKED(ID_BTN_OK, &CDlgDataGroupProperty::OnBnClickedBtnOk) | ||
ON_BN_CLICKED(ID_BTN_CANCEL, &CDlgDataGroupProperty::OnBnClickedBtnCancel) | ||
END_MESSAGE_MAP() | ||
|
||
|
||
// CDlgDataGroupProperty 消息处理程序 | ||
|
||
|
||
BOOL CDlgDataGroupProperty::OnInitDialog() | ||
{ | ||
CBaseDialog::OnInitDialog(); | ||
|
||
// TODO: 在此添加额外的初始化 | ||
InitDisplay(); | ||
return TRUE; // return TRUE unless you set the focus to a control | ||
// 异常: OCX 属性页应返回 FALSE | ||
} | ||
|
||
void CDlgDataGroupProperty::InitDisplay() | ||
{ | ||
CWnd* pWnd = GetDlgItem(IDC_DATA_GROUP_NAME); | ||
if (nullptr != pWnd && NULL != pWnd->GetSafeHwnd()) | ||
{ | ||
pWnd->SetWindowText(m_strGroupName); | ||
} | ||
|
||
CTime CurrentTime = CTime::GetCurrentTime(); | ||
|
||
CString strTime = CurrentTime.Format(_T("%Y-%m-%d %H:%M:%S")); | ||
|
||
pWnd = GetDlgItem(IDC_DATA_YIELD_TIME); | ||
|
||
if (nullptr != pWnd && NULL != pWnd->GetSafeHwnd()) | ||
{ | ||
pWnd->SetWindowText(strTime); | ||
} | ||
} | ||
|
||
|
||
void CDlgDataGroupProperty::OnBnClickedBtnOk() | ||
{ | ||
// TODO: 在此添加控件通知处理程序代码 | ||
CWnd* pWnd = GetDlgItem(IDC_DATA_GROUP_NAME); | ||
if (nullptr != pWnd && NULL != pWnd->GetSafeHwnd()) | ||
{ | ||
CString strGroupName; | ||
pWnd->GetWindowText(strGroupName); | ||
|
||
if (strGroupName.IsEmpty()) | ||
{ | ||
Utility::AfxBCGPMessageBox(_T("数组组名不能为空!"),MB_OK | MB_ICONERROR); | ||
return; | ||
} | ||
|
||
m_strGroupName = strGroupName; | ||
|
||
OnOK(); | ||
} | ||
|
||
} | ||
|
||
|
||
void CDlgDataGroupProperty::OnBnClickedBtnCancel() | ||
{ | ||
// TODO: 在此添加控件通知处理程序代码 | ||
OnCancel(); | ||
} | ||
|
||
CString CDlgDataGroupProperty::GetGroupName(void) | ||
{ | ||
return m_strGroupName; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#pragma once | ||
|
||
#include "BaseDialog.h" | ||
// CDlgDataGroupProperty 对话框 | ||
|
||
class CDlgDataGroupProperty : public CBaseDialog | ||
{ | ||
DECLARE_DYNAMIC(CDlgDataGroupProperty) | ||
|
||
public: | ||
CDlgDataGroupProperty(const CString& strGroupName,CWnd* pParent = NULL); // 标准构造函数 | ||
virtual ~CDlgDataGroupProperty(); | ||
|
||
// 对话框数据 | ||
enum { IDD = IDD_DLG_DATA_GROUP_PROPERTY }; | ||
|
||
protected: | ||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持 | ||
|
||
DECLARE_MESSAGE_MAP() | ||
public: | ||
virtual BOOL OnInitDialog(); | ||
|
||
private: | ||
void InitDisplay(); | ||
|
||
CString m_strGroupName; | ||
public: | ||
afx_msg void OnBnClickedBtnOk(); | ||
afx_msg void OnBnClickedBtnCancel(); | ||
|
||
CString GetGroupName(void); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.