2007-03-27 17:47:10 +00:00
|
|
|
/*
|
|
|
|
* CiderPress
|
|
|
|
* Copyright (C) 2007 by faddenSoft, LLC. All Rights Reserved.
|
|
|
|
* See the file LICENSE for distribution terms.
|
|
|
|
*/
|
|
|
|
#include "stdafx.h"
|
|
|
|
#include "ConfirmOverwriteDialog.h"
|
|
|
|
#include "AddClashDialog.h"
|
|
|
|
|
|
|
|
BEGIN_MESSAGE_MAP(AddClashDialog, CDialog)
|
2014-11-04 00:26:53 +00:00
|
|
|
ON_BN_CLICKED(IDC_CLASH_RENAME, OnRename)
|
|
|
|
ON_BN_CLICKED(IDC_CLASH_SKIP, OnSkip)
|
2007-03-27 17:47:10 +00:00
|
|
|
END_MESSAGE_MAP()
|
|
|
|
|
|
|
|
/*
|
2014-11-21 21:18:20 +00:00
|
|
|
* Replaces some static text fields.
|
2007-03-27 17:47:10 +00:00
|
|
|
*/
|
2014-11-21 21:18:20 +00:00
|
|
|
BOOL AddClashDialog::OnInitDialog(void)
|
2007-03-27 17:47:10 +00:00
|
|
|
{
|
2014-11-04 00:26:53 +00:00
|
|
|
CWnd* pWnd;
|
2007-03-27 17:47:10 +00:00
|
|
|
|
2014-11-04 00:26:53 +00:00
|
|
|
pWnd = GetDlgItem(IDC_CLASH_WINNAME);
|
2014-11-18 05:13:13 +00:00
|
|
|
ASSERT(pWnd != NULL);
|
2014-11-04 00:26:53 +00:00
|
|
|
pWnd->SetWindowText(fWindowsName);
|
2007-03-27 17:47:10 +00:00
|
|
|
|
2014-11-04 00:26:53 +00:00
|
|
|
pWnd = GetDlgItem(IDC_CLASH_STORAGENAME);
|
2014-11-18 05:13:13 +00:00
|
|
|
ASSERT(pWnd != NULL);
|
2014-11-04 00:26:53 +00:00
|
|
|
pWnd->SetWindowText(fStorageName);
|
2007-03-27 17:47:10 +00:00
|
|
|
|
2014-11-04 00:26:53 +00:00
|
|
|
return CDialog::OnInitDialog();
|
2007-03-27 17:47:10 +00:00
|
|
|
}
|
|
|
|
|
2014-11-21 21:18:20 +00:00
|
|
|
void AddClashDialog::OnSkip(void)
|
2007-03-27 17:47:10 +00:00
|
|
|
{
|
2014-11-04 00:26:53 +00:00
|
|
|
fDoRename = false;
|
|
|
|
CDialog::OnOK();
|
2007-03-27 17:47:10 +00:00
|
|
|
}
|
2014-11-21 21:18:20 +00:00
|
|
|
|
|
|
|
void AddClashDialog::OnRename(void)
|
2007-03-27 17:47:10 +00:00
|
|
|
{
|
2014-11-04 00:26:53 +00:00
|
|
|
RenameOverwriteDialog dlg;
|
2007-03-27 17:47:10 +00:00
|
|
|
|
2014-11-04 00:26:53 +00:00
|
|
|
dlg.fNewFileSource = fWindowsName;
|
|
|
|
dlg.fExistingFile = fStorageName;
|
|
|
|
dlg.fNewName = fStorageName;
|
|
|
|
if (dlg.DoModal() == IDOK) {
|
|
|
|
fNewName = dlg.fNewName;
|
|
|
|
fDoRename = true;
|
|
|
|
CDialog::OnOK();
|
|
|
|
}
|
2007-03-27 17:47:10 +00:00
|
|
|
}
|