/// <summary> /// /// </summary> /// <param name="e"></param> protected virtual void simulationStateChanged(SimulationStateUpdateEventArgs e) { if (SimulationStateChanged != null) { SimulationStateChanged(this, e); } }
/// <summary> /// Trigger function to start the Simulation State Chnge Event /// </summary> /// <param name="currentState"></param> private void triggerSimulationStateChangedEvent(Simulation_State currentState) { state = currentState; SimulationStateUpdateEventArgs myArgument = new SimulationStateUpdateEventArgs(); myArgument.simulationState = currentState; simulationStateChanged(myArgument); }
/// <summary> /// Event Handler from the Simulation Interface /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void simStateChenged(object sender, SimulationStateUpdateEventArgs e) { this.Dispatcher.Invoke(DispatcherPriority.Normal, new System.Windows.Threading.DispatcherOperationCallback(delegate { // Update the UI via a function updateSimulationStatusUi(e.simulationState); return(null); }), null); }