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
11 #include <afs/param.h>
16 #include "server_status_dlg.h"
22 static char THIS_FILE[] = __FILE__;
26 /////////////////////////////////////////////////////////////////////////////
27 // CServerStatusDlg property Dlg
29 IMPLEMENT_DYNCREATE(CServerStatusDlg, CDialog)
31 CServerStatusDlg::CServerStatusDlg() : CDialog()
33 InitModalIndirect (TaLocale_GetDialogResource (CServerStatusDlg::IDD));
35 //{{AFX_DATA_INIT(CServerStatusDlg)
41 CServerStatusDlg::~CServerStatusDlg()
45 void CServerStatusDlg::DoDataExchange(CDataExchange* pDX)
47 CDialog::DoDataExchange(pDX);
48 //{{AFX_DATA_MAP(CServerStatusDlg)
49 DDX_Control(pDX, IDC_SHOWSTATUS, m_ShowStatus);
50 DDX_Control(pDX, IDC_CELL_NAME, m_CellName);
51 DDX_Check(pDX, IDC_DONTPROBESERVERS, m_bFast);
52 DDX_Radio(pDX, IDC_LOCALCELL, m_nCell);
56 BEGIN_MESSAGE_MAP(CServerStatusDlg, CDialog)
57 //{{AFX_MSG_MAP(CServerStatusDlg)
58 ON_BN_CLICKED(IDC_SHOWSTATUS, OnShowStatus)
59 ON_BN_CLICKED(IDC_SPECIFIEDCELL, OnSpecifiedCell)
60 ON_BN_CLICKED(IDC_LOCALCELL, OnLocalCell)
61 ON_BN_CLICKED(IDC_ALL_CELLS, OnAllCells)
62 ON_EN_CHANGE(IDC_CELL_NAME, OnChangeCellName)
63 ON_BN_CLICKED(IDHELP, OnHelp)
67 /////////////////////////////////////////////////////////////////////////////
68 // CServerStatusDlg message handlers
69 BOOL CServerStatusDlg::Save()
74 BOOL CServerStatusDlg::OnInitDialog()
76 CDialog::OnInitDialog();
78 m_CellName.EnableWindow(FALSE);
83 return TRUE; // return TRUE unless you set the focus to a control
84 // EXCEPTION: OCX Property Pages should return FALSE
87 void CServerStatusDlg::OnShowStatus()
91 CheckServers(GetCellNameText(), (WHICH_CELLS)m_nCell, m_bFast);
94 void CServerStatusDlg::OnSpecifiedCell()
96 m_nCell = SPECIFIC_CELL;
97 m_CellName.EnableWindow(TRUE);
98 CheckEnableShowStatus();
101 void CServerStatusDlg::OnLocalCell()
103 m_nCell = LOCAL_CELL;
104 m_CellName.EnableWindow(FALSE);
105 m_ShowStatus.EnableWindow(TRUE);
108 void CServerStatusDlg::OnAllCells()
111 m_CellName.EnableWindow(FALSE);
112 m_ShowStatus.EnableWindow(TRUE);
115 void CServerStatusDlg::CheckEnableShowStatus()
117 m_ShowStatus.EnableWindow(GetCellNameText().GetLength() > 0);
120 void CServerStatusDlg::OnChangeCellName()
122 CheckEnableShowStatus();
125 CString CServerStatusDlg::GetCellNameText()
129 m_CellName.GetWindowText(strCellName);
134 void CServerStatusDlg::OnHelp()
136 ShowHelp(m_hWnd, SERVER_STATUS_HELP_ID);