Garmin Fleet Management Controller  2.19.0
CDriverLoginDlg Class Reference

Dialog allowing the user to manage canned responses. More...

#include <CDriverLoginDlg.h>

+ Inheritance diagram for CDriverLoginDlg:

Public Member Functions

 CDriverLoginDlg (CWnd *aParent, FmiApplicationLayer &aCom)
 Constructor. More...
 
virtual ~CDriverLoginDlg ()
 Destructor. More...
 

Protected Member Functions

virtual void DoDataExchange (CDataExchange *aDataExchange)
 Perform dialog data exchange and validation. More...
 
afx_msg void OnBnClickedDelete ()
 Button handler for the Delete button. More...
 
afx_msg void OnBnClickedOk ()
 Button handler for the OK button. More...
 
afx_msg void OnBnClickedSet ()
 Button handler for the Set button. More...
 
afx_msg void OnCancel ()
 Handler for the Cancel action. More...
 
afx_msg void OnEnChangeEditBoxes ()
 Edit handler for the Driver ID and Driver Password boxes. More...
 
afx_msg void OnEnKillfocusLoginEdit ()
 Handles the kill focus event for the driver ID and password edit boxes. More...
 
afx_msg void OnEnSetfocusLoginEdit ()
 Handles the set focus event for the driver ID and password edit boxes. More...
 
BOOL OnInitDialog ()
 This function is called when the window is created. More...
 
afx_msg void OnLbnKillfocusDriverList ()
 Handles the kill focus event for the driver list. More...
 
afx_msg void OnLbnSelchangeDriverList ()
 Selection Changed handler for the Driver List box. More...
 
afx_msg void OnLbnSetfocusDriverList ()
 Handles the set focus event for the driver list. More...
 
void PostNcDestroy ()
 Called by MFC after the window has been destroyed; performs final termination activities. More...
 
void updateListBox ()
 Update the canned response list box from the canned response map owned by FmiApplicationLayer. More...
 

Protected Attributes

FmiApplicationLayermCom
 Reference to the FMI communication controller. More...
 
CString mDriverId
 DDX member: the contents of the Driver ID edit box. More...
 
CString mDriverPassword
 DDX member: the contents of the Driver Password edit box. More...
 
CListBox mListBox
 List box control containing the canned responses. More...
 
int mSelectedIndex
 Index of the list box item currently selected. More...
 

Detailed Description

Dialog allowing the user to manage canned responses.

This dialog allows the user to manage the global list of canned responses available for messages. Particular responses for a message are selected in the CSelectCannedResponseDlg.

Note
This dialog must always be created modeless.
Since
Protocol A607

Definition at line 25 of file CDriverLoginDlg.h.

Constructor & Destructor Documentation

CDriverLoginDlg::CDriverLoginDlg ( CWnd *  aParent,
FmiApplicationLayer aCom 
)

Constructor.

Parameters
aParentThe parent window.
aComReference to the FMI communication controller

Definition at line 39 of file CDriverLoginDlg.cpp.

CDriverLoginDlg::~CDriverLoginDlg ( )
virtual

Destructor.

Definition at line 54 of file CDriverLoginDlg.cpp.

References DoDataExchange().

Member Function Documentation

void CDriverLoginDlg::DoDataExchange ( CDataExchange *  aDataExchange)
protectedvirtual

Perform dialog data exchange and validation.

Parameters
aDataExchangeThe DDX context

Definition at line 63 of file CDriverLoginDlg.cpp.

References IDC_DRIVERS_EDIT_ID, IDC_DRIVERS_EDIT_PASSWORD, and IDC_DRIVERS_LST_DRIVERS.

Referenced by ~CDriverLoginDlg().

void CDriverLoginDlg::OnBnClickedDelete ( )
protected

Button handler for the Delete button.

Remove the selected driver from the allowed logins.

Definition at line 131 of file CDriverLoginDlg.cpp.

References FALSE, IDC_DRIVERS_BTN_DELETE, and TRUE.

void CDriverLoginDlg::OnBnClickedOk ( )
protected

Button handler for the OK button.

Closes the window.

Definition at line 224 of file CDriverLoginDlg.cpp.

void CDriverLoginDlg::OnBnClickedSet ( )
protected

Button handler for the Set button.

Saves the new driver password.

Definition at line 151 of file CDriverLoginDlg.cpp.

References DriverLoginItem::setPassword(), and TRUE.

void CDriverLoginDlg::OnCancel ( )
protected

Handler for the Cancel action.

Closes the window.

Definition at line 234 of file CDriverLoginDlg.cpp.

void CDriverLoginDlg::OnEnChangeEditBoxes ( )
protected

Edit handler for the Driver ID and Driver Password boxes.

If either box is empty, disables the Set button; if both ID and password are specified, enables the Set button.

Definition at line 174 of file CDriverLoginDlg.cpp.

References FALSE, IDC_DRIVERS_BTN_SET, and TRUE.

void CDriverLoginDlg::OnEnKillfocusLoginEdit ( )
protected

Handles the kill focus event for the driver ID and password edit boxes.

Sets the default control to the OK button so that it is activated if the user presses the Enter key.

Definition at line 265 of file CDriverLoginDlg.cpp.

void CDriverLoginDlg::OnEnSetfocusLoginEdit ( )
protected

Handles the set focus event for the driver ID and password edit boxes.

Sets the default control to the Set button so that it is activated if the user presses the Enter key.

Definition at line 254 of file CDriverLoginDlg.cpp.

References IDC_DRIVERS_BTN_SET.

BOOL CDriverLoginDlg::OnInitDialog ( )
protected

This function is called when the window is created.

This function is called when the window is created. It initializes the canned response list, and sets the initial position of the window.

Returns
TRUE, since this function does not set focus to a control

Definition at line 80 of file CDriverLoginDlg.cpp.

References FALSE, IDC_DRIVERS_BTN_DELETE, and TRUE.

void CDriverLoginDlg::OnLbnKillfocusDriverList ( )
protected

Handles the kill focus event for the driver list.

Sets the default control to the OK button so that it is activated if the user presses the Enter key.

Definition at line 285 of file CDriverLoginDlg.cpp.

void CDriverLoginDlg::OnLbnSelchangeDriverList ( )
protected

Selection Changed handler for the Driver List box.

Fills in the driver ID and password fields of the dialog with the information from the selected list item, for easy editing.

Definition at line 194 of file CDriverLoginDlg.cpp.

References FALSE, DriverLoginItem::getDriverId(), DriverLoginItem::getPassword(), IDC_DRIVERS_BTN_DELETE, IDC_DRIVERS_LST_DRIVERS, and TRUE.

void CDriverLoginDlg::OnLbnSetfocusDriverList ( )
protected

Handles the set focus event for the driver list.

Sets the default control to the Delete button so that it is activated if the user presses the Enter key.

Definition at line 275 of file CDriverLoginDlg.cpp.

References IDC_DRIVERS_BTN_DELETE.

void CDriverLoginDlg::PostNcDestroy ( )
protected

Called by MFC after the window has been destroyed; performs final termination activities.

Definition at line 243 of file CDriverLoginDlg.cpp.

void CDriverLoginDlg::updateListBox ( )
protected

Update the canned response list box from the canned response map owned by FmiApplicationLayer.

Definition at line 97 of file CDriverLoginDlg.cpp.

References FileBackedMap< T >::begin(), and FileBackedMap< T >::end().

Member Data Documentation

FmiApplicationLayer& CDriverLoginDlg::mCom
protected

Reference to the FMI communication controller.

Definition at line 61 of file CDriverLoginDlg.h.

CString CDriverLoginDlg::mDriverId
protected

DDX member: the contents of the Driver ID edit box.

Definition at line 70 of file CDriverLoginDlg.h.

CString CDriverLoginDlg::mDriverPassword
protected

DDX member: the contents of the Driver Password edit box.

Definition at line 73 of file CDriverLoginDlg.h.

CListBox CDriverLoginDlg::mListBox
protected

List box control containing the canned responses.

Definition at line 64 of file CDriverLoginDlg.h.

int CDriverLoginDlg::mSelectedIndex
protected

Index of the list box item currently selected.

Definition at line 67 of file CDriverLoginDlg.h.


The documentation for this class was generated from the following files: