Chronos Plugins  5.2.0
This documentation covers the plugin interfaces definitions and an example implementation.
MockPlugin.Tasks.BrewFrappuccino.CompositionEditor Class Reference

Provide an editor for our complex parameter set, the standard component model way. More...

+ Inheritance diagram for MockPlugin.Tasks.BrewFrappuccino.CompositionEditor:
+ Collaboration diagram for MockPlugin.Tasks.BrewFrappuccino.CompositionEditor:

Public Member Functions

override UITypeEditorEditStyle GetEditStyle (ITypeDescriptorContext context)
 Which kind of editor should be shown? More...
 
override object EditValue (ITypeDescriptorContext context, IServiceProvider provider, object value)
 Pass the value to edit to our editor dialog and return the changed(?) value. More...
 

Detailed Description

Provide an editor for our complex parameter set, the standard component model way.

Definition at line 201 of file MockUseDeviceTasks.cs.

Member Function Documentation

◆ EditValue()

override object MockPlugin.Tasks.BrewFrappuccino.CompositionEditor.EditValue ( ITypeDescriptorContext  context,
IServiceProvider  provider,
object  value 
)

Pass the value to edit to our editor dialog and return the changed(?) value.

Parameters
context
provider
value
Returns

Definition at line 221 of file MockUseDeviceTasks.cs.

222  {
223  var editProvider = (IWindowsFormsEditorService)provider?.GetService(typeof(IWindowsFormsEditorService));
224  // create the editor form
225  var compData = (CompositionData)value;
226  // we could get a reference to the task here: var theTask = context.Instance as BrewFrappuccino;
227  using (var myEditor = new FrappuccinoCompositionEditor(compData))
228  {
229  // our editor will only modify the parameters if it has been closed by clicking OK
230  editProvider?.ShowDialog(myEditor);
231  }
232  return value;
233  }

◆ GetEditStyle()

override UITypeEditorEditStyle MockPlugin.Tasks.BrewFrappuccino.CompositionEditor.GetEditStyle ( ITypeDescriptorContext  context)

Which kind of editor should be shown?

Parameters
context
Returns

Definition at line 208 of file MockUseDeviceTasks.cs.

209  {
210  // we want a real dialog, not just a drop down box
211  return UITypeEditorEditStyle.Modal;
212  }

The documentation for this class was generated from the following file: