|
Chronos Plugins 5.11.0
This documentation covers the plugin interfaces definitions and an example implementation.
|
Provides an endless supply of nonsense sample lists. More...
Public Member Functions | |
| MockSampleListWorker () | |
| void | DoYourJob () |
| Take over control. When this function exits, Chronos is in charge again. | |
| void | Dispose () |
Static Public Member Functions | |
| static IEnumerable< string > | GetFakeLogs (string creator) |
| Creates a few fake log files. | |
Protected Member Functions | |
| virtual void | OnPropertyChanged ([CallerMemberName] string propertyName=null) |
Properties | |
| string | ButtonCaption = NormalButtonLabel [get, private set] |
| Shown on the sample list page. | |
| System.Drawing.Icon | ButtonIcon = Properties.Resources.MockNormal [get, private set] |
| Shown in the button, preferred size 22x22. | |
| ISampleListAccessor | SampleList [set] |
| Here we get an helper that allows us to manipulate the current sample list. | |
| IEnumerable< IDevice > | ConfiguredDevices [get, set] |
| List of IDevice for all configured devices in Chronos. | |
| IEnumerable< string > | LogPaths [get] |
| Provide full paths to each of your log files here. | |
| Func< StopRunArgs, Task > | StopRun [set] |
| Callback function returning a task that completes once the schedule queue was stopped. | |
Events | |
| RunSampleListHandler | RunSampleList |
| PropertyChangedEventHandler | PropertyChanged |
| Events inherited from AxelSemrau.Chronos.Plugin.INeedToRunSampleLists | |
| RunSampleListHandler | RunSampleList |
| Trigger this event to actually create and run a schedule. | |
Private Member Functions | |
| bool | OneMoreScheduleWanted (Window ownerWin) |
| Ask the user if he wants to start more schedules. | |
| void | HandleAbortButton (ShowPluginIsInCharge win) |
| void | HandleStopButton (ShowPluginIsInCharge win) |
| void | TurnOffResets () |
| void | DoOnGUIThread (Action theAction) |
| Execute the specified action in the GUI thread's context. | |
Private Attributes | |
| readonly TaskFactory | mGuiFactory |
| Func< StopRunArgs, Task > | mStopRun |
Static Private Attributes | |
| const string | NormalButtonLabel = "Run plugin provided\r\nsample lists" |
Provides an endless supply of nonsense sample lists.
A possible serious use would be to generate sample lists from LIMS data and to feed them to Chronos.
Definition at line 30 of file MockSampleListWorker.cs.
| MockPlugin.SampleList.MockSampleListWorker.MockSampleListWorker | ( | ) |
Definition at line 40 of file MockSampleListWorker.cs.
References AxelSemrau.Chronos.Plugin.Helpers.Gui, AxelSemrau.Chronos.Plugin.IGuiHelper.GuiThreadScheduler, and mGuiFactory.
| void MockPlugin.SampleList.MockSampleListWorker.Dispose | ( | ) |
Definition at line 218 of file MockSampleListWorker.cs.
References MockPlugin.SampleList.RemotePluginService.StopService().
|
private |
Execute the specified action in the GUI thread's context.
| theAction |
Definition at line 190 of file MockSampleListWorker.cs.
References mGuiFactory.
Referenced by DoYourJob(), and OneMoreScheduleWanted().
| void MockPlugin.SampleList.MockSampleListWorker.DoYourJob | ( | ) |
Take over control. When this function exits, Chronos is in charge again.
We show some dialog window to make clear what we are doing, and that we are in charge.
Implements AxelSemrau.Chronos.Plugin.IWorkWithSampleLists.
Definition at line 76 of file MockSampleListWorker.cs.
References ButtonCaption, ButtonIcon, AxelSemrau.Chronos.Plugin.Helpers.Debug, DoOnGUIThread(), AxelSemrau.Chronos.Core.ExecutionQueue, AxelSemrau.Chronos.Plugin.Helpers.Gui, HandleAbortButton(), HandleStopButton(), AxelSemrau.Chronos.Plugin.IGuiHelper.MainWindow, NormalButtonLabel, OneMoreScheduleWanted(), OnPropertyChanged(), AxelSemrau.Chronos.Plugin.IGuiHelper.OwnMyWindow(), AxelSemrau.Chronos.IScheduleQueue.RemoveFailedPlanners(), RunSampleList, AxelSemrau.Chronos.Plugin.IDebugHelper.TraceWrite(), and TurnOffResets().
|
static |
Creates a few fake log files.
| creator |
Definition at line 237 of file MockSampleListWorker.cs.
|
private |
Definition at line 133 of file MockSampleListWorker.cs.
References AxelSemrau.Chronos.Plugin.Helpers.Gui, AxelSemrau.Chronos.Plugin.IGuiHelper.GuiThreadScheduler, and mStopRun.
Referenced by DoYourJob().
|
private |
Definition at line 155 of file MockSampleListWorker.cs.
References AxelSemrau.Chronos.Plugin.Helpers.Gui, AxelSemrau.Chronos.Plugin.IGuiHelper.GuiThreadScheduler, and mStopRun.
Referenced by DoYourJob().
|
private |
Ask the user if he wants to start more schedules.
| ownerWin |
For a real plugin, this could be some check whether the analytical results of the last sample require intervention or not, before injecting the next sample.
Definition at line 60 of file MockSampleListWorker.cs.
References DoOnGUIThread().
Referenced by DoYourJob().
|
protectedvirtual |
Definition at line 225 of file MockSampleListWorker.cs.
References PropertyChanged.
Referenced by DoYourJob().
|
private |
Definition at line 177 of file MockSampleListWorker.cs.
References ConfiguredDevices.
Referenced by DoYourJob().
|
private |
Definition at line 38 of file MockSampleListWorker.cs.
Referenced by DoOnGUIThread(), and MockSampleListWorker().
|
private |
Definition at line 247 of file MockSampleListWorker.cs.
Referenced by HandleAbortButton(), and HandleStopButton().
|
staticprivate |
Definition at line 37 of file MockSampleListWorker.cs.
Referenced by DoYourJob().
|
getprivate set |
Shown on the sample list page.
You can update this using INotifyPropertyChanged.
Implements AxelSemrau.Chronos.Plugin.IWorkWithSampleLists.
Definition at line 48 of file MockSampleListWorker.cs.
Referenced by DoYourJob().
|
getprivate set |
Shown in the button, preferred size 22x22.
You can update this using INotifyPropertyChanged.
Implements AxelSemrau.Chronos.Plugin.IWorkWithSampleLists.
Definition at line 50 of file MockSampleListWorker.cs.
Referenced by DoYourJob().
|
getset |
List of IDevice for all configured devices in Chronos.
Use with caution!
Implements AxelSemrau.Chronos.Plugin.IDirectDeviceAccess.
Definition at line 214 of file MockSampleListWorker.cs.
Referenced by TurnOffResets().
|
get |
Provide full paths to each of your log files here.
Implements AxelSemrau.Chronos.Plugin.IProvideDiagnosticLogs.
Definition at line 230 of file MockSampleListWorker.cs.
|
set |
Here we get an helper that allows us to manipulate the current sample list.
Implements AxelSemrau.Chronos.Plugin.INeedCellAccess.
Definition at line 202 of file MockSampleListWorker.cs.
|
set |
Callback function returning a task that completes once the schedule queue was stopped.
Implements AxelSemrau.Chronos.Plugin.IStopRuns.
Definition at line 248 of file MockSampleListWorker.cs.
| PropertyChangedEventHandler MockPlugin.SampleList.MockSampleListWorker.PropertyChanged |
Definition at line 223 of file MockSampleListWorker.cs.
Referenced by OnPropertyChanged().
| RunSampleListHandler MockPlugin.SampleList.MockSampleListWorker.RunSampleList |
Definition at line 195 of file MockSampleListWorker.cs.
Referenced by DoYourJob().