Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions InteractiveAutomationToolkit/Components/Calendar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/// <summary>
/// Widget to show/edit a datetime.
/// </summary>
public class Calendar : InteractiveWidget, IValidationWidget
public class Calendar : InteractiveWidget, IValidationWidget, IIsReadonlyWidget
{
private bool changed;
private bool focusLost;
Expand Down Expand Up @@ -38,11 +38,8 @@ public Calendar() : this(DateTime.Now)
}

/// <summary>
/// Gets or sets a value indicating whether the control is displayed in read-only mode.
/// Read-only mode causes the widgets to appear read-write but the user won't be able to change their value.
/// This only affects interactive scripts running in a web environment.
/// <inheritdoc/>
/// </summary>
/// <remarks>Available from DataMiner 10.4.1 onwards.</remarks>
public virtual bool IsReadOnly
{
get
Expand Down
7 changes: 2 additions & 5 deletions InteractiveAutomationToolkit/Components/CheckBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/// <summary>
/// A checkbox that can be selected or cleared.
/// </summary>
public class CheckBox : InteractiveWidget
public class CheckBox : InteractiveWidget, IIsReadonlyWidget
{
private bool changed;
private bool focusLost;
Expand Down Expand Up @@ -60,11 +60,8 @@ public event EventHandler<CheckBoxChangedEventArgs> Changed
}

/// <summary>
/// Gets or sets a value indicating whether the control is displayed in read-only mode.
/// Read-only mode causes the widgets to appear read-write but the user won't be able to change their value.
/// This only affects interactive scripts running in a web environment.
/// <inheritdoc/>
/// </summary>
/// <remarks>Available from DataMiner 10.4.1 onwards.</remarks>
public virtual bool IsReadOnly
{
get
Expand Down
7 changes: 2 additions & 5 deletions InteractiveAutomationToolkit/Components/DateTimePicker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/// <summary>
/// Widget to show/edit a datetime.
/// </summary>
public class DateTimePicker : TimePickerBase, IValidationWidget
public class DateTimePicker : TimePickerBase, IValidationWidget, IIsReadonlyWidget
{
private readonly AutomationDateTimePickerOptions dateTimePickerOptions;

Expand Down Expand Up @@ -371,11 +371,8 @@ public string ValidationText
}

/// <summary>
/// Gets or sets a value indicating whether the control is displayed in read-only mode.
/// Read-only mode causes the widgets to appear read-write but the user won't be able to change their value.
/// This only affects interactive scripts running in a web environment.
/// <inheritdoc/>
/// </summary>
/// <remarks>Available from DataMiner 10.4.1 onwards.</remarks>
public virtual bool IsReadOnly
{
get
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,8 @@
/// <summary>
/// Defines the base functionality for a checkboxlist widget, including properties for state management.
/// </summary>
public interface ICheckBoxListBase : IValidationWidget
public interface ICheckBoxListBase : IValidationWidget, IIsReadonlyWidget
{
/// <summary>
/// Gets or sets a value indicating whether the checkboxlist is read-only.
/// </summary>
bool IsReadOnly { get; set; }

/// <summary>
/// Gets or sets a value indicating whether the options in the checkboxlist are sorted.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,13 @@
using System;
using Skyline.DataMiner.Automation;

public interface IDropDownBase : IValidationWidget
public interface IDropDownBase : IValidationWidget, IIsReadonlyWidget
{
/// <summary>
/// Gets or sets a value indicating whether a filter box is available for the drop-down list.
/// </summary>
bool IsDisplayFilterShown { get; set; }

/// <summary>
/// Gets or sets a value indicating whether the control is displayed in read-only mode.
/// Read-only mode causes the widgets to appear read-write but the user won't be able to change their value.
/// This only affects interactive scripts running in a web environment.
/// </summary>
bool IsReadOnly { get; set; }

/// <summary>
/// Gets or sets a value indicating whether the options are sorted naturally.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace Skyline.DataMiner.Utils.InteractiveAutomationScript
{
public interface IIsReadonlyWidget
{
/// <summary>
/// Gets or sets a value indicating whether the control is displayed in read-only mode.
/// Read-only mode causes the widgets to appear read-write but the user won't be able to change their value.
/// This only affects interactive scripts running in a web environment.
/// </summary>
/// <remarks>Available from DataMiner 10.4.1 onwards.</remarks>
bool IsReadOnly { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,8 @@
/// <summary>
/// Defines the base functionality for a radio button list widget, including properties for state and appearance management.
/// </summary>
public interface IRadioButtonListBase
public interface IRadioButtonListBase : IIsReadonlyWidget
{
/// <summary>
/// Gets or sets a value indicating whether the radio button list is read-only.
/// </summary>
bool IsReadOnly { get; set; }

/// <summary>
/// Gets or sets a value indicating whether the options in the radio button list are sorted.
/// </summary>
Expand Down
8 changes: 3 additions & 5 deletions InteractiveAutomationToolkit/Components/Numeric.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/// A spinner or numeric up-down control.
/// Has a slider when the range is limited.
/// </summary>
public class Numeric : InteractiveWidget, IValidationWidget
public class Numeric : InteractiveWidget, IValidationWidget, IIsReadonlyWidget
{
private bool changed;
private bool focusLost;
Expand Down Expand Up @@ -255,12 +255,10 @@ public string ValidationText
}
}


/// <summary>
/// Gets or sets a value indicating whether the control is displayed in read-only mode.
/// Read-only mode causes the widgets to appear read-write but the user won't be able to change their value.
/// This only affects interactive scripts running in a web environment.
/// <inheritdoc/>
/// </summary>
/// <remarks>Available from DataMiner 10.4.1 onwards.</remarks>
public virtual bool IsReadOnly
{
get
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ public string Tooltip
}

/// <inheritdoc/>
/// <remarks>Available from DataMiner 10.4.1 onwards.</remarks>
public virtual bool IsReadOnly
{
get
Expand Down
7 changes: 2 additions & 5 deletions InteractiveAutomationToolkit/Components/TextBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/// <summary>
/// Widget that is used to edit and display text.
/// </summary>
public class TextBox : InteractiveWidget, IValidationWidget
public class TextBox : InteractiveWidget, IValidationWidget, IIsReadonlyWidget
{
private bool changed;
private bool focusLost;
Expand Down Expand Up @@ -193,11 +193,8 @@ public string ValidationText
}

/// <summary>
/// Gets or sets a value indicating whether the control is displayed in read-only mode.
/// Read-only mode causes the widgets to appear read-write but the user won't be able to change their value.
/// This only affects interactive scripts running in a web environment.
/// <inheritdoc/>
/// </summary>
/// <remarks>Available from DataMiner 10.4.1 onwards.</remarks>
public virtual bool IsReadOnly
{
get
Expand Down
7 changes: 2 additions & 5 deletions InteractiveAutomationToolkit/Components/Time.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/// <summary>
/// Widget to show/edit a time duration.
/// </summary>
public class Time : InteractiveWidget, IValidationWidget
public class Time : InteractiveWidget, IValidationWidget, IIsReadonlyWidget
{
private bool changed;
private bool focusLost;
Expand Down Expand Up @@ -38,11 +38,8 @@ public Time() : this(default)
}

/// <summary>
/// Gets or sets a value indicating whether the control is displayed in read-only mode.
/// Read-only mode causes the widgets to appear read-write but the user won't be able to change their value.
/// This only affects interactive scripts running in a web environment.
/// <inheritdoc/>
/// </summary>
/// <remarks>Available from DataMiner 10.4.1 onwards.</remarks>
public virtual bool IsReadOnly
{
get
Expand Down
7 changes: 2 additions & 5 deletions InteractiveAutomationToolkit/Components/TimePicker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/// <summary>
/// Widget to show/edit a time of day.
/// </summary>
public class TimePicker : TimePickerBase, IValidationWidget
public class TimePicker : TimePickerBase, IValidationWidget, IIsReadonlyWidget
{
private bool changed;
private bool focusLost;
Expand Down Expand Up @@ -293,11 +293,8 @@ public string ValidationText
}

/// <summary>
/// Gets or sets a value indicating whether the control is displayed in read-only mode.
/// Read-only mode causes the widgets to appear read-write but the user won't be able to change their value.
/// This only affects interactive scripts running in a web environment.
/// <inheritdoc/>
/// </summary>
/// <remarks>Available from DataMiner 10.4.1 onwards.</remarks>
public virtual bool IsReadOnly
{
get
Expand Down
7 changes: 2 additions & 5 deletions InteractiveAutomationToolkit/Components/TreeView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/// <summary>
/// A tree view structure.
/// </summary>
public class TreeView : InteractiveWidget
public class TreeView : InteractiveWidget, IIsReadonlyWidget
{
private Dictionary<string, bool> checkedItemCache;
private Dictionary<string, bool> collapsedItemCache; // TODO: should only contain Items with LazyLoading set to true
Expand Down Expand Up @@ -232,11 +232,8 @@ public string Tooltip
}

/// <summary>
/// Gets or sets a value indicating whether the control is displayed in read-only mode.
/// Read-only mode causes the widgets to appear read-write but the user won't be able to change their value.
/// This only affects interactive scripts running in a web environment.
/// <inheritdoc/>
/// </summary>
/// <remarks>Available from DataMiner 10.4.1 onwards.</remarks>
public virtual bool IsReadOnly
{
get
Expand Down