|
|
|
|
// ArrayDlg.cpp : ʵ<><CAB5><EFBFBD>ļ<EFBFBD>
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
#include "stdafx.h"
|
|
|
|
|
#include "LaiPuLaser.h"
|
|
|
|
|
#include "DlgArray.h"
|
|
|
|
|
#include "afxdialogex.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// CDlgArray <20>Ի<EFBFBD><D4BB><EFBFBD>
|
|
|
|
|
|
|
|
|
|
IMPLEMENT_DYNAMIC(CDlgArray, CDialogEx)
|
|
|
|
|
|
|
|
|
|
CDlgArray::CDlgArray(CWnd* pParent /*=NULL*/)
|
|
|
|
|
: CDialogEx(CDlgArray::IDD, pParent)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CDlgArray::~CDlgArray()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CDlgArray::DoDataExchange(CDataExchange* pDX)
|
|
|
|
|
{
|
|
|
|
|
CDialogEx::DoDataExchange(pDX);
|
|
|
|
|
DDX_Text(pDX, IDC_ARRAY_CNT_H,m_ArrayPar.m_ArrayCntH);
|
|
|
|
|
DDX_Text(pDX, IDC_ARRAY_CNT_V, m_ArrayPar.m_ArrayCntV);
|
|
|
|
|
DDX_Text(pDX, IDC_ARRAY_OFFSET_H, m_ArrayPar.m_ArrayOffsetH);
|
|
|
|
|
DDX_Text(pDX, IDC_ARRAY_OFFSET_V, m_ArrayPar.m_ArrayOffsetV);
|
|
|
|
|
DDX_Text(pDX, IDC_ARRAY_CNT,m_ArrayPar.m_ArrayCnt);
|
|
|
|
|
DDX_Text(pDX, IDC_RADIUS, m_ArrayPar.m_Radius);
|
|
|
|
|
DDX_Text(pDX, IDC_GAP_ANGLE, m_ArrayPar.m_GapAngle);
|
|
|
|
|
DDX_Text(pDX, IDC_FILL_OFFSET, m_ArrayPar.m_FillOffset);
|
|
|
|
|
DDX_Text(pDX, IDC_FIIL_CNT, m_ArrayPar.m_FillCnt);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BEGIN_MESSAGE_MAP(CDlgArray, CDialogEx)
|
|
|
|
|
ON_BN_CLICKED(IDOK,OnBnClickedOk)
|
|
|
|
|
ON_BN_CLICKED(IDC_RECT, &CDlgArray::OnBnClickedRect)
|
|
|
|
|
ON_BN_CLICKED(IDC_CIRCLE, &CDlgArray::OnBnClickedCircle)
|
|
|
|
|
ON_BN_CLICKED(IDC_CIRCLE2, &CDlgArray::OnBnClickedCircle2)
|
|
|
|
|
END_MESSAGE_MAP()
|
|
|
|
|
|
|
|
|
|
BOOL CDlgArray::OnInitDialog()
|
|
|
|
|
{
|
|
|
|
|
CDialogEx::OnInitDialog();
|
|
|
|
|
((CButton *)GetDlgItem(IDC_RECT))->SetCheck(TRUE);
|
|
|
|
|
OnBnClickedRect();
|
|
|
|
|
UpdateData(FALSE);
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CDlgArray::OnBnClickedRect()
|
|
|
|
|
{
|
|
|
|
|
m_ArrayPar.m_bRectArray = true;
|
|
|
|
|
m_ArrayPar.m_bCircleArray = false;
|
|
|
|
|
m_ArrayPar.m_bFillArray = false;
|
|
|
|
|
((CButton *)GetDlgItem(IDC_CIRCLE))->SetCheck(FALSE);
|
|
|
|
|
((CButton *)GetDlgItem(IDC_CIRCLE2))->SetCheck(FALSE);
|
|
|
|
|
CWnd *pWnd;
|
|
|
|
|
pWnd = GetDlgItem(IDC_STATIC4);
|
|
|
|
|
pWnd->ShowWindow(SW_SHOW);
|
|
|
|
|
pWnd = GetDlgItem(IDC_STATIC5);
|
|
|
|
|
pWnd->ShowWindow(SW_SHOW);
|
|
|
|
|
pWnd = GetDlgItem(IDC_STATIC6);
|
|
|
|
|
pWnd->ShowWindow(SW_SHOW);
|
|
|
|
|
pWnd = GetDlgItem(IDC_STATIC7);
|
|
|
|
|
pWnd->ShowWindow(SW_SHOW);
|
|
|
|
|
pWnd = GetDlgItem(IDC_ARRAY_CNT_H);
|
|
|
|
|
pWnd->ShowWindow(SW_SHOW);
|
|
|
|
|
pWnd = GetDlgItem(IDC_ARRAY_CNT_V);
|
|
|
|
|
pWnd->ShowWindow(SW_SHOW);
|
|
|
|
|
pWnd = GetDlgItem(IDC_ARRAY_OFFSET_H);
|
|
|
|
|
pWnd->ShowWindow(SW_SHOW);
|
|
|
|
|
pWnd = GetDlgItem(IDC_ARRAY_OFFSET_V);
|
|
|
|
|
pWnd->ShowWindow(SW_SHOW);
|
|
|
|
|
|
|
|
|
|
pWnd = GetDlgItem(IDC_STATIC1);
|
|
|
|
|
pWnd->ShowWindow(SW_HIDE);
|
|
|
|
|
pWnd = GetDlgItem(IDC_STATIC2);
|
|
|
|
|
pWnd->ShowWindow(SW_HIDE);
|
|
|
|
|
pWnd = GetDlgItem(IDC_STATIC3);
|
|
|
|
|
pWnd->ShowWindow(SW_HIDE);
|
|
|
|
|
pWnd = GetDlgItem(IDC_ARRAY_CNT);
|
|
|
|
|
pWnd->ShowWindow(SW_HIDE);
|
|
|
|
|
pWnd = GetDlgItem(IDC_RADIUS);
|
|
|
|
|
pWnd->ShowWindow(SW_HIDE);
|
|
|
|
|
pWnd = GetDlgItem(IDC_GAP_ANGLE);
|
|
|
|
|
pWnd->ShowWindow(SW_HIDE);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pWnd = GetDlgItem(IDC_STATIC8);
|
|
|
|
|
pWnd->ShowWindow(SW_HIDE);
|
|
|
|
|
pWnd = GetDlgItem(IDC_STATIC9);
|
|
|
|
|
pWnd->ShowWindow(SW_HIDE);
|
|
|
|
|
pWnd = GetDlgItem(IDC_FILL_OFFSET);
|
|
|
|
|
pWnd->ShowWindow(SW_HIDE);
|
|
|
|
|
pWnd = GetDlgItem(IDC_FIIL_CNT);
|
|
|
|
|
pWnd->ShowWindow(SW_HIDE);
|
|
|
|
|
}
|
|
|
|
|
void CDlgArray::OnBnClickedCircle()
|
|
|
|
|
{
|
|
|
|
|
m_ArrayPar.m_bRectArray = false;
|
|
|
|
|
m_ArrayPar.m_bCircleArray = true;
|
|
|
|
|
m_ArrayPar.m_bFillArray = false;
|
|
|
|
|
((CButton *)GetDlgItem(IDC_RECT))->SetCheck(FALSE);
|
|
|
|
|
((CButton *)GetDlgItem(IDC_CIRCLE2))->SetCheck(FALSE);
|
|
|
|
|
CWnd *pWnd;
|
|
|
|
|
pWnd = GetDlgItem(IDC_ARRAY_CNT_H);
|
|
|
|
|
pWnd->ShowWindow(SW_HIDE);
|
|
|
|
|
pWnd = GetDlgItem(IDC_ARRAY_CNT_V);
|
|
|
|
|
pWnd->ShowWindow(SW_HIDE);
|
|
|
|
|
pWnd = GetDlgItem(IDC_ARRAY_OFFSET_H);
|
|
|
|
|
pWnd->ShowWindow(SW_HIDE);
|
|
|
|
|
pWnd = GetDlgItem(IDC_ARRAY_OFFSET_V);
|
|
|
|
|
pWnd->ShowWindow(SW_HIDE);
|
|
|
|
|
pWnd = GetDlgItem(IDC_STATIC4);
|
|
|
|
|
pWnd->ShowWindow(SW_HIDE);
|
|
|
|
|
pWnd = GetDlgItem(IDC_STATIC5);
|
|
|
|
|
pWnd->ShowWindow(SW_HIDE);
|
|
|
|
|
pWnd = GetDlgItem(IDC_STATIC6);
|
|
|
|
|
pWnd->ShowWindow(SW_HIDE);
|
|
|
|
|
pWnd = GetDlgItem(IDC_STATIC7);
|
|
|
|
|
pWnd->ShowWindow(SW_HIDE);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pWnd = GetDlgItem(IDC_STATIC1);
|
|
|
|
|
pWnd->ShowWindow(SW_SHOW);
|
|
|
|
|
pWnd = GetDlgItem(IDC_STATIC2);
|
|
|
|
|
pWnd->ShowWindow(SW_SHOW);
|
|
|
|
|
pWnd = GetDlgItem(IDC_STATIC3);
|
|
|
|
|
pWnd->ShowWindow(SW_SHOW);
|
|
|
|
|
pWnd = GetDlgItem(IDC_ARRAY_CNT);
|
|
|
|
|
pWnd->ShowWindow(SW_SHOW);
|
|
|
|
|
pWnd = GetDlgItem(IDC_RADIUS);
|
|
|
|
|
pWnd->ShowWindow(SW_SHOW);
|
|
|
|
|
pWnd = GetDlgItem(IDC_GAP_ANGLE);
|
|
|
|
|
pWnd->ShowWindow(SW_SHOW);
|
|
|
|
|
|
|
|
|
|
pWnd = GetDlgItem(IDC_STATIC8);
|
|
|
|
|
pWnd->ShowWindow(SW_HIDE);
|
|
|
|
|
pWnd = GetDlgItem(IDC_STATIC9);
|
|
|
|
|
pWnd->ShowWindow(SW_HIDE);
|
|
|
|
|
pWnd = GetDlgItem(IDC_FILL_OFFSET);
|
|
|
|
|
pWnd->ShowWindow(SW_HIDE);
|
|
|
|
|
pWnd = GetDlgItem(IDC_FIIL_CNT);
|
|
|
|
|
pWnd->ShowWindow(SW_HIDE);
|
|
|
|
|
}
|
|
|
|
|
void CDlgArray::OnBnClickedOk()
|
|
|
|
|
{
|
|
|
|
|
UpdateData(TRUE);
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>й<EFBFBD><D0B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
CArrayMgr ArrayMgr;
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
ArrayMgr.Creat(m_ArrayPar);
|
|
|
|
|
OnOK();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CDlgArray::OnBnClickedCircle2()
|
|
|
|
|
{
|
|
|
|
|
m_ArrayPar.m_bRectArray = false;
|
|
|
|
|
m_ArrayPar.m_bCircleArray = false;
|
|
|
|
|
m_ArrayPar.m_bFillArray = true;
|
|
|
|
|
((CButton *)GetDlgItem(IDC_RECT))->SetCheck(FALSE);
|
|
|
|
|
((CButton *)GetDlgItem(IDC_CIRCLE))->SetCheck(FALSE);
|
|
|
|
|
CWnd *pWnd;
|
|
|
|
|
pWnd = GetDlgItem(IDC_ARRAY_CNT_H);
|
|
|
|
|
pWnd->ShowWindow(SW_HIDE);
|
|
|
|
|
pWnd = GetDlgItem(IDC_ARRAY_CNT_V);
|
|
|
|
|
pWnd->ShowWindow(SW_HIDE);
|
|
|
|
|
pWnd = GetDlgItem(IDC_ARRAY_OFFSET_H);
|
|
|
|
|
pWnd->ShowWindow(SW_HIDE);
|
|
|
|
|
pWnd = GetDlgItem(IDC_ARRAY_OFFSET_V);
|
|
|
|
|
pWnd->ShowWindow(SW_HIDE);
|
|
|
|
|
pWnd = GetDlgItem(IDC_STATIC4);
|
|
|
|
|
pWnd->ShowWindow(SW_HIDE);
|
|
|
|
|
pWnd = GetDlgItem(IDC_STATIC5);
|
|
|
|
|
pWnd->ShowWindow(SW_HIDE);
|
|
|
|
|
pWnd = GetDlgItem(IDC_STATIC6);
|
|
|
|
|
pWnd->ShowWindow(SW_HIDE);
|
|
|
|
|
pWnd = GetDlgItem(IDC_STATIC7);
|
|
|
|
|
pWnd->ShowWindow(SW_HIDE);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pWnd = GetDlgItem(IDC_STATIC1);
|
|
|
|
|
pWnd->ShowWindow(SW_HIDE);
|
|
|
|
|
pWnd = GetDlgItem(IDC_STATIC2);
|
|
|
|
|
pWnd->ShowWindow(SW_HIDE);
|
|
|
|
|
pWnd = GetDlgItem(IDC_STATIC3);
|
|
|
|
|
pWnd->ShowWindow(SW_HIDE);
|
|
|
|
|
pWnd = GetDlgItem(IDC_ARRAY_CNT);
|
|
|
|
|
pWnd->ShowWindow(SW_HIDE);
|
|
|
|
|
pWnd = GetDlgItem(IDC_RADIUS);
|
|
|
|
|
pWnd->ShowWindow(SW_HIDE);
|
|
|
|
|
pWnd = GetDlgItem(IDC_GAP_ANGLE);
|
|
|
|
|
pWnd->ShowWindow(SW_HIDE);
|
|
|
|
|
|
|
|
|
|
pWnd = GetDlgItem(IDC_STATIC8);
|
|
|
|
|
pWnd->ShowWindow(SW_SHOW);
|
|
|
|
|
pWnd = GetDlgItem(IDC_STATIC9);
|
|
|
|
|
pWnd->ShowWindow(SW_SHOW);
|
|
|
|
|
pWnd = GetDlgItem(IDC_FILL_OFFSET);
|
|
|
|
|
pWnd->ShowWindow(SW_SHOW);
|
|
|
|
|
pWnd = GetDlgItem(IDC_FIIL_CNT);
|
|
|
|
|
pWnd->ShowWindow(SW_SHOW);
|
|
|
|
|
}
|
|
|
|
|
|