// JobDescribe.cpp : implementation file // #include "stdafx.h" #include "p4win.h" #include "JobDescribe.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CJobDescribe dialog CJobDescribe::CJobDescribe(CWnd* pParent /*=NULL*/) : CDialog(CJobDescribe::IDD, pParent) { //{{AFX_DATA_INIT(CJobDescribe) m_JobStr = _T(""); //}}AFX_DATA_INIT } void CJobDescribe::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CJobDescribe) DDX_Text(pDX, IDC_JOB_NBR, m_JobStr); DDX_Check(pDX, IDC_AUTOCONVERTNBR, m_IsConvertNbr); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CJobDescribe, CDialog) //{{AFX_MSG_MAP(CJobDescribe) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CJobDescribe message handlers BOOL CJobDescribe::OnInitDialog() { CDialog::OnInitDialog(); m_IsConvertNbr = GET_P4REGPTR()->GetConvertJobNbr( ); UpdateData(FALSE); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } void CJobDescribe::OnOK() { UpdateData(); if (m_IsConvertNbr) { BOOL b = TRUE; m_JobStr = GetJobStr(); for (int i=-1; ++i < m_JobStr.GetLength(); ) { if (!_istdigit(m_JobStr.GetAt(i))) { b = FALSE; break; } } if (b) m_JobStr.FormatMessage(IDS_JOBNAME_FORMAT_n, _tstoi(m_JobStr)); UpdateData(FALSE); } if (m_IsConvertNbr != GET_P4REGPTR()->GetConvertJobNbr( )) GET_P4REGPTR()->SetConvertJobNbr(m_IsConvertNbr); CDialog::OnOK(); } CString CJobDescribe::GetJobStr() { m_JobStr.TrimRight( ); m_JobStr.TrimLeft( ); if (m_IsConvertNbr) m_JobStr.TrimLeft(_T('0')); return m_JobStr; }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 11099 | brkarpala | Integrate p4win from //guest/perforce_software/p4win/...@8562 | ||
//guest/perforce_software/p4win/gui/JobDescribe.cpp | |||||
#1 | 8562 | Matt Attaway |
These feet never stop running. Initial commit of the P4Win source code. To the best of our knowledge this compiles and runs using the 2013.3 P4 API and VS 2010. Expect a few changes as we refine the build process. Please post any build issues to the forums. |