Team Fortress 2 Source Code as on 22/4/2020
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.

99 lines
2.8 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. // ModelCheckInDlg.h : header file
  9. //
  10. #if !defined(AFX_MODELCHECKINDLG_H__75541530_E85C_4FAB_8C76_6EE68353E2E2__INCLUDED_)
  11. #define AFX_MODELCHECKINDLG_H__75541530_E85C_4FAB_8C76_6EE68353E2E2__INCLUDED_
  12. #if _MSC_VER > 1000
  13. #pragma once
  14. #endif // _MSC_VER > 1000
  15. /////////////////////////////////////////////////////////////////////////////
  16. // CModelCheckInDlg dialog
  17. class CModelCheckInDlg : public CDialog
  18. {
  19. // Construction
  20. public:
  21. CModelCheckInDlg(CWnd* pParent = NULL); // standard constructor
  22. // Dialog Data
  23. //{{AFX_DATA(CModelCheckInDlg)
  24. enum { IDD = IDD_MODELCHECKIN_DIALOG };
  25. CString m_HL2GameDirectory;
  26. CString m_TF2GameDirectory;
  27. CString m_UserName;
  28. int m_HL2Radio;
  29. int m_TF2Radio;
  30. //}}AFX_DATA
  31. // ClassWizard generated virtual function overrides
  32. //{{AFX_VIRTUAL(CModelCheckInDlg)
  33. protected:
  34. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  35. //}}AFX_VIRTUAL
  36. // Implementation
  37. protected:
  38. HICON m_hIcon;
  39. // Generated message map functions
  40. //{{AFX_MSG(CModelCheckInDlg)
  41. virtual BOOL OnInitDialog();
  42. afx_msg void OnPaint();
  43. afx_msg HCURSOR OnQueryDragIcon();
  44. //}}AFX_MSG
  45. afx_msg void OnFileCheckIn();
  46. afx_msg void OnFileCheckOut();
  47. afx_msg void OnFileExit();
  48. DECLARE_MESSAGE_MAP()
  49. private:
  50. enum ProjectType_t
  51. {
  52. PROJECT_ERROR = -1,
  53. PROJECT_HL2 = 0,
  54. PROJECT_TF2
  55. };
  56. bool CheckInfo();
  57. bool SetCurrentSSProject( ProjectType_t project, char const* pRelativeDir );
  58. ProjectType_t ComputeRelativeFileName( char const* pInFile, char* pRelativeFile );
  59. void StoreStateIntoRegistry( );
  60. void RestoreStateFromRegistry( );
  61. ProjectType_t GetFileNames( char const* pTitle, char*& pRelativePath,
  62. char*& pFileName, char*& pDestPath );
  63. void ResetDirectoryEntry( CString &fullPath, char *pRegEntry );
  64. void PerformCheckoutCommand( ProjectType_t project,
  65. char const* pRelativeDir, char const* pDestPath, char const* pFileName );
  66. void PerformCheckinCommand( ProjectType_t project,
  67. char const* pRelativeDir, char const* pDestPath, char const* pFileName );
  68. };
  69. //-----------------------------------------------------------------------------
  70. // registry info
  71. //-----------------------------------------------------------------------------
  72. #define MDL_CHECKOUT_REG_CLASS "HKEY_CURRENT_USER\\SOFTWARE\\Valve\\MDLCheckOut"
  73. #define MDL_CHECKOUT_REG_LAST_PATH "Path"
  74. #define MDL_CHECKOUT_REG_USER "User"
  75. #define MDL_CHECKOUT_REG_HL2_PATH "HL2"
  76. #define MDL_CHECKOUT_REG_TF2_PATH "TF2"
  77. //{{AFX_INSERT_LOCATION}}
  78. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  79. #endif // !defined(AFX_MODELCHECKINDLG_H__75541530_E85C_4FAB_8C76_6EE68353E2E2__INCLUDED_)