📄 groupdlg.cpp
字号:
/////////////////////////////////////////////////////////////////////////////
//
// OPC DataAccess VC++ Client: GroupDlg.CPP
// (Source File)
//
/////////////////////////////////////////////////////////////////////////////
//
// Author: Raphael Imhof
// Initial Date: 11/04/98
// $Workfile: GroupDlg.cpp $
// $Revision: 1 $
// $Date: 7/27/99 5:22p $
// Target System: Microsoft Windows NT 4.0
// Environment: Visual C++ 5.0 / OPC DataAccess 1.0/2.0
// Remarks:
//
/////////////////////////////////////////////////////////////////////////////
//
// Description: implementation of the CGroupDlg class.
// Group attributes dialog.
//
//
/////////////////////////////////////////////////////////////////////////////
//
// History of Changes (Please remove very old comments and blank lines!)
// $Log: /IDK/OPCServer/clients/VC++/InfoServerExplorer/GroupDlg.cpp $
//
// 1 7/27/99 5:22p Imhof
//
// 1 7/27/99 5:18p Imhof
//
// 4 1/15/99 6:43p Imhof
// Updated legal notice.
//
// 3 12/14/98 4:46p Imhof
// Modifications for OPC 2.0
//
// 2 11/10/98 2:20p Imhof
// Added file header's.
//
//
// $Nokeywords:$ (To avoid useless search while checking in.)
/////////////////////////////////////////////////////////////////////////////
// Copyright (C) 1998, Siemens Building Technologies, Inc. Landis Division
//
// SIEMENS BUILDING TECHNOLOGIES, INC. IS PROVIDING THE FOLLOWING
// EXAMPLES OF CODE AS SAMPLE ONLY.
//
// SIEMENS BUILDING TECHNOLOGIES, INC. MAKES NO REPRESENTATIONS
// OR WARRANTIES OF ANY KIND WITH RESPECT TO THE VALIDTY OF THE
// CODES OR DESIRED RESULTS AND DISCLAIMS ALL SUCH
// REPRESENTATIONS AND WARRANTIES, INCLUDING FOR EXAMPLE,
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE. SIEMENS BUILIDNG TECHNOLOGIES, INC. DOES NOT
// REPRESENT OR WARRANT THAT THE FOLLOWING CODE SAMPLES ARE
// ACCURATE, VALID, COMPLETE OR CURRENT.
//
/////////////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "infoserverexplorer.h"
#include "MainFrm.h"
#include "infoserverexplorerdoc.h"
#include "GroupDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CGroupDlg dialog
CGroupDlg::CGroupDlg(CWnd* pParent /*=NULL*/)
: CDialog(CGroupDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CGroupDlg)
m_sGroup = _T("");
m_dwLCID = 0;
m_dwUpdateRate = 100;
m_bActive = TRUE;
m_lTimeBias = 0;
m_fDeadBand = 1.0f;
m_bDataChange = TRUE;
//}}AFX_DATA_INIT
}
void CGroupDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CGroupDlg)
DDX_Text(pDX, IDC_GROUP_NAME, m_sGroup);
DDX_Text(pDX, IDC_GROUP_LCID, m_dwLCID);
DDX_Text(pDX, IDC_GROUP_UPDATE_RATE, m_dwUpdateRate);
DDV_MinMaxDWord(pDX, m_dwUpdateRate, 0, 100000);
DDX_Check(pDX, IDC_GROUP_ACTIVE, m_bActive);
DDX_Text(pDX, IDC_GROUP_TIME_BIAS, m_lTimeBias);
DDV_MinMaxLong(pDX, m_lTimeBias, 0, 100);
DDX_Text(pDX, IDC_GROUP_DEADBAND, m_fDeadBand);
DDV_MinMaxFloat(pDX, m_fDeadBand, 0.f, 100.f);
DDX_Check(pDX, IDC_GROUP_DATACHANGE, m_bDataChange);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CGroupDlg, CDialog)
//{{AFX_MSG_MAP(CGroupDlg)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CGroupDlg message handlers
BOOL CGroupDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
CMainFrame* pMainFrame = (CMainFrame*) AfxGetMainWnd();
CInfoServerExplorerDoc* pDoc = (CInfoServerExplorerDoc*) pMainFrame->GetActiveDocument();
if(pDoc->GetInfoServer()->GetOPCVersion() > OPC_VERSION_10) //OPC 1.0
{
//OPC 2.0
GetDlgItem(IDC_GROUP_DATACHANGE)->EnableWindow(TRUE);
}
else
{
GetDlgItem(IDC_GROUP_DATACHANGE)->EnableWindow(FALSE);
m_bDataChange = TRUE; //OPC 1.0 always enabled
UpdateData(FALSE);
}
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -