2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
15 #include <afs/param.h>
19 #include "server_status_dlg.h"
25 static char THIS_FILE
[] = __FILE__
;
29 /////////////////////////////////////////////////////////////////////////////
30 // CServerStatusDlg property Dlg
32 IMPLEMENT_DYNCREATE(CServerStatusDlg
, CDialog
)
34 CServerStatusDlg::CServerStatusDlg() : CDialog()
36 InitModalIndirect (TaLocale_GetDialogResource (CServerStatusDlg::IDD
));
38 //{{AFX_DATA_INIT(CServerStatusDlg)
44 CServerStatusDlg::~CServerStatusDlg()
48 void CServerStatusDlg::DoDataExchange(CDataExchange
* pDX
)
50 CDialog::DoDataExchange(pDX
);
51 //{{AFX_DATA_MAP(CServerStatusDlg)
52 DDX_Control(pDX
, IDC_SHOWSTATUS
, m_ShowStatus
);
53 DDX_Control(pDX
, IDC_CELL_NAME
, m_CellName
);
54 DDX_Check(pDX
, IDC_DONTPROBESERVERS
, m_bFast
);
55 DDX_Radio(pDX
, IDC_LOCALCELL
, m_nCell
);
59 BEGIN_MESSAGE_MAP(CServerStatusDlg
, CDialog
)
60 //{{AFX_MSG_MAP(CServerStatusDlg)
61 ON_BN_CLICKED(IDC_SHOWSTATUS
, OnShowStatus
)
62 ON_BN_CLICKED(IDC_SPECIFIEDCELL
, OnSpecifiedCell
)
63 ON_BN_CLICKED(IDC_LOCALCELL
, OnLocalCell
)
64 ON_BN_CLICKED(IDC_ALL_CELLS
, OnAllCells
)
65 ON_EN_CHANGE(IDC_CELL_NAME
, OnChangeCellName
)
66 ON_BN_CLICKED(IDHELP
, OnHelp
)
70 /////////////////////////////////////////////////////////////////////////////
71 // CServerStatusDlg message handlers
72 BOOL
CServerStatusDlg::Save()
77 BOOL
CServerStatusDlg::OnInitDialog()
79 CDialog::OnInitDialog();
81 m_CellName
.EnableWindow(FALSE
);
86 return TRUE
; // return TRUE unless you set the focus to a control
87 // EXCEPTION: OCX Property Pages should return FALSE
90 void CServerStatusDlg::OnShowStatus()
94 CheckServers(GetCellNameText(), (WHICH_CELLS
)m_nCell
, m_bFast
);
97 void CServerStatusDlg::OnSpecifiedCell()
99 m_nCell
= SPECIFIC_CELL
;
100 m_CellName
.EnableWindow(TRUE
);
101 CheckEnableShowStatus();
104 void CServerStatusDlg::OnLocalCell()
106 m_nCell
= LOCAL_CELL
;
107 m_CellName
.EnableWindow(FALSE
);
108 m_ShowStatus
.EnableWindow(TRUE
);
111 void CServerStatusDlg::OnAllCells()
114 m_CellName
.EnableWindow(FALSE
);
115 m_ShowStatus
.EnableWindow(TRUE
);
118 void CServerStatusDlg::CheckEnableShowStatus()
120 m_ShowStatus
.EnableWindow(GetCellNameText().GetLength() > 0);
123 void CServerStatusDlg::OnChangeCellName()
125 CheckEnableShowStatus();
128 CString
CServerStatusDlg::GetCellNameText()
132 m_CellName
.GetWindowText(strCellName
);
137 void CServerStatusDlg::OnHelp()
139 ShowHelp(m_hWnd
, SERVER_STATUS_HELP_ID
);