using System.ComponentModel;
namespace Microsoft.Win32.TaskScheduler
{
///
/// Represents a UI element that can edit tasks and their settings
///
public interface ITaskEditor : ITaskDefinitionEditor
{
///
/// Gets the current . This is only the task used to initialize this control. The updates made to the control are not registered.
///
/// The task.
[Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
Task Task { get; }
///
/// Gets or sets the folder for the task. If control is initialized with a , this value will be set to the folder of the registered task.
///
/// The task folder name.
[Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
string TaskFolder { get; set; }
///
/// Gets or sets the name of the task. If control is initialized with a , this value will be set to the name of the registered task.
///
/// The task name.
[Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
string TaskName { get; set; }
}
///
/// Represents a UI element that can edit task settings
///
public interface ITaskDefinitionEditor
{
///
/// Gets or sets a value indicating whether this is editor.Editable.
///
/// true if editor.Editable; otherwise, false.
[DefaultValue(false), Category("Behavior"), Description("Determines whether the task can be edited.")]
bool Editable { get; set; }
///
/// Gets or sets a value indicating whether errors are shown in the UI.
///
///
/// true if errors are shown; otherwise, false.
///
[DefaultValue(true), Category("Behavior"), Description("Determines whether errors are shown in the UI.")]
bool ShowErrors { get; set; }
///
/// Gets the in its edited state.
///
/// The task definition.
[Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
TaskDefinition TaskDefinition { get; }
///
/// Gets the assigned at initialization.
///
/// The task service.
[Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
TaskService TaskService { get; }
///
/// Gets or sets a value indicating whether this task definition is v2.
///
///
/// true if this task definition is v2; otherwise, false.
///
bool IsV2 { get; }
///
/// Reinitializes all the controls based on current values.
///
void ReinitializeControls();
}
///
/// Represents a UI element that can must be forced to refresh its state
///
public interface ITaskEditorUIElement
{
///
/// Refreshes the state of the elements within the control using values set within the control.
///
void RefreshState();
}
}