TheDef.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. #ifndef __THE_CLOUD_DEF_20160612__
  2. #define __THE_CLOUD_DEF_20160612__
  3. // <string>和<vector>命名空间最好放在stdafx.h头文件中,不然可能产生编译错误;
  4. #include <string>
  5. #include <vector>
  6. using namespace std;
  7. #ifndef _UNICODE
  8. typedef string TString;
  9. #else
  10. typedef wstring TString;
  11. #endif
  12. typedef vector<TString> STR_VEC;
  13. #include <strsafe.h>
  14. //////////////////////////////////////////////////////////////////////////
  15. // Version表备份相关信息;
  16. typedef struct ST_StudioInfo
  17. {
  18. TString strVersion;
  19. TString strStudioName; // 影楼店名;
  20. TString strStudioTelNo; // 影楼电话;
  21. TString strStudioAddr; // 影楼地址;
  22. TString strStudioSite; // 影楼网址;
  23. TCHAR szbakServer1[MAX_PATH]; // 与bCheckbak1对应,原片备份目录的共享主机名 ;
  24. TCHAR szbakServer2[MAX_PATH]; // 与bCheckbak2对应,初修片备份目录的共享主机名 ;
  25. TCHAR szbakServer3[MAX_PATH]; // 与bCheckbak31对应,精修片备份目录的共享主机名 ;
  26. TCHAR szbakServer4[MAX_PATH]; // 与bCheckbak4对应,设计片备份目录的共享主机名 ;
  27. TCHAR szbakServer5[MAX_PATH]; // 与bCheckbak5对应,数据库备份目录的共享主机名 ;
  28. ST_StudioInfo(){
  29. strVersion = _T("00000");
  30. }
  31. ST_StudioInfo(const ST_StudioInfo &another)
  32. {
  33. strVersion = another.strVersion;
  34. strStudioName = another.strStudioName;
  35. strStudioTelNo = another.strStudioTelNo;
  36. strStudioAddr = another.strStudioAddr;
  37. strStudioSite = another.strStudioSite;
  38. }
  39. ST_StudioInfo& operator=(const ST_StudioInfo &another)
  40. {
  41. if ( this == &another)
  42. {
  43. return *this;
  44. }
  45. strVersion = another.strVersion;
  46. strStudioName = another.strStudioName;
  47. strStudioTelNo = another.strStudioTelNo;
  48. strStudioAddr = another.strStudioAddr;
  49. strStudioSite = another.strStudioSite;
  50. return *this;
  51. }
  52. }StudioInfo,*pStudioInfo;
  53. //////////////////////////////////////////////////////////////////////////
  54. // branchinfo.dat文件;
  55. typedef struct _branchinfo_
  56. {
  57. TString strBranchId; // 域名;
  58. TString strBranchName; // 店名;
  59. TString strBranchIP; // IP;
  60. TString strHomeOffice; // 总店;
  61. TString strEnterprise; // 企业名;
  62. }STBranchInfo, *pSTBranchInfo;
  63. /*
  64. //////////////////////////////////////////////////////////////////////////
  65. // 共享目录信息表NetShareInfo;
  66. typedef struct ST_TblNetShareInfo
  67. {
  68. BOOL bEnable;
  69. TString strBranchId;
  70. TString strShareDirectory;
  71. BYTE byMinCapacity;
  72. BYTE byMaxCapacity;
  73. BYTE byImgType;
  74. BYTE byPriority;
  75. ST_TblNetShareInfo()
  76. {
  77. bEnable = FALSE;
  78. byMinCapacity = 0;
  79. byMaxCapacity = 0;
  80. byImgType = 0;
  81. byPriority = 0;
  82. }
  83. ST_TblNetShareInfo(const ST_TblNetShareInfo &another)
  84. {
  85. bEnable = another.bEnable;
  86. byMinCapacity = another.byMinCapacity;
  87. byMaxCapacity = another.byMaxCapacity;
  88. byPriority = another.byPriority;
  89. byImgType = another.byImgType;
  90. strBranchId = another.strBranchId;
  91. strShareDirectory = another.strShareDirectory;
  92. }
  93. ST_TblNetShareInfo& operator=(const ST_TblNetShareInfo &another)
  94. {
  95. if ( this == &another )
  96. {
  97. return *this;
  98. }
  99. bEnable = another.bEnable;
  100. byMinCapacity = another.byMinCapacity;
  101. byMaxCapacity = another.byMaxCapacity;
  102. byPriority = another.byPriority;
  103. byImgType = another.byImgType;
  104. strBranchId = another.strBranchId;
  105. strShareDirectory = another.strShareDirectory;
  106. return *this;
  107. }
  108. }TblNetShareInfo,*pTblNetShareInfo;
  109. */
  110. enum // 缩放结果;
  111. {
  112. ZoomNull = 0, // 无缩放;
  113. ZoomIn = 1, // 缩小;
  114. ZoomOut = 2 // 放大;
  115. };
  116. enum
  117. {
  118. OImgtype = 1, // 原片;
  119. EImgtype = 2, // 初修;
  120. FImgtype = 3, // 精修;
  121. DImgtype = 4, // 设计;
  122. OBImgtype = 5,
  123. EBImgtype = 6,
  124. FBImgtype = 7,
  125. DBImgtype = 8
  126. };
  127. enum
  128. {
  129. IMG_IMPORT = 0,
  130. IMG_EXPORT = 1
  131. };
  132. enum
  133. {
  134. COPY_IF_EXISTS = 1,
  135. COPY_FAIL_IF_EXISTS = 2,
  136. COPY_OTHER_NAME_IF_EXISTS = 3
  137. };
  138. #define MIN_CAPACITY 5
  139. #define MAX_CAPACITY 10
  140. #define OImgpath _T("客户原片(管理软件)$")
  141. #define EImgpath _T("修好的片(管理软件)$")
  142. #define FImgpath _T("精修好的片(管理软件)$")
  143. #define DImgpath _T("设计好的片(管理软件)$")
  144. #define OBImgpath _T("客户原片备份(管理软件)$")
  145. #define EBImgpath _T("修好的片备份(管理软件)$")
  146. #define FBImgpath _T("精修好的片备份(管理软件)$")
  147. #define DBImgpath _T("设计好的片备份(管理软件)$")
  148. #define COBImgpath _T("客户原片备份(儿童管理软件)$")
  149. #define CEBImgpath _T("修好的片备份(儿童管理软件)$")
  150. #define CFBImgpath _T("精修好的片备份(儿童管理软件)$")
  151. #define CDBImgpath _T("设计好的片备份(儿童管理软件)$")
  152. #define GET_XPIX(x) ( x >> 16) // 高16位;
  153. #define GET_YPIX(y) (y & 0x0000ffff) // 低16位;
  154. #define SET_PIX(x,y) (( x << 16) | y) // 高低合并;
  155. #define INVALID_COPY_PIX ((DWORD)-1) // 传递此值,表示没有复制压缩;
  156. #endif//__THE_CLOUD_DEF_20160612__;