Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
1.9 KiB

  1. // ParameterDialog.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "watcher.h"
  5. #include "ParameterDialog.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11. /////////////////////////////////////////////////////////////////////////////
  12. // ParameterDialog dialog
  13. ParameterDialog::ParameterDialog(CWnd* pParent /*=NULL*/)
  14. : CDialog(ParameterDialog::IDD, pParent)
  15. {
  16. //{{AFX_DATA_INIT(ParameterDialog)
  17. // NOTE: the ClassWizard will add member initialization here
  18. Machine = "";
  19. Command="";
  20. Port = TELNET_PORT;
  21. tcclnt = 0;
  22. language = 0;
  23. DeleteValue = FALSE;
  24. history = 0;
  25. //}}AFX_DATA_INIT
  26. }
  27. void ParameterDialog::DoDataExchange(CDataExchange* pDX)
  28. {
  29. CDialog::DoDataExchange(pDX);
  30. //{{AFX_DATA_MAP(ParameterDialog)
  31. // NOTE: the ClassWizard will add DDX and DDV calls here
  32. DDX_Text(pDX, IDC_MACHINE, Machine);
  33. DDV_MaxChars(pDX, Machine, 256);
  34. DDX_Text(pDX, IDC_COMMAND, Command);
  35. DDV_MaxChars(pDX, Command, 256);
  36. DDX_Text(pDX, IDC_LOGIN, LoginName);
  37. DDV_MaxChars(pDX, Command, 256);
  38. DDX_Text(pDX, IDC_PASSWD, LoginPasswd);
  39. DDV_MaxChars(pDX, Command, 256);
  40. DDX_Text(pDX, IDC_SESSION, Session);
  41. DDV_MaxChars(pDX, Session, 256);
  42. DDV_MinChars(pDX,Session);
  43. DDX_Text(pDX,IDC_PORT, Port);
  44. DDX_CBIndex(pDX,IDC_HISTORY,history);
  45. DDX_CBIndex(pDX,IDC_TELNET,tcclnt);
  46. DDX_CBIndex(pDX,IDC_LANGUAGE,language);
  47. //}}AFX_DATA_MAP
  48. }
  49. BEGIN_MESSAGE_MAP(ParameterDialog, CDialog)
  50. //{{AFX_MSG_MAP(ParameterDialog)
  51. // NOTE: the ClassWizard will add message map macros here
  52. //}}AFX_MSG_MAP
  53. END_MESSAGE_MAP()
  54. /////////////////////////////////////////////////////////////////////////////
  55. // ParameterDialog message handlers
  56. void ParameterDialog::DDV_MinChars(CDataExchange *pDX, CString &str)
  57. {
  58. if(pDX->m_bSaveAndValidate == FALSE){
  59. return;
  60. }
  61. if(str == TEXT("")){
  62. pDX->Fail();
  63. return;
  64. }
  65. }