public override void Update(string sJSon) { c_Cell Cell = JsonConvert.DeserializeObject <c_Cell>(sJSon); bool b = false; int i = 0; if (m_ListOfCells != null) { foreach (c_Cell ListCell in m_ListOfCells) { if (ListCell.Name == Cell.Name) { b = true; break; } i++; } if (b) { m_ListOfCells[i] = Cell; } else { m_ListOfCells.Add(Cell); } } else { m_ListOfCells.Add(Cell); } //m_cMainView.Invoke((MethodInvoker)delegate { UpdateChart(); }); m_cFabric.update(); }
public void SetAutomode() { if (m_bAutoModeActive) { m_bAutoModeActive = false; m_bManualModeActive = true; m_sAutoModeBtnText = "Start"; m_sAutoModeText = "Automode: OFF"; } else { m_bAutoModeActive = true; m_bManualModeActive = false; m_sAutoModeBtnText = "Stop"; m_sAutoModeText = "Automode: ON"; } OnPropertyChange("m_bAutoModeActive"); OnPropertyChange("m_bManualModeActive"); OnPropertyChange("m_sAutoModeBtnText"); OnPropertyChange("m_sAutoModeText"); m_cFabric.m_bAutoModeActive = m_bAutoModeActive; m_cFabric.m_bFirstActionInAutoMode = m_bAutoModeActive; m_cFabric.m_bFirstActionInAutoMode = m_bAutoModeActive; m_cFabric.update(); }
public override void Update(string sJSon) { c_Action cPlcAction = new c_Action(); cPlcAction = JsonConvert.DeserializeObject <c_Action>(sJSon); if (m_cCurrentAction.m_sActionID == cPlcAction.m_sActionID) { m_cCurrentAction.m_iActionState = cPlcAction.m_iActionState; } m_cFabric.update(); }
public void Update() { m_cFabric.update(); }