Chronos Plugins 5.9.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 () |
Public Member Functions inherited from AxelSemrau.Chronos.Plugin.IWorkWithSampleLists |
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. | |
Properties inherited from AxelSemrau.Chronos.Plugin.IWorkWithSampleLists | |
Properties inherited from AxelSemrau.Chronos.Plugin.INeedCellAccess | |
Properties inherited from AxelSemrau.Chronos.Plugin.IDirectDeviceAccess | |
Properties inherited from AxelSemrau.Chronos.Plugin.IProvideDiagnosticLogs | |
Properties inherited from AxelSemrau.Chronos.Plugin.IStopRuns |
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 MockPlugin.SampleList.MockSampleListWorker.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 MockPlugin.SampleList.MockSampleListWorker.mGuiFactory.
Referenced by MockPlugin.SampleList.MockSampleListWorker.DoYourJob(), and MockPlugin.SampleList.MockSampleListWorker.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 MockPlugin.SampleList.MockSampleListWorker.ButtonCaption, MockPlugin.SampleList.MockSampleListWorker.ButtonIcon, AxelSemrau.Chronos.Plugin.Helpers.Debug, MockPlugin.SampleList.MockSampleListWorker.DoOnGUIThread(), AxelSemrau.Chronos.Core.ExecutionQueue, AxelSemrau.Chronos.Plugin.Helpers.Gui, MockPlugin.SampleList.MockSampleListWorker.HandleAbortButton(), MockPlugin.SampleList.MockSampleListWorker.HandleStopButton(), AxelSemrau.Chronos.Plugin.IGuiHelper.MainWindow, MockPlugin.SampleList.MockSampleListWorker.NormalButtonLabel, MockPlugin.SampleList.MockSampleListWorker.OneMoreScheduleWanted(), MockPlugin.SampleList.MockSampleListWorker.OnPropertyChanged(), AxelSemrau.Chronos.Plugin.IGuiHelper.OwnMyWindow(), AxelSemrau.Chronos.IScheduleQueue.RemoveFailedPlanners(), MockPlugin.SampleList.MockSampleListWorker.RunSampleList, AxelSemrau.Chronos.Plugin.IDebugHelper.TraceWrite(), and MockPlugin.SampleList.MockSampleListWorker.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 MockPlugin.SampleList.MockSampleListWorker.mStopRun.
Referenced by MockPlugin.SampleList.MockSampleListWorker.DoYourJob().
|
private |
Definition at line 155 of file MockSampleListWorker.cs.
References AxelSemrau.Chronos.Plugin.Helpers.Gui, AxelSemrau.Chronos.Plugin.IGuiHelper.GuiThreadScheduler, and MockPlugin.SampleList.MockSampleListWorker.mStopRun.
Referenced by MockPlugin.SampleList.MockSampleListWorker.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 MockPlugin.SampleList.MockSampleListWorker.DoOnGUIThread().
Referenced by MockPlugin.SampleList.MockSampleListWorker.DoYourJob().
|
protectedvirtual |
Definition at line 225 of file MockSampleListWorker.cs.
References MockPlugin.SampleList.MockSampleListWorker.PropertyChanged.
Referenced by MockPlugin.SampleList.MockSampleListWorker.DoYourJob().
|
private |
Definition at line 177 of file MockSampleListWorker.cs.
References MockPlugin.SampleList.MockSampleListWorker.ConfiguredDevices.
Referenced by MockPlugin.SampleList.MockSampleListWorker.DoYourJob().
|
private |
Definition at line 38 of file MockSampleListWorker.cs.
Referenced by MockPlugin.SampleList.MockSampleListWorker.DoOnGUIThread(), and MockPlugin.SampleList.MockSampleListWorker.MockSampleListWorker().
|
private |
Definition at line 247 of file MockSampleListWorker.cs.
Referenced by MockPlugin.SampleList.MockSampleListWorker.HandleAbortButton(), and MockPlugin.SampleList.MockSampleListWorker.HandleStopButton().
|
staticprivate |
Definition at line 37 of file MockSampleListWorker.cs.
Referenced by MockPlugin.SampleList.MockSampleListWorker.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 MockPlugin.SampleList.MockSampleListWorker.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 MockPlugin.SampleList.MockSampleListWorker.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 MockPlugin.SampleList.MockSampleListWorker.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 MockPlugin.SampleList.MockSampleListWorker.OnPropertyChanged().
RunSampleListHandler MockPlugin.SampleList.MockSampleListWorker.RunSampleList |
Definition at line 195 of file MockSampleListWorker.cs.
Referenced by MockPlugin.SampleList.MockSampleListWorker.DoYourJob().