//starting the assemble file //.assembly extern mscorlib {} //.assembly Add //{ // .ver 1:0:1:0 //} //.class OuterClass //.method static void main() cil managed public override void InAProgram(AProgram node) { _output.WriteLine(".assembly extern mscorlib {}"); _output.WriteLine(".assembly Test"); _output.WriteLine("{"); _output.WriteLine("\t.ver 1:0:1:0"); _output.WriteLine("}"); // _output.WriteLine(".class OuterClass"); // _output.WriteLine("{"); }
public override int Execute <T>(T parameters) { switch (SubCommandName) { case "MESSAGE_CONFIRM": if (parameters is Dictionary <string, string> ) { Dictionary <string, string> values = parameters as Dictionary <string, string>; AProgram program = _component.GetProgram("CIM_MESSAGE_CONFIRM_REPORT"); program.ExecuteManual(values); } break; case "GLASS_DATA_REQUEST": if (parameters is Dictionary <string, string> ) { Dictionary <string, string> values = parameters as Dictionary <string, string>; AProgram program = _component.GetProgram("GLASS_DATA_REQUEST"); program.ExecuteManual(values); } break; case "GLASS_DATA_MODIFY": if (parameters is Dictionary <string, string> ) { Dictionary <string, string> values = parameters as Dictionary <string, string>; AProgram program = _component.GetProgram("GLASS_DATA_CHANGE_REPORT"); program.ExecuteManual(values); } break; case "JOB_JUDGE_CHANGE": if (parameters is Dictionary <string, string> ) { Dictionary <string, string> values = parameters as Dictionary <string, string>; AProgram program = _component.GetProgram("JOB_JUDGE_CHANGE"); program.ExecuteManual(values); } break; default: break; } return(0); }
public override void InAProgram(AProgram node) { // Build definitions for allowed types according to grammar. CS246 grammar only allows int, string, and float BasicTypeDefinition intType; intType = new BasicTypeDefinition(); intType.name = "int"; StringTypeDefinition stringType = new StringTypeDefinition(); stringType.name = "string"; BasicTypeDefinition floatType = new BasicTypeDefinition(); floatType.name = "float"; // Create and seed the symbolTable _globalSymbolTable = new Dictionary <string, Definition>(); _globalSymbolTable.Add("int", intType); _globalSymbolTable.Add("string", stringType); _globalSymbolTable.Add("float", floatType); }
public override void OutAProgram(AProgram node) { // _output.WriteLine("}"); _output.Close(); }
protected override int InnerExecute() { //0~9, a~z,A~Z string account = ""; //5 string password = ""; //5 //if (IsManualExecute) //{ // account = this.ProgramDataList[0].Value.ToString(); // password = this.ProgramDataList[1].Value.ToString(); // Log(string.Format("{0}\t{1}", _component.ControlName, string.Format("PGM DATA SEND MANUAL"))); //} //else //{ // string value = VI_USER_LOGIN_RECIPE.Value; // string[] temp = value.Split('|'); // if (temp != null && temp.Length == 3) // { // account = temp[1]; // password = temp[2]; // } //} if (_main.SystemConfig.UserAccount == null) { return(-1); } account = _main.SystemConfig.UserAccount; password = _main.SystemConfig.UserPassword; //받아서 처리하는 부분 //양전자 RECIPE 가져오는 곳 this.StatusChange(enumProgramStatus.PROCESSING); _main.MelsecNetMultiWordWriteByString(OW_RECIPE_CHANGE_AUTHORIZATION_USER_ACCOUNT, account, 5, ' '); _main.MelsecNetMultiWordWriteByString(OW_RECIPE_CHANGE_AUTHORIZATION_PASSWORD, password, 5, ' '); Log(string.Format("{0}\t{1}", _component.ControlName, string.Format("PGM DATA SEND - ACCOUNT={0} PASSWORD="******""; bool error = false; if (CTimeout.WaitSync(timeout, 10)) { string acceptAccount = _main.MelsecNetMultiWordReadToString(IW_RECIPE_CHANGE_PERMISSION_USER_ACCOUNT); string permissionCode = _main.MelsecNetWordRead(IW_RECIPE_CHANGE_PERMISSION_PERMISSION_CODE); if (acceptAccount.Trim() == account.Trim()) { if (permissionCode == PERMISSION_ACCEPT.ToString()) { //_main.SendData(new List<string>() { "USER_LOGIN_RECIPE_REPLY", "O" }); AProgram program = _component.GetProgram("PPID_RECIPE_MAP_REPORT"); program.ExecuteManual(_values); } else { error = true; tempMsg = string.Format("[{0}] Recipe Change Authorization Reject by BC", account.Trim()); } } else { error = true; tempMsg = string.Format("[{0}] Recipe Change Authorization Failure! Account mismatch error. RECV={1}", account.Trim(), acceptAccount.Trim()); } } else { error = true; _main.MelsecNetBitOnOff(OB_RECIPE_CHANGE_AUTHORIZATION, false); tempMsg = string.Format("[{0}] Recipe Change Authorization Failure! No response [timeout T1={1} sec]", account.Trim(), T1 / 1000); Log(string.Format("{0}\t{1}", _component.ControlName, tempMsg)); } if (!error) { return(0); } //_main.SendData(new List<string>() { "USER_LOGIN_RECIPE_REPLY", "X" }); Log(string.Format("{0}\t{1}", _component.ControlName, "PGM DATA DISPLAY")); #region 메시지 창 표시 string receivedTime = DateTime.Now.ToString("yyyyMMdd HH:mm:ss"); string msgId = "0"; string message = string.Format("[{0}] {1}", this.Name, tempMsg); string panelNo = "1"; CSubject subject = CUIManager.Inst.GetData("CIMMessage"); subject.SetValue("List", new List <string>() { "MESSAGE_SET", msgId, receivedTime, message, panelNo }); subject.Notify(); #endregion return(0); }