public static bool LoadSave(bool _bLoad) { string sExeFolder = System.AppDomain.CurrentDomain.BaseDirectory; string sLotInfo = sExeFolder + "SeqData\\LotInfo.ini"; //Current Lot Informations. if (_bLoad) { CIniFile IniLotInfo = new CIniFile(sLotInfo); Log.Trace("SEQ", "Lot LoadSave"); IniLotInfo.Load("Member ", "m_bLotOpen ", out m_bLotOpen); IniLotInfo.Load("Member ", "m_bLotEnded ", out m_bLotEnded); IniLotInfo.Load("Member ", "m_bRqstLotEnd ", out m_bRqstLotEnd); IniLotInfo.Load("Member ", "m_sLotNo ", out m_sLotNo); IniLotInfo.Load("Member ", "m_sJobName ", out m_sJobName); } else { CIniFile IniLotInfo = new CIniFile(sLotInfo); IniLotInfo.Save("Member ", "m_bLotOpen ", m_bLotOpen); IniLotInfo.Save("Member ", "m_bLotEnded ", m_bLotEnded); IniLotInfo.Save("Member ", "m_bRqstLotEnd ", m_bRqstLotEnd); IniLotInfo.Save("Member ", "m_sLotNo ", m_sLotNo); IniLotInfo.Save("Member ", "m_sJobName ", m_sJobName); } return(true); }
public void SavePttColor(string _sJobName) { string sExeFolder = System.AppDomain.CurrentDomain.BaseDirectory; string sPttColorPath = sExeFolder + "JobFile\\" + _sJobName + "\\DispenseColor.ini"; CIniFile IniPttColor = new CIniFile(sPttColorPath); IniPttColor.Save("PttColor", "m_iDisprLineRgb", m_iDisprLineRgb); IniPttColor.Save("PttColor", "m_iDisprSlctRgb", m_iDisprSlctRgb); }
public void SaveId(IdData Data) { //Make Dir. string sExeFolder = System.AppDomain.CurrentDomain.BaseDirectory; string sPath = sExeFolder + "Util\\LogOn.ini"; CIniFile Ini = new CIniFile(sPath); int iTemp = 0; Ini.Save(Data.ID, "Password", Data.Password); iTemp = (int)Data.Level; Ini.Save(Data.ID, "Level", iTemp); }
public void LoadSaveDayIni(bool _bLoad, ref TData _tData) { //Make Dir. string sPath = DAY_FOLDER + "DayInfo.ini"; if (_bLoad) { CIniFile IniLoadDayInfo = new CIniFile(sPath); IniLoadDayInfo.Load("Data", "dWorkTime ", out _tData.dWorkTime); IniLoadDayInfo.Load("Data", "dStopTime ", out _tData.dStopTime); IniLoadDayInfo.Load("Data", "dErrTime ", out _tData.dErrTime); IniLoadDayInfo.Load("Data", "dTotalTime", out _tData.dTotalTime); IniLoadDayInfo.Load("Data", "dUPEH ", out _tData.dUPEH); IniLoadDayInfo.Load("Data", "dUPH ", out _tData.dUPH); IniLoadDayInfo.Load("Data", "iWorkCnt ", out _tData.iWorkCnt); IniLoadDayInfo.Load("Data", "iLotCnt ", out _tData.iLotCnt); } else { CIniFile IniSaveDayInfo = new CIniFile(sPath); IniSaveDayInfo.Save("Data", "dWorkTime ", _tData.dWorkTime); IniSaveDayInfo.Save("Data", "dStopTime ", _tData.dStopTime); IniSaveDayInfo.Save("Data", "dErrTime ", _tData.dErrTime); IniSaveDayInfo.Save("Data", "dTotalTime", _tData.dTotalTime); IniSaveDayInfo.Save("Data", "dUPEH ", _tData.dUPEH); IniSaveDayInfo.Save("Data", "dUPH ", _tData.dUPH); IniSaveDayInfo.Save("Data", "iWorkCnt ", _tData.iWorkCnt); IniSaveDayInfo.Save("Data", "iLotCnt ", _tData.iLotCnt); } }
public bool LoadSave(bool _bLoad) { CConfig Config = new CConfig(); string sSelLan; string sErrNo; switch (m_eLangSel) { default: sSelLan = "E_"; break; case EN_LAN_SEL.English: sSelLan = "E_"; break; case EN_LAN_SEL.Korean: sSelLan = "K_"; break; case EN_LAN_SEL.Chinese: sSelLan = "C_"; break; } if (_bLoad) { CIniFile ErrorConfig = new CIniFile(m_sParaFolderPath + "Error.ini"); for (int i = 0; i < m_iMaxErr; i++) { sErrNo = string.Format("ERR({0:000})", i); ErrorConfig.Load("sEnum", sErrNo, out m_aErr[i].Para.sEnum); ErrorConfig.Load(sSelLan + "sName", sErrNo, out m_aErr[i].Para.sName); ErrorConfig.Load(sSelLan + "sAction", sErrNo, out m_aErr[i].Para.sAction); ErrorConfig.Load("sImgPath", sErrNo, out m_aErr[i].Para.sImgPath); ErrorConfig.Load("dRectLeft ", sErrNo, out m_aErr[i].Para.dRectLeft); ErrorConfig.Load("dRectTop ", sErrNo, out m_aErr[i].Para.dRectTop); ErrorConfig.Load("dRectWidth ", sErrNo, out m_aErr[i].Para.dRectWidth); ErrorConfig.Load("dRectHeight", sErrNo, out m_aErr[i].Para.dRectHeight); } } else { CIniFile ErrorConfig = new CIniFile(m_sParaFolderPath + "Error.ini"); for (int i = 0; i < m_iMaxErr; i++) { sErrNo = string.Format("ERR({0:000})", i); ErrorConfig.Save("sEnum", sErrNo, m_aErr[i].Para.sEnum); ErrorConfig.Save(sSelLan + "sName", sErrNo, m_aErr[i].Para.sName); ErrorConfig.Save(sSelLan + "sAction", sErrNo, m_aErr[i].Para.sAction); ErrorConfig.Save("sImgPath", sErrNo, m_aErr[i].Para.sImgPath); ErrorConfig.Save("dRectLeft ", sErrNo, m_aErr[i].Para.dRectLeft); ErrorConfig.Save("dRectTop ", sErrNo, m_aErr[i].Para.dRectTop); ErrorConfig.Save("dRectWidth ", sErrNo, m_aErr[i].Para.dRectWidth); ErrorConfig.Save("dRectHeight", sErrNo, m_aErr[i].Para.dRectHeight); } } return(true); }
public static void Save(string _sJobName) { string sExeFolder = System.AppDomain.CurrentDomain.BaseDirectory; string sDevicePath = sExeFolder + "JobFile\\" + _sJobName + "\\MotrPstn.ini"; string sCommonPath = sExeFolder + "Util\\CommonPstn.ini"; CIniFile IniDevice = new CIniFile(sDevicePath); CIniFile IniCommon = new CIniFile(sCommonPath); string sSection; //Save Device. for (int m = 0; m < m_iMaxMotr; m++) { //Set Dir. sSection = "Motor" + m.ToString(); for (int i = 0; i < MotrPstn[m].PstnValue.Length; i++) { if (MotrPstn[m].PstnValue[i].bCommon) { IniCommon.Save(sSection, MotrPstn[m].PstnValue[i].sName, MotrPstn[m].PstnValue[i].dValue); } else { IniDevice.Save(sSection, MotrPstn[m].PstnValue[i].sName, MotrPstn[m].PstnValue[i].dValue); } } } }
public void SaveData(double _dStartTime, string _sLotNo, TLotData _LotData) { try { string sSpcFd = System.IO.Directory.GetParent(SPC.LOT.Folder).Parent.FullName.ToString(); string sSttDt = DateTime.FromOADate(_dStartTime).ToString("yyyyMMdd");//DateTime.Now.ToString("yyyyMMdd"); string sPath = SPC.LOT.Folder + sSttDt + "\\" + _sLotNo + ".ini"; DirectoryInfo di = new DirectoryInfo(Path.GetDirectoryName(sPath)); //DirectoryInfo di = new DirectoryInfo(sPath); if (!di.Exists) { di.Create(); } //몬가 마음에 안드는데 ... 시간상 패스 대충 쓸라고 만든거임 //카운트 저장. int iCnt = 0; CIniFile IniCnt = new CIniFile(sPath); IniCnt.Load("ETC", "DataCnt", ref iCnt);//이거 여기서 저장하는데 Datamap에서도 가져다가 쓴다. IniCnt.Save("ETC", "DataCnt", iCnt + 1); //데이터 저장. CAutoIniFile.SaveStruct(sPath, "LotData" + (iCnt).ToString(), ref _LotData); } catch (Exception _e) { Log.Trace("Data Save Fail" + _e.Message); } }
private void SaveCommand(int _iIndx) { string sCommandPath = "C:\\Data\\VisnCommand.ini"; CIniFile IniCommandSave = new CIniFile(sCommandPath); IniCommandSave.Save("Command", "Index", _iIndx); }
private void SaveJobFile(string _sDevice) { string sCommandPath = "C:\\Data\\VisnJobChange.ini"; CIniFile IniCommandSave = new CIniFile(sCommandPath); IniCommandSave.Save("JobChange", "Device", OM.GetCrntDev()); }
private void SaveLotStart(string _sLotNo) { string sLotDataPath = "C:\\Data\\LotName.ini"; CIniFile IniLotDatadSave = new CIniFile(sLotDataPath); IniLotDatadSave.Save("LotName", "LotName", _sLotNo); }
//작업 노드 로드 세이브. public static void SaveNodePos(string _sJobName) { string sExeFolder = System.AppDomain.CurrentDomain.BaseDirectory; string sDevOptnPath = sExeFolder + "JobFile\\" + _sJobName + "\\NodePos.ini"; CIniFile IniNodePos = new CIniFile(sDevOptnPath); for (int i = 0; i < OM.MAX_NODE_POS; i++) { IniNodePos.Save(i.ToString(), "dWrkSttPos", NodePos[i].dWrkSttPos); IniNodePos.Save(i.ToString(), "iDirection", NodePos[i].iDirection); IniNodePos.Save(i.ToString(), "dDegree ", NodePos[i].dDegree); IniNodePos.Save(i.ToString(), "iWrkCnt ", NodePos[i].iWrkCnt); IniNodePos.Save(i.ToString(), "iWrkPitch ", NodePos[i].dWrkPitch); } }
public static void Save(string _sJobName) { string sExeFolder = System.AppDomain.CurrentDomain.BaseDirectory; string sDevicePath = sExeFolder + "JobFile\\" + _sJobName + "\\MotrPstn.ini"; string sCommonPath = sExeFolder + "Util\\CommonPstn.ini"; string sMinMaxPath = sExeFolder + "Util\\LimitPstn.ini"; CIniFile IniDevice = new CIniFile(sDevicePath); CIniFile IniCommon = new CIniFile(sCommonPath); CIniFile IniMinMax = new CIniFile(sMinMaxPath); string sSection; //Save Device. for (int m = 0; m < m_iMaxMotr; m++) { //Set Dir. sSection = "Motor" + m.ToString(); for (int i = 0; i < MotrPstn[m].PstnValue.Length; i++) { if (MotrPstn[m].PstnValue[i].bCommon) { IniCommon.Save(sSection, MotrPstn[m].PstnValue[i].sName, MotrPstn[m].PstnValue[i].dValue); } else { IniDevice.Save(sSection, MotrPstn[m].PstnValue[i].sName, MotrPstn[m].PstnValue[i].dValue); } if (MotrPstn[m].PstnValue[i].dMax <= 0) { MotrPstn[m].PstnValue[i].dMax = ML.MT_GetMaxPosition(m); } IniMinMax.Save(sSection, MotrPstn[m].PstnValue[i].sName.Trim() + "_MIN", MotrPstn[m].PstnValue[i].dMin); IniMinMax.Save(sSection, MotrPstn[m].PstnValue[i].sName.Trim() + "_MAX", MotrPstn[m].PstnValue[i].dMax); if (MotrPstn[m].PstnValue[i].iSpdPer <= 0) { MotrPstn[m].PstnValue[i].iSpdPer = 100; } if (MotrPstn[m].PstnValue[i].iSpdPer > 100) { MotrPstn[m].PstnValue[i].iSpdPer = 100; } IniMinMax.Save(sSection, MotrPstn[m].PstnValue[i].sName.Trim() + "_SPD", MotrPstn[m].PstnValue[i].iSpdPer); } } }
private void SaveManMode(bool _bMode) { string sCommandPath = "C:\\Data\\VisnManMode.ini"; CIniFile IniCommandSave = new CIniFile(sCommandPath); int iManMode = _bMode ? 1 : 0; IniCommandSave.Save("ManMode", "ManMode", iManMode); }
public static void SaveLastInfo() { string sExeFolder = System.AppDomain.CurrentDomain.BaseDirectory; string sLastInfoPath = sExeFolder + "SeqData\\LastInfo.ini"; CIniFile IniLastInfo = new CIniFile(sLastInfoPath); //Save IniLastInfo.Save("LAST WORK INFO", "Device", m_sCrntDev); }
public void SaveErrIni(TData _tData) { string sPath; string sCaption; DateTime tErrDateTime; tErrDateTime = DateTime.FromOADate(_tData.dSttTime); sPath = ERR_FOLDER + DateTime.Now.ToString("yyyyMMdd") + ".ini"; int iCnt; CIniFile IniSaveErr = new CIniFile(sPath); IniSaveErr.Load("ETC", "ErrCnt", out iCnt); sCaption = iCnt.ToString(); IniSaveErr.Save(sCaption, "iErrNo ", _tData.iErrNo); IniSaveErr.Save(sCaption, "sErrName", _tData.sErrName); IniSaveErr.Save(sCaption, "dSttTime", _tData.dSttTime); IniSaveErr.Save(sCaption, "sErrMsg ", _tData.sErrMsg); IniSaveErr.Save(sCaption, "sLotId ", _tData.sLotId); iCnt++; IniSaveErr.Save("ETC", "ErrCnt", iCnt); }
public void LoadSaveLastErr(bool _bLoad) { //Set Dir. //ERR_FOLDER ; string sPath = ERR_FOLDER + "LastErr.ini"; if (_bLoad) { CIniFile IniLastErrInfo = new CIniFile(sPath); IniLastErrInfo.Load("LastInfo", "m_iLastErr", out m_iLastErr); IniLastErrInfo.Load("LastInfo", "m_sLastErrMsg", out m_sLastErrMsg); } else { CIniFile IniLastErrInfo = new CIniFile(sPath); //IniLastErrInfo.ClearFile(sPath) ; IniLastErrInfo.Save("LastInfo", "m_iLastErr", m_iLastErr); IniLastErrInfo.Save("LastInfo", "m_sLastErrMsg", m_sLastErrMsg); } }
public void SaveDataIni(double _dOaSaveDate, ref T _tData) { string sPath; DateTime tDateTime; tDateTime = DateTime.FromOADate(_dOaSaveDate); sPath = Folder + tDateTime.ToString("yyyyMMdd") + ".ini"; ////기존에 있던것들 지우기. //DirectoryInfo di = new DirectoryInfo(Folder); //if (!di.Exists) di.Create(); //foreach (FileInfo fi in di.GetFiles()) //{ // //if (fi.Extension != ".log") continue; // // 12개월 이전 로그를 삭제합니다. // if (fi.CreationTime <= DateTime.Now.AddMonths(-12)) // { // fi.Delete(); // } //} //기존에 있던것들 지우기. DirectoryInfo di = new DirectoryInfo(Folder); if (!di.Exists) { di.Create(); } foreach (FileInfo fi in di.GetFiles()) { //if (fi.Extension != ".log") continue; // 12개월 이전 로그를 삭제합니다. if (fi.CreationTime <= DateTime.Now.AddMonths(-12)) { fi.Delete(); } } //카운트 저장. int iCnt = 0; CIniFile IniGetErrCnt = new CIniFile(sPath); IniGetErrCnt.Load("ETC", "DataCnt", ref iCnt);//이거 여기서 저장하는데 Datamap에서도 가져다가 쓴다. int iAddedCnt = iCnt + 1; IniGetErrCnt.Save("ETC", "DataCnt", iAddedCnt); //데이터 저장. CAutoIniFile.SaveStruct <T>(sPath, iCnt.ToString(), ref _tData); }
/* * public static void LoadEqpStat() * { * string sExeFolder = System.AppDomain.CurrentDomain.BaseDirectory; * string sEqpOptnPath = sExeFolder + "Util\\EqpStat.ini"; * CAutoIniFile.LoadStruct<CEqpStat>(sEqpOptnPath,"EqpStat",ref EqpStat); * } * public static void SaveEqpStat() * { * string sExeFolder = System.AppDomain.CurrentDomain.BaseDirectory; * string sEqpOptnPath = sExeFolder + "Util\\EqpStat.ini"; * CAutoIniFile.SaveStruct<CEqpStat>(sEqpOptnPath,"EqpStat",ref EqpStat); * } */ public static bool LoadSave(bool _bLoad) { string sExeFolder = System.AppDomain.CurrentDomain.BaseDirectory; string sLotInfo = sExeFolder + "SeqData\\LotInfo.ini"; //Current Lot Informations. TLot Data = new TLot(); CIniFile IniLotInfo = new CIniFile(sLotInfo); //int iCount = LotList.Count ; if (_bLoad) { //IniLotInfo.Load("Total ", "Count" , out iCount ); IniLotInfo.Load("Total ", "LotOpened", out LotOpened); IniLotInfo.Load("Total ", "LotEnded", out LotEnded); CAutoIniFile.LoadStruct <TLot>(sLotInfo, "CrntLotData", ref CrntLotData); //LotList.Clear(); //for(int i = 0 ; i < iCount ; i++){ // CAutoIniFile.LoadStruct<TLot>(sLotInfo,i.ToString(),ref Data); // LotList.Add(Data); //} } else { //IniLotInfo.Save("Total ", "Count" , iCount ); IniLotInfo.Save("Total ", "LotOpened", LotOpened); IniLotInfo.Save("Total ", "LotEnded", LotEnded); CAutoIniFile.SaveStruct <TLot>(sLotInfo, "CrntLotData", ref CrntLotData); //for(int i = 0 ; i < iCount ; i++){ // Data = LotList[i]; // CAutoIniFile.SaveStruct<TLot>(sLotInfo,i.ToString(),ref Data); //} } return(true); }
public void LoadPassword(bool IsLoad) { string Path; //Make Dir. string sExeFolder = System.AppDomain.CurrentDomain.BaseDirectory; string sCmnOptnPath = sExeFolder + "Util\\Password.ini"; //Load Device. if (IsLoad) { CIniFile IniLoadPass = new CIniFile(sCmnOptnPath); IniLoadPass.Load("PASSWORD", "m_sEngineerPass", out m_sEngineerPass); IniLoadPass.Load("PASSWORD", "m_sMasterPass ", out m_sMasterPass); } else { CIniFile IniSavePass = new CIniFile(sCmnOptnPath); IniSavePass.Save("PASSWORD", "m_sEngineerPass", m_sEngineerPass); IniSavePass.Save("PASSWORD", "m_sMasterPass ", m_sMasterPass); } }
public bool SaveDayData(TData _tData, DateTime _tDateTime) //혹시 나중에 Lot하고 동기화 할까봐 TDateTime 인자 넣음. { //최근에 뜬 에러일시 팅겨냄... DirectoryInfo di = new DirectoryInfo(LOT_FOLDER); if (!di.Exists) { di.Create(); } //기존에 있던것들 지우기. foreach (FileInfo fi in di.GetFiles()) { if (fi.Extension != ".log") { continue; } // 3개월 이전 로그를 삭제합니다. if (fi.CreationTime <= DateTime.Now.AddMonths(-3)) { fi.Delete(); } } string sPath = LOT_FOLDER + _tDateTime.ToString("yyyyMMdd") + ".ini"; CIniFile IniSaveDayDate = new CIniFile(sPath); IniSaveDayDate.Save("Data", "dWorkTime ", _tData.dWorkTime); IniSaveDayDate.Save("Data", "dStopTime ", _tData.dStopTime); IniSaveDayDate.Save("Data", "dErrTime ", _tData.dErrTime); IniSaveDayDate.Save("Data", "dTotalTime", _tData.dTotalTime); IniSaveDayDate.Save("Data", "dUPEH ", _tData.dUPEH); IniSaveDayDate.Save("Data", "dUPH ", _tData.dUPH); IniSaveDayDate.Save("Data", "iWorkCnt ", _tData.iWorkCnt); IniSaveDayDate.Save("Data", "iLotCnt ", _tData.iLotCnt); return(true); }
public static bool LoadSave(bool _bLoad) { string sExeFolder = System.AppDomain.CurrentDomain.BaseDirectory; string sLotInfo = sExeFolder + "SeqData\\LotInfo.ini"; CIniFile IniLotInfo = new CIniFile(sLotInfo); string sLot = ""; int LotCount = 0; if (_bLoad) { IniLotInfo.Load("Total ", "LotCount", ref LotCount); IniLotInfo.Load("Total ", "LotOpened", ref LotOpened); IniLotInfo.Load("Total ", "LotEnded", ref LotEnded); IniLotInfo.Load("Total ", "iWorkMgzCnt", ref iWorkMgzCnt); IniLotInfo.Load("Total ", "CrntLotData", ref CrntLotData); IniLotInfo.Load("Total ", "LastPopLot", ref LastPopLot); LotList.Clear(); for (int i = 0; i < LotCount; i++) { IniLotInfo.Load("LotList ", i.ToString(), ref sLot); LotList.Add(sLot); } } else { LotCount = LotList.Count; IniLotInfo.Save("Total ", "LotCount", LotCount); IniLotInfo.Save("Total ", "LotOpened", LotOpened); IniLotInfo.Save("Total ", "LotEnded", LotEnded); IniLotInfo.Save("Total ", "iWorkMgzCnt", iWorkMgzCnt); IniLotInfo.Save("Total ", "CrntLotData", CrntLotData); IniLotInfo.Save("Total ", "LastPopLot", LastPopLot); for (int i = 0; i < LotCount; i++) { sLot = LotList[i]; IniLotInfo.Save("LotList ", i.ToString(), sLot); } } return(true); }
public void SaveDataCnt(double _dStartTime, string _sLotNo, int [] _ChipCnts) { //if(_ChipCnts.Length != (int)cs.MAX_CHIP_STAT) return ; //Read&Write. string sSPCFolder = System.IO.Directory.GetParent(SPC.LOT.Folder).Parent.FullName.ToString(); string sDataPath = ""; string sToday = DateTime.FromOADate(_dStartTime).ToString("yyyyMMdd");//DateTime.Now.ToString("yyyyMMdd"); sDataPath = sSPCFolder + "\\DataMap\\" + sToday + "\\" + _sLotNo + "\\Data.cnt"; DirectoryInfo di = new DirectoryInfo(Path.GetDirectoryName(sDataPath)); if (!di.Exists) { di.Create(); } CIniFile Ini = new CIniFile(sDataPath); Ini.Save("ChipCount", "Rslt", _ChipCnts); }
public bool LoadSave(bool _bLoad) { string sSelLan; string sIndex; switch (m_eLangSel) { default: sSelLan = "E_"; break; case EN_LAN_SEL.English: sSelLan = "E_"; break; case EN_LAN_SEL.Korean: sSelLan = "K_"; break; case EN_LAN_SEL.Chinese: sSelLan = "C_"; break; } if (_bLoad) { CIniFile InputConfig = new CIniFile(m_sParaFolderPath + "Input.ini"); for (int i = 0; i < m_iMaxIn; i++) { sIndex = string.Format("Input({0:000})", i); InputConfig.Load("Address ", sIndex, out m_aIn[i].Para.iAdd); InputConfig.Load("Invert ", sIndex, out m_aIn[i].Para.bInv); InputConfig.Load("Enum ", sIndex, out m_aIn[i].Para.sEnum); InputConfig.Load(sSelLan + "Name ", sIndex, out m_aIn[i].Para.sName); InputConfig.Load(sSelLan + "Comment ", sIndex, out m_aIn[i].Para.SComt); InputConfig.Load("OnDelay ", sIndex, out m_aIn[i].Para.iOnDelay); InputConfig.Load("OffDelay ", sIndex, out m_aIn[i].Para.iOffDelay); InputConfig.Load("NotLog ", sIndex, out m_aIn[i].Para.bNotLog); } CIniFile OutputConfig = new CIniFile(m_sParaFolderPath + "Output.ini"); for (int i = 0; i < m_iMaxOut; i++) { sIndex = string.Format("Output({0:000})", i); OutputConfig.Load("Address ", sIndex, out m_aOut[i].Para.iAdd); OutputConfig.Load("Invert ", sIndex, out m_aOut[i].Para.bInv); OutputConfig.Load("Enum ", sIndex, out m_aOut[i].Para.sEnum); OutputConfig.Load(sSelLan + "Name ", sIndex, out m_aOut[i].Para.sName); OutputConfig.Load(sSelLan + "Comment ", sIndex, out m_aOut[i].Para.SComt); OutputConfig.Load("OnDelay ", sIndex, out m_aOut[i].Para.iOnDelay); OutputConfig.Load("OffDelay ", sIndex, out m_aOut[i].Para.iOffDelay); OutputConfig.Load("NotLog ", sIndex, out m_aOut[i].Para.bNotLog); } } else { CIniFile InputConfig = new CIniFile(m_sParaFolderPath + "Input.ini"); for (int i = 0; i < m_iMaxIn; i++) { sIndex = string.Format("Input({0:000})", i); InputConfig.Save("Address ", sIndex, m_aIn[i].Para.iAdd); InputConfig.Save("Invert ", sIndex, m_aIn[i].Para.bInv); InputConfig.Save("Enum ", sIndex, m_aIn[i].Para.sEnum); InputConfig.Save(sSelLan + "Name ", sIndex, m_aIn[i].Para.sName); InputConfig.Save(sSelLan + "Comment ", sIndex, m_aIn[i].Para.SComt); InputConfig.Save("OnDelay ", sIndex, m_aIn[i].Para.iOnDelay); InputConfig.Save("OffDelay ", sIndex, m_aIn[i].Para.iOffDelay); InputConfig.Save("NotLog ", sIndex, m_aIn[i].Para.bNotLog); } CIniFile OutputConfig = new CIniFile(m_sParaFolderPath + "Output.ini"); for (int i = 0; i < m_iMaxOut; i++) { sIndex = string.Format("Output({0:000})", i); OutputConfig.Save("Address ", sIndex, m_aOut[i].Para.iAdd); OutputConfig.Save("Invert ", sIndex, m_aOut[i].Para.bInv); OutputConfig.Save("Enum ", sIndex, m_aOut[i].Para.sEnum); OutputConfig.Save(sSelLan + "Name ", sIndex, m_aOut[i].Para.sName); OutputConfig.Save(sSelLan + "Comment ", sIndex, m_aOut[i].Para.SComt); OutputConfig.Save("OnDelay ", sIndex, m_aOut[i].Para.iOnDelay); OutputConfig.Save("OffDelay ", sIndex, m_aOut[i].Para.iOffDelay); OutputConfig.Save("NotLog ", sIndex, m_aOut[i].Para.bNotLog); } } return(true); }
public void LoadSaveLotIni(bool _bLoad) { string sPath; sPath = LOT_FOLDER + LOT.GetLotNo() + "\\LotInfo.ini"; if (_bLoad) { CIniFile IniLoadLotInfo = new CIniFile(sPath); IniLoadLotInfo.Load("Data", "sLotId ", out m_tData.sLotId); IniLoadLotInfo.Load("Data", "iWorkCnt ", out m_tData.iWorkCnt); IniLoadLotInfo.Load("Data", "dSttTime ", out m_tData.dSttTime); IniLoadLotInfo.Load("Data", "dEndTime ", out m_tData.dEndTime); IniLoadLotInfo.Load("Data", "dWorkTime ", out m_tData.dWorkTime); IniLoadLotInfo.Load("Data", "dErrTime ", out m_tData.dErrTime); IniLoadLotInfo.Load("Data", "dStopTime ", out m_tData.dStopTime); IniLoadLotInfo.Load("Data", "dTotalTime", out m_tData.dTotalTime); IniLoadLotInfo.Load("Data", "dUPEH ", out m_tData.dUPEH); IniLoadLotInfo.Load("Data", "dUPH ", out m_tData.dUPH); IniLoadLotInfo.Load("Data", "sJobFile ", out m_tData.sJobFile); } else { CIniFile IniSaveLotInfo = new CIniFile(sPath); IniSaveLotInfo.Save("Data", "sLotId ", m_tData.sLotId); IniSaveLotInfo.Save("Data", "iWorkCnt ", m_tData.iWorkCnt); IniSaveLotInfo.Save("Data", "dSttTime ", m_tData.dSttTime); IniSaveLotInfo.Save("Data", "dEndTime ", m_tData.dEndTime); IniSaveLotInfo.Save("Data", "dWorkTime ", m_tData.dWorkTime); IniSaveLotInfo.Save("Data", "dErrTime ", m_tData.dErrTime); IniSaveLotInfo.Save("Data", "dStopTime ", m_tData.dStopTime); IniSaveLotInfo.Save("Data", "dTotalTime", m_tData.dTotalTime); IniSaveLotInfo.Save("Data", "dUPEH ", m_tData.dUPEH); IniSaveLotInfo.Save("Data", "dUPH ", m_tData.dUPH); IniSaveLotInfo.Save("Data", "sJobFile ", m_tData.sJobFile); } }
public void SavePat(string _sFileName) { string sPath, sNum; int iNum; sPath = _sFileName; CIniFile IniPattern = new CIniFile(sPath); for (iNum = 0; iNum < MAX_HGHT_CMD; iNum++) { sNum = iNum.ToString(); IniPattern.Save("PatternPara", "m_dHghtXPos" + sNum, HghtPos[iNum].dPosX); IniPattern.Save("PatternPara", "m_dHghtYPos" + sNum, HghtPos[iNum].dPosY); IniPattern.Save("PatternPara", "m_dHghtZPos" + sNum, HghtPos[iNum].dPosZ); } IniPattern.Save("PatternPara", "m_dXScale", m_dXScale); IniPattern.Save("PatternPara", "m_dYScale", m_dYScale); IniPattern.Save("PatternPara", "m_dXSttOffset", m_dXSttOffset); IniPattern.Save("PatternPara", "m_dYSttOffset", m_dYSttOffset); IniPattern.Save("PatternPara", "m_dSpeed", m_dSpeed); IniPattern.Save("PatternPara", "m_iHghtPosCnt", m_iHghtPosCnt); IniPattern.Save("PatternPara", "m_dAcc", m_dAcc); IniPattern.Save("PatternPara", "m_dDec", m_dDec); }
public void SavePat(string _sFileName) { string sPath, sNum; int iNum; sPath = _sFileName; CIniFile IniPattern = new CIniFile(sPath); for (iNum = 0; iNum < MAX_DSP_CMD; iNum++) { sNum = iNum.ToString(); IniPattern.Save("PatternPara", "dPosX" + sNum, DspPos[iNum].dPosX); IniPattern.Save("PatternPara", "dPosY" + sNum, DspPos[iNum].dPosY); IniPattern.Save("PatternPara", "dPosZ" + sNum, DspPos[iNum].dPosZ); IniPattern.Save("PatternPara", "bDispOn" + sNum, DspPos[iNum].bDispOn); } IniPattern.Save("PatternPara", "m_dXScale", m_dXScale); IniPattern.Save("PatternPara", "m_dYScale", m_dYScale); IniPattern.Save("PatternPara", "m_dXSttOffset", m_dXSttOffset); IniPattern.Save("PatternPara", "m_dYSttOffset", m_dYSttOffset); IniPattern.Save("PatternPara", "m_dSpeed", m_dSpeed); IniPattern.Save("PatternPara", "m_iDispPosCnt", m_iDispPosCnt); IniPattern.Save("PatternPara", "m_dAcc", m_dAcc); IniPattern.Save("PatternPara", "m_dDec", m_dDec); }
public bool LoadSave(bool _bLoad) { //if(_bLoad) //{ // CConfig Config = new CConfig(); // Config.Load(m_sParaFolderPath + "TowerLamp.ini",CConfig.EN_CONFIG_FILE_TYPE.ftIni); // // sIndex = "Para"; // Config.GetValue("iRedAdd",sIndex,out Para.iRedAdd); // Config.GetValue("iYelAdd",sIndex,out Para.iYelAdd); // Config.GetValue("iGrnAdd",sIndex,out Para.iGrnAdd); // Config.GetValue("iSndAdd",sIndex,out Para.iSndAdd); // // int iTemp; // sIndex = "LampInfo"; // for(int i = 0 ; i < (int)EN_SEQ_STAT.MAX_SEQ_STAT ; i++) // { // Config.GetValue("iRed ",sIndex,out iTemp);Para.LampInfo[i].iRed = (EN_LAMP_OPER)iTemp ; // Config.GetValue("iYel ",sIndex,out iTemp);Para.LampInfo[i].iYel = (EN_LAMP_OPER)iTemp ; // Config.GetValue("iGrn ",sIndex,out iTemp);Para.LampInfo[i].iGrn = (EN_LAMP_OPER)iTemp ; // Config.GetValue("iBuzz",sIndex,out iTemp);Para.LampInfo[i].iBuzz= (EN_LAMP_OPER)iTemp ; // } //} //else //{ // CConfig Config = new CConfig(); // // sIndex = "Para"; // Config.SetValue("iRedAdd",sIndex, Para.iRedAdd); // Config.SetValue("iYelAdd",sIndex, Para.iYelAdd); // Config.SetValue("iGrnAdd",sIndex, Para.iGrnAdd); // Config.SetValue("iSndAdd",sIndex, Para.iSndAdd); // // sIndex = "LampInfo"; // for(int i = 0;i < (int)EN_SEQ_STAT.MAX_SEQ_STAT;i++) // { // Config.SetValue("iRed ",sIndex,(int)Para.LampInfo[i].iRed); // Config.SetValue("iYel ",sIndex,(int)Para.LampInfo[i].iYel); // Config.SetValue("iGrn ",sIndex,(int)Para.LampInfo[i].iGrn); // Config.SetValue("iBuzz",sIndex,(int)Para.LampInfo[i].iBuzz); // } // Config.Save(m_sParaFolderPath + "TowerLamp.ini",CConfig.EN_CONFIG_FILE_TYPE.ftIni); //} string sIndex; CConfig Config = new CConfig(); if (_bLoad) { CIniFile TLampConfig = new CIniFile(m_sParaFolderPath + "TowerLamp.ini"); int iTemp; for (int i = 0; i < (int)EN_SEQ_STAT.MAX_SEQ_STAT; i++) { sIndex = string.Format("TOWER_LAMP({0:0000})", i); TLampConfig.Load("iRed ", sIndex, out iTemp); Para.LampInfo[i].iRed = (EN_LAMP_OPER)iTemp; TLampConfig.Load("iYel ", sIndex, out iTemp); Para.LampInfo[i].iYel = (EN_LAMP_OPER)iTemp; TLampConfig.Load("iGrn ", sIndex, out iTemp); Para.LampInfo[i].iGrn = (EN_LAMP_OPER)iTemp; TLampConfig.Load("iBuzz", sIndex, out iTemp); Para.LampInfo[i].iBuzz = (EN_LAMP_OPER)iTemp; } sIndex = "m_aAdd"; TLampConfig.Load(sIndex, "iRedAdd", out Para.iRedAdd); TLampConfig.Load(sIndex, "iYelAdd", out Para.iYelAdd); TLampConfig.Load(sIndex, "iGrnAdd", out Para.iGrnAdd); TLampConfig.Load(sIndex, "iSndAdd", out Para.iSndAdd); } else { CIniFile TLampConfig = new CIniFile(m_sParaFolderPath + "TowerLamp.ini"); for (int i = 0; i < (int)EN_SEQ_STAT.MAX_SEQ_STAT; i++) { sIndex = string.Format("TOWER_LAMP({0:0000})", i); TLampConfig.Save("iRed ", sIndex, (int)Para.LampInfo[i].iRed); TLampConfig.Save("iYel ", sIndex, (int)Para.LampInfo[i].iYel); TLampConfig.Save("iGrn ", sIndex, (int)Para.LampInfo[i].iGrn); TLampConfig.Save("iBuzz", sIndex, (int)Para.LampInfo[i].iBuzz); } sIndex = "m_aAdd"; TLampConfig.Save(sIndex, "iRedAdd", Para.iRedAdd); TLampConfig.Save(sIndex, "iYelAdd", Para.iYelAdd); TLampConfig.Save(sIndex, "iGrnAdd", Para.iGrnAdd); TLampConfig.Save(sIndex, "iSndAdd", Para.iSndAdd); } return(true); }
//public bool LoadSave(bool _bLoad) //{ // CConfig Config = new CConfig(); // // //LoadSave(bool _bLoad, int _iCylNo , ref CConfig _Config) // if(_bLoad) // { // Config.Load(m_sParaFolderPath + "Cylinder.ini",CConfig.EN_CONFIG_FILE_TYPE.ftIni); // for(int i = 0;i < m_iMaxCylinder;i++) // { // m_aCylinder[i].LoadSave(true,i,ref Config); // } // } // else // { // // for(int i = 0;i < m_iMaxCylinder;i++) // { // m_aCylinder[i].LoadSave(false,i,ref Config); // } // Config.Save(m_sParaFolderPath + "Cylinder.ini",CConfig.EN_CONFIG_FILE_TYPE.ftIni); // } // return true; //} public bool LoadSave(bool _bLoad) { CConfig Config = new CConfig(); string sSelLan; string sCylNo; switch (m_eLangSel) { default: sSelLan = "E_"; break; case EN_LAN_SEL.English: sSelLan = "E_"; break; case EN_LAN_SEL.Korean: sSelLan = "K_"; break; case EN_LAN_SEL.Chinese: sSelLan = "C_"; break; } if (_bLoad) { CIniFile CylConfig = new CIniFile(m_sParaFolderPath + "Cylinder.ini"); int iDirType = 0; for (int i = 0; i < m_iMaxCylinder; i++) { sCylNo = string.Format("Cylinder({0:000})", i); CylConfig.Load("sEnum", sCylNo, out m_aCylinder[i].Para.sEnum); CylConfig.Load(sSelLan + "sName", sCylNo, out m_aCylinder[i].Para.sName); CylConfig.Load(sSelLan + "sComment", sCylNo, out m_aCylinder[i].Para.sComment); CylConfig.Load("iFwdXAdd", sCylNo, out m_aCylinder[i].Para.iFwdXAdd); CylConfig.Load("iBwdXAdd", sCylNo, out m_aCylinder[i].Para.iBwdXAdd); CylConfig.Load("iFwdYAdd", sCylNo, out m_aCylinder[i].Para.iFwdYAdd); CylConfig.Load("iBwdYAdd", sCylNo, out m_aCylinder[i].Para.iBwdYAdd); CylConfig.Load("iFwdOnDelay", sCylNo, out m_aCylinder[i].Para.iFwdOnDelay); CylConfig.Load("iBwdOnDelay", sCylNo, out m_aCylinder[i].Para.iBwdOnDelay); CylConfig.Load("iFwdTimeOut", sCylNo, out m_aCylinder[i].Para.iFwdTimeOut); CylConfig.Load("iBwdTimeOut", sCylNo, out m_aCylinder[i].Para.iBwdTimeOut); CylConfig.Load("eDirType", sCylNo, out iDirType); CylConfig.Load("bActrSync", sCylNo, out m_aCylinder[i].Para.bActrSync); CylConfig.Load("iActrSync", sCylNo, out m_aCylinder[i].Para.iActrSync); CylConfig.Load("iRptDelay", sCylNo, out Repeat.iDelay); m_aCylinder[i].Para.eDirType = (EN_MOVE_DIRECTION)iDirType; } } else { CIniFile CylConfig = new CIniFile(m_sParaFolderPath + "Cylinder.ini"); for (int i = 0; i < m_iMaxCylinder; i++) { sCylNo = string.Format("Cylinder({0:000})", i); CylConfig.Save("sEnum", sCylNo, m_aCylinder[i].Para.sEnum); CylConfig.Save(sSelLan + "sName", sCylNo, m_aCylinder[i].Para.sName); CylConfig.Save(sSelLan + "sComment", sCylNo, m_aCylinder[i].Para.sComment); CylConfig.Save("iFwdXAdd", sCylNo, m_aCylinder[i].Para.iFwdXAdd); CylConfig.Save("iBwdXAdd", sCylNo, m_aCylinder[i].Para.iBwdXAdd); CylConfig.Save("iFwdYAdd", sCylNo, m_aCylinder[i].Para.iFwdYAdd); CylConfig.Save("iBwdYAdd", sCylNo, m_aCylinder[i].Para.iBwdYAdd); CylConfig.Save("iFwdOnDelay", sCylNo, m_aCylinder[i].Para.iFwdOnDelay); CylConfig.Save("iBwdOnDelay", sCylNo, m_aCylinder[i].Para.iBwdOnDelay); CylConfig.Save("iFwdTimeOut", sCylNo, m_aCylinder[i].Para.iFwdTimeOut); CylConfig.Save("iBwdTimeOut", sCylNo, m_aCylinder[i].Para.iBwdTimeOut); CylConfig.Save("eDirType", sCylNo, (int)m_aCylinder[i].Para.eDirType); CylConfig.Save("bActrSync", sCylNo, m_aCylinder[i].Para.bActrSync); CylConfig.Save("iActrSync", sCylNo, m_aCylinder[i].Para.iActrSync); CylConfig.Save("iRptDelay", sCylNo, Repeat.iDelay); } } return(true); }