使用soui开发的mbc,只支持windows版本
w1146869587
2022-01-24 479b1995ef435713c2cf4f0da8de3a6af6c30922
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#pragma once
 
// CDirectoryChangeMgr command target
#define        CMD_BACKUPDIR_DELETE        _T("Delete")
#define        CMD_BACKUPDIR_NEW            _T("New")
#define        CMD_BACKUPDIR_MODIFY        _T("Modify")
#define        CMD_BACKUPDIR_RENAME        _T("Rename")
 
#define        REG_DBSUBKEY                    _T( "Software\\Activesoft\\NetDiskDB" )
 
class CDirectoryChangeMgr : public CObject
{
public:
    CDirectoryChangeMgr();
    virtual ~CDirectoryChangeMgr();
// Attributers
public:
    CStringArray    m_arBackupDir; 
    CString            m_strLogin;        // User Login Name
    CString            m_strServerID;    // Server ID
    CString            m_strDBFile;    // DB File Name 
    CDBConnect        m_AConnect;        // Local Database
    BOOL            m_bOpenDB;
// Operations
public:
    BOOL        OpenDB( CString strLogin, CString strPassword, CString strServerID, BOOL bCheckFile = false );
    void        CloseDB();
    CString        GetTemplateDBFile( );
    BOOL        IsDBOpen(){return m_bOpenDB;};
public:
    BOOL        InsertChangeDir(CString strFilePath, CString strOperateType, CString strFileParam =_T("")); 
    static        CString        GetNetDiskDBWorkDir();
    static CString        GetModulePath();
    static CString        GetPathName( CString strFileName );
    static BOOL        ExistPath( CString strFilePath );
    static BOOL        ExistFile( CString strFileName );
    CString        GenerateGUIDString();
    BOOL        GetBackupDir(CStringArray &arBackupDir );
    void        WriteDBErrToFile( CString strErrInfo );
    void        WriteRowToFile(CString strFileName, CString strContent );
    bool        CStringToAnsi( LPCTSTR pszT,  LPSTR *ppszA  );
    CString        GetDBReplaceStr( CString strData );
};