|
|
|
|
#include "StdAfx.h"
|
|
|
|
|
#include "RecipeMgr.h"
|
|
|
|
|
#include "LogMgr.h"
|
|
|
|
|
#include "FileMgr.h"
|
|
|
|
|
#include "CStringFuc.h"
|
|
|
|
|
#include "WaferRecipeDataMgr.h"
|
|
|
|
|
#include "MsgBox.h"
|
|
|
|
|
#include "DlgChildRecipe.h"
|
|
|
|
|
#include "CommonParaMgr.h"
|
|
|
|
|
#include "GlobalFunction.h"
|
|
|
|
|
#include "Laser.h"
|
|
|
|
|
#include "ProgramLaserTuiHuo.h"
|
|
|
|
|
#include "RecipeMgr.h"
|
|
|
|
|
#include "DlgRecipeCtrl.h"
|
|
|
|
|
#include "MyXmlMgr.h"
|
|
|
|
|
#include "ExceptionMsg.h"
|
|
|
|
|
#include "AuthorityMgr.h"
|
|
|
|
|
#include "CommonParaMgr.h"
|
|
|
|
|
#include "Propertie.h"
|
|
|
|
|
#include "PropertieMgr.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define RECIPE_FILE_PATH _T("\\RecipePar\\")
|
|
|
|
|
#define RECIPE_GROUP_NAME_FILE _T("\\font\\GroupNameList")//<2F><><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD><D0B1>ļ<EFBFBD>
|
|
|
|
|
#define SECS_RECIPE_FILE_PATH _T("\\SecsRecipe")
|
|
|
|
|
|
|
|
|
|
#define RECIPE_GROUP_CNT 10 //recipe <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
#define ONE_GROUP_PAR_CNT 50 //һ<><D2BB>recipe <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
#define NEW_RECIPE_FILE_PATH _T("\\Recipe\\")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define RECIPE_FILE_SUFFIX "rcp" //recipe <20>ļ<EFBFBD>ʹ<EFBFBD>õĺ<C3B5>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define XML_ITEM_PAR_TYPE "ParType"
|
|
|
|
|
#define XML_ITEM_PAR_VAL "ParVal"
|
|
|
|
|
|
|
|
|
|
#define RCP_PAR_TYPE_DOUBLE "Double"
|
|
|
|
|
#define RCP_PAR_TYPE_STRING "String"
|
|
|
|
|
#define RCP_PAR_TYPE_BOOL "Bool"
|
|
|
|
|
#define RCP_PAR_TYPE_INT "Int"
|
|
|
|
|
|
|
|
|
|
#define NULL_RECIPE_NAME "" //<2F><>Ч<EFBFBD><D0A7>recipe <20><><EFBFBD><EFBFBD>
|
|
|
|
|
#define PARA_MODIFY_DATA_PATH _T("\\ParaModifyRecord\\")
|
|
|
|
|
|
|
|
|
|
#define OFFSET_TAB_FILE_PATH "\\OffsetTable\\TableFile\\"
|
|
|
|
|
|
|
|
|
|
#define MFC_CTRLSCAL _T("\\CommPar\\MFC_CtrlScal.bin") // MFC<46><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
#if 1
|
|
|
|
|
CSubRecipe::CSubRecipe(void)
|
|
|
|
|
{
|
|
|
|
|
m_bUseSubRecipe = true;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD>ʹ<EFBFBD><CAB9>
|
|
|
|
|
ReadMFCCtrlScalFile();
|
|
|
|
|
//<2F><>ʼ<EFBFBD><CABC>recipe <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
IntiRecipeParVec();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//<2F><>ָ<EFBFBD><D6B8><EFBFBD>ļ<EFBFBD><C4BC>ж<EFBFBD>ȡMfcϵ<63><CFB5>
|
|
|
|
|
void CSubRecipe::ReadMFCCtrlScalFile()
|
|
|
|
|
{
|
|
|
|
|
CFileMgr FileMgr;
|
|
|
|
|
CString FilePath;
|
|
|
|
|
vector<vector<CString>> StrVec;
|
|
|
|
|
FileMgr.GetFullFilePath(FilePath, MFC_CTRLSCAL);
|
|
|
|
|
FileMgr.ReadFileToStrVec(FilePath, StrVec);
|
|
|
|
|
int StrSize = StrVec.size();
|
|
|
|
|
for (int i = 0; i < StrSize; i++)
|
|
|
|
|
{
|
|
|
|
|
if (2 == StrVec[i].size())
|
|
|
|
|
{
|
|
|
|
|
MFCScalStrVec.push_back(StrVec[i]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
//<2F><>ʼ<EFBFBD><CABC>recipe <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28>м<EFBFBD><D0BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>µIJ<C2B5><C4B2><EFBFBD>)
|
|
|
|
|
void CSubRecipe::IntiRecipeParVec()
|
|
|
|
|
{
|
|
|
|
|
//<2F><><EFBFBD>Ա<EFBFBD><D4B1>༭<EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ҫ<EFBFBD><D2AA>ǰ<EFBFBD>涨<EFBFBD><E6B6A8>
|
|
|
|
|
{
|
|
|
|
|
CRecipeParameter RecipePar;
|
|
|
|
|
RecipePar.m_ParName = RECIPE_PAR_NAME_LASER_FRE;
|
|
|
|
|
RecipePar.m_ParShowName = "Laser1 Frequency";
|
|
|
|
|
RecipePar.m_ParUnit = "Hz";//<2F><><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>λ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
|
|
|
|
RecipePar.m_ParType = _RecipeParType_Double;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipePar.m_ParDoubleVal = 1000;//Ĭ<><C4AC>ֵ
|
|
|
|
|
RecipePar.m_DoubleMinVal = 0;
|
|
|
|
|
RecipePar.m_DoubleMaxVal = gCommonParaMgr->GetCommonParaVal(RECIPE_PAR_MAX_LASER_FRE);
|
|
|
|
|
m_RecipeParVec.push_back(RecipePar);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
CRecipeParameter RecipePar;
|
|
|
|
|
RecipePar.m_ParName = RECIPE_PAR_NAME_LASER2_FRE;
|
|
|
|
|
RecipePar.m_ParShowName = "Laser2 Frequency";
|
|
|
|
|
RecipePar.m_ParUnit = "Hz";//<2F><><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>λ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
|
|
|
|
RecipePar.m_ParType = _RecipeParType_Double;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipePar.m_ParDoubleVal = 1000;//Ĭ<><C4AC>ֵ
|
|
|
|
|
RecipePar.m_DoubleMinVal = 0;
|
|
|
|
|
RecipePar.m_DoubleMaxVal = gCommonParaMgr->GetCommonParaVal(RECIPE_PAR_MAX_LASER_FRE);
|
|
|
|
|
m_RecipeParVec.push_back(RecipePar);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
CRecipeParameter RecipePar;
|
|
|
|
|
RecipePar.m_ParName = RECIPE_PAR_NAME_PRF2_DELAY;
|
|
|
|
|
RecipePar.m_ParShowName = "Two Pulse Delay";
|
|
|
|
|
RecipePar.m_ParUnit = "ns";//<2F><><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>λ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
|
|
|
|
RecipePar.m_ParType = _RecipeParType_Double;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipePar.m_ParDoubleVal = 0;
|
|
|
|
|
RecipePar.m_DoubleMinVal = 0;
|
|
|
|
|
RecipePar.m_DoubleMaxVal = gCommonParaMgr->GetCommonParaVal(RECIPE_PAR_MAX_LASER_PULSE_DELAY);
|
|
|
|
|
m_RecipeParVec.push_back(RecipePar);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
CRecipeParameter RecipePar;
|
|
|
|
|
RecipePar.m_ParName = RECIPE_PAR_NAME_LASER_CURR_1;
|
|
|
|
|
RecipePar.m_ParShowName = "Laser1 Current";
|
|
|
|
|
RecipePar.m_ParUnit = "A";//<2F><><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>λ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
|
|
|
|
RecipePar.m_ParType = _RecipeParType_Double;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipePar.m_ParDoubleVal = 0;
|
|
|
|
|
RecipePar.m_DoubleMinVal = 0;
|
|
|
|
|
RecipePar.m_DoubleMaxVal = gCommonParaMgr->GetCommonParaVal(RECIPE_PAR_MAX_LASER_CURR_1);
|
|
|
|
|
m_RecipeParVec.push_back(RecipePar);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
CRecipeParameter RecipePar;
|
|
|
|
|
RecipePar.m_ParName = RECIPE_PAR_NAME_LASER_CURR_2;
|
|
|
|
|
RecipePar.m_ParShowName = "Laser2 Current";
|
|
|
|
|
RecipePar.m_ParUnit = "A";//<2F><><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>λ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
|
|
|
|
RecipePar.m_ParType = _RecipeParType_Double;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipePar.m_ParDoubleVal = 0;
|
|
|
|
|
RecipePar.m_DoubleMinVal = 0;
|
|
|
|
|
RecipePar.m_DoubleMaxVal = gCommonParaMgr->GetCommonParaVal(RECIPE_PAR_MAX_LASER_CURR_2);
|
|
|
|
|
m_RecipeParVec.push_back(RecipePar);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
CRecipeParameter RecipePar;
|
|
|
|
|
RecipePar.m_ParName = RECIPE_PAR_NAME_LASER_EDI_1;
|
|
|
|
|
RecipePar.m_ParShowName = "Laser1 Edi";
|
|
|
|
|
RecipePar.m_ParUnit = "J/cm2";//<2F><><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>λ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
|
|
|
|
RecipePar.m_ParType = _RecipeParType_Double;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipePar.m_ParDoubleVal = 0;
|
|
|
|
|
RecipePar.m_DoubleMinVal = 0;
|
|
|
|
|
RecipePar.m_DoubleMaxVal = gCommonParaMgr->GetCommonParaVal(RECIPE_PAR_MAX_LASER_EDI_1);
|
|
|
|
|
m_RecipeParVec.push_back(RecipePar);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
CRecipeParameter RecipePar;
|
|
|
|
|
RecipePar.m_ParName = RECIPE_PAR_NAME_LASER_EDI_2;
|
|
|
|
|
RecipePar.m_ParShowName = "Laser2 Edi";
|
|
|
|
|
RecipePar.m_ParUnit = "J/cm2";//<2F><><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>λ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
|
|
|
|
RecipePar.m_ParType = _RecipeParType_Double;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipePar.m_ParDoubleVal = 0;
|
|
|
|
|
RecipePar.m_DoubleMinVal = 0;
|
|
|
|
|
RecipePar.m_DoubleMaxVal = gCommonParaMgr->GetCommonParaVal(RECIPE_PAR_MAX_LASER_EDI_2);
|
|
|
|
|
m_RecipeParVec.push_back(RecipePar);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
CRecipeParameter RecipePar;
|
|
|
|
|
RecipePar.m_ParName = RECIPE_PAR_NAME_LASER_EDI_OFFSET_1;
|
|
|
|
|
RecipePar.m_ParShowName = "Laser1 Edi Offset";
|
|
|
|
|
RecipePar.m_ParUnit = "J/cm2";//<2F><><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>λ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
|
|
|
|
RecipePar.m_ParType = _RecipeParType_Double;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipePar.m_ParDoubleVal = 0;
|
|
|
|
|
RecipePar.m_DoubleMinVal = -2;
|
|
|
|
|
RecipePar.m_DoubleMaxVal = 2;
|
|
|
|
|
m_RecipeParVec.push_back(RecipePar);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
CRecipeParameter RecipePar;
|
|
|
|
|
RecipePar.m_ParName = RECIPE_PAR_NAME_LASER_EDI_OFFSET_2;
|
|
|
|
|
RecipePar.m_ParShowName = "Laser2 Edi Offset";
|
|
|
|
|
RecipePar.m_ParUnit = "J/cm2";//<2F><><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>λ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
|
|
|
|
RecipePar.m_ParType = _RecipeParType_Double;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipePar.m_ParDoubleVal = 0;
|
|
|
|
|
RecipePar.m_DoubleMinVal = -2;
|
|
|
|
|
RecipePar.m_DoubleMaxVal = 2;
|
|
|
|
|
m_RecipeParVec.push_back(RecipePar);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
CRecipeParameter RecipePar;
|
|
|
|
|
RecipePar.m_ParName = RECIPE_PAR_NAME_EDI_CHECK_SCOPE;
|
|
|
|
|
RecipePar.m_ParShowName = "Edi Check Scope";
|
|
|
|
|
RecipePar.m_ParUnit = "J/cm2";//<2F><><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>λ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
|
|
|
|
RecipePar.m_ParType = _RecipeParType_Double;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipePar.m_ParDoubleVal = 0;
|
|
|
|
|
RecipePar.m_DoubleMinVal = 0;
|
|
|
|
|
RecipePar.m_DoubleMaxVal = 5;
|
|
|
|
|
m_RecipeParVec.push_back(RecipePar);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
CRecipeParameter RecipePar;
|
|
|
|
|
RecipePar.m_ParName = RECIPE_PAR_NAME_OVERLAP_RATIO_X;
|
|
|
|
|
RecipePar.m_ParShowName = "Overlap Rate X";
|
|
|
|
|
RecipePar.m_ParUnit = "%";//<2F><><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>λ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
|
|
|
|
RecipePar.m_ParType = _RecipeParType_Double;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipePar.m_ParDoubleVal = 0;
|
|
|
|
|
RecipePar.m_DoubleMinVal = 0;
|
|
|
|
|
RecipePar.m_DoubleMaxVal = 99;
|
|
|
|
|
m_RecipeParVec.push_back(RecipePar);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
CRecipeParameter RecipePar;
|
|
|
|
|
RecipePar.m_ParName = RECIPE_PAR_NAME_OVERLAP_RATIO_Y;
|
|
|
|
|
RecipePar.m_ParShowName = "Overlap Rate Y";
|
|
|
|
|
RecipePar.m_ParUnit = "%";//<2F><><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>λ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
|
|
|
|
RecipePar.m_ParType = _RecipeParType_Double;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipePar.m_ParDoubleVal = 0;
|
|
|
|
|
RecipePar.m_DoubleMinVal = 0;
|
|
|
|
|
RecipePar.m_DoubleMaxVal = 99;
|
|
|
|
|
m_RecipeParVec.push_back(RecipePar);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
CRecipeParameter RecipePar;
|
|
|
|
|
RecipePar.m_ParName = RECIPE_PAR_NAME_FOCUS_ADJUST_VAL;
|
|
|
|
|
RecipePar.m_ParShowName = "Foucs Adjust Val";
|
|
|
|
|
RecipePar.m_ParUnit = "mm";//<2F><><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>λ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
|
|
|
|
RecipePar.m_ParType = _RecipeParType_Double;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipePar.m_ParDoubleVal = 0;
|
|
|
|
|
RecipePar.m_DoubleMinVal = gCommonParaMgr->GetCommonParaVal(RECIPE_PAR_MIN_FOCUS_ADJUST);
|
|
|
|
|
RecipePar.m_DoubleMaxVal = gCommonParaMgr->GetCommonParaVal(RECIPE_PAR_MAX_FOCUS_ADJUST);
|
|
|
|
|
m_RecipeParVec.push_back(RecipePar);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
CRecipeParameter RecipePar;
|
|
|
|
|
RecipePar.m_ParName = RECIPE_PAR_NAME_FIX_SCAN_SPEED;
|
|
|
|
|
RecipePar.m_ParShowName = "Fix Scan Speed";
|
|
|
|
|
RecipePar.m_ParUnit = "mm/s";//<2F><><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>λ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
|
|
|
|
RecipePar.m_ParType = _RecipeParType_Double;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipePar.m_ParDoubleVal = 0;
|
|
|
|
|
RecipePar.m_DoubleMinVal = gCommonParaMgr->GetCommonParaVal(RECIPE_PAR_MIN_SCAN_SPEED);
|
|
|
|
|
RecipePar.m_DoubleMaxVal = gCommonParaMgr->GetCommonParaVal(RECIPE_PAR_MAX_SCAN_SPEED);
|
|
|
|
|
m_RecipeParVec.push_back(RecipePar);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
CRecipeParameter RecipePar;
|
|
|
|
|
RecipePar.m_ParName = RECIPE_PAR_NAME_FIX_SCAN_LINE_GAP;
|
|
|
|
|
RecipePar.m_ParShowName = "Fix Scan Line Gap";
|
|
|
|
|
RecipePar.m_ParUnit = "mm";//<2F><><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>λ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
|
|
|
|
RecipePar.m_ParType = _RecipeParType_Double;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipePar.m_ParDoubleVal = 0;
|
|
|
|
|
RecipePar.m_DoubleMinVal = 0;
|
|
|
|
|
RecipePar.m_DoubleMaxVal = gCommonParaMgr->GetCommonParaVal(RECIPE_PAR_MAX_FIX_SCAN_LINE_GAP);
|
|
|
|
|
m_RecipeParVec.push_back(RecipePar);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
CRecipeParameter RecipePar;
|
|
|
|
|
RecipePar.m_ParName = RECIPE_PAR_NAME_SCAN_LINE_START_IDX;
|
|
|
|
|
RecipePar.m_ParShowName = "Start Scan Line Idx";
|
|
|
|
|
//RecipePar.m_ParUnit = "mm";//<2F><><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>λ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
|
|
|
|
RecipePar.m_ParType = _RecipeParType_Double;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipePar.m_ParDoubleVal = 0;
|
|
|
|
|
RecipePar.m_DoubleMinVal = 0;
|
|
|
|
|
RecipePar.m_DoubleMaxVal = 100000;
|
|
|
|
|
m_RecipeParVec.push_back(RecipePar);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
CRecipeParameter RecipePar;
|
|
|
|
|
RecipePar.m_ParName = RECIPE_PAR_NAME_ALIGNER_ANG;
|
|
|
|
|
RecipePar.m_ParShowName = "Wafer Aligner Angle";
|
|
|
|
|
RecipePar.m_ParUnit = "degree";//<2F><><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>λ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
|
|
|
|
RecipePar.m_ParType = _RecipeParType_Double;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipePar.m_ParDoubleVal = 270;
|
|
|
|
|
RecipePar.m_DoubleMinVal = 0;
|
|
|
|
|
RecipePar.m_DoubleMaxVal = 360;
|
|
|
|
|
m_RecipeParVec.push_back(RecipePar);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
int StrSize = MFCScalStrVec.size();
|
|
|
|
|
double m_MinVal = 0.0;
|
|
|
|
|
double m_MaxVal = 0.0;
|
|
|
|
|
if (StrSize > 0)
|
|
|
|
|
{
|
|
|
|
|
m_MinVal = CStringToDouble(MFCScalStrVec[0][1]);
|
|
|
|
|
m_MaxVal = CStringToDouble(MFCScalStrVec[StrSize - 1][1]);
|
|
|
|
|
}
|
|
|
|
|
CRecipeParameter RecipePar;
|
|
|
|
|
RecipePar.m_ParName = RECIPE_PAR_NAME_N2_VAL;
|
|
|
|
|
RecipePar.m_ParShowName = "N2 Val";
|
|
|
|
|
RecipePar.m_ParUnit = "L";//<2F><><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>λ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
|
|
|
|
RecipePar.m_ParType = _RecipeParType_Double;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipePar.m_ParDoubleVal = m_MinVal;
|
|
|
|
|
RecipePar.m_DoubleMinVal = m_MinVal;
|
|
|
|
|
RecipePar.m_DoubleMaxVal = m_MaxVal;
|
|
|
|
|
m_RecipeParVec.push_back(RecipePar);
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>------------------------------------------------
|
|
|
|
|
{
|
|
|
|
|
CRecipeParameter RecipePar;
|
|
|
|
|
RecipePar.m_ParName = RECIPE_PAR_NAME_SCAN_AREA;
|
|
|
|
|
RecipePar.m_ParShowName = "Scan Area";
|
|
|
|
|
RecipePar.m_ParType = _RecipeParType_CString;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
m_RecipeParVec.push_back(RecipePar);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
CRecipeParameter RecipePar;
|
|
|
|
|
RecipePar.m_ParName = RECIPE_PAR_NAME_AREA_IDX;
|
|
|
|
|
RecipePar.m_ParShowName = "Area Idx";
|
|
|
|
|
RecipePar.m_ParType = _RecipeParType_Int;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipePar.m_ParIntVal = 1;
|
|
|
|
|
m_RecipeParVec.push_back(RecipePar);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
CRecipeParameter RecipePar;
|
|
|
|
|
RecipePar.m_ParName = RECIPE_PAR_NAME_N2_STATE;
|
|
|
|
|
RecipePar.m_ParShowName = "N2";
|
|
|
|
|
RecipePar.m_ParType = _RecipeParType_Bool;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipePar.m_ParBoolVal = true;
|
|
|
|
|
m_RecipeParVec.push_back(RecipePar);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
CRecipeParameter RecipePar;
|
|
|
|
|
RecipePar.m_ParName = RECIPE_PAR_NAME_USE_CUR_N2VAL;
|
|
|
|
|
RecipePar.m_ParShowName = "Use CurN2Val";
|
|
|
|
|
RecipePar.m_ParType = _RecipeParType_Bool;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipePar.m_ParBoolVal = false;
|
|
|
|
|
m_RecipeParVec.push_back(RecipePar);
|
|
|
|
|
}
|
|
|
|
|
#ifdef __OFFSET_TABLE__
|
|
|
|
|
{
|
|
|
|
|
CRecipeParameter RecipePar;
|
|
|
|
|
RecipePar.m_ParName = RECIPE_PAR_NAME_OFFSET_TAB;
|
|
|
|
|
RecipePar.m_ParShowName = "Offset Table";
|
|
|
|
|
RecipePar.m_ParType = _RecipeParType_CString;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipePar.m_ParStrVal = RECIPE_OFFSET_TBL_NULL;
|
|
|
|
|
m_RecipeParVec.push_back(RecipePar);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
CRecipeParameter RecipePar;
|
|
|
|
|
RecipePar.m_ParName = RECIPE_PAR_NAME_RUNTIMES;
|
|
|
|
|
RecipePar.m_ParShowName = "Run Times";
|
|
|
|
|
RecipePar.m_ParType = _RecipeParType_Int;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipePar.m_ParIntVal = 1;//Ĭ<><C4AC>ֵ
|
|
|
|
|
m_RecipeParVec.push_back(RecipePar);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD>ܱ<EFBFBD><DCB1>༭<EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>---------------------------------------------------------------
|
|
|
|
|
#if 1
|
|
|
|
|
{
|
|
|
|
|
CRecipeParameter RecipePar;
|
|
|
|
|
RecipePar.m_ParName = RECIPE_PAR_NAME_LASER1_POW;
|
|
|
|
|
RecipePar.m_ParShowName = "Laser1 Power";
|
|
|
|
|
RecipePar.m_ParUnit = "w";//<2F><><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>λ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
|
|
|
|
RecipePar.m_ParType = _RecipeParType_Double;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipePar.m_ParDoubleVal = 0;
|
|
|
|
|
RecipePar.m_DoubleMinVal = 0;
|
|
|
|
|
RecipePar.m_DoubleMaxVal = gCommonParaMgr->GetCommonParaVal(RECIPE_PAR_MAX_LASER_POW_1);
|
|
|
|
|
RecipePar.m_bRcpInfoPar = true;//<2F>Ƿ<EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD>ܱ<EFBFBD><DCB1>༭)
|
|
|
|
|
m_RecipeParVec.push_back(RecipePar);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
CRecipeParameter RecipePar;
|
|
|
|
|
RecipePar.m_ParName = RECIPE_PAR_NAME_LASER2_POW;
|
|
|
|
|
RecipePar.m_ParShowName = "Laser2 Power";
|
|
|
|
|
RecipePar.m_ParUnit = "w";//<2F><><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>λ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
|
|
|
|
RecipePar.m_ParType = _RecipeParType_Double;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipePar.m_ParDoubleVal = 0;
|
|
|
|
|
RecipePar.m_DoubleMinVal = 0;
|
|
|
|
|
RecipePar.m_DoubleMaxVal = gCommonParaMgr->GetCommonParaVal(RECIPE_PAR_MAX_LASER_POW_2);
|
|
|
|
|
RecipePar.m_bRcpInfoPar = true;//<2F>Ƿ<EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD>ܱ<EFBFBD><DCB1>༭)
|
|
|
|
|
m_RecipeParVec.push_back(RecipePar);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
CRecipeParameter RecipePar;
|
|
|
|
|
RecipePar.m_ParName = RECIPE_PAR_NAME_SCAN_SPEED;
|
|
|
|
|
RecipePar.m_ParShowName = "Scan Speed";
|
|
|
|
|
RecipePar.m_ParUnit = "mm/s";//<2F><><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>λ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
|
|
|
|
RecipePar.m_ParType = _RecipeParType_Double;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipePar.m_ParDoubleVal = 0;
|
|
|
|
|
RecipePar.m_DoubleMinVal = gCommonParaMgr->GetCommonParaVal(RECIPE_PAR_MIN_SCAN_SPEED);
|
|
|
|
|
RecipePar.m_DoubleMaxVal = gCommonParaMgr->GetCommonParaVal(RECIPE_PAR_MAX_SCAN_SPEED);
|
|
|
|
|
RecipePar.m_bRcpInfoPar = true;//<2F>Ƿ<EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD>ܱ<EFBFBD><DCB1>༭)
|
|
|
|
|
m_RecipeParVec.push_back(RecipePar);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
CRecipeParameter RecipePar;
|
|
|
|
|
RecipePar.m_ParName = RECIPE_PAR_NAME_ROTATO_DIMMER_ANG;
|
|
|
|
|
RecipePar.m_ParShowName = "Dimmer1 Angle";
|
|
|
|
|
RecipePar.m_ParUnit = "degree";//<2F><><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>λ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
|
|
|
|
RecipePar.m_ParType = _RecipeParType_Double;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipePar.m_ParDoubleVal = 0;
|
|
|
|
|
RecipePar.m_DoubleMinVal = 0;
|
|
|
|
|
RecipePar.m_DoubleMaxVal = gCommonParaMgr->GetCommonParaVal(RECIPE_PAR_MAX_DIMMER_ANG_1);
|
|
|
|
|
RecipePar.m_bRcpInfoPar = true;//<2F>Ƿ<EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD>ܱ<EFBFBD><DCB1>༭)
|
|
|
|
|
m_RecipeParVec.push_back(RecipePar);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
CRecipeParameter RecipePar;
|
|
|
|
|
RecipePar.m_ParName = RECIPE_PAR_NAME_ROTATO_DIMMER_ANG2;
|
|
|
|
|
RecipePar.m_ParShowName = "Dimmer2 Angle";
|
|
|
|
|
RecipePar.m_ParUnit = "degree";//<2F><><EFBFBD><EFBFBD><EFBFBD>ĵ<EFBFBD>λ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
|
|
|
|
RecipePar.m_ParType = _RecipeParType_Double;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipePar.m_ParDoubleVal = 0;
|
|
|
|
|
RecipePar.m_DoubleMinVal = 0;
|
|
|
|
|
RecipePar.m_DoubleMaxVal = gCommonParaMgr->GetCommonParaVal(RECIPE_PAR_MAX_DIMMER_ANG_2);
|
|
|
|
|
RecipePar.m_bRcpInfoPar = true;//<2F>Ƿ<EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD>ܱ<EFBFBD><DCB1>༭)
|
|
|
|
|
m_RecipeParVec.push_back(RecipePar);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
#if 1
|
|
|
|
|
//<2F><><EFBFBD>ݲ<EFBFBD><DDB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD><CDB7><EFBFBD>CString <20><><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
CString CRecipeParameter::GetParStr()
|
|
|
|
|
{
|
|
|
|
|
CString ParStr;
|
|
|
|
|
switch(m_ParType)
|
|
|
|
|
{
|
|
|
|
|
case _RecipeParType_Double:
|
|
|
|
|
ParStr = Db2CString(m_ParDoubleVal);
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeParType_Bool:
|
|
|
|
|
ParStr = (m_ParBoolVal)?(BOOL_STR_ON):(BOOL_STR_OFF);
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeParType_CString:
|
|
|
|
|
ParStr = m_ParStrVal;
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeParType_Int:
|
|
|
|
|
ParStr = Int2CString(m_ParIntVal);
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
return ParStr;
|
|
|
|
|
}
|
|
|
|
|
CString CRecipeParameter::GetParTypeStr()
|
|
|
|
|
{
|
|
|
|
|
CString Str;
|
|
|
|
|
switch(m_ParType)
|
|
|
|
|
{
|
|
|
|
|
case _RecipeParType_Double:
|
|
|
|
|
Str = RCP_PAR_TYPE_DOUBLE;
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeParType_Bool:
|
|
|
|
|
Str = RCP_PAR_TYPE_BOOL;
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeParType_CString:
|
|
|
|
|
Str = RCP_PAR_TYPE_STRING;
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeParType_Int:
|
|
|
|
|
Str = RCP_PAR_TYPE_INT;
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
return Str;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CRecipeParameter::SetValByStr(CString s)
|
|
|
|
|
{
|
|
|
|
|
switch(m_ParType)
|
|
|
|
|
{
|
|
|
|
|
case _RecipeParType_Double:
|
|
|
|
|
m_ParDoubleVal = CStringToDouble(s);
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeParType_Bool:
|
|
|
|
|
m_ParBoolVal = ((s==BOOL_STR_ON))?(true):(false);
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeParType_CString:
|
|
|
|
|
m_ParStrVal = s;
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeParType_Int:
|
|
|
|
|
m_ParIntVal = CStringToInt(s);
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CRecipeParameter::SetTypeByStr(CString TypeStr)
|
|
|
|
|
{
|
|
|
|
|
if(TypeStr==RCP_PAR_TYPE_DOUBLE)
|
|
|
|
|
{
|
|
|
|
|
m_ParType = _RecipeParType_Double;
|
|
|
|
|
}
|
|
|
|
|
if(TypeStr==RCP_PAR_TYPE_STRING)
|
|
|
|
|
{
|
|
|
|
|
m_ParType = _RecipeParType_CString;
|
|
|
|
|
}
|
|
|
|
|
if(TypeStr==RCP_PAR_TYPE_BOOL)
|
|
|
|
|
{
|
|
|
|
|
m_ParType = _RecipeParType_Bool;
|
|
|
|
|
}
|
|
|
|
|
if(TypeStr==RCP_PAR_TYPE_INT)
|
|
|
|
|
{
|
|
|
|
|
m_ParType = _RecipeParType_Int;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
void CRecipeParameter::GetRangeStr(CString &Min,CString &Max)
|
|
|
|
|
{
|
|
|
|
|
if(m_ParType==_RecipeParType_Double)
|
|
|
|
|
{
|
|
|
|
|
Min = Db2CString(m_DoubleMinVal);
|
|
|
|
|
Max = Db2CString(m_DoubleMaxVal);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
Min = Max = "---";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
#if 1
|
|
|
|
|
CRecipe::CRecipe(void)
|
|
|
|
|
{
|
|
|
|
|
m_DoubleValCnt = 0;//double <20><><EFBFBD>Ͳ<EFBFBD><CDB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
m_GroupIdx = -1;//<2F><><EFBFBD>ı<EFBFBD><C4B1><EFBFBD>
|
|
|
|
|
m_RecipeIdx = -1;//<2F><><EFBFBD><EFBFBD><EFBFBD>еı<D0B5><C4B1><EFBFBD>
|
|
|
|
|
|
|
|
|
|
m_CurSubRecipeIdx = 0;//<2F><>ǰʹ<C7B0>õ<EFBFBD>SubRecipe <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
m_bEnableEdit = true;//<2F><>ǰʱ<C7B0><CAB1><EFBFBD><EFBFBD><EFBFBD>Ա༭
|
|
|
|
|
RecipeReset();
|
|
|
|
|
|
|
|
|
|
CSubRecipe SubRecipe;
|
|
|
|
|
SubRecipe.m_SubRecipeName = "SubRecipe1";
|
|
|
|
|
m_SubRecipeVec.push_back(SubRecipe);//Ĭ<><C4AC><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>SubRecipe
|
|
|
|
|
}
|
|
|
|
|
void CRecipe::RecipeReset()
|
|
|
|
|
{
|
|
|
|
|
m_RecipeName = NULL_RECIPE_NAME;//Recipe <20><>
|
|
|
|
|
}
|
|
|
|
|
bool CRecipe::IsValid()
|
|
|
|
|
{
|
|
|
|
|
return (m_RecipeName != NULL_RECIPE_NAME);
|
|
|
|
|
}
|
|
|
|
|
vector<CRecipeParameter> &CRecipe::GetRecipeParVec()
|
|
|
|
|
{
|
|
|
|
|
return m_SubRecipeVec[m_CurSubRecipeIdx].m_RecipeParVec;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>RecipePar <20><><EFBFBD>ļ<EFBFBD>
|
|
|
|
|
void CRecipe::SaveRecipeParToFile(CString FilePath)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>ȡrecipe <20><><EFBFBD><EFBFBD>
|
|
|
|
|
void CRecipe::ReadRecipeParFromFile(CString FilePath)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
//ͨ<><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>
|
|
|
|
|
CRecipeParameter CRecipe::GetRecipePar(CString ParName)
|
|
|
|
|
{
|
|
|
|
|
CRecipeParameter Par;
|
|
|
|
|
vector<CRecipeParameter> &RecipeParVec = GetRecipeParVec();
|
|
|
|
|
int size = RecipeParVec.size();
|
|
|
|
|
for(int i=0;i<size;i++)
|
|
|
|
|
{
|
|
|
|
|
CRecipeParameter &RecipePar = RecipeParVec[i];
|
|
|
|
|
if(RecipePar.m_ParName == ParName)
|
|
|
|
|
{
|
|
|
|
|
Par = RecipePar;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return Par;
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>
|
|
|
|
|
void CRecipe::SetRecipePar(CString ParName,CRecipeParameter Par)
|
|
|
|
|
{
|
|
|
|
|
vector<CRecipeParameter> &RecipeParVec = GetRecipeParVec();
|
|
|
|
|
int size = RecipeParVec.size();
|
|
|
|
|
for(int i=0;i<size;i++)
|
|
|
|
|
{
|
|
|
|
|
CRecipeParameter &RecipePar = RecipeParVec[i];
|
|
|
|
|
if(RecipePar.m_ParName == ParName)
|
|
|
|
|
{
|
|
|
|
|
RecipePar = Par;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Χ
|
|
|
|
|
bool CRecipe::CheckParRange(bool bShowMsg)
|
|
|
|
|
{
|
|
|
|
|
gLogMgr->WriteDebugLog("Func---->Check Recipe Par Range");
|
|
|
|
|
vector<CRecipeParameter> &RecipeParVec = GetRecipeParVec();
|
|
|
|
|
int size = RecipeParVec.size();
|
|
|
|
|
for(int i=0;i<m_DoubleValCnt;i++)
|
|
|
|
|
{
|
|
|
|
|
CRecipeParameter &RecipePar = RecipeParVec[i];
|
|
|
|
|
if(!CheckParRangeExt(RecipePar,RecipePar.m_ParDoubleVal,bShowMsg))
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
bool CRecipe::CheckParRangeExt(CRecipeParameter &RecipePar,double ParVal,bool bShowMsg)
|
|
|
|
|
{
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>ʹ<EFBFBD><CAB9><EFBFBD>ļ<EFBFBD><C4BC>еIJ<D0B5><C4B2><EFBFBD>
|
|
|
|
|
double DoubleMaxVal = gCommonParaMgr->GetCommonParaVal(RecipePar.m_ParName);
|
|
|
|
|
if(IsDbEqualZero(DoubleMaxVal))
|
|
|
|
|
DoubleMaxVal = RecipePar.m_DoubleMaxVal;
|
|
|
|
|
|
|
|
|
|
if(ParVal<RecipePar.m_DoubleMinVal || ParVal>DoubleMaxVal)
|
|
|
|
|
{
|
|
|
|
|
CString s,s1;
|
|
|
|
|
s += "[";
|
|
|
|
|
s += RecipePar.m_ParShowName;
|
|
|
|
|
s += "]";
|
|
|
|
|
s1.Format(" : %.2f",ParVal);
|
|
|
|
|
s += s1;
|
|
|
|
|
s1.Format("\n<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Χ[%.2f~%.2f]",RecipePar.m_DoubleMinVal,DoubleMaxVal);
|
|
|
|
|
s += s1;
|
|
|
|
|
if(bShowMsg)
|
|
|
|
|
{
|
|
|
|
|
CMsgBox MsgBox;
|
|
|
|
|
MsgBox.Show(s);
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>ParName <20><><EFBFBD><EFBFBD><EFBFBD>ķ<EFBFBD>Χ
|
|
|
|
|
bool CRecipe::CheckParRangeByName(CString ParName,double val)
|
|
|
|
|
{
|
|
|
|
|
CRecipeParameter RecipePar = GetRecipePar(ParName);
|
|
|
|
|
return CheckParRangeExt(RecipePar,val,true);
|
|
|
|
|
}
|
|
|
|
|
//<2F><>ȡ<EFBFBD><C8A1>ʾ<EFBFBD>õ<EFBFBD><C3B5><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
CString CRecipe::GetShowName()
|
|
|
|
|
{
|
|
|
|
|
CString s("<EFBFBD><EFBFBD>");
|
|
|
|
|
if(m_GroupIdx>=0 && m_RecipeIdx>=0)
|
|
|
|
|
{
|
|
|
|
|
s.Format("[%d][%d]",m_GroupIdx+1,m_RecipeIdx+1);
|
|
|
|
|
s += m_RecipeName;
|
|
|
|
|
}
|
|
|
|
|
else//<2F>ָ<EFBFBD><D6B8><EFBFBD>recipe
|
|
|
|
|
{
|
|
|
|
|
s = "Recover : "+m_RecipeName;
|
|
|
|
|
}
|
|
|
|
|
return s;
|
|
|
|
|
}
|
|
|
|
|
void CRecipe::AddSubRecipe(CString SubRecipeName)
|
|
|
|
|
{
|
|
|
|
|
int size = m_SubRecipeVec.size();
|
|
|
|
|
if(size>0)
|
|
|
|
|
{
|
|
|
|
|
CSubRecipe SubRecipe = m_SubRecipeVec[m_CurSubRecipeIdx];//<2F>õ<EFBFBD>ǰѡ<C7B0><D1A1><EFBFBD><EFBFBD>sub recipe <20><><EFBFBD>и<EFBFBD><D0B8><EFBFBD>
|
|
|
|
|
SubRecipe.m_SubRecipeName = SubRecipeName;
|
|
|
|
|
m_SubRecipeVec.push_back(SubRecipe);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
void CRecipe::DelSubRecipe(CString SubRecipeName)
|
|
|
|
|
{
|
|
|
|
|
int size = m_SubRecipeVec.size();
|
|
|
|
|
if(m_SubRecipeVec.size()>1)//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϲ<EFBFBD><CFB2><EFBFBD>ɾ<EFBFBD><C9BE>
|
|
|
|
|
{
|
|
|
|
|
vector<CSubRecipe>::iterator iter = m_SubRecipeVec.begin();
|
|
|
|
|
vector<CSubRecipe>::iterator iter_end = m_SubRecipeVec.end();
|
|
|
|
|
for(;iter!=iter_end;iter++)
|
|
|
|
|
{
|
|
|
|
|
if((*iter).m_SubRecipeName == SubRecipeName)
|
|
|
|
|
{
|
|
|
|
|
m_SubRecipeVec.erase(iter);
|
|
|
|
|
m_CurSubRecipeIdx = 0;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CString CRecipe::GetCurSubRecipeName()
|
|
|
|
|
{
|
|
|
|
|
CString RecipeName;
|
|
|
|
|
if(m_CurSubRecipeIdx>=0 && m_CurSubRecipeIdx<m_SubRecipeVec.size())
|
|
|
|
|
{
|
|
|
|
|
RecipeName = m_SubRecipeVec[m_CurSubRecipeIdx].m_SubRecipeName;
|
|
|
|
|
}
|
|
|
|
|
return RecipeName;
|
|
|
|
|
}
|
|
|
|
|
void CRecipe::SetCurSubRecipeName(CString Name)
|
|
|
|
|
{
|
|
|
|
|
if(m_CurSubRecipeIdx>=0 && m_CurSubRecipeIdx<m_SubRecipeVec.size())
|
|
|
|
|
{
|
|
|
|
|
m_SubRecipeVec[m_CurSubRecipeIdx].m_SubRecipeName = Name;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//<2F><>ȡOffsetTable <20><><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6>SubRecipe
|
|
|
|
|
bool CRecipe::ReadOffsetTableFile(CString TableName)
|
|
|
|
|
{
|
|
|
|
|
CString TableFilePath = gRecipeMgr->GetOffsetTablePath(TableName);
|
|
|
|
|
CSubRecipe &SubRecipe = m_SubRecipeVec[m_CurSubRecipeIdx];
|
|
|
|
|
bool Ret = SubRecipe.m_OffsetTable.ReadOffsetTableFile(TableFilePath);
|
|
|
|
|
if(TableName==RECIPE_OFFSET_TBL_NULL)
|
|
|
|
|
Ret = true;
|
|
|
|
|
return Ret;
|
|
|
|
|
}
|
|
|
|
|
//<2F><>ȡOffsetTableָ<65><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
double CRecipe::GetOffsetParVal(CString ParName)
|
|
|
|
|
{
|
|
|
|
|
CSubRecipe &SubRecipe = m_SubRecipeVec[m_CurSubRecipeIdx];
|
|
|
|
|
return SubRecipe.m_OffsetTable.GetOffsetParVal(ParName);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CRecipeMgr *gRecipeMgr = new CRecipeMgr;
|
|
|
|
|
CRecipeMgr::CRecipeMgr(void)
|
|
|
|
|
{
|
|
|
|
|
m_CurSelGroupIdx = 0;//<2F><>ǰѡ<C7B0><D1A1><EFBFBD><EFBFBD>gourp <20><><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
m_CurSelRecipeIdx = 0;//<2F><>ǰѡ<C7B0><D1A1><EFBFBD><EFBFBD>recipe <20><><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
m_CurSelRecipeParIdx = -1;//<2F><>ǰѡ<C7B0><D1A1><EFBFBD><EFBFBD>par <20><><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
m_pRecipeGroupComb = NULL;
|
|
|
|
|
|
|
|
|
|
m_FocusAdjustMin = 0;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Χ<EFBFBD><CEA7>Сֵ
|
|
|
|
|
m_FocusAdjustMax = 0;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Χ<EFBFBD><CEA7><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
CRecipeMgr::~CRecipeMgr(void)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
void CRecipeMgr::OnAppInitialize()
|
|
|
|
|
{
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>recipe Ŀ¼
|
|
|
|
|
CreatRecipeFilePath();
|
|
|
|
|
//<2F><>ʼ<EFBFBD><CABC>recipe dlg
|
|
|
|
|
CDlgChildRecipe *pDlg = dynamic_cast<CDlgChildRecipe*>(gChildRecipe);
|
|
|
|
|
pDlg->InitDialogItem();
|
|
|
|
|
}
|
|
|
|
|
//<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>list <20>ļ<EFBFBD>·<EFBFBD><C2B7>
|
|
|
|
|
CString CRecipeMgr::GetRecipeNameListPath()
|
|
|
|
|
{
|
|
|
|
|
CFileMgr FileMgr;
|
|
|
|
|
CString FilePath;
|
|
|
|
|
FileMgr.GetFullFilePath(FilePath,RECIPE_GROUP_NAME_FILE);//<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>·<EFBFBD><C2B7>
|
|
|
|
|
return FilePath;
|
|
|
|
|
}
|
|
|
|
|
//<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><C2B7>GroupIdx(0~RECIPE_GROUP_CNT)
|
|
|
|
|
CString CRecipeMgr::GetGroupDirPath(int GroupIdx)
|
|
|
|
|
{
|
|
|
|
|
CFileMgr FileMgr;
|
|
|
|
|
CString FilePath;
|
|
|
|
|
CString GroupDirName;
|
|
|
|
|
GroupDirName.Format("ParGroup%d\\",GroupIdx);
|
|
|
|
|
GroupDirName = RECIPE_FILE_PATH + GroupDirName;
|
|
|
|
|
FileMgr.GetFullFilePath(FilePath,GroupDirName);//<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>·<EFBFBD><C2B7>
|
|
|
|
|
return FilePath;
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD>õ<EFBFBD>ǰѡ<C7B0>е<EFBFBD>Recipe <20><><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
void CRecipeMgr::SetCurSelRecipeIdx(int Idx)
|
|
|
|
|
{
|
|
|
|
|
int size = m_CurGroupRecipeVec.size();
|
|
|
|
|
if(Idx>=0 && Idx<size)
|
|
|
|
|
{
|
|
|
|
|
m_CurSelRecipeIdx = Idx;
|
|
|
|
|
CString s;
|
|
|
|
|
s.Format("SetCurSelRecipeIdx : %d",Idx+1);
|
|
|
|
|
gLogMgr->WriteDebugLog(s);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#if 1
|
|
|
|
|
//<2F><><EFBFBD>浱ǰѡ<C7B0><D1A1><EFBFBD><EFBFBD>Recipe
|
|
|
|
|
void CRecipeMgr::SaveCurSelRecipe(CRecipe Recipe)
|
|
|
|
|
{
|
|
|
|
|
int size = m_CurGroupRecipeVec.size();
|
|
|
|
|
if(m_CurSelRecipeIdx>=0 && m_CurSelRecipeIdx<size)
|
|
|
|
|
{
|
|
|
|
|
m_CurGroupRecipeVec[m_CurSelRecipeIdx] = Recipe;
|
|
|
|
|
//<2F><>ȡRecipe <20><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>·<EFBFBD><C2B7>
|
|
|
|
|
CString ParPath = GetRecipeFilePath(m_CurSelGroupIdx,m_CurSelRecipeIdx);
|
|
|
|
|
Recipe.SaveRecipeParToFile(ParPath);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//<2F><>ȡRecipe <20><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>·<EFBFBD><C2B7>
|
|
|
|
|
CString CRecipeMgr::GetRecipeFilePath(int GroupIdx,int RecipeIdx)
|
|
|
|
|
{
|
|
|
|
|
//д<>뵽<EFBFBD>ļ<EFBFBD>
|
|
|
|
|
CFileMgr FileMgr;
|
|
|
|
|
CString DirPath = GetGroupDirPath(GroupIdx);
|
|
|
|
|
CString FilePath;
|
|
|
|
|
FilePath.Format("RecipePar%d.rcp",RecipeIdx);
|
|
|
|
|
FilePath = DirPath+FilePath;
|
|
|
|
|
return FilePath;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//<2F><>ȡ<EFBFBD><C8A1>ǰѡ<C7B0><D1A1><EFBFBD><EFBFBD>group <20><><EFBFBD><EFBFBD>
|
|
|
|
|
CString CRecipeMgr::GetCurSelGroupName()
|
|
|
|
|
{
|
|
|
|
|
return m_RecipeGroupNameVec[m_CurSelGroupIdx];
|
|
|
|
|
}
|
|
|
|
|
//<2F><>ȡ<EFBFBD><C8A1>ǰѡ<C7B0><D1A1><EFBFBD><EFBFBD>group recipe <20>ַ<EFBFBD><D6B7><EFBFBD>
|
|
|
|
|
CString CRecipeMgr::GetSelGroupRecipeStr()
|
|
|
|
|
{
|
|
|
|
|
CString Num1,Num2;
|
|
|
|
|
Num1.Format("<%d>",m_CurSelGroupIdx+1);
|
|
|
|
|
Num2.Format("<%d>",m_CurSelRecipeIdx+1);
|
|
|
|
|
CString GroupRecipeStr;
|
|
|
|
|
GroupRecipeStr += Num1;
|
|
|
|
|
GroupRecipeStr += m_RecipeGroupNameVec[m_CurSelGroupIdx];
|
|
|
|
|
GroupRecipeStr += Num2;
|
|
|
|
|
GroupRecipeStr += m_CurGroupRecipeVec[m_CurSelRecipeIdx].m_RecipeName;
|
|
|
|
|
return GroupRecipeStr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰrecipe <20><>ɨ<EFBFBD><C9A8>·<EFBFBD><C2B7>
|
|
|
|
|
void CRecipeMgr::CreatRecipeScanPath(CRecipe *pRecipe,int SubRecipeIdx)
|
|
|
|
|
{
|
|
|
|
|
pRecipe->SetCurSubRecipeIdx(SubRecipeIdx);//<2F><><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>ǰ<EFBFBD><C7B0>SubRecipeIdx
|
|
|
|
|
CRecipeParameter RecipePar;
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>ɨ<EFBFBD><C9A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
CString AreaName;
|
|
|
|
|
RecipePar = pRecipe->GetRecipePar(RECIPE_PAR_NAME_SCAN_AREA);
|
|
|
|
|
AreaName = RecipePar.m_ParStrVal;
|
|
|
|
|
if(!gWaferRecipeDataMgr->SelScanAreaByName(AreaName))
|
|
|
|
|
{
|
|
|
|
|
CString Msg("ɨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: ");
|
|
|
|
|
Msg += AreaName;
|
|
|
|
|
CExceptionMsg ExceptionMsg;
|
|
|
|
|
ExceptionMsg.SetMsg(Msg);
|
|
|
|
|
throw ExceptionMsg;
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>ɨ<EFBFBD><C9A8>·<EFBFBD><C2B7>
|
|
|
|
|
int AreaIdx;
|
|
|
|
|
RecipePar = pRecipe->GetRecipePar(RECIPE_PAR_NAME_AREA_IDX);
|
|
|
|
|
AreaIdx = RecipePar.m_ParIntVal-1;
|
|
|
|
|
gWaferRecipeDataMgr->CreatScanPath(AreaIdx);
|
|
|
|
|
|
|
|
|
|
m_pView->RefreshView();
|
|
|
|
|
}
|
|
|
|
|
void CRecipeMgr::CreatScanPath(CString AreaName,int AreaIdx)
|
|
|
|
|
{
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>·<EFBFBD><C2B7>
|
|
|
|
|
if(!gWaferRecipeDataMgr->SelScanAreaByName(AreaName))
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>ɨ<EFBFBD><C9A8>·<EFBFBD><C2B7>
|
|
|
|
|
gWaferRecipeDataMgr->CreatScanPath(AreaIdx);
|
|
|
|
|
//Ĭ<><C4AC>ѡ<EFBFBD><D1A1>area
|
|
|
|
|
//CObjContainer &ObjContainer = gLayer.GetObjContainer();
|
|
|
|
|
//ObjContainer.SelObjByIdx(AreaIdx);
|
|
|
|
|
m_pView->RefreshView();
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if 1
|
|
|
|
|
#if 1
|
|
|
|
|
CString CRecipeMgr::GetRecipePath()
|
|
|
|
|
{
|
|
|
|
|
CString DirPath = gProgramLaserTuiHuo->GetLaipuLaserDataDir(NEW_RECIPE_FILE_PATH);
|
|
|
|
|
return DirPath;
|
|
|
|
|
}
|
|
|
|
|
void CRecipeMgr::CreatRecipeFilePath()
|
|
|
|
|
{
|
|
|
|
|
CString DirPath = GetRecipePath();
|
|
|
|
|
CFileMgr FileMgr;
|
|
|
|
|
if(!FileMgr.IsDirectoryExists(DirPath))
|
|
|
|
|
FileMgr.CreatDir(DirPath);
|
|
|
|
|
DirPath += "\\";
|
|
|
|
|
}
|
|
|
|
|
//<2F><>ȡ<EFBFBD><C8A1>Recipe<70>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><C2B7>(<28><><EFBFBD><EFBFBD>RecipeName <20><EFBFBD>)
|
|
|
|
|
CString CRecipeMgr::GetCtrlRecipeFilePath(CString GroupName,CString RecipeName)
|
|
|
|
|
{
|
|
|
|
|
CString Path = GetRecipePath();
|
|
|
|
|
Path += GroupName;
|
|
|
|
|
Path += "\\";
|
|
|
|
|
Path += RecipeName;
|
|
|
|
|
Path += ".";
|
|
|
|
|
Path += RECIPE_FILE_SUFFIX;
|
|
|
|
|
return Path;
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
#if 1
|
|
|
|
|
//<2F><><EFBFBD>õ<EFBFBD>ǰѡ<C7B0>е<EFBFBD>group <20><><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
void CRecipeMgr::SetCurSelGourpIdx(int Idx)
|
|
|
|
|
{
|
|
|
|
|
int size = m_NewRecipeGroupNameVec.size();
|
|
|
|
|
if(Idx>=0 && Idx<size)
|
|
|
|
|
{
|
|
|
|
|
m_CurSelGroupName = m_NewRecipeGroupNameVec[Idx];
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
m_CurSelGroupName = "";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//<2F>Ƿ<EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD>˱༭<CBB1><E0BCAD>recipe
|
|
|
|
|
bool CRecipeMgr::IsbSelEditRecipe()
|
|
|
|
|
{
|
|
|
|
|
return (m_CurSelRecipeName!="");
|
|
|
|
|
}
|
|
|
|
|
void CRecipeMgr::RecipeCtrlInit(CRecipeCtrlItem &CtrlItem)
|
|
|
|
|
{
|
|
|
|
|
CString &EditName1 = *(CtrlItem.m_EditName1);
|
|
|
|
|
CString &EditName2 = *(CtrlItem.m_EditName2);
|
|
|
|
|
ERecipeCtrlType RecipeCtrlType = GetCurRecipeCtrlType();
|
|
|
|
|
int size = 0;
|
|
|
|
|
switch(RecipeCtrlType)
|
|
|
|
|
{
|
|
|
|
|
case _RecipeCtrl_AddGroup:
|
|
|
|
|
CtrlItem.m_DlgTitle = "Add Recipe Group";
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeCtrl_DelGroup:
|
|
|
|
|
CtrlItem.m_DlgTitle = "Delete Recipe Group";
|
|
|
|
|
EditName2 = m_CurSelGroupName;
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeCtrl_GroupName:
|
|
|
|
|
EditName1 = m_CurSelGroupName;
|
|
|
|
|
EditName2 = m_CurSelGroupName;
|
|
|
|
|
CtrlItem.m_DlgTitle = "Recipe Group ReName";
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeCtrl_RecipeName:
|
|
|
|
|
CtrlItem.m_DlgTitle = "Recipe ReName";
|
|
|
|
|
EditName1 = m_CurSelRecipeName;
|
|
|
|
|
EditName2 = m_CurSelRecipeName;
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeCtrl_AddRecipe:
|
|
|
|
|
CtrlItem.m_DlgTitle = "Add Recipe";
|
|
|
|
|
UpdateRecipeGroupComb(CtrlItem.m_RecipeCtrlGroupComb);
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeCtrl_MoveRecipe:
|
|
|
|
|
CtrlItem.m_DlgTitle = "Move Recipe";
|
|
|
|
|
UpdateRecipeGroupComb(CtrlItem.m_RecipeCtrlGroupComb);
|
|
|
|
|
EditName2 = m_CurSelRecipeName;
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeCtrl_CopyRecipe:
|
|
|
|
|
CtrlItem.m_DlgTitle = "Copy Recipe";
|
|
|
|
|
EditName1 = m_CurSelRecipeName;
|
|
|
|
|
EditName2 = m_CurSelRecipeName+"-Copy";
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeCtrl_DelRecipe:
|
|
|
|
|
CtrlItem.m_DlgTitle = "Delete Recipe";
|
|
|
|
|
EditName1 = m_CurSelGroupName;
|
|
|
|
|
EditName2 = m_CurSelRecipeName;
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeCtrl_AddSubRecipe:
|
|
|
|
|
{
|
|
|
|
|
CtrlItem.m_DlgTitle = "Add Sub Recipe";
|
|
|
|
|
vector<CSubRecipe> &SubRecipeVec = m_CurEditRecipe.GetSubRecipeVec();
|
|
|
|
|
CString Name;
|
|
|
|
|
Name.Format("SubRecipe%ld",SubRecipeVec.size()+1);
|
|
|
|
|
EditName1 = m_CurSelRecipeName;
|
|
|
|
|
EditName2 = Name;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeCtrl_DelSubRecipe:
|
|
|
|
|
{
|
|
|
|
|
CtrlItem.m_DlgTitle = "Delete Sub Recipe";
|
|
|
|
|
vector<CSubRecipe> &SubRecipeVec = m_CurEditRecipe.GetSubRecipeVec();
|
|
|
|
|
EditName1 = m_CurSelRecipeName;
|
|
|
|
|
EditName2 = SubRecipeVec[m_CurEditRecipe.m_CurSubRecipeIdx].m_SubRecipeName;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeCtrl_SubRecipeName:
|
|
|
|
|
{
|
|
|
|
|
CtrlItem.m_DlgTitle = "Sub Recipe ReName";
|
|
|
|
|
vector<CSubRecipe> &SubRecipeVec = m_CurEditRecipe.GetSubRecipeVec();
|
|
|
|
|
EditName1 = SubRecipeVec[m_CurEditRecipe.m_CurSubRecipeIdx].m_SubRecipeName;
|
|
|
|
|
EditName2 = EditName1;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>
|
|
|
|
|
void CRecipeMgr::BindingRecipeGroupComb(CComboBox *p)
|
|
|
|
|
{
|
|
|
|
|
m_pRecipeGroupComb = p;
|
|
|
|
|
UpdateRecipeGroupVec();
|
|
|
|
|
UpdateRecipeGroupComb(m_pRecipeGroupComb);
|
|
|
|
|
};
|
|
|
|
|
//ˢ<><CBA2>RecipeGroup <20><>Ϣ
|
|
|
|
|
void CRecipeMgr::UpdateRecipeGroupInfo()
|
|
|
|
|
{
|
|
|
|
|
UpdateRecipeGroupVec();
|
|
|
|
|
UpdateRecipeGroupComb(m_pRecipeGroupComb);
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD><D0B1><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
void CRecipeMgr::UpdateRecipeGroupVec()
|
|
|
|
|
{
|
|
|
|
|
m_NewRecipeGroupNameVec.clear();
|
|
|
|
|
CString DirPath = GetRecipePath();
|
|
|
|
|
CFileMgr FileMgr;
|
|
|
|
|
vector<CString> FilePathVec;
|
|
|
|
|
FileMgr.GetChildFileOrDirName(true,GetRecipePath(),FilePathVec,"");
|
|
|
|
|
int size = FilePathVec.size();
|
|
|
|
|
for(int k=0;k<size;k++)
|
|
|
|
|
{
|
|
|
|
|
CString GroupName = FileMgr.GetFileNameFromPath(FilePathVec[k],true);
|
|
|
|
|
m_NewRecipeGroupNameVec.push_back(GroupName);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
void CRecipeMgr::UpdatParBoolComb(CComboBox &Comb)
|
|
|
|
|
{
|
|
|
|
|
Comb.ResetContent();//<2F><><EFBFBD><EFBFBD>
|
|
|
|
|
Comb.InsertString(0,BOOL_STR_ON);
|
|
|
|
|
Comb.InsertString(1,BOOL_STR_OFF);
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>
|
|
|
|
|
void CRecipeMgr::UpdateRecipeGroupComb(CComboBox *pComb)
|
|
|
|
|
{
|
|
|
|
|
if(!pComb)
|
|
|
|
|
return;
|
|
|
|
|
CComboBox &ComboBox = *pComb;
|
|
|
|
|
ComboBox.ResetContent();//<2F><><EFBFBD><EFBFBD>
|
|
|
|
|
int idx = -1;
|
|
|
|
|
int size = m_NewRecipeGroupNameVec.size();
|
|
|
|
|
for(int k=0;k<size;k++)
|
|
|
|
|
{
|
|
|
|
|
ComboBox.InsertString(k,m_NewRecipeGroupNameVec[k]);
|
|
|
|
|
if(m_CurSelGroupName == m_NewRecipeGroupNameVec[k])
|
|
|
|
|
idx = k;
|
|
|
|
|
}
|
|
|
|
|
if(idx>=0)
|
|
|
|
|
ComboBox.SetCurSel(idx);
|
|
|
|
|
}
|
|
|
|
|
void CRecipeMgr::UpdateSelRecipeComb(CComboBox &ComboBox,vector<CString> &SelGroupRecipeNameVec)
|
|
|
|
|
{
|
|
|
|
|
ComboBox.ResetContent();//<2F><><EFBFBD><EFBFBD>
|
|
|
|
|
//<2F>ӵ<EFBFBD>ǰѡ<C7B0>е<EFBFBD>recipe Ŀ¼<C4BF><C2BC>ȡrecipe <20>ļ<EFBFBD><C4BC>б<EFBFBD>
|
|
|
|
|
ReadCurGroupRecipeName(SelGroupRecipeNameVec);
|
|
|
|
|
int size = SelGroupRecipeNameVec.size();
|
|
|
|
|
for(int k=0;k<size;k++)
|
|
|
|
|
{
|
|
|
|
|
ComboBox.InsertString(k,SelGroupRecipeNameVec[k]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
void CRecipeMgr::UpdateSelSubRecipeComb(CComboBox &ComboBox,CRecipe Recipe)
|
|
|
|
|
{
|
|
|
|
|
ComboBox.ResetContent();//<2F><><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
vector<CSubRecipe> &SubRecipeVec = Recipe.GetSubRecipeVec();
|
|
|
|
|
int size = SubRecipeVec.size();
|
|
|
|
|
for(int k=0;k<size;k++)
|
|
|
|
|
{
|
|
|
|
|
ComboBox.InsertString(k,SubRecipeVec[k].m_SubRecipeName);
|
|
|
|
|
}
|
|
|
|
|
ComboBox.SetCurSel(0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CRecipeMgr::InitGroupRecipeList(CListCtrl &List)
|
|
|
|
|
{
|
|
|
|
|
//<2F><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>
|
|
|
|
|
List.SetExtendedStyle(LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES);
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
int idx = 0;
|
|
|
|
|
List.InsertColumn(idx,"Idx",LVCFMT_LEFT,50,-1);
|
|
|
|
|
idx++;
|
|
|
|
|
List.InsertColumn(idx,"Recipe Name",LVCFMT_LEFT,300,-1);
|
|
|
|
|
idx++;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
void CRecipeMgr::InitEditSubRecipeList(CListCtrl &List)
|
|
|
|
|
{
|
|
|
|
|
//<2F><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>
|
|
|
|
|
List.SetExtendedStyle(LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES);
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
int idx = 0;
|
|
|
|
|
List.InsertColumn(idx,"Idx",LVCFMT_LEFT,50,-1);
|
|
|
|
|
idx++;
|
|
|
|
|
List.InsertColumn(idx,"Sub Recipe Name",LVCFMT_LEFT,430,-1);
|
|
|
|
|
idx++;
|
|
|
|
|
}
|
|
|
|
|
void CRecipeMgr::InitEditRecipeList(CListCtrl &List,bool bShowParRange)
|
|
|
|
|
{
|
|
|
|
|
//<2F><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD>
|
|
|
|
|
List.SetExtendedStyle(LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES);
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
int idx = 0;
|
|
|
|
|
List.InsertColumn(idx,"Idx",LVCFMT_CENTER,35,-1);
|
|
|
|
|
idx++;
|
|
|
|
|
List.InsertColumn(idx,"ParName",LVCFMT_LEFT,135,-1);
|
|
|
|
|
idx++;
|
|
|
|
|
List.InsertColumn(idx,"Type",LVCFMT_CENTER,80,-1);
|
|
|
|
|
idx++;
|
|
|
|
|
if(bShowParRange)
|
|
|
|
|
{
|
|
|
|
|
List.InsertColumn(idx,"Min",LVCFMT_CENTER,80,-1);
|
|
|
|
|
idx++;
|
|
|
|
|
List.InsertColumn(idx,"Max",LVCFMT_CENTER,80,-1);
|
|
|
|
|
idx++;
|
|
|
|
|
}
|
|
|
|
|
List.InsertColumn(idx,"Unit",LVCFMT_CENTER,80,-1);
|
|
|
|
|
idx++;
|
|
|
|
|
List.InsertColumn(idx,"Value",LVCFMT_LEFT,250,-1);
|
|
|
|
|
idx++;
|
|
|
|
|
}
|
|
|
|
|
void CRecipeMgr::UpdateGroupRecipeList(CListCtrl &List)
|
|
|
|
|
{
|
|
|
|
|
//<2F>ӵ<EFBFBD>ǰѡ<C7B0>е<EFBFBD>recipe Ŀ¼<C4BF><C2BC>ȡrecipe <20>ļ<EFBFBD><C4BC>б<EFBFBD>
|
|
|
|
|
ReadCurGroupRecipeName(m_CurSelGroupRecipeNameVec);
|
|
|
|
|
List.DeleteAllItems();
|
|
|
|
|
int size = m_CurSelGroupRecipeNameVec.size();
|
|
|
|
|
for(int k=0;k<size;k++)
|
|
|
|
|
{
|
|
|
|
|
int idx = 0;
|
|
|
|
|
List.InsertItem(k," ");//<2F><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
|
|
|
|
|
List.SetItemText(k,idx++,Int2CString(k+1));//<2F><><EFBFBD><EFBFBD>
|
|
|
|
|
CString RecipeName = m_CurSelGroupRecipeNameVec[k];
|
|
|
|
|
RecipeName += ".";
|
|
|
|
|
RecipeName += RECIPE_FILE_SUFFIX;
|
|
|
|
|
List.SetItemText(k,idx++,m_CurSelGroupRecipeNameVec[k]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
void CRecipeMgr::UpdateEditSubRecipeList(CListCtrl &List)
|
|
|
|
|
{
|
|
|
|
|
List.DeleteAllItems();
|
|
|
|
|
if(!IsbSelEditRecipe())
|
|
|
|
|
return;
|
|
|
|
|
vector<CSubRecipe> &SubRecipeVec = m_CurEditRecipe.GetSubRecipeVec();
|
|
|
|
|
int size = SubRecipeVec.size();
|
|
|
|
|
for(int k=0;k<size;k++)
|
|
|
|
|
{
|
|
|
|
|
int idx = 0;
|
|
|
|
|
List.InsertItem(k," ");//<2F><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
|
|
|
|
|
List.SetItemText(k,idx++,Int2CString(k+1));//<2F><><EFBFBD><EFBFBD>
|
|
|
|
|
List.SetItemText(k,idx++,SubRecipeVec[k].m_SubRecipeName);
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
List.SetItemState(m_CurEditRecipe.m_CurSubRecipeIdx,LVIS_FOCUSED | LVIS_SELECTED,LVIS_FOCUSED | LVIS_SELECTED);
|
|
|
|
|
}
|
|
|
|
|
void CRecipeMgr::UpdateEditRecipeList(CListCtrl &RecipeList,CListCtrl &RecipeInfoList,bool bResetErrRangeParIdxSet)
|
|
|
|
|
{
|
|
|
|
|
RecipeInfoList.DeleteAllItems();
|
|
|
|
|
if(bResetErrRangeParIdxSet)
|
|
|
|
|
{
|
|
|
|
|
RecipeList.DeleteAllItems();
|
|
|
|
|
ResetParIdxSet();
|
|
|
|
|
}
|
|
|
|
|
if(!IsbSelEditRecipe())//û<><C3BB>ѡ<EFBFBD><D1A1>Ҫ<EFBFBD>༭<EFBFBD><E0BCAD>Recipe
|
|
|
|
|
return;
|
|
|
|
|
//<2F><><EFBFBD>¼<EFBFBD><C2BC>⽹<EFBFBD><E2BDB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>config,<2C><><EFBFBD>㽹<EFBFBD><E3BDB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Χ
|
|
|
|
|
UpdateLaserFocusProp();
|
|
|
|
|
//<2F><><EFBFBD>µ<EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
UpdateInvalidParIdxSet(m_CurEditRecipe);
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>recipe <20>ķ<EFBFBD><C4B7><EFBFBD><EFBFBD>ò<EFBFBD><C3B2><EFBFBD>
|
|
|
|
|
UpdateRecipeInfoPar(m_CurEditRecipe);
|
|
|
|
|
|
|
|
|
|
vector<CRecipeParameter> &RecipeParVec = m_CurEditRecipe.GetRecipeParVec();
|
|
|
|
|
int size = RecipeParVec.size();
|
|
|
|
|
if(size<=0)
|
|
|
|
|
return;
|
|
|
|
|
int RecipeListIdx = 0;
|
|
|
|
|
int RecipeInfoListIdx = 0;
|
|
|
|
|
for(int k=0;k<size;k++)
|
|
|
|
|
{
|
|
|
|
|
int idx = 0;
|
|
|
|
|
CRecipeParameter &RecipePar = RecipeParVec[k];
|
|
|
|
|
//<2F>ı佹<C4B1><E4BDB9><EFBFBD><CEA2>ֵ<EFBFBD>ķ<EFBFBD>Χ
|
|
|
|
|
if(RecipePar.m_ParName ==RECIPE_PAR_NAME_FOCUS_ADJUST_VAL)
|
|
|
|
|
{
|
|
|
|
|
RecipePar.m_DoubleMinVal = m_FocusAdjustMin;
|
|
|
|
|
RecipePar.m_DoubleMaxVal= m_FocusAdjustMax;
|
|
|
|
|
}
|
|
|
|
|
CString Min,Max;
|
|
|
|
|
RecipePar.GetRangeStr(Min,Max);
|
|
|
|
|
if(RecipePar.m_bRcpInfoPar)//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
{
|
|
|
|
|
RecipeInfoList.InsertItem(RecipeInfoListIdx," ");//<2F><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
|
|
|
|
|
RecipeInfoList.SetItemText(RecipeInfoListIdx,idx++,Int2CString(RecipeInfoListIdx+1));//<2F><><EFBFBD><EFBFBD>
|
|
|
|
|
RecipeInfoList.SetItemText(RecipeInfoListIdx,idx++,RecipePar.m_ParShowName);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipeInfoList.SetItemText(RecipeInfoListIdx,idx++,RecipePar.GetParTypeStr());//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipeInfoList.SetItemText(RecipeInfoListIdx,idx++,Min);//<2F><>Сֵ
|
|
|
|
|
RecipeInfoList.SetItemText(RecipeInfoListIdx,idx++,Max);//<2F><><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
RecipeInfoList.SetItemText(RecipeInfoListIdx,idx++,RecipePar.m_ParUnit);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ
|
|
|
|
|
RecipeInfoList.SetItemText(RecipeInfoListIdx,idx++,RecipePar.GetParStr());//<2F><><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
RecipeInfoListIdx++;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if(bResetErrRangeParIdxSet)
|
|
|
|
|
{
|
|
|
|
|
RecipeList.InsertItem(RecipeListIdx," ");//<2F><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
|
|
|
|
|
RecipeList.SetItemText(RecipeListIdx,idx++,Int2CString(RecipeListIdx+1));//<2F><><EFBFBD><EFBFBD>
|
|
|
|
|
RecipeList.SetItemText(RecipeListIdx,idx++,RecipePar.m_ParShowName);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipeList.SetItemText(RecipeListIdx,idx++,RecipePar.GetParTypeStr());//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipeList.SetItemText(RecipeListIdx,idx++,Min);//<2F><>Сֵ
|
|
|
|
|
RecipeList.SetItemText(RecipeListIdx,idx++,Max);//<2F><><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
RecipeList.SetItemText(RecipeListIdx,idx++,RecipePar.m_ParUnit);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ
|
|
|
|
|
RecipeList.SetItemText(RecipeListIdx,idx++,RecipePar.GetParStr());//<2F><><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
RecipeListIdx++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
void CRecipeMgr::UpdateEditRecipeListExt(CListCtrl &RecipeList,CRecipe &Recipe)
|
|
|
|
|
{
|
|
|
|
|
RecipeList.DeleteAllItems();
|
|
|
|
|
vector<CRecipeParameter> &RecipeParVec = Recipe.GetRecipeParVec();
|
|
|
|
|
int size = RecipeParVec.size();
|
|
|
|
|
if(size<=0)
|
|
|
|
|
return;
|
|
|
|
|
int RecipeListIdx = 0;
|
|
|
|
|
int RecipeInfoListIdx = 0;
|
|
|
|
|
for(int k=0;k<size;k++)
|
|
|
|
|
{
|
|
|
|
|
int idx = 0;
|
|
|
|
|
CRecipeParameter &RecipePar = RecipeParVec[k];
|
|
|
|
|
CString Min,Max;
|
|
|
|
|
RecipePar.GetRangeStr(Min,Max);
|
|
|
|
|
if(!RecipePar.m_bRcpInfoPar)
|
|
|
|
|
{
|
|
|
|
|
{
|
|
|
|
|
RecipeList.InsertItem(RecipeListIdx," ");//<2F><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
|
|
|
|
|
RecipeList.SetItemText(RecipeListIdx,idx++,Int2CString(RecipeListIdx+1));//<2F><><EFBFBD><EFBFBD>
|
|
|
|
|
RecipeList.SetItemText(RecipeListIdx,idx++,RecipePar.m_ParShowName);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipeList.SetItemText(RecipeListIdx,idx++,RecipePar.GetParTypeStr());//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipeList.SetItemText(RecipeListIdx,idx++,Min);//<2F><>Сֵ
|
|
|
|
|
RecipeList.SetItemText(RecipeListIdx,idx++,Max);//<2F><><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
RecipeList.SetItemText(RecipeListIdx,idx++,RecipePar.m_ParUnit);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ
|
|
|
|
|
RecipeList.SetItemText(RecipeListIdx,idx++,RecipePar.GetParStr());//<2F><><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
RecipeListIdx++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>ֱ༭<D6B1>ͷDZ༭<C7B1><E0BCAD><EFBFBD><EFBFBD>
|
|
|
|
|
void CRecipeMgr::UpdateAllRecipeParToList(CRecipe Recipe,CListCtrl &RecipeList)
|
|
|
|
|
{
|
|
|
|
|
RecipeList.DeleteAllItems();
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>recipe <20>ķ<EFBFBD><C4B7><EFBFBD><EFBFBD>ò<EFBFBD><C3B2><EFBFBD>
|
|
|
|
|
UpdateRecipeInfoPar(Recipe);
|
|
|
|
|
|
|
|
|
|
vector<CRecipeParameter> &RecipeParVec = Recipe.GetRecipeParVec();
|
|
|
|
|
int size = RecipeParVec.size();
|
|
|
|
|
int RecipeListIdx = 0;
|
|
|
|
|
int RecipeInfoListIdx = 0;
|
|
|
|
|
for(int k=0;k<size;k++)
|
|
|
|
|
{
|
|
|
|
|
int idx = 0;
|
|
|
|
|
CRecipeParameter &RecipePar = RecipeParVec[k];
|
|
|
|
|
RecipeList.InsertItem(k," ");//<2F><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
|
|
|
|
|
RecipeList.SetItemText(k,idx++,Int2CString(k+1));//<2F><><EFBFBD><EFBFBD>
|
|
|
|
|
RecipeList.SetItemText(k,idx++,RecipePar.m_ParShowName);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipeList.SetItemText(k,idx++,RecipePar.m_ParUnit);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ
|
|
|
|
|
RecipeList.SetItemText(k,idx++,RecipePar.GetParTypeStr());//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipeList.SetItemText(k,idx++,RecipePar.GetParStr());//<2F><><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>
|
|
|
|
|
void CRecipeMgr::UpdateAreaIdxCombo(CComboBox &AreaIdxComb)
|
|
|
|
|
{
|
|
|
|
|
CObjContainer &ObjContainer = gLayer.GetObjContainer();
|
|
|
|
|
int AreaCnt = ObjContainer.GetScanAreaCnt();
|
|
|
|
|
AreaIdxComb.ResetContent();//<2F><><EFBFBD><EFBFBD>
|
|
|
|
|
int idx = 0;
|
|
|
|
|
for(int k=0;k<AreaCnt;k++)
|
|
|
|
|
{
|
|
|
|
|
CString Str = GetAreaIdxStr(k);
|
|
|
|
|
AreaIdxComb.InsertString(idx++,Str);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
CString CRecipeMgr::GetAreaIdxStr(int k)
|
|
|
|
|
{
|
|
|
|
|
CString Str;
|
|
|
|
|
if(k<9)
|
|
|
|
|
Str.Format("[0%d]",k+1);
|
|
|
|
|
else
|
|
|
|
|
Str.Format("[%d]",k+1);
|
|
|
|
|
Str += "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
|
|
|
|
|
return Str;
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
#if 1
|
|
|
|
|
void CRecipeMgr::AddRecipeGroup(CString GroupName)
|
|
|
|
|
{
|
|
|
|
|
CString GroupPath = GetRecipePath();
|
|
|
|
|
GroupPath += "\\";
|
|
|
|
|
GroupPath += GroupName;
|
|
|
|
|
|
|
|
|
|
CFileMgr FileMgr;
|
|
|
|
|
FileMgr.CreatDir(GroupPath);
|
|
|
|
|
}
|
|
|
|
|
//ɾ<><C9BE>Recipe<70><65>
|
|
|
|
|
void CRecipeMgr::DeleteRecipeGroup(CString GroupName)
|
|
|
|
|
{
|
|
|
|
|
CFileMgr FileMgr;
|
|
|
|
|
CString Path = GetRecipePath();
|
|
|
|
|
Path += GroupName;
|
|
|
|
|
Path += "\\";
|
|
|
|
|
|
|
|
|
|
CWorkTime WorkTime;
|
|
|
|
|
CCsvData CsvData;
|
|
|
|
|
CsvData.AddData("<EFBFBD>û<EFBFBD>",false);
|
|
|
|
|
CsvData.AddData(gAuthorityMgr->GetCurUserName(),true);
|
|
|
|
|
CsvData.AddData("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>",false);
|
|
|
|
|
CsvData.AddData(WorkTime.GetDateTime("/",":"),true);
|
|
|
|
|
CsvData.AddData("Group ·<><C2B7>",false);
|
|
|
|
|
CsvData.AddData(Path,true);
|
|
|
|
|
CsvData.AddData("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",false);
|
|
|
|
|
CsvData.AddData("ɾ<EFBFBD><EFBFBD>recipe group",true);
|
|
|
|
|
|
|
|
|
|
vector<CString> RcpPathVec;
|
|
|
|
|
FileMgr.GetChildFileOrDirName(false,Path,RcpPathVec,RECIPE_FILE_SUFFIX);
|
|
|
|
|
int size1 = RcpPathVec.size();
|
|
|
|
|
for(int i=0;i<size1;i++)
|
|
|
|
|
{
|
|
|
|
|
CString Name = FileMgr.GetFileNameFromPath(RcpPathVec[i],true);
|
|
|
|
|
CsvData.AddData("ɾ<EFBFBD><EFBFBD>recipe ",false);
|
|
|
|
|
CsvData.AddData(Name,true);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CString FileName = WorkTime.GetCurTime("_");
|
|
|
|
|
FileName += "_";
|
|
|
|
|
FileName += GroupName;
|
|
|
|
|
CString DataPath = CreatCurParDataPath();
|
|
|
|
|
FileMgr.WriteDataToExcel(DataPath,FileName,CsvData,false);
|
|
|
|
|
|
|
|
|
|
//ִ<><D6B4>ɾ<EFBFBD><C9BE>
|
|
|
|
|
FileMgr.DeleteFolder(Path);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>recipe
|
|
|
|
|
void CRecipeMgr::AddRecipe(CString GroupName,CString RecipeName)
|
|
|
|
|
{
|
|
|
|
|
if(!CheckRecipeNameExist(RecipeName))
|
|
|
|
|
return;
|
|
|
|
|
CString RecipeFilePath = GetCtrlRecipeFilePath(GroupName,RecipeName);
|
|
|
|
|
gLogMgr->WriteDebugLog(RecipeFilePath);
|
|
|
|
|
|
|
|
|
|
CRecipe Recipe;
|
|
|
|
|
SaveRecipeToXml(RecipeFilePath,Recipe);
|
|
|
|
|
|
|
|
|
|
CRecipeCtrlPar RecipeCtrlPar;
|
|
|
|
|
RecipeCtrlPar.m_CtrlType = _RecipeCtrl_AddRecipe;
|
|
|
|
|
RecipeCtrlPar.m_FilePath = RecipeFilePath;
|
|
|
|
|
RecipeCtrlPar.m_RcpName = RecipeName;
|
|
|
|
|
SaveRecipeHistoy(RecipeCtrlPar);
|
|
|
|
|
}
|
|
|
|
|
//ɾ<><C9BE>Recipe
|
|
|
|
|
void CRecipeMgr::DeletRecipe(CString RecipeName)
|
|
|
|
|
{
|
|
|
|
|
CString Path = GetCtrlRecipeFilePath(m_CurSelGroupName,RecipeName);
|
|
|
|
|
CFileMgr FileMgr;
|
|
|
|
|
FileMgr.DeleteFolder(Path);
|
|
|
|
|
|
|
|
|
|
CRecipeCtrlPar RecipeCtrlPar;
|
|
|
|
|
RecipeCtrlPar.m_CtrlType = _RecipeCtrl_DelRecipe;
|
|
|
|
|
RecipeCtrlPar.m_FilePath = Path;
|
|
|
|
|
RecipeCtrlPar.m_RcpName = RecipeName;
|
|
|
|
|
SaveRecipeHistoy(RecipeCtrlPar);
|
|
|
|
|
}
|
|
|
|
|
//<2F>ƶ<EFBFBD>recipe <20><>GroupName
|
|
|
|
|
void CRecipeMgr::MoveRecipe(CString GroupName,CString RecipeName)
|
|
|
|
|
{
|
|
|
|
|
CString OldPath = GetCtrlRecipeFilePath(m_CurSelGroupName,RecipeName);
|
|
|
|
|
CString NewPath = GetCtrlRecipeFilePath(GroupName,RecipeName);
|
|
|
|
|
CFileMgr FileMgr;
|
|
|
|
|
FileMgr.MoveFolder(OldPath,NewPath);
|
|
|
|
|
|
|
|
|
|
CRecipeCtrlPar RecipeCtrlPar;
|
|
|
|
|
RecipeCtrlPar.m_CtrlType = _RecipeCtrl_MoveRecipe;
|
|
|
|
|
RecipeCtrlPar.m_FilePath = OldPath;
|
|
|
|
|
RecipeCtrlPar.m_NewFilePath = NewPath;
|
|
|
|
|
RecipeCtrlPar.m_RcpName = RecipeName;
|
|
|
|
|
SaveRecipeHistoy(RecipeCtrlPar);
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD>recipe <20><><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0>group
|
|
|
|
|
void CRecipeMgr::CopyRecipe(CString NewRecipeName)
|
|
|
|
|
{
|
|
|
|
|
if(!CheckRecipeNameExist(NewRecipeName))
|
|
|
|
|
return;
|
|
|
|
|
CString OldPath = GetCtrlRecipeFilePath(m_CurSelGroupName,m_CurSelRecipeName);
|
|
|
|
|
CString NewPath = GetCtrlRecipeFilePath(m_CurSelGroupName,NewRecipeName);
|
|
|
|
|
CFileMgr FileMgr;
|
|
|
|
|
FileMgr.CopyFolder(OldPath,NewPath);
|
|
|
|
|
|
|
|
|
|
CRecipeCtrlPar RecipeCtrlPar;
|
|
|
|
|
RecipeCtrlPar.m_CtrlType = _RecipeCtrl_CopyRecipe;
|
|
|
|
|
RecipeCtrlPar.m_FilePath = OldPath;
|
|
|
|
|
RecipeCtrlPar.m_RcpName = m_CurSelRecipeName;
|
|
|
|
|
RecipeCtrlPar.m_RcpNameNew = NewRecipeName;
|
|
|
|
|
SaveRecipeHistoy(RecipeCtrlPar);
|
|
|
|
|
}
|
|
|
|
|
bool CRecipeMgr::ReadEditRecipeFromFile()
|
|
|
|
|
{
|
|
|
|
|
CString RecipeFilePath = GetCtrlRecipeFilePath(m_CurSelGroupName,m_CurSelRecipeName);
|
|
|
|
|
if(ReadRecipeFromXml(RecipeFilePath,m_CurEditRecipe))
|
|
|
|
|
{
|
|
|
|
|
m_CurEditRecipe.m_RecipeName = m_CurSelRecipeName;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
bool CRecipeMgr::ReadEditRecipeFromFile(CRecipe &Recipe,int SelGroupIdx,CString SelRecipeName)
|
|
|
|
|
{
|
|
|
|
|
int size = m_NewRecipeGroupNameVec.size();
|
|
|
|
|
if(SelGroupIdx<0||SelGroupIdx>=size)
|
|
|
|
|
return false;
|
|
|
|
|
CString SelGroupName = m_NewRecipeGroupNameVec[SelGroupIdx];
|
|
|
|
|
CString RecipeFilePath = GetCtrlRecipeFilePath(SelGroupName,SelRecipeName);
|
|
|
|
|
Recipe.m_RecipeName = SelRecipeName;
|
|
|
|
|
return ReadRecipeFromXml(RecipeFilePath,Recipe);
|
|
|
|
|
}
|
|
|
|
|
//<2F>ı<EFBFBD><C4B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
void CRecipeMgr::ChangeGroupName(CString NewGroupName)
|
|
|
|
|
{
|
|
|
|
|
CString OldGroupPath = GetRecipePath();
|
|
|
|
|
CString NewGroupPath = OldGroupPath + NewGroupName;
|
|
|
|
|
OldGroupPath += m_CurSelGroupName;
|
|
|
|
|
CFileMgr FileMgr;
|
|
|
|
|
FileMgr.ReNameFolder(OldGroupPath,NewGroupPath);
|
|
|
|
|
m_CurSelGroupName = NewGroupName;
|
|
|
|
|
m_CurEditRecipe.m_FilePath = GetCtrlRecipeFilePath(m_CurSelGroupName,m_CurSelRecipeName);
|
|
|
|
|
}
|
|
|
|
|
//<2F>ı<EFBFBD>recipe <20><><EFBFBD><EFBFBD>
|
|
|
|
|
void CRecipeMgr::ChangeRecipeName(CString NewRcpName)
|
|
|
|
|
{
|
|
|
|
|
if(!CheckRecipeNameExist(NewRcpName))
|
|
|
|
|
return;
|
|
|
|
|
CString OldPath = GetCtrlRecipeFilePath(m_CurSelGroupName,m_CurSelRecipeName);
|
|
|
|
|
CString NewPath = GetCtrlRecipeFilePath(m_CurSelGroupName,NewRcpName);
|
|
|
|
|
CFileMgr FileMgr;
|
|
|
|
|
FileMgr.ReNameFolder(OldPath,NewPath);
|
|
|
|
|
SetCurSelRecipeName(NewRcpName);
|
|
|
|
|
m_CurEditRecipe.m_FilePath = NewPath;
|
|
|
|
|
}
|
|
|
|
|
//<2F>ı<EFBFBD>SubRecipe <20><><EFBFBD><EFBFBD>
|
|
|
|
|
void CRecipeMgr::ChangeSubRecipeName(CString NewRcpName)
|
|
|
|
|
{
|
|
|
|
|
m_CurEditRecipe.SetCurSubRecipeName(NewRcpName);
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>
|
|
|
|
|
CString RecipeFilePath = GetCtrlRecipeFilePath(m_CurSelGroupName,m_CurEditRecipe.m_RecipeName);
|
|
|
|
|
SaveRecipeToXml(m_CurEditRecipe.m_FilePath,m_CurEditRecipe);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CString CRecipeMgr::GetRecipeCtrlName(ERecipeCtrlType RecipeCtrlType)
|
|
|
|
|
{
|
|
|
|
|
CString CtrlName;
|
|
|
|
|
switch(RecipeCtrlType)
|
|
|
|
|
{
|
|
|
|
|
case _RecipeCtrl_AddGroup:
|
|
|
|
|
CtrlName = "Add Group";
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeCtrl_DelGroup:
|
|
|
|
|
CtrlName = "Delete Group";
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeCtrl_GroupName:
|
|
|
|
|
CtrlName = "Group ReName";
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeCtrl_AddRecipe:
|
|
|
|
|
CtrlName = "Add Recipe";
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeCtrl_DelRecipe:
|
|
|
|
|
CtrlName = "Delete Recipe";
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeCtrl_CopyRecipe:
|
|
|
|
|
CtrlName = "Copy Recipe";
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeCtrl_MoveRecipe:
|
|
|
|
|
CtrlName = "Move Recipe";
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeCtrl_RecipeName:
|
|
|
|
|
CtrlName = "Recipe ReName";
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeCtrl_AddSubRecipe:
|
|
|
|
|
CtrlName = "Add SubRecipe";
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeCtrl_DelSubRecipe:
|
|
|
|
|
CtrlName = "Delete SubRecipe";
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeCtrl_SubRecipeName:
|
|
|
|
|
CtrlName = "SubRecipe ReName";
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
return CtrlName;
|
|
|
|
|
}
|
|
|
|
|
//<2F>ӵ<EFBFBD>ǰѡ<C7B0>е<EFBFBD>recipe Ŀ¼<C4BF><C2BC>ȡrecipe <20>ļ<EFBFBD><C4BC>б<EFBFBD>
|
|
|
|
|
void CRecipeMgr::ReadCurGroupRecipeName(vector<CString> &SelGroupRecipeNameVec)
|
|
|
|
|
{
|
|
|
|
|
SelGroupRecipeNameVec.clear();
|
|
|
|
|
CString RecipePath = GetRecipePath();
|
|
|
|
|
RecipePath += m_CurSelGroupName;
|
|
|
|
|
CFileMgr FileMgr;
|
|
|
|
|
vector<CString> FilePathVec;
|
|
|
|
|
FileMgr.GetChildFileOrDirName(false,RecipePath,FilePathVec,RECIPE_FILE_SUFFIX);
|
|
|
|
|
int size = FilePathVec.size();
|
|
|
|
|
for(int k=0;k<size;k++)
|
|
|
|
|
{
|
|
|
|
|
SelGroupRecipeNameVec.push_back(FileMgr.GetFileNameFromPath(FilePathVec[k],true));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
CString CRecipeMgr::RecipeCtrlExcute(CRecipeCtrlItem &CtrlItem)
|
|
|
|
|
{
|
|
|
|
|
CString CtrlStr;
|
|
|
|
|
CString ErrMsg;
|
|
|
|
|
CString &EditName1 = *(CtrlItem.m_EditName1);
|
|
|
|
|
CString &EditName2 = *(CtrlItem.m_EditName2);
|
|
|
|
|
CString &SelGroupName = CtrlItem.m_SelGroupName;
|
|
|
|
|
|
|
|
|
|
bool bUpdateRecipeGroup = false;
|
|
|
|
|
ERecipeCtrlType RecipeCtrlType = GetCurRecipeCtrlType();
|
|
|
|
|
if(RecipeCtrlType==_RecipeCtrl_AddGroup
|
|
|
|
|
||RecipeCtrlType==_RecipeCtrl_GroupName
|
|
|
|
|
||RecipeCtrlType==_RecipeCtrl_RecipeName
|
|
|
|
|
||RecipeCtrlType==_RecipeCtrl_AddRecipe)
|
|
|
|
|
{
|
|
|
|
|
if(EditName2.Find('.',0)!= -1)
|
|
|
|
|
{
|
|
|
|
|
ErrMsg = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>С<EFBFBD><EFBFBD><EFBFBD><EFBFBD>!";
|
|
|
|
|
return ErrMsg;
|
|
|
|
|
}
|
|
|
|
|
if(EditName2=="")
|
|
|
|
|
{
|
|
|
|
|
ErrMsg = "<EFBFBD><EFBFBD><EFBFBD>벻<EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>!";
|
|
|
|
|
return ErrMsg;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch(RecipeCtrlType)
|
|
|
|
|
{
|
|
|
|
|
case _RecipeCtrl_AddGroup:
|
|
|
|
|
AddRecipeGroup(EditName2);
|
|
|
|
|
CtrlStr = EditName2;
|
|
|
|
|
bUpdateRecipeGroup = true;
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeCtrl_DelGroup:
|
|
|
|
|
DeleteRecipeGroup(EditName2);
|
|
|
|
|
CtrlStr = EditName2;
|
|
|
|
|
bUpdateRecipeGroup = true;
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeCtrl_GroupName:
|
|
|
|
|
ChangeGroupName(EditName2);
|
|
|
|
|
CtrlStr = EditName1 + "->" + EditName2;
|
|
|
|
|
bUpdateRecipeGroup = true;
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeCtrl_RecipeName:
|
|
|
|
|
ChangeRecipeName(EditName2);
|
|
|
|
|
CtrlStr = EditName1 + "->" + EditName2;
|
|
|
|
|
bUpdateRecipeGroup = false;
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeCtrl_AddRecipe:
|
|
|
|
|
AddRecipe(SelGroupName,EditName2);
|
|
|
|
|
CtrlStr = EditName2 + " To Group : " + SelGroupName;
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeCtrl_DelRecipe:
|
|
|
|
|
DeletRecipe(EditName2);
|
|
|
|
|
CtrlStr = EditName2 + "Delete From Group: " + EditName1;
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeCtrl_MoveRecipe:
|
|
|
|
|
MoveRecipe(SelGroupName,EditName2);
|
|
|
|
|
CtrlStr = EditName2 + " To Group : " + SelGroupName;
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeCtrl_CopyRecipe:
|
|
|
|
|
CopyRecipe(EditName2);
|
|
|
|
|
CtrlStr = EditName1 + "Copy To: " + EditName2;
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeCtrl_AddSubRecipe:
|
|
|
|
|
AddSubRecipe(EditName2);
|
|
|
|
|
CtrlStr = EditName2 + " To Recipe : " + EditName1;
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeCtrl_DelSubRecipe:
|
|
|
|
|
DelSubRecipe(EditName2);
|
|
|
|
|
CtrlStr = EditName2 + " From Recipe : " + EditName1;
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeCtrl_SubRecipeName:
|
|
|
|
|
ChangeSubRecipeName(EditName2);
|
|
|
|
|
CtrlStr = EditName1 + "->" + EditName2;
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
if(bUpdateRecipeGroup)
|
|
|
|
|
{
|
|
|
|
|
UpdateRecipeGroupVec();
|
|
|
|
|
UpdateRecipeGroupComb(m_pRecipeGroupComb);
|
|
|
|
|
}
|
|
|
|
|
CString CtrlName = "RecipeCtrl-->";
|
|
|
|
|
CtrlName += GetRecipeCtrlName(RecipeCtrlType);
|
|
|
|
|
CtrlName += " : ";
|
|
|
|
|
CString Log = CtrlName + CtrlStr;
|
|
|
|
|
gLogMgr->WriteDebugLog(Log);
|
|
|
|
|
|
|
|
|
|
return ErrMsg;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool CRecipeMgr::EditRecipeByCtrlType(ERecipeCtrlType CtrlType)
|
|
|
|
|
{
|
|
|
|
|
CString ErrMsg;
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
switch(CtrlType)
|
|
|
|
|
{
|
|
|
|
|
case _RecipeCtrl_AddGroup:
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeCtrl_AddRecipe:
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeCtrl_GroupName:
|
|
|
|
|
if(m_CurSelGroupName=="")
|
|
|
|
|
{
|
|
|
|
|
ErrMsg = "û<EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>group";
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeCtrl_RecipeName:
|
|
|
|
|
case _RecipeCtrl_MoveRecipe:
|
|
|
|
|
case _RecipeCtrl_CopyRecipe:
|
|
|
|
|
case _RecipeCtrl_DelRecipe:
|
|
|
|
|
case _RecipeCtrl_AddSubRecipe:
|
|
|
|
|
case _RecipeCtrl_DelSubRecipe:
|
|
|
|
|
if(!IsbSelEditRecipe())
|
|
|
|
|
ErrMsg = "û<EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Recipe";
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
if(ErrMsg=="" && CtrlType==_RecipeCtrl_DelSubRecipe)
|
|
|
|
|
{
|
|
|
|
|
if(m_CurEditRecipe.GetSubRecipeVec().size()<=1)
|
|
|
|
|
ErrMsg = "ֻ<EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>sub Recipe <20><><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>";
|
|
|
|
|
}
|
|
|
|
|
if(ErrMsg!="")
|
|
|
|
|
{
|
|
|
|
|
CMsgBox MsgBox;
|
|
|
|
|
MsgBox.Show(ErrMsg);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
m_CurRecipeCtrlType = CtrlType;
|
|
|
|
|
CDlgRecipeCtrl dlg;
|
|
|
|
|
return (dlg.DoModal()==IDOK);
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>sub recipe <20><><EFBFBD><EFBFBD>ǰ<EFBFBD>༭<EFBFBD><E0BCAD>recipe <20><>
|
|
|
|
|
void CRecipeMgr::AddSubRecipe(CString SubRecipeName)
|
|
|
|
|
{
|
|
|
|
|
m_CurEditRecipe.AddSubRecipe(SubRecipeName);
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>
|
|
|
|
|
CString RecipeFilePath = GetCtrlRecipeFilePath(m_CurSelGroupName,m_CurEditRecipe.m_RecipeName);
|
|
|
|
|
SaveRecipeToXml(m_CurEditRecipe.m_FilePath,m_CurEditRecipe);
|
|
|
|
|
|
|
|
|
|
CRecipeCtrlPar RecipeCtrlPar;
|
|
|
|
|
RecipeCtrlPar.m_CtrlType = _RecipeCtrl_AddSubRecipe;
|
|
|
|
|
RecipeCtrlPar.m_FilePath = RecipeFilePath;
|
|
|
|
|
RecipeCtrlPar.m_RcpName = m_CurEditRecipe.m_RecipeName;
|
|
|
|
|
RecipeCtrlPar.m_SubRcpName = SubRecipeName;
|
|
|
|
|
SaveRecipeHistoy(RecipeCtrlPar);
|
|
|
|
|
}
|
|
|
|
|
void CRecipeMgr::DelSubRecipe(CString SubRecipeName)
|
|
|
|
|
{
|
|
|
|
|
m_CurEditRecipe.DelSubRecipe(SubRecipeName);
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>
|
|
|
|
|
CString RecipeFilePath = GetCtrlRecipeFilePath(m_CurSelGroupName,m_CurEditRecipe.m_RecipeName);
|
|
|
|
|
SaveRecipeToXml(m_CurEditRecipe.m_FilePath,m_CurEditRecipe);
|
|
|
|
|
|
|
|
|
|
CRecipeCtrlPar RecipeCtrlPar;
|
|
|
|
|
RecipeCtrlPar.m_CtrlType = _RecipeCtrl_DelSubRecipe;
|
|
|
|
|
RecipeCtrlPar.m_FilePath = RecipeFilePath;
|
|
|
|
|
RecipeCtrlPar.m_RcpName = m_CurEditRecipe.m_RecipeName;
|
|
|
|
|
RecipeCtrlPar.m_SubRcpName = SubRecipeName;
|
|
|
|
|
SaveRecipeHistoy(RecipeCtrlPar);
|
|
|
|
|
}
|
|
|
|
|
//<2F>ƶ<EFBFBD>SubRecipe <20><>˳<EFBFBD><CBB3>
|
|
|
|
|
bool CRecipeMgr::MoveSubRecipe(bool bMoveUp)
|
|
|
|
|
{
|
|
|
|
|
if(!IsbSelEditRecipe())
|
|
|
|
|
{
|
|
|
|
|
CMsgBox MsgBox;
|
|
|
|
|
MsgBox.Show("û<EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Recipe");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
int CurSubRecipeIdx = m_CurEditRecipe.m_CurSubRecipeIdx;
|
|
|
|
|
int SwapSubRecipeIdx = (bMoveUp)?(CurSubRecipeIdx-1):(CurSubRecipeIdx+1);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
vector<CSubRecipe> &SubRecipeVec = m_CurEditRecipe.GetSubRecipeVec();
|
|
|
|
|
int size = SubRecipeVec.size();
|
|
|
|
|
if(SwapSubRecipeIdx >=0 && SwapSubRecipeIdx<size && SwapSubRecipeIdx != CurSubRecipeIdx)
|
|
|
|
|
{
|
|
|
|
|
swap(SubRecipeVec[CurSubRecipeIdx],SubRecipeVec[SwapSubRecipeIdx]);
|
|
|
|
|
m_CurEditRecipe.m_CurSubRecipeIdx = SwapSubRecipeIdx;//<2F><><EFBFBD>µ<EFBFBD>ǰѡ<C7B0><D1A1><EFBFBD><EFBFBD>Ŀ
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
void CRecipeMgr::SetSubRecipeIdx(int idx)
|
|
|
|
|
{
|
|
|
|
|
vector<CSubRecipe> &SubRecipeVec = m_CurEditRecipe.GetSubRecipeVec();
|
|
|
|
|
int size = SubRecipeVec.size();
|
|
|
|
|
if(idx>=0&&idx<size)
|
|
|
|
|
{
|
|
|
|
|
m_CurEditRecipe.SetCurSubRecipeIdx(idx);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
void CRecipeMgr::OnSelRecipeIdxChange(int idx)
|
|
|
|
|
{
|
|
|
|
|
SetCurSelRecipeName("");
|
|
|
|
|
int size = m_CurSelGroupRecipeNameVec.size();
|
|
|
|
|
if(idx>=0&&idx<size)
|
|
|
|
|
{
|
|
|
|
|
SetCurSelRecipeName(m_CurSelGroupRecipeNameVec[idx]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
CString CRecipeMgr::GetCurEditRecipeInfo()
|
|
|
|
|
{
|
|
|
|
|
CString RecipeInfo;
|
|
|
|
|
if(IsbSelEditRecipe())
|
|
|
|
|
{
|
|
|
|
|
RecipeInfo = m_CurEditRecipe.m_FilePath;
|
|
|
|
|
}
|
|
|
|
|
return RecipeInfo;
|
|
|
|
|
}
|
|
|
|
|
CString CRecipeMgr::GetCurEditSubRecipeInfo()
|
|
|
|
|
{
|
|
|
|
|
CString SubRecipeInfo;
|
|
|
|
|
if(IsbSelEditRecipe())
|
|
|
|
|
{
|
|
|
|
|
SubRecipeInfo = m_CurEditRecipe.GetCurSubRecipeName();
|
|
|
|
|
}
|
|
|
|
|
return SubRecipeInfo;
|
|
|
|
|
}
|
|
|
|
|
//ѡ<><D1A1><EFBFBD><EFBFBD>ǰrecipe <20><>ɨ<EFBFBD><C9A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
void CRecipeMgr::SelRecipeScanArea(CComboBox &ComboBox)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
#if 1
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>recipe <20><>XML <20>ļ<EFBFBD>(<28><><EFBFBD><EFBFBD>Xml <20>Ѵ<EFBFBD><D1B4><EFBFBD>,<2C>Ḳ<EFBFBD><E1B8B2>)
|
|
|
|
|
void CRecipeMgr::SaveRecipeToXml(CString FilePath,CRecipe &Recipe)
|
|
|
|
|
{
|
|
|
|
|
CMyXmlItem XmlItemRoot;//<2F><><EFBFBD>ڵ<EFBFBD>
|
|
|
|
|
XmlItemRoot.m_XmlItemName = "Root";
|
|
|
|
|
|
|
|
|
|
int SubRecipeCnt = Recipe.m_SubRecipeVec.size();
|
|
|
|
|
for(int k=0;k<SubRecipeCnt;k++)
|
|
|
|
|
{
|
|
|
|
|
CSubRecipe &SubRecipe = Recipe.m_SubRecipeVec[k];
|
|
|
|
|
CMyXmlItem XmlItemSubRecipe;
|
|
|
|
|
XmlItemSubRecipe.m_XmlItemName = "SubRecipe";
|
|
|
|
|
XmlItemSubRecipe.m_XmlItemAttributeName = "Name";
|
|
|
|
|
XmlItemSubRecipe.m_XmlItemAttributeVal = SubRecipe.m_SubRecipeName;
|
|
|
|
|
int size = SubRecipe.m_RecipeParVec.size();
|
|
|
|
|
for(int i=0;i<size;i++)
|
|
|
|
|
{
|
|
|
|
|
CRecipeParameter &RecipePar = SubRecipe.m_RecipeParVec[i];
|
|
|
|
|
if(RecipePar.m_bRcpInfoPar)//<2F><><EFBFBD><EFBFBD><EFBFBD>DZ༭<C7B1><E0BCAD><EFBFBD><EFBFBD>
|
|
|
|
|
continue;
|
|
|
|
|
CMyXmlItem XmlItemPar;
|
|
|
|
|
XmlItemPar.m_XmlItemName = "RecipePar";
|
|
|
|
|
XmlItemPar.m_XmlItemAttributeName = "Name";
|
|
|
|
|
XmlItemPar.m_XmlItemAttributeVal = RecipePar.m_ParName;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
{//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
CMyXmlItem XmlItemParName;
|
|
|
|
|
XmlItemParName.m_XmlItemName = XML_ITEM_PAR_TYPE;
|
|
|
|
|
CMyXmlItem XmlItemParVal;
|
|
|
|
|
XmlItemParVal.m_XmlItemName = RecipePar.GetParTypeStr();
|
|
|
|
|
XmlItemParName.AddXmlItem(XmlItemParVal);
|
|
|
|
|
XmlItemPar.AddXmlItem(XmlItemParName);
|
|
|
|
|
}
|
|
|
|
|
{//<2F><><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
CMyXmlItem XmlItemParName;
|
|
|
|
|
XmlItemParName.m_XmlItemName = XML_ITEM_PAR_VAL;
|
|
|
|
|
CMyXmlItem XmlItemParVal;
|
|
|
|
|
XmlItemParVal.m_XmlItemName = RecipePar.GetParStr();
|
|
|
|
|
XmlItemParName.AddXmlItem(XmlItemParVal);
|
|
|
|
|
XmlItemPar.AddXmlItem(XmlItemParName);
|
|
|
|
|
}
|
|
|
|
|
XmlItemSubRecipe.AddXmlItem(XmlItemPar);
|
|
|
|
|
}
|
|
|
|
|
XmlItemRoot.AddXmlItem(XmlItemSubRecipe);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CString Log("Save Rcp : ");
|
|
|
|
|
Log += FilePath;
|
|
|
|
|
gLogMgr->WriteDebugLog(Log);
|
|
|
|
|
CMyXmlMgr XmlMgr;
|
|
|
|
|
XmlMgr.SaveXmlItemToFile(FilePath,XmlItemRoot);
|
|
|
|
|
|
|
|
|
|
Log += " Complete" ;
|
|
|
|
|
gLogMgr->WriteDebugLog(Log);
|
|
|
|
|
}
|
|
|
|
|
//<2F><>xml <20>ļ<EFBFBD><C4BC>ж<EFBFBD>ȡRecipe <20><><EFBFBD><EFBFBD>
|
|
|
|
|
bool CRecipeMgr::ReadRecipeFromXml(CString FilePath,CRecipe &Recipe)
|
|
|
|
|
{
|
|
|
|
|
CMyXmlMgr XmlMgr;
|
|
|
|
|
CMyXmlItem XmlItemRoot;
|
|
|
|
|
XmlMgr.ReadXmlItemFromFile(FilePath,XmlItemRoot);
|
|
|
|
|
vector<CMyXmlItem> &SubRecipeVec = XmlItemRoot.m_XmlItemVec;
|
|
|
|
|
int SubRecipeCnt = SubRecipeVec.size();
|
|
|
|
|
if(SubRecipeCnt<=0)
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
Recipe.m_FilePath = FilePath;
|
|
|
|
|
Recipe.m_SubRecipeVec.clear();
|
|
|
|
|
Recipe.m_CurSubRecipeIdx = 0;
|
|
|
|
|
for(int i=0;i<SubRecipeCnt;i++)
|
|
|
|
|
{
|
|
|
|
|
CMyXmlItem &XmlItemSubRecipe = SubRecipeVec[i];
|
|
|
|
|
//<2F>ָ<EFBFBD>Sub Recipe <20>IJ<EFBFBD><C4B2><EFBFBD>
|
|
|
|
|
CSubRecipe SubRecipe;
|
|
|
|
|
SubRecipe.m_SubRecipeName = XmlItemSubRecipe.m_XmlItemAttributeVal;
|
|
|
|
|
vector<CMyXmlItem> &RecipeParVec = XmlItemSubRecipe.m_XmlItemVec;
|
|
|
|
|
int ParCnt = RecipeParVec.size();
|
|
|
|
|
for(int j=0;j<ParCnt;j++)
|
|
|
|
|
{
|
|
|
|
|
CMyXmlItem &XmlItemRecipePar = RecipeParVec[j];
|
|
|
|
|
CRecipeParameter XmlRecipePar;
|
|
|
|
|
XmlRecipePar.m_ParName = XmlItemRecipePar.m_XmlItemAttributeVal;
|
|
|
|
|
vector<CMyXmlItem> &RecipeParInfoVec = XmlItemRecipePar.m_XmlItemVec;
|
|
|
|
|
int ParInfoCnt = RecipeParInfoVec.size();
|
|
|
|
|
for(int k=0;k<ParInfoCnt;k++)
|
|
|
|
|
{
|
|
|
|
|
CMyXmlItem &XmlItemParInfo = RecipeParInfoVec[k];
|
|
|
|
|
CString ParInfoName = XmlItemParInfo.m_XmlItemName;
|
|
|
|
|
CString ParInfoVal;
|
|
|
|
|
vector<CMyXmlItem> &RecipeParInfoValVec = XmlItemParInfo.m_XmlItemVec;
|
|
|
|
|
if(!RecipeParInfoValVec.empty())
|
|
|
|
|
{
|
|
|
|
|
ParInfoVal = RecipeParInfoValVec[0].m_XmlItemName;
|
|
|
|
|
}
|
|
|
|
|
if(ParInfoName==XML_ITEM_PAR_TYPE)
|
|
|
|
|
{
|
|
|
|
|
XmlRecipePar.SetTypeByStr(ParInfoVal);
|
|
|
|
|
}
|
|
|
|
|
if(ParInfoName==XML_ITEM_PAR_VAL)
|
|
|
|
|
{
|
|
|
|
|
XmlRecipePar.SetValByStr(ParInfoVal);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
vector<CRecipeParameter> &SubRecipeParVec = SubRecipe.m_RecipeParVec;
|
|
|
|
|
int SubRecipeParCnt = SubRecipeParVec.size();
|
|
|
|
|
for(int m=0;m<SubRecipeParCnt;m++)
|
|
|
|
|
{
|
|
|
|
|
CRecipeParameter &RecipePar = SubRecipeParVec[m];
|
|
|
|
|
if(RecipePar.m_ParName == XmlRecipePar.m_ParName)
|
|
|
|
|
{
|
|
|
|
|
RecipePar.m_ParBoolVal= XmlRecipePar.m_ParBoolVal;
|
|
|
|
|
RecipePar.m_ParDoubleVal= XmlRecipePar.m_ParDoubleVal;
|
|
|
|
|
RecipePar.m_ParStrVal= XmlRecipePar.m_ParStrVal;
|
|
|
|
|
RecipePar.m_ParIntVal= XmlRecipePar.m_ParIntVal;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Recipe.m_SubRecipeVec.push_back(SubRecipe);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CString Log("Read Rcp : ");
|
|
|
|
|
Log += FilePath;
|
|
|
|
|
gLogMgr->WriteDebugLog(Log);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ¼
|
|
|
|
|
CString CRecipeMgr::CreatCurParDataPath()
|
|
|
|
|
{
|
|
|
|
|
CString MonitoringDataPath = gProgramLaserTuiHuo->GetLaipuLaserDataDir(PARA_MODIFY_DATA_PATH);
|
|
|
|
|
CString Path = MonitoringDataPath;
|
|
|
|
|
CFileMgr FileMgr;
|
|
|
|
|
CWorkTime WorkTime;
|
|
|
|
|
Path += WorkTime.GetCurYear();
|
|
|
|
|
Path += "\\"+WorkTime.GetCurMonth();
|
|
|
|
|
Path += "\\"+WorkTime.GetCurDay();
|
|
|
|
|
Path += "\\";
|
|
|
|
|
if(!FileMgr.IsDirectoryExists(Path))
|
|
|
|
|
{
|
|
|
|
|
FileMgr.CreatDir(Path);
|
|
|
|
|
}
|
|
|
|
|
return Path;
|
|
|
|
|
}
|
|
|
|
|
void CRecipeMgr::ResetParIdxSet()
|
|
|
|
|
{
|
|
|
|
|
m_ErrRangeParIdxSet.clear();
|
|
|
|
|
m_ChangeParIdxSet.clear();
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD>浱ǰ<E6B5B1>༭<EFBFBD><E0BCAD>recipe
|
|
|
|
|
bool CRecipeMgr::SaveEditRecipePar(CListCtrl &ListCtrl,CListCtrl &RecipeInfoList)
|
|
|
|
|
{
|
|
|
|
|
CMsgBox MsgBox;
|
|
|
|
|
ResetParIdxSet();
|
|
|
|
|
if(!IsbSelEditRecipe())
|
|
|
|
|
{
|
|
|
|
|
MsgBox.Show("û<EFBFBD><EFBFBD>ѡ<EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Recipe");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
CWorkTime WorkTime;
|
|
|
|
|
bool bHasParChange = false;//<2F>Ƿ<EFBFBD><C7B7>в<EFBFBD><D0B2><EFBFBD><EFBFBD>仯
|
|
|
|
|
CCsvData CsvData;
|
|
|
|
|
CsvData.AddData("<EFBFBD>û<EFBFBD>",false);
|
|
|
|
|
CsvData.AddData(gAuthorityMgr->GetCurUserName(),true);
|
|
|
|
|
CsvData.AddData("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>",false);
|
|
|
|
|
CsvData.AddData(WorkTime.GetDateTime("/",":"),true);
|
|
|
|
|
CsvData.AddData("Recipe Name",false);
|
|
|
|
|
CsvData.AddData(m_CurEditRecipe.m_RecipeName,true);
|
|
|
|
|
CsvData.AddData("SubRecipe Name",false);
|
|
|
|
|
CsvData.AddData(m_CurEditRecipe.GetCurSubRecipeName(),true);
|
|
|
|
|
CsvData.AddData("SubRecipe Idx",false);
|
|
|
|
|
CsvData.AddData(Int2CString(m_CurEditRecipe.GetCurSubRecipeIdx()),true);
|
|
|
|
|
CsvData.AddData("rcp·<EFBFBD><EFBFBD>",false);
|
|
|
|
|
CsvData.AddData(m_CurEditRecipe.m_FilePath,true);
|
|
|
|
|
|
|
|
|
|
CsvData.AddData(" ",false);
|
|
|
|
|
CsvData.AddData(" ",true);
|
|
|
|
|
|
|
|
|
|
CsvData.AddData("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",false);
|
|
|
|
|
CsvData.AddData("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ",false);
|
|
|
|
|
CsvData.AddData("<EFBFBD><EFBFBD>ֵ",true);
|
|
|
|
|
|
|
|
|
|
CRecipe RecipeTmp = m_CurEditRecipe;//<2F><>ʱrecipe <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼range <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱֵ
|
|
|
|
|
bool bLaser1EdiZero = false;//Edi <20>Ƿ<EFBFBD>Ϊ0
|
|
|
|
|
bool bLaser2EdiZero = false;
|
|
|
|
|
|
|
|
|
|
bool bRangeCheckOk = true;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Χ<EFBFBD><CEA7><EFBFBD><EFBFBD>
|
|
|
|
|
vector<CRecipeParameter> &RecipeParVec = m_CurEditRecipe.GetRecipeParVec();
|
|
|
|
|
vector<CRecipeParameter> &RecipeParVecTmp = RecipeTmp.GetRecipeParVec();
|
|
|
|
|
int size = RecipeParVec.size();
|
|
|
|
|
for(int k=0;k<size;k++)
|
|
|
|
|
{
|
|
|
|
|
CString ParValOld,ParValNew;
|
|
|
|
|
CString Log("RecipePar : ");
|
|
|
|
|
CRecipeParameter &RecipePar = RecipeParVec[k];
|
|
|
|
|
CRecipeParameter &RecipeParTmp = RecipeParVecTmp[k];
|
|
|
|
|
ParValOld = RecipePar.GetParStr();
|
|
|
|
|
Log += RecipePar.m_ParShowName;
|
|
|
|
|
Log += "[";
|
|
|
|
|
Log += ParValOld;
|
|
|
|
|
Log += "]->[";
|
|
|
|
|
|
|
|
|
|
CString ParValStr = ListCtrl.GetItemText(k,Rcp_List_Val_Col);
|
|
|
|
|
if(RecipePar.m_ParType==_RecipeParType_Double)
|
|
|
|
|
{
|
|
|
|
|
double Val = CStringToDouble(ParValStr);
|
|
|
|
|
if(!(Val>=RecipePar.m_DoubleMinVal && Val<=RecipePar.m_DoubleMaxVal))
|
|
|
|
|
{
|
|
|
|
|
bRangeCheckOk = false;
|
|
|
|
|
RecipeParTmp.m_ParDoubleVal = CStringToDouble(ParValStr);
|
|
|
|
|
m_ErrRangeParIdxSet.insert(k);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
RecipePar.m_ParDoubleVal = CStringToDouble(ParValStr);
|
|
|
|
|
RecipeParTmp.m_ParDoubleVal = RecipePar.m_ParDoubleVal;
|
|
|
|
|
if(RecipePar.m_ParName==RECIPE_PAR_NAME_LASER_EDI_1 && IsDbEqualZero(RecipePar.m_ParDoubleVal))
|
|
|
|
|
{
|
|
|
|
|
bLaser1EdiZero = true;
|
|
|
|
|
}
|
|
|
|
|
if(RecipePar.m_ParName==RECIPE_PAR_NAME_LASER_EDI_2 && IsDbEqualZero(RecipePar.m_ParDoubleVal))
|
|
|
|
|
{
|
|
|
|
|
bLaser2EdiZero = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else if(RecipePar.m_ParType==_RecipeParType_Bool)
|
|
|
|
|
{
|
|
|
|
|
RecipePar.m_ParBoolVal = (ParValStr==BOOL_STR_ON)?true:false;
|
|
|
|
|
RecipeParTmp.m_ParBoolVal = RecipePar.m_ParBoolVal;
|
|
|
|
|
}
|
|
|
|
|
else if(RecipePar.m_ParType==_RecipeParType_Int)
|
|
|
|
|
{
|
|
|
|
|
RecipePar.m_ParIntVal = CStringToDouble(ParValStr);
|
|
|
|
|
RecipeParTmp.m_ParIntVal = RecipePar.m_ParIntVal;
|
|
|
|
|
}
|
|
|
|
|
else if(RecipePar.m_ParType==_RecipeParType_CString)
|
|
|
|
|
{
|
|
|
|
|
RecipePar.m_ParStrVal = ParValStr;
|
|
|
|
|
RecipeParTmp.m_ParStrVal = RecipePar.m_ParStrVal;
|
|
|
|
|
}
|
|
|
|
|
ParValNew = RecipePar.GetParStr();
|
|
|
|
|
Log += ParValNew;
|
|
|
|
|
Log += "]";
|
|
|
|
|
gLogMgr->WriteDebugLog(Log);
|
|
|
|
|
|
|
|
|
|
//ֻ<><D6BB>¼<EFBFBD>Ǽ<EFBFBD><C7BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
if(!RecipePar.m_bRcpInfoPar)
|
|
|
|
|
{
|
|
|
|
|
if(ParValOld!=ParValNew)
|
|
|
|
|
{
|
|
|
|
|
bHasParChange = true;
|
|
|
|
|
m_ChangeParIdxSet.insert(k);
|
|
|
|
|
}
|
|
|
|
|
else//<2F>ޱ仯
|
|
|
|
|
{
|
|
|
|
|
ParValNew = "";
|
|
|
|
|
}
|
|
|
|
|
CsvData.AddData(RecipePar.m_ParShowName,false);
|
|
|
|
|
CsvData.AddData(ParValOld,false);
|
|
|
|
|
CsvData.AddData(ParValNew,true);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>recipe <20>ķ<EFBFBD><C4B7><EFBFBD><EFBFBD>ò<EFBFBD><C3B2><EFBFBD>
|
|
|
|
|
UpdateEditRecipeList(ListCtrl,RecipeInfoList,false);
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ķ<EFBFBD>Χ
|
|
|
|
|
{
|
|
|
|
|
vector<CRecipeParameter> &RecipeParVec = m_CurEditRecipe.GetRecipeParVec();
|
|
|
|
|
int size = RecipeParVec.size();
|
|
|
|
|
for(int k=0;k<size;k++)
|
|
|
|
|
{
|
|
|
|
|
CRecipeParameter &RecipePar = RecipeParVec[k];
|
|
|
|
|
if(!RecipePar.m_bRcpInfoPar)
|
|
|
|
|
continue;
|
|
|
|
|
if(RecipePar.m_ParType==_RecipeParType_Double)
|
|
|
|
|
{
|
|
|
|
|
if(!(RecipePar.m_ParDoubleVal>=RecipePar.m_DoubleMinVal && RecipePar.m_ParDoubleVal<=RecipePar.m_DoubleMaxVal))
|
|
|
|
|
{
|
|
|
|
|
//ediΪ0<CEAA><30>ʱ<EFBFBD><CAB1>dimmer ang == nan<61><6E>Ҫ<EFBFBD><D2AA>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
|
|
|
|
if(RecipePar.m_ParName==RECIPE_PAR_NAME_ROTATO_DIMMER_ANG && bLaser1EdiZero)
|
|
|
|
|
continue;
|
|
|
|
|
if(RecipePar.m_ParName==RECIPE_PAR_NAME_ROTATO_DIMMER_ANG2 && bLaser2EdiZero)
|
|
|
|
|
continue;
|
|
|
|
|
bRangeCheckOk = false;
|
|
|
|
|
m_ErrRangeParIdxSet.insert(k);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//ˢ<><CBA2>list <20><>ʾ
|
|
|
|
|
UpdateEditRecipeListExt(ListCtrl,RecipeTmp);
|
|
|
|
|
if(!bRangeCheckOk)
|
|
|
|
|
{
|
|
|
|
|
MsgBox.Show("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Χ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><EFBFBD>");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>ļ<DEB8>¼
|
|
|
|
|
if(bHasParChange)//<2F>б仯ʱ<E4BBAF>ű<EFBFBD><C5B1><EFBFBD>
|
|
|
|
|
{
|
|
|
|
|
CString FileName = WorkTime.GetCurTime("_");
|
|
|
|
|
FileName += "_";
|
|
|
|
|
FileName += m_CurEditRecipe.m_RecipeName;
|
|
|
|
|
CString DataPath = CreatCurParDataPath();
|
|
|
|
|
CFileMgr FileMgr;
|
|
|
|
|
FileMgr.WriteDataToExcel(DataPath,FileName,CsvData,false);
|
|
|
|
|
}
|
|
|
|
|
CString RecipeFilePath = GetCtrlRecipeFilePath(m_CurSelGroupName,m_CurEditRecipe.m_RecipeName);
|
|
|
|
|
SaveRecipeToXml(m_CurEditRecipe.m_FilePath,m_CurEditRecipe);
|
|
|
|
|
|
|
|
|
|
CString s = m_CurEditRecipe.m_RecipeName;
|
|
|
|
|
if(bHasParChange)
|
|
|
|
|
s += " <20>ijɹ<C4B3>";
|
|
|
|
|
else
|
|
|
|
|
s += " <20><><EFBFBD><EFBFBD><EFBFBD>ޱ仯";
|
|
|
|
|
MsgBox.Show(s);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>recipe<70>IJ<EFBFBD><C4B2><EFBFBD><EFBFBD><EFBFBD>¼
|
|
|
|
|
void CRecipeMgr::SaveRecipeHistoy(CRecipeCtrlPar RecipeCtrlPar)
|
|
|
|
|
{
|
|
|
|
|
CWorkTime WorkTime;
|
|
|
|
|
CCsvData CsvData;
|
|
|
|
|
CsvData.AddData("<EFBFBD>û<EFBFBD>",false);
|
|
|
|
|
CsvData.AddData(gAuthorityMgr->GetCurUserName(),true);
|
|
|
|
|
CsvData.AddData("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>",false);
|
|
|
|
|
CsvData.AddData(WorkTime.GetDateTime("/",":"),true);
|
|
|
|
|
CsvData.AddData("rcp·<EFBFBD><EFBFBD>",false);
|
|
|
|
|
CsvData.AddData(RecipeCtrlPar.m_FilePath,true);
|
|
|
|
|
CsvData.AddData("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",false);
|
|
|
|
|
CsvData.AddData(GetRecipeCtrlName(RecipeCtrlPar.m_CtrlType),true);
|
|
|
|
|
|
|
|
|
|
CsvData.AddData("Recipe Name",false);
|
|
|
|
|
CsvData.AddData(RecipeCtrlPar.m_RcpName,true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch(RecipeCtrlPar.m_CtrlType)
|
|
|
|
|
{
|
|
|
|
|
case _RecipeCtrl_CopyRecipe:
|
|
|
|
|
{
|
|
|
|
|
CsvData.AddData("Copy Recipe Name",false);
|
|
|
|
|
CsvData.AddData(RecipeCtrlPar.m_RcpNameNew,true);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeCtrl_RecipeName:
|
|
|
|
|
{
|
|
|
|
|
CsvData.AddData("New Recipe Name",false);
|
|
|
|
|
CsvData.AddData(RecipeCtrlPar.m_RcpNameNew,true);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeCtrl_MoveRecipe:
|
|
|
|
|
{
|
|
|
|
|
CsvData.AddData("rcp<EFBFBD>ƶ<EFBFBD>·<EFBFBD><EFBFBD>",false);
|
|
|
|
|
CsvData.AddData(RecipeCtrlPar.m_NewFilePath,true);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case _RecipeCtrl_AddSubRecipe:
|
|
|
|
|
case _RecipeCtrl_DelSubRecipe:
|
|
|
|
|
{
|
|
|
|
|
CsvData.AddData("Sub Recipe Name",false);
|
|
|
|
|
CsvData.AddData(RecipeCtrlPar.m_SubRcpName,true);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CString FileName = WorkTime.GetCurTime("_");
|
|
|
|
|
FileName += "_";
|
|
|
|
|
FileName += RecipeCtrlPar.m_RcpName;
|
|
|
|
|
CString DataPath = CreatCurParDataPath();
|
|
|
|
|
CFileMgr FileMgr;
|
|
|
|
|
FileMgr.WriteDataToExcel(DataPath,FileName,CsvData,false);
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD>µ<EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
void CRecipeMgr::UpdateInvalidParIdxSet(CRecipe &Recipe)
|
|
|
|
|
{
|
|
|
|
|
m_InvalidParIdxSet.clear();
|
|
|
|
|
CRecipeParameter RecipePar;
|
|
|
|
|
//edi check scope Ϊ0 ʱ<><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч,ʹ<><CAB9>config <20><><EFBFBD><EFBFBD>
|
|
|
|
|
RecipePar = Recipe.GetRecipePar(RECIPE_PAR_NAME_EDI_CHECK_SCOPE);
|
|
|
|
|
if(IsDbEqualZero(RecipePar.m_ParDoubleVal))
|
|
|
|
|
m_InvalidParIdxSet.insert(Rcp_EdiScope_Idx);
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˹̶<CBB9>ɨ<EFBFBD><C9A8><EFBFBD>ٶ<EFBFBD>,<2C>ص<EFBFBD><D8B5><EFBFBD>X <20><>Ч
|
|
|
|
|
RecipePar = Recipe.GetRecipePar(RECIPE_PAR_NAME_FIX_SCAN_SPEED);
|
|
|
|
|
if(!IsDbEqualZero(RecipePar.m_ParDoubleVal))
|
|
|
|
|
m_InvalidParIdxSet.insert(Rcp_OverlapX_Idx);
|
|
|
|
|
else
|
|
|
|
|
m_InvalidParIdxSet.insert(Rcp_FixSpeed_Idx);
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˹̶<CBB9>ɨ<EFBFBD><C9A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C>ص<EFBFBD><D8B5><EFBFBD>Y <20><>Ч
|
|
|
|
|
RecipePar = Recipe.GetRecipePar(RECIPE_PAR_NAME_FIX_SCAN_LINE_GAP);
|
|
|
|
|
if(!IsDbEqualZero(RecipePar.m_ParDoubleVal))
|
|
|
|
|
m_InvalidParIdxSet.insert(Rcp_OverlapY_Idx);
|
|
|
|
|
else
|
|
|
|
|
m_InvalidParIdxSet.insert(Rcp_FixGap_Idx);
|
|
|
|
|
|
|
|
|
|
RecipePar = Recipe.GetRecipePar(RECIPE_PAR_NAME_OFFSET_TAB);
|
|
|
|
|
if(RecipePar.m_ParStrVal ==RECIPE_OFFSET_TBL_NULL)
|
|
|
|
|
m_InvalidParIdxSet.insert(Rcp_OffsetTab_Idx);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
#if 1
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>recipe <20>ķ<EFBFBD><C4B7><EFBFBD><EFBFBD>ò<EFBFBD><C3B2><EFBFBD>
|
|
|
|
|
bool CRecipeMgr::UpdateRecipeInfoPar(CRecipe &Recipe)
|
|
|
|
|
{
|
|
|
|
|
CString log;
|
|
|
|
|
log = "Flow---->UpdateRecipeInfoPar : ";
|
|
|
|
|
log += Recipe.m_RecipeName;
|
|
|
|
|
gLogMgr->WriteDebugLog(log);
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD>
|
|
|
|
|
gLaser->UpdateLaserProp();
|
|
|
|
|
int BakSubRecipeIdx = Recipe.GetCurSubRecipeIdx();//<2F><><EFBFBD>ڻָ<DABB>
|
|
|
|
|
vector<CSubRecipe> &SubRecipeVec = Recipe.GetSubRecipeVec();
|
|
|
|
|
int size = SubRecipeVec.size();
|
|
|
|
|
for(int k=0;k<size;k++)
|
|
|
|
|
{
|
|
|
|
|
Recipe.SetCurSubRecipeIdx(k);//<2F><><EFBFBD>ǵ<EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>SubRecipe
|
|
|
|
|
|
|
|
|
|
CRecipeParameter RecipePar;
|
|
|
|
|
double OverlapRatio;//ɨ<><C9A8><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>
|
|
|
|
|
double Laser1Fre,Laser2Fre;//<2F><><EFBFBD><EFBFBD>Ƶ<EFBFBD><C6B5>
|
|
|
|
|
double Laser1Edi;//Laser1<72><31><EFBFBD><EFBFBD><EFBFBD>ܶ<EFBFBD>
|
|
|
|
|
double Laser2Edi;//Laser2<72><32><EFBFBD><EFBFBD><EFBFBD>ܶ<EFBFBD>
|
|
|
|
|
double Laser1EdiOffset;//Laser1<72><31><EFBFBD><EFBFBD><EFBFBD>ܶ<EFBFBD>Offset
|
|
|
|
|
double Laser2EdiOffset;//Laser2<72><32><EFBFBD><EFBFBD><EFBFBD>ܶ<EFBFBD>Offset
|
|
|
|
|
|
|
|
|
|
DbSize SpotSize = gLaser->GetSpotSize(_LaserDeviceType_MainLaser1);//<2F><><EFBFBD>߳ߴ<DFB3>
|
|
|
|
|
|
|
|
|
|
if(gLaser->IsbScanByDirX())
|
|
|
|
|
RecipePar = Recipe.GetRecipePar(RECIPE_PAR_NAME_OVERLAP_RATIO_X);
|
|
|
|
|
else
|
|
|
|
|
RecipePar = Recipe.GetRecipePar(RECIPE_PAR_NAME_OVERLAP_RATIO_Y);
|
|
|
|
|
OverlapRatio = RecipePar.m_ParDoubleVal;
|
|
|
|
|
RecipePar = Recipe.GetRecipePar(RECIPE_PAR_NAME_LASER_FRE);
|
|
|
|
|
Laser1Fre = RecipePar.m_ParDoubleVal;
|
|
|
|
|
RecipePar = Recipe.GetRecipePar(RECIPE_PAR_NAME_LASER2_FRE);
|
|
|
|
|
Laser2Fre = RecipePar.m_ParDoubleVal;
|
|
|
|
|
RecipePar = Recipe.GetRecipePar(RECIPE_PAR_NAME_LASER_EDI_1);
|
|
|
|
|
Laser1Edi = RecipePar.m_ParDoubleVal;
|
|
|
|
|
RecipePar = Recipe.GetRecipePar(RECIPE_PAR_NAME_LASER_EDI_2);
|
|
|
|
|
Laser2Edi = RecipePar.m_ParDoubleVal;
|
|
|
|
|
RecipePar = Recipe.GetRecipePar(RECIPE_PAR_NAME_LASER_EDI_OFFSET_1);
|
|
|
|
|
Laser1EdiOffset = RecipePar.m_ParDoubleVal;
|
|
|
|
|
RecipePar = Recipe.GetRecipePar(RECIPE_PAR_NAME_LASER_EDI_OFFSET_2);
|
|
|
|
|
Laser2EdiOffset = RecipePar.m_ParDoubleVal;
|
|
|
|
|
|
|
|
|
|
//<2F>ص<EFBFBD><D8B5><EFBFBD>/Ƶ<><C6B5>/<2F><><EFBFBD>߳ߴ<DFB3>---->ɨ<><C9A8><EFBFBD>ٶ<EFBFBD>
|
|
|
|
|
double ScanSpeed = gWaferRecipeDataMgr->CalScanSpeedByOverlapRatio(OverlapRatio,Laser1Fre);
|
|
|
|
|
if(ScanSpeed>0)
|
|
|
|
|
{
|
|
|
|
|
RecipePar = Recipe.GetRecipePar(RECIPE_PAR_NAME_SCAN_SPEED);
|
|
|
|
|
RecipePar.m_ParDoubleVal = ScanSpeed;
|
|
|
|
|
Recipe.SetRecipePar(RECIPE_PAR_NAME_SCAN_SPEED,RecipePar);
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Recipe <20>е<EFBFBD><D0B5>趨ֵ
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>ǹ̶<C7B9><CCB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD>Ĺ<EFBFBD><C4B9><EFBFBD>ֵ(<28><><EFBFBD><EFBFBD>Ƶ<EFBFBD><C6B5><EFBFBD>й<EFBFBD>)
|
|
|
|
|
double Laser1FixCurr = 0;
|
|
|
|
|
double Laser2FixCurr = 0;
|
|
|
|
|
{
|
|
|
|
|
RecipePar = Recipe.GetRecipePar(RECIPE_PAR_NAME_LASER_CURR_1);
|
|
|
|
|
Laser1FixCurr = RecipePar.m_ParDoubleVal;
|
|
|
|
|
Recipe.SetRecipePar(RECIPE_PAR_NAME_LASER_CURR_1,RecipePar);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
RecipePar = Recipe.GetRecipePar(RECIPE_PAR_NAME_LASER_CURR_2);
|
|
|
|
|
Laser2FixCurr = RecipePar.m_ParDoubleVal;
|
|
|
|
|
Recipe.SetRecipePar(RECIPE_PAR_NAME_LASER_CURR_2,RecipePar);
|
|
|
|
|
}
|
|
|
|
|
double Laser1FixPow = 0;
|
|
|
|
|
double Laser2FixPow = 0;
|
|
|
|
|
gLaser->GetLaserFixedCurrentPow(_LaserDeviceType_MainLaser1,Laser1Fre,Laser1FixCurr,Laser1FixPow);
|
|
|
|
|
gLaser->GetLaserFixedCurrentPow(_LaserDeviceType_MainLaser2,Laser2Fre,Laser2FixCurr,Laser2FixPow);
|
|
|
|
|
{
|
|
|
|
|
RecipePar = Recipe.GetRecipePar(RECIPE_PAR_NAME_LASER1_POW);
|
|
|
|
|
RecipePar.m_ParDoubleVal = Laser1FixPow;
|
|
|
|
|
Recipe.SetRecipePar(RECIPE_PAR_NAME_LASER1_POW,RecipePar);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
RecipePar = Recipe.GetRecipePar(RECIPE_PAR_NAME_LASER2_POW);
|
|
|
|
|
RecipePar.m_ParDoubleVal = Laser2FixPow;
|
|
|
|
|
Recipe.SetRecipePar(RECIPE_PAR_NAME_LASER2_POW,RecipePar);
|
|
|
|
|
}
|
|
|
|
|
//<2F><>ȡ<EFBFBD><C8A1><EFBFBD>ʲ<EFBFBD><CAB2><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
{
|
|
|
|
|
RecipePar = Recipe.GetRecipePar(RECIPE_PAR_NAME_OFFSET_TAB);
|
|
|
|
|
CString OffsetTableName = RecipePar.m_ParStrVal;
|
|
|
|
|
if(!Recipe.ReadOffsetTableFile(OffsetTableName))
|
|
|
|
|
{
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>Ϊ<EFBFBD>쳣
|
|
|
|
|
m_ErrRangeParIdxSet.insert(Rcp_OffsetTab_Idx);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//[<5B><><EFBFBD><EFBFBD><EFBFBD>ܶ<EFBFBD>/Ƶ<><C6B5>/<2F><><EFBFBD>߳ߴ<DFB3>]--->[˥<><CBA5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD>Ƕ<EFBFBD>]
|
|
|
|
|
{
|
|
|
|
|
double OffsetTabEdi = Recipe.GetOffsetParVal(RECIPE_OFFSET_PAR_LASER1_EDI);
|
|
|
|
|
double Edi = Laser1Edi + Laser1EdiOffset + OffsetTabEdi;
|
|
|
|
|
double RotatoDimmerAng = gWaferRecipeDataMgr->CalRotatoDimmerAng(SpotSize.w,SpotSize.h,Edi,Laser1Fre,Laser1FixPow);
|
|
|
|
|
if(!(RotatoDimmerAng>-180 && RotatoDimmerAng<180))//<2F><>Ч<EFBFBD><D0A7><EFBFBD>㷶Χ
|
|
|
|
|
{
|
|
|
|
|
log.Format("Err Ang = %lf",RotatoDimmerAng);
|
|
|
|
|
gLogMgr->WriteDebugLog(log);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
RecipePar = Recipe.GetRecipePar(RECIPE_PAR_NAME_ROTATO_DIMMER_ANG);
|
|
|
|
|
RecipePar.m_ParDoubleVal = RotatoDimmerAng;
|
|
|
|
|
Recipe.SetRecipePar(RECIPE_PAR_NAME_ROTATO_DIMMER_ANG,RecipePar);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
double OffsetTabEdi = Recipe.GetOffsetParVal(RECIPE_OFFSET_PAR_LASER2_EDI);
|
|
|
|
|
double Edi = Laser2Edi + Laser2EdiOffset + OffsetTabEdi;
|
|
|
|
|
double RotatoDimmerAng = gWaferRecipeDataMgr->CalRotatoDimmerAng(SpotSize.w,SpotSize.h,Edi,Laser2Fre,Laser2FixPow);
|
|
|
|
|
if(!(RotatoDimmerAng>-180 && RotatoDimmerAng<180))//<2F><>Ч<EFBFBD><D0A7><EFBFBD>㷶Χ
|
|
|
|
|
{
|
|
|
|
|
log.Format("Err Ang = %lf",RotatoDimmerAng);
|
|
|
|
|
gLogMgr->WriteDebugLog(log);
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
RecipePar = Recipe.GetRecipePar(RECIPE_PAR_NAME_ROTATO_DIMMER_ANG2);
|
|
|
|
|
RecipePar.m_ParDoubleVal = RotatoDimmerAng;
|
|
|
|
|
Recipe.SetRecipePar(RECIPE_PAR_NAME_ROTATO_DIMMER_ANG2,RecipePar);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Recipe.SetCurSubRecipeIdx(BakSubRecipeIdx);//<2F>ָ<EFBFBD>
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
//ͨ<><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1>ǰ<EFBFBD><C7B0>recipe <20><><EFBFBD><EFBFBD>
|
|
|
|
|
CRecipeParameter CRecipeMgr::GetCurRecipePar(CString ParName)
|
|
|
|
|
{
|
|
|
|
|
return m_CurWorkRecipe.GetRecipePar(ParName);
|
|
|
|
|
}
|
|
|
|
|
void CRecipeMgr::CreatCurEditRecipeScanPath()
|
|
|
|
|
{
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>ɨ<EFBFBD><C9A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
CRecipe &CurEditRecipe = m_CurEditRecipe;
|
|
|
|
|
CRecipeParameter RecipePar = CurEditRecipe.GetRecipePar(RECIPE_PAR_NAME_SCAN_AREA);
|
|
|
|
|
CString AreaName = RecipePar.m_ParStrVal;
|
|
|
|
|
RecipePar = CurEditRecipe.GetRecipePar(RECIPE_PAR_NAME_AREA_IDX);
|
|
|
|
|
int AreaIdx = RecipePar.m_ParIntVal-1;
|
|
|
|
|
CreatScanPath(AreaName,AreaIdx);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if 1
|
|
|
|
|
void CRecipeMgr::UpdateEditRecipeListExt(CRecipe &Recipe,CListCtrl &RecipeList,CListCtrl &RecipeInfoList)
|
|
|
|
|
{
|
|
|
|
|
if(!Recipe.IsValid())
|
|
|
|
|
return;
|
|
|
|
|
RecipeList.DeleteAllItems();
|
|
|
|
|
RecipeInfoList.DeleteAllItems();
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>recipe <20>ķ<EFBFBD><C4B7><EFBFBD><EFBFBD>ò<EFBFBD><C3B2><EFBFBD>
|
|
|
|
|
UpdateRecipeInfoPar(Recipe);
|
|
|
|
|
|
|
|
|
|
vector<CRecipeParameter> &RecipeParVec = Recipe.GetRecipeParVec();
|
|
|
|
|
int size = RecipeParVec.size();
|
|
|
|
|
if(size<=0)
|
|
|
|
|
return;
|
|
|
|
|
int RecipeListIdx = 0;
|
|
|
|
|
int RecipeInfoListIdx = 0;
|
|
|
|
|
for(int k=0;k<size;k++)
|
|
|
|
|
{
|
|
|
|
|
int idx = 0;
|
|
|
|
|
CRecipeParameter &RecipePar = RecipeParVec[k];
|
|
|
|
|
if(RecipePar.m_bRcpInfoPar)//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
{
|
|
|
|
|
RecipeInfoList.InsertItem(RecipeInfoListIdx," ");//<2F><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
|
|
|
|
|
RecipeInfoList.SetItemText(RecipeInfoListIdx,idx++,Int2CString(RecipeInfoListIdx+1));//<2F><><EFBFBD><EFBFBD>
|
|
|
|
|
RecipeInfoList.SetItemText(RecipeInfoListIdx,idx++,RecipePar.m_ParShowName);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipeInfoList.SetItemText(RecipeInfoListIdx,idx++,RecipePar.m_ParUnit);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ
|
|
|
|
|
RecipeInfoList.SetItemText(RecipeInfoListIdx,idx++,RecipePar.GetParTypeStr());//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipeInfoList.SetItemText(RecipeInfoListIdx,idx++,RecipePar.GetParStr());//<2F><><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
RecipeInfoListIdx++;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
RecipeList.InsertItem(RecipeListIdx," ");//<2F><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
|
|
|
|
|
RecipeList.SetItemText(RecipeListIdx,idx++,Int2CString(RecipeListIdx+1));//<2F><><EFBFBD><EFBFBD>
|
|
|
|
|
RecipeList.SetItemText(RecipeListIdx,idx++,RecipePar.m_ParShowName);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipeList.SetItemText(RecipeListIdx,idx++,RecipePar.m_ParUnit);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ
|
|
|
|
|
RecipeList.SetItemText(RecipeListIdx,idx++,RecipePar.GetParTypeStr());//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
RecipeList.SetItemText(RecipeListIdx,idx++,RecipePar.GetParStr());//<2F><><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
RecipeListIdx++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CRecipeMgr::UpdateEditSubRecipeListExt(CRecipe &Recipe,CListCtrl &List)
|
|
|
|
|
{
|
|
|
|
|
List.DeleteAllItems();
|
|
|
|
|
vector<CSubRecipe> &SubRecipeVec = Recipe.GetSubRecipeVec();
|
|
|
|
|
int size = SubRecipeVec.size();
|
|
|
|
|
if(size<=0)
|
|
|
|
|
return;
|
|
|
|
|
for(int k=0;k<size;k++)
|
|
|
|
|
{
|
|
|
|
|
int idx = 0;
|
|
|
|
|
List.InsertItem(k," ");//<2F><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
|
|
|
|
|
List.SetItemText(k,idx++,Int2CString(k+1));//<2F><><EFBFBD><EFBFBD>
|
|
|
|
|
List.SetItemText(k,idx++,SubRecipeVec[k].m_SubRecipeName);
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
List.SetItemState(Recipe.m_CurSubRecipeIdx,LVIS_FOCUSED | LVIS_SELECTED,LVIS_FOCUSED | LVIS_SELECTED);
|
|
|
|
|
}
|
|
|
|
|
//<2F><>ȡRecipeName <20><>Ӧ<EFBFBD><D3A6><EFBFBD>ļ<EFBFBD>·<EFBFBD><C2B7>
|
|
|
|
|
CString CRecipeMgr::GetRecipePathByName(CString RecipeName)
|
|
|
|
|
{
|
|
|
|
|
vector<CString> RcpGroupPathVec;
|
|
|
|
|
CString DirPath = GetRecipePath();
|
|
|
|
|
CFileMgr FileMgr;
|
|
|
|
|
//<2F><><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC>е<EFBFBD>·<EFBFBD><C2B7>
|
|
|
|
|
FileMgr.GetChildFileOrDirName(true,DirPath,RcpGroupPathVec,"");
|
|
|
|
|
//<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
|
|
|
|
|
int size = RcpGroupPathVec.size();
|
|
|
|
|
for(int k=0;k<size;k++)
|
|
|
|
|
{
|
|
|
|
|
vector<CString> RcpPathVec;
|
|
|
|
|
FileMgr.GetChildFileOrDirName(false,RcpGroupPathVec[k],RcpPathVec,RECIPE_FILE_SUFFIX);
|
|
|
|
|
int size1 = RcpPathVec.size();
|
|
|
|
|
for(int i=0;i<size1;i++)
|
|
|
|
|
{
|
|
|
|
|
CString Name = FileMgr.GetFileNameFromPath(RcpPathVec[i],true);
|
|
|
|
|
if(Name == RecipeName)
|
|
|
|
|
return RcpPathVec[i];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>recipe<70>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
bool CRecipeMgr::CheckRecipeNameExist(CString RecipeName)
|
|
|
|
|
{
|
|
|
|
|
CString RecipePath = GetRecipePathByName(RecipeName);
|
|
|
|
|
if(RecipePath != "")
|
|
|
|
|
{
|
|
|
|
|
CString s;
|
|
|
|
|
s = RecipePath + "<EFBFBD>Ѵ<EFBFBD><EFBFBD><EFBFBD>";
|
|
|
|
|
CMsgBox MsgBox;
|
|
|
|
|
MsgBox.Show(s);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD>¼<EFBFBD><C2BC>⽹<EFBFBD><E2BDB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>config
|
|
|
|
|
void CRecipeMgr::UpdateLaserFocusProp()
|
|
|
|
|
{
|
|
|
|
|
gLogMgr->WriteDebugLog("Func---->UpdateLaserFocusProp");
|
|
|
|
|
//<2F><><EFBFBD>⽹<EFBFBD><E2BDB9>ֵ
|
|
|
|
|
double FocusZMoveUpVal = 0;
|
|
|
|
|
{
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><D4B1><EFBFBD>ӳ<EFBFBD><D3B3>
|
|
|
|
|
CString Path = "Laser";
|
|
|
|
|
CString Name = _T("m_FocusZMoveUpVal");//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
CPropertie Propertie;
|
|
|
|
|
Propertie.SetpVal((void*)&FocusZMoveUpVal);
|
|
|
|
|
Propertie.SetType(_PROP_TYPE_DOUBLE);
|
|
|
|
|
Propertie.SetPath(Path);
|
|
|
|
|
Propertie.SetName(Name);
|
|
|
|
|
Propertie.WriteRead(true);//<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Z<EFBFBD><5A><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
double DistanceMeterPosZ = 0;
|
|
|
|
|
{
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><D4B1><EFBFBD>ӳ<EFBFBD><D3B3>
|
|
|
|
|
CString Path = "PlatSpecialPosMgr";
|
|
|
|
|
CString Name = _T("m_SpecialPosTypeDistance_MeterPos_z");//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
CPropertie Propertie;
|
|
|
|
|
Propertie.SetpVal((void*)&DistanceMeterPosZ);
|
|
|
|
|
Propertie.SetType(_PROP_TYPE_DOUBLE);
|
|
|
|
|
Propertie.SetPath(Path);
|
|
|
|
|
Propertie.SetName(Name);
|
|
|
|
|
Propertie.WriteRead(true);//<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>
|
|
|
|
|
}
|
|
|
|
|
//Z<>ᰲȫ<E1B0B2><C8AB><EFBFBD><EFBFBD>
|
|
|
|
|
double MotorZSafeCoord = 0;
|
|
|
|
|
{
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><D4B1><EFBFBD>ӳ<EFBFBD><D3B3>
|
|
|
|
|
CString Path = "PlatSpecialPosMgr";
|
|
|
|
|
CString Name = _T("m_MotorZSafeCoord");//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
CPropertie Propertie;
|
|
|
|
|
Propertie.SetpVal((void*)&MotorZSafeCoord);
|
|
|
|
|
Propertie.SetType(_PROP_TYPE_DOUBLE);
|
|
|
|
|
Propertie.SetPath(Path);
|
|
|
|
|
Propertie.SetName(Name);
|
|
|
|
|
Propertie.WriteRead(true);//<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CString log;
|
|
|
|
|
log.Format("FocusZMoveUpVal=%f,DistanceMeterPosZ=%f,MotorZSafeCoord=%f",FocusZMoveUpVal,DistanceMeterPosZ,MotorZSafeCoord);
|
|
|
|
|
gLogMgr->WriteDebugLog(log);
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD>㽹<EFBFBD><E3BDB9><EFBFBD><CEA2><EFBFBD><EFBFBD>Χ
|
|
|
|
|
double LaserFocusZ = DistanceMeterPosZ + FocusZMoveUpVal;
|
|
|
|
|
|
|
|
|
|
m_FocusAdjustMin = (MotorZSafeCoord - LaserFocusZ)+0.5;//<2F><><EFBFBD>ϵ<EFBFBD>0.5mm
|
|
|
|
|
m_FocusAdjustMax = (LaserFocusZ*-1)-1;////<2F><><EFBFBD>µ<EFBFBD>1 mm
|
|
|
|
|
|
|
|
|
|
log.Format("LaserFocusZ=%f,FocusAdjustMin=%f,FocusAdjustMax=%f",LaserFocusZ,m_FocusAdjustMin,m_FocusAdjustMax);
|
|
|
|
|
gLogMgr->WriteDebugLog(log);
|
|
|
|
|
}
|
|
|
|
|
//<2F><>ȡTabName <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><C2B7>
|
|
|
|
|
CString CRecipeMgr::GetOffsetTablePath(CString TabName)
|
|
|
|
|
{
|
|
|
|
|
CString TabPath = gProgramLaserTuiHuo->GetLaipuLaserDataDir(OFFSET_TAB_FILE_PATH);
|
|
|
|
|
TabPath += TabName;
|
|
|
|
|
TabPath += ".tbl";
|
|
|
|
|
return TabPath;
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#endif
|