-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bec12e5
commit 7dad29f
Showing
251 changed files
with
36,767 additions
and
352 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
// BackupAllProjects.cpp : implementation file | ||
// | ||
|
||
#include "stdafx.h" | ||
#include "VandaEngine1.h" | ||
#include "BackupAllProjects.h" | ||
#include "afxdialogex.h" | ||
|
||
|
||
// CBackupAllProjects dialog | ||
|
||
IMPLEMENT_DYNAMIC(CBackupAllProjects, CDialog) | ||
|
||
CBackupAllProjects::CBackupAllProjects(CWnd* pParent /*=NULL*/) | ||
: CDialog(CBackupAllProjects::IDD, pParent) | ||
{ | ||
|
||
} | ||
|
||
CBackupAllProjects::~CBackupAllProjects() | ||
{ | ||
} | ||
|
||
void CBackupAllProjects::DoDataExchange(CDataExchange* pDX) | ||
{ | ||
CDialog::DoDataExchange(pDX); | ||
DDX_Control(pDX, IDC_EDIT_DESTINATION, m_editBoxDestination); | ||
} | ||
|
||
|
||
BEGIN_MESSAGE_MAP(CBackupAllProjects, CDialog) | ||
ON_BN_CLICKED(IDC_BUTTON_DESTINATION, &CBackupAllProjects::OnBnClickedButtonDestination) | ||
ON_BN_CLICKED(IDOK, &CBackupAllProjects::OnBnClickedOk) | ||
END_MESSAGE_MAP() | ||
|
||
|
||
// CBackupAllProjects message handlers | ||
|
||
|
||
void CBackupAllProjects::OnBnClickedButtonDestination() | ||
{ | ||
BROWSEINFO bi; | ||
ZeroMemory(&bi, sizeof(bi)); | ||
TCHAR szDisplayName[MAX_PATH]; | ||
szDisplayName[0] = _T('S'); | ||
|
||
bi.hwndOwner = NULL; | ||
bi.pidlRoot = NULL; | ||
bi.pszDisplayName = szDisplayName; | ||
bi.lpszTitle = _T("Please select a folder"); | ||
bi.ulFlags = BIF_RETURNONLYFSDIRS; | ||
bi.lParam = NULL; | ||
bi.iImage = 0; | ||
|
||
LPITEMIDLIST pidl = SHBrowseForFolder(&bi); | ||
TCHAR szPathName[MAX_PATH]; | ||
if (NULL != pidl) | ||
{ | ||
BOOL bRet = SHGetPathFromIDList(pidl, szPathName); | ||
if (FALSE == bRet) | ||
return; | ||
m_strDestination = (CString)szPathName; | ||
m_editBoxDestination.SetWindowTextA(m_strDestination); | ||
} | ||
} | ||
|
||
CChar* CBackupAllProjects::GetSrcPath() | ||
{ | ||
return m_srcPath; | ||
} | ||
|
||
CChar* CBackupAllProjects::GetDstPath() | ||
{ | ||
return m_dstPath; | ||
} | ||
|
||
void CBackupAllProjects::OnBnClickedOk() | ||
{ | ||
if (m_strDestination.IsEmpty()) | ||
{ | ||
MessageBox("Please select destination path", "Error", MB_OK | MB_ICONERROR); | ||
return; | ||
} | ||
|
||
CChar docPath[MAX_URI_SIZE]; | ||
HRESULT result = SHGetFolderPath(NULL, CSIDL_PERSONAL, NULL, SHGFP_TYPE_CURRENT, docPath); | ||
if (result != S_OK) | ||
{ | ||
PrintInfo("\nCouldn't get the documents folder", COLOR_RED); | ||
return; | ||
} | ||
sprintf(m_srcPath, "%s%s", docPath, "/Vanda/"); | ||
|
||
sprintf(m_dstPath, "%s%s", (LPCSTR)m_strDestination, "/Vanda/"); | ||
|
||
CreateWindowsDirectory(m_dstPath); | ||
|
||
CDialog::OnOK(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#pragma once | ||
#include "afxcmn.h" | ||
|
||
|
||
// CBackupAllProjects dialog | ||
|
||
class CBackupAllProjects : public CDialog | ||
{ | ||
DECLARE_DYNAMIC(CBackupAllProjects) | ||
|
||
public: | ||
CBackupAllProjects(CWnd* pParent = NULL); // standard constructor | ||
virtual ~CBackupAllProjects(); | ||
|
||
// Dialog Data | ||
enum { IDD = IDD_DIALOG_BACKUP_ALL_PROJECTS }; | ||
|
||
protected: | ||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support | ||
|
||
DECLARE_MESSAGE_MAP() | ||
|
||
private: | ||
CChar m_srcPath[MAX_URI_SIZE]; | ||
CChar m_dstPath[MAX_URI_SIZE]; | ||
|
||
public: | ||
afx_msg void OnBnClickedButtonDestination(); | ||
CRichEditCtrl m_editBoxDestination; | ||
CString m_strDestination; | ||
afx_msg void OnBnClickedOk(); | ||
|
||
CChar* GetSrcPath(); | ||
CChar* GetDstPath(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.