#if !defined(AFX_RECIPECOPYSETTINGSPAGE_H__7C095807_97B7_4390_A499_4E361AD72BF4__INCLUDED_)
#define AFX_RECIPECOPYSETTINGSPAGE_H__7C095807_97B7_4390_A499_4E361AD72BF4__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#ifdef  BUILD_GUIDLL
#define     DLLCLASS    __declspec(dllexport)
#else
#define     DLLCLASS    __declspec(dllimport)
#endif

#include "MyPropertyPage.h"
#include "ShadeButtonST.h"
#include "ShadeCheckButtonST.h"
#include <vector>

// RecipeCopySettingsPage.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CRecipeCopySettingsPage dialog

class DLLCLASS CRecipeCopySettingsPage : public CMyPropertyPage // public CPropertyPage
{
DECLARE_DYNCREATE(CRecipeCopySettingsPage)

// Construction
public:
    virtual void SetPagesTabText();
    CRecipeCopySettingsPage();
    ~CRecipeCopySettingsPage();

// Dialog Data
// {{AFX_DATA(CRecipeCopySettingsPage)
    enum {
        IDD = IDD_COPY_SETTINGS
    };
    CListCtrl m_destinationListCtrl;
    CListCtrl m_sourceListCtrl;

    CShadeButtonST m_copyPkgBtn;
    CShadeButtonST m_copyModuleBtn;

    CShadeCheckButtonST m_module9Btn;
    CShadeCheckButtonST m_module8Btn;
    CShadeCheckButtonST m_module7Btn;
    CShadeCheckButtonST m_module6Btn;
    CShadeCheckButtonST m_module5Btn;
    CShadeCheckButtonST m_module4Btn;
    CShadeCheckButtonST m_module3Btn;
    CShadeCheckButtonST m_module20Btn;
    CShadeCheckButtonST m_module2Btn;
    CShadeCheckButtonST m_module10Btn;
    CShadeCheckButtonST m_module19Btn;
    CShadeCheckButtonST m_module18Btn;
    CShadeCheckButtonST m_module17Btn;
    CShadeCheckButtonST m_module16Btn;
    CShadeCheckButtonST m_module15Btn;
    CShadeCheckButtonST m_module14Btn;
    CShadeCheckButtonST m_module13Btn;
    CShadeCheckButtonST m_module12Btn;
    CShadeCheckButtonST m_module11Btn;
    CShadeCheckButtonST m_module1Btn;
// }}AFX_DATA

// Overrides
// ClassWizard generate virtual function overrides
// {{AFX_VIRTUAL(CRecipeCopySettingsPage)
public:
    virtual BOOL OnSetActive();
protected:
    virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
// }}AFX_VIRTUAL

// Implementation
protected:
// Generated message map functions
// {{AFX_MSG(CRecipeCopySettingsPage)
    virtual BOOL OnInitDialog();
    afx_msg void OnCopyPackageButton();
    afx_msg void OnCopyModuleButton();
// }}AFX_MSG
    DECLARE_MESSAGE_MAP()

private:
    void DisplayIn2ndLang();
    void InitIconButtons();
    void InitModuleButtons();
    void InitListCtrl();
    void InitListCtrlData();
    void SetModuleText();

    BOOL GetSelectedPackage();

/// return true if source and destination package is the same
    bool IsSameSourceAndDestination();

    void CopyToNewPackageInfo(CString csNewPackage, CString csExistingPackage, CString csTable);

/// copy record field from existing package to new package
    bool CopyRecField(CDaoRecordset &NewPkgRS, CDaoRecordset &ExistPkgRS, CString csTable,
                      CString csNewPkg, CString csExistingPkg, int iStartFieldNo);

/// copy existing package Motor Speed record to a new record
    void CopyToNewMtrSpdRec(CString csNewPackage, CString csExistingPackage,
                            int iNoOfModuleToCopy, CStringArray *csModuleName, CString csTable);

    enum
    {
        MAX_MODULES = 20,
    };

    CString m_csDestinationPackage;
    CString m_csSourcePackage;

    bool m_bUseMotorPosTable;

    std::vector<CString> m_disableModuleNames;

public:
    void AddDisableModules(CString csModuleName);
};

// {{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_RECIPECOPYSETTINGSPAGE_H__7C095807_97B7_4390_A499_4E361AD72BF4__INCLUDED_)
