ancora una modifica x debug progName con char invalidi
This commit is contained in:
+7
-4
@@ -243,15 +243,18 @@ namespace IOB_WIN
|
||||
CncLib.Focas1.ODBEXEPRG answ = FANUC_ref.getPrgName();
|
||||
try
|
||||
{
|
||||
string nome = new string(answ.name);
|
||||
prgName= string.Format("{0}|{1}", answ.o_num, nome);
|
||||
lg.Info(answ.ToString());
|
||||
//string nome = string.Join("_",answ.name);
|
||||
string nome = new string(answ.name.Where(c => char.IsLetter(c) || char.IsDigit(c)).ToArray());
|
||||
//string nome = new string(answ.name);
|
||||
prgName = string.Format("{0}|{1}", answ.o_num, nome);
|
||||
}
|
||||
catch(Exception exc)
|
||||
catch (Exception exc)
|
||||
{
|
||||
lg.Error(exc, "Errore in getPrgName");
|
||||
}
|
||||
// pulisco il valore...
|
||||
prgName= prgName.Replace('\n', ' ').Replace('\r', ' ').Trim();
|
||||
prgName = prgName.Replace('\n', ' ').Replace('\r', ' ').Trim();
|
||||
return prgName;
|
||||
}
|
||||
|
||||
|
||||
@@ -869,7 +869,7 @@ namespace IOB_WIN
|
||||
// decodifica valore!
|
||||
string[] valori = qDecodeIN(queueVal);
|
||||
// aggiungo macchina e valore...
|
||||
answ += string.Format(@"{0}?flux={1}&valore={2}", currIobConf.codIOB, valori[1], valori[2]);
|
||||
answ += string.Format(@"{0}?flux={1}&&valore={2}", currIobConf.codIOB, valori[1], valori[2]);
|
||||
// aggiondo dataOra evento e corrente + contatore...
|
||||
answ += string.Format(@"&&dtEve={0}&&dtCurr={1:yyyyMMddHHmmssfff}&&cnt={2}", valori[0], DateTime.Now, valori[3]);
|
||||
return answ;
|
||||
|
||||
Reference in New Issue
Block a user