OptionNetworkDlg.h
上传用户:zslianheng
上传日期:2013-04-03
资源大小:946k
文件大小:3k
源码类别:

Linux/Unix编程

开发平台:

Visual C++

  1. /***************************************************************************
  2.  *                                                                         *
  3.  *   This program is free software; you can redistribute it and/or modify  *
  4.  *   it under the terms of the GNU General Public License as published by  *
  5.  *   the Free Software Foundation; either version 2 of the License, or     *
  6.  *   (at your option) any later version.                                   *
  7.  *                                                                         *
  8.  *   copyright            : (C) 2002 by Zhang Yong                         *
  9.  *   email                : z-yong163@163.com                              *
  10.  ***************************************************************************/
  11. #if !defined(AFX_OPTIONNETWORKDLG_H__B2F02B53_1E78_4A26_A4F1_1AAB8AA36D15__INCLUDED_)
  12. #define AFX_OPTIONNETWORKDLG_H__B2F02B53_1E78_4A26_A4F1_1AAB8AA36D15__INCLUDED_
  13. #if _MSC_VER > 1000
  14. #pragma once
  15. #endif // _MSC_VER > 1000
  16. // OptionNetworkDlg.h : header file
  17. //
  18. #include "sessionlistener.h"
  19. #include "sockssession.h"
  20. #include "httpsession.h"
  21. class ProxyInfo;
  22. /////////////////////////////////////////////////////////////////////////////
  23. // COptionNetworkDlg dialog
  24. class COptionNetworkDlg : public CPropertyPage, public SessionListener
  25. {
  26. DECLARE_DYNCREATE(COptionNetworkDlg)
  27. // Construction
  28. public:
  29. COptionNetworkDlg();
  30. ~COptionNetworkDlg();
  31. // Dialog Data
  32. //{{AFX_DATA(COptionNetworkDlg)
  33. enum { IDD = IDD_OPTION_NETWORK };
  34. CComboBox m_proxyTypeCombo;
  35. CString m_host;
  36. int m_port;
  37. BOOL m_useProxy;
  38. CString m_proxyHost;
  39. CString m_proxyPasswd;
  40. CString m_proxyUserName;
  41. int m_proxyPort;
  42. int m_proxyType;
  43. BOOL m_proxyResolve;
  44. //}}AFX_DATA
  45. // Overrides
  46. // ClassWizard generate virtual function overrides
  47. //{{AFX_VIRTUAL(COptionNetworkDlg)
  48. public:
  49. virtual void OnOK();
  50. protected:
  51. virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  52. //}}AFX_VIRTUAL
  53. private:
  54. virtual void sessionFinished(bool success);
  55. void getProxyInfo(ProxyInfo &info);
  56. void enableControls();
  57. SocksSession socksSession;
  58. HttpSession httpSession;
  59. // Implementation
  60. protected:
  61. // Generated message map functions
  62. //{{AFX_MSG(COptionNetworkDlg)
  63. virtual BOOL OnInitDialog();
  64. afx_msg void OnUseProxy();
  65. afx_msg void OnProxyTest();
  66. afx_msg void OnSelchangeProxyType();
  67. //}}AFX_MSG
  68. DECLARE_MESSAGE_MAP()
  69. };
  70. //{{AFX_INSERT_LOCATION}}
  71. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  72. #endif // !defined(AFX_OPTIONNETWORKDLG_H__B2F02B53_1E78_4A26_A4F1_1AAB8AA36D15__INCLUDED_)