This commit is contained in:
Igor Pavlov
2003-12-11 00:00:00 +00:00
committed by Kornel Lesiński
commit 8c1b5c7b7e
982 changed files with 118799 additions and 0 deletions

View File

@@ -0,0 +1,78 @@
// CopyDialog.cpp
#include "StdAfx.h"
#include "CopyDialog.h"
#include "Windows/Control/Static.h"
#include "Windows/Shell.h"
#include "Windows/FileName.h"
#ifdef LANG
#include "../../LangUtils.h"
#endif
using namespace NWindows;
#ifdef LANG
static CIDLangPair kIDLangPairs[] =
{
{ IDOK, 0x02000702 },
{ IDCANCEL, 0x02000710 }
};
#endif
bool CCopyDialog::OnInit()
{
#ifdef LANG
LangSetDlgItemsText(HWND(*this), kIDLangPairs, sizeof(kIDLangPairs) / sizeof(kIDLangPairs[0]));
#endif
_path.Attach(GetItem(IDC_COPY_COMBO));
SetText(Title);
NControl::CStatic staticContol;
staticContol.Attach(GetItem(IDC_COPY_STATIC));
staticContol.SetText(Static);
for(int i = 0; i < Strings.Size(); i++)
_path.AddString(Strings[i]);
_path.SetText(Value);
return CModalDialog::OnInit();
}
bool CCopyDialog::OnButtonClicked(int aButtonID, HWND buttonHWND)
{
switch(aButtonID)
{
case IDC_COPY_SET_PATH:
OnButtonSetPath();
return true;
}
return CModalDialog::OnButtonClicked(aButtonID, buttonHWND);
}
void CCopyDialog::OnButtonSetPath()
{
CSysString currentPath;
_path.GetText(currentPath);
/*
#ifdef LANG
CSysString title = LangLoadString(IDS_EXTRACT_SET_FOLDER, 0x02000881);
#else
CSysString title = MyLoadString(IDS_EXTRACT_SET_FOLDER);
#endif
*/
CSysString title = TEXT("Specify a location for output folder");
CSysString resultPath;
if (!NShell::BrowseForFolder(HWND(*this), title, currentPath, resultPath))
return;
NFile::NName::NormalizeDirPathPrefix(resultPath);
_path.SetCurSel(-1);
_path.SetText(resultPath);
}
void CCopyDialog::OnOK()
{
_path.GetText(Value);
CModalDialog::OnOK();
}

View File

@@ -0,0 +1,29 @@
// CopyDialog.h
#pragma once
#ifndef __COPYDIALOG_H
#define __COPYDIALOG_H
#include "Windows/Control/Dialog.h"
#include "Windows/Control/ComboBox.h"
#include "resource.h"
class CCopyDialog: public NWindows::NControl::CModalDialog
{
NWindows::NControl::CComboBox _path;
virtual void OnOK();
virtual bool OnInit();
void OnButtonSetPath();
bool OnButtonClicked(int buttonID, HWND buttonHWND);
public:
UString Title;
UString Static;
UString Value;
CSysStringVector Strings;
INT_PTR Create(HWND parentWindow = 0)
{ return CModalDialog::Create(MAKEINTRESOURCE(IDD_DIALOG_COPY), parentWindow); }
};
#endif

View File

@@ -0,0 +1,22 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by resource.rc
//
#define IDD_DIALOG_COPY 202
#define IDC_COPY_STATIC 1000
#define IDC_COPY_COMBO 1001
#define IDC_COPY_SET_PATH 1002
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 157
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1003
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

View File

@@ -0,0 +1,101 @@
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// Russian resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
#ifdef _WIN32
LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
#pragma code_page(1251)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"\0"
END
#endif // APSTUDIO_INVOKED
#endif // Russian resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_DIALOG_COPY DIALOG DISCARDABLE 0, 0, 360, 71
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Copy"
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "",IDC_COPY_STATIC,7,7,346,8
COMBOBOX IDC_COPY_COMBO,7,20,317,65,CBS_DROPDOWN |
CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "...",IDC_COPY_SET_PATH,333,20,20,14,WS_GROUP
DEFPUSHBUTTON "OK",IDOK,240,50,50,14
PUSHBUTTON "Cancel",IDCANCEL,303,50,50,14
END
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE
BEGIN
IDD_DIALOG_COPY, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 353
TOPMARGIN, 7
BOTTOMMARGIN, 64
END
END
#endif // APSTUDIO_INVOKED
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////