/// <summary> /// Status of the plugin changed /// </summary> /// <param name="sender"></param> /// <param name="args"></param> public void PluginStatusChanged(IPlugin sender, StatusEventArgs args) { if (args.StatusChangedMode == StatusChangedMode.ImageUpdate) { imageIndex = args.ImageIndex; if (WorkspaceModel.ExecutionEngine == null || !WorkspaceModel.ExecutionEngine.IsRunning()) { if (WorkspaceModel.MyEditor != null && WorkspaceModel.MyEditor.Presentation != null && UpdateableView != null) { WorkspaceModel.MyEditor.Presentation.Dispatcher.Invoke(DispatcherPriority.Normal, (SendOrPostCallback) delegate { UpdateableView.update(); }, null); } } } }
public void getFilteredResults(UpdateableView view, int value, bool moreThan, bool lessThan) { List <Car> filteredCars = new List <Car>(); foreach (Car c in cars) { if (moreThan || lessThan) { if (moreThan && c.MaxSpeed > value) { filteredCars.Add(c); } else if (!moreThan && c.MaxSpeed < value) { filteredCars.Add(c); } } else { filteredCars.Add(c); } } view.updateView(filteredCars); }