public void Process(comAdditionsEvent _event) { try { this._Module._Heat.comAdditionsHistory.Add(_event); } catch { } }
public static int ComSenderMaterialNames(SteelMakingPatternEvent smPatt) { comAdditionsEvent comANames = new comAdditionsEvent(); for (int i = 0; i < smPatt.materialsName.Count; i++) { if (smPatt.materialsName[i] == null || smPatt.materialsName[i] == "") smPatt.materialsName[i] = " "; while (smPatt.materialsName[i].Length < 6) smPatt.materialsName[i] += " "; if (smPatt.materialsName[i].Length > 6) { //int extra = smPatt.materialsName[i].Length - 6;; smPatt.materialsName[i] = smPatt.materialsName[i].Remove(6); } } comANames.Bunker1MaterialName = smPatt.materialsName[0]; InstantLogger.log("Material name loaded = " + smPatt.materialsName[0], "Material 1", InstantLogger.TypeMessage.normal); comANames.Bunker2MaterialName = smPatt.materialsName[1]; InstantLogger.log("Material name loaded = " + smPatt.materialsName[1], "Material 2", InstantLogger.TypeMessage.normal); comANames.Bunker3MaterialName = smPatt.materialsName[2]; InstantLogger.log("Material name loaded = " + smPatt.materialsName[2], "Material 3", InstantLogger.TypeMessage.normal); comANames.Bunker4MaterialName = smPatt.materialsName[3]; InstantLogger.log("Material name loaded = " + smPatt.materialsName[3], "Material 4", InstantLogger.TypeMessage.normal); comANames.Bunker5MaterialName = smPatt.materialsName[4]; InstantLogger.log("Material name loaded = " + smPatt.materialsName[4], "Material 5", InstantLogger.TypeMessage.normal); comANames.Bunker6MaterialName = smPatt.materialsName[5]; InstantLogger.log("Material name loaded = " + smPatt.materialsName[5], "Material 6", InstantLogger.TypeMessage.normal); comANames.Bunker7MaterialName = smPatt.materialsName[6]; InstantLogger.log("Material name loaded = " + smPatt.materialsName[6], "Material 7", InstantLogger.TypeMessage.normal); comANames.Bunker8MaterialName = smPatt.materialsName[7]; InstantLogger.log("Material name loaded = " + smPatt.materialsName[7], "Material 8", InstantLogger.TypeMessage.normal); comANames.Bunker9MaterialName = smPatt.materialsName[8]; InstantLogger.log("Material name loaded = " + smPatt.materialsName[8], "Material 9", InstantLogger.TypeMessage.normal); comANames.Bunker10MaterialName = smPatt.materialsName[9]; InstantLogger.log("Material name loaded = " + smPatt.materialsName[9], "Material 10", InstantLogger.TypeMessage.normal); m_pushGate.PushEvent(comANames); Random rnd1 = new Random(); m_pushGate.PushEvent(new cntAdditionsEvent() {Counter = rnd1.Next(1000)}); return 0; }