protected override void WriteComp(CompInfoTemp c, int compBufferNo, List <int> homeBufferNo, ref string scripts) { string CHM = c.content[KeyWordDef.HM]; if (!CHM.Contains("D")) { TextFunctions.AppendMultiRepeat( ref scripts, "SingleAxisHome", new List <Dictionary <string, string> >() { new Dictionary <string, string>() { { "#AxisNo#", GetAxisNo(c).ToString() }, { "#NAME#", GetAxisName(c, false) }, { "@HG", GetHomeBufferNo(c, homeBufferNo).ToString() }, } }, CompManager.GetBufferIndex(compBufferNo, scripts), CompManager.GetBufferCount(compBufferNo, scripts) ); } bool CN = int.Parse(c.content[KeyWordDef.CN]) > 0 ? true : false; if (!CN) { return; } int index = GetHomeIndex(c, homeBufferNo, scripts); int count = GetHomeCount(c, homeBufferNo, scripts); List <Dictionary <string, string> > compDictList = new List <Dictionary <string, string> >() { new Dictionary <string, string>() { { "#AxisNo#", GetAxisNo(c).ToString() }, { "#BCNo#", compBufferNo.ToString() }, { "@CS", c.content[KeyWordDef.CS] }, { "@CT", c.content[KeyWordDef.CT] }, { "@CND", c.content[KeyWordDef.CND] }, { "#NAME#", GetAxisName(c, false) }, { "@HG", GetHomeBufferNo(c, homeBufferNo).ToString() }, } }; string repeatKeyWord = "CompRepeat"; TextFunctions.AppendMultiRepeat(ref scripts, repeatKeyWord, compDictList, index, count); index = CompManager.GetBufferIndex(compBufferNo, scripts); count = CompManager.GetBufferCount(compBufferNo, scripts); TextFunctions.AppendMultiRepeat(ref scripts, repeatKeyWord, compDictList, index, count); index = CompManager.GetBufferIndex(ST.DEF, scripts); TextFunctions.AppendMultiRepeat(ref scripts, repeatKeyWord, compDictList, index); }
protected override void WriteLaser(CompInfoTemp c, int laserBufferNo, ref string scripts) { int index = CompManager.GetBufferIndex(laserBufferNo, scripts); int count = CompManager.GetBufferCount(laserBufferNo, scripts); List <Dictionary <string, string> > LCMDictList = new List <Dictionary <string, string> >() { new Dictionary <string, string>() { { "#AxisNo#", (c.axisStart + 3).ToString() }, } }; string repeatKeyWord = "LaserRepeat_LCM_" + c.content[KeyWordDef.LM]; TextFunctions.AppendMultiRepeat(ref scripts, repeatKeyWord, LCMDictList, index, count); }
protected virtual int GetHomeCount(CompInfoTemp c, List <int> homeBufferNo, string scripts) { int count = CompManager.GetBufferCount(GetHomeBufferNo(c, homeBufferNo), scripts); return(count); }