2using System.ComponentModel;
16 private const string NoDevice =
"No device";
21 #region Not interesting for this example
43 [DynamicPropertyMaster]
62 if (propName ==
"Autosampler")
68 TypeDescriptor.Refresh(
this);
76 return new PropertyDescriptorCollection(
new PropertyDescriptor[]{dynProp});
98 var sb =
new StringBuilder(
"DynPropFor");
99 foreach (var someChar
in parentDevName??
"NoDevice")
101 if (
char.IsLetter(someChar))
106 return sb.ToString();
117 public override void SetValue(
object component,
object value) => mParent.mDynPropValue = value?.ToString();
Classes and interfaces that are meant for plugins. The classes and interfaces below this namespace ar...
Example task implementations. Since there are lots of things that can be done from a task,...
To be implemented by the "device driver" part of a Chronos plugin.
To be implemented if the task needs to access a device ("Autosampler" property in Chronos)
Implement this interface in your task if you want the method editor to notify it of changed propertie...
This task demonstrates how to make the property list depend on the picked autosampler.
string GetTaskAction()
Description of the tasks's action (for hints/time table)
void PostValidate()
Called after the schedule construction is completed.
void SetDevice(IDevice yourDevice)
React to a picked device.
override object GetPropertyOwner(PropertyDescriptor pd)
void Execute()
Do whatever you have to do with your parameters.
void PreValidate()
Called before the schedule construction is completed.
void PropertyEdited(string propName, object propValue)
This will be called as soon as a property was changed in the method editor.
override PropertyDescriptorCollection GetProperties()
Just a dynamic property named after the picked autosampler. The value is just redirected to the mDynP...
override void SetValue(object component, object value)
override void ResetValue(object component)
readonly MockDynamicPropsDependingOnDevice mParent
override bool ShouldSerializeValue(object component)
static string BuildPropName(string parentDevName)
override Type ComponentType
override bool CanResetValue(object component)
override object GetValue(object component)
MyPropertyDescriptor(MockDynamicPropsDependingOnDevice parent)
override Type PropertyType