diff --git a/Bonsai.Core/ElementCategory.cs b/Bonsai.Core/ElementCategory.cs index 02e0f8bda..1dc5ecfb1 100644 --- a/Bonsai.Core/ElementCategory.cs +++ b/Bonsai.Core/ElementCategory.cs @@ -1,4 +1,6 @@ -namespace Bonsai +using System; + +namespace Bonsai { /// /// Specifies the category of a workflow element. @@ -14,6 +16,7 @@ public enum ElementCategory /// A combinator that propagates only the elements of an observable sequence /// matching some specific condition. /// + [Obsolete] Condition, /// diff --git a/Bonsai.Core/Expressions/ConditionBuilder.cs b/Bonsai.Core/Expressions/ConditionBuilder.cs index cb6c47ddc..e495224b5 100644 --- a/Bonsai.Core/Expressions/ConditionBuilder.cs +++ b/Bonsai.Core/Expressions/ConditionBuilder.cs @@ -11,7 +11,6 @@ namespace Bonsai.Expressions /// [Obsolete] [ProxyType(typeof(Condition))] - [WorkflowElementCategory(ElementCategory.Condition)] [XmlType("Condition", Namespace = Constants.XmlNamespace)] [Description("Filters the elements of an observable sequence according to a condition specified by the encapsulated workflow.")] public class ConditionBuilder : Condition diff --git a/Bonsai.Core/Reactive/Condition.cs b/Bonsai.Core/Reactive/Condition.cs index c0589d0d1..c74d785c2 100644 --- a/Bonsai.Core/Reactive/Condition.cs +++ b/Bonsai.Core/Reactive/Condition.cs @@ -13,7 +13,6 @@ namespace Bonsai.Reactive /// Represents an expression builder which filters the elements of an observable /// sequence according to a condition specified by the encapsulated workflow. /// - [WorkflowElementCategory(ElementCategory.Condition)] [XmlType(Namespace = Constants.ReactiveXmlNamespace)] [Description("Filters the elements of an observable sequence according to a condition specified by the encapsulated workflow.")] public class Condition : SingleArgumentWorkflowExpressionBuilder diff --git a/Bonsai.Design/ExpressionBuilderTypeConverter.cs b/Bonsai.Design/ExpressionBuilderTypeConverter.cs index 82054e041..65798e9b7 100644 --- a/Bonsai.Design/ExpressionBuilderTypeConverter.cs +++ b/Bonsai.Design/ExpressionBuilderTypeConverter.cs @@ -68,8 +68,6 @@ public override object ConvertTo(ITypeDescriptorContext context, CultureInfo cul { case ElementCategory.Source: return disabled ? HatchBrushes.DiagonalViolet : obsolete ? HatchBrushes.CrossViolet : Brushes.Violet; - case ElementCategory.Condition: - return disabled ? HatchBrushes.DiagonalLightGreen : obsolete ? HatchBrushes.CrossLightGreen : Brushes.LightGreen; case ElementCategory.Transform: return disabled ? HatchBrushes.DiagonalWhite : obsolete ? HatchBrushes.CrossWhite : Brushes.White; case ElementCategory.Sink: diff --git a/Bonsai.Editor/EditorForm.cs b/Bonsai.Editor/EditorForm.cs index e6a035bde..e170ebff9 100644 --- a/Bonsai.Editor/EditorForm.cs +++ b/Bonsai.Editor/EditorForm.cs @@ -663,7 +663,9 @@ void InitializeToolboxCategory(string categoryName, IEnumerable - - - diff --git a/Bonsai.Scripting.Expressions/ExpressionCondition.cs b/Bonsai.Scripting.Expressions/ExpressionCondition.cs index 9aa71b2d8..b8762821b 100644 --- a/Bonsai.Scripting.Expressions/ExpressionCondition.cs +++ b/Bonsai.Scripting.Expressions/ExpressionCondition.cs @@ -14,7 +14,6 @@ namespace Bonsai.Scripting.Expressions /// of an observable sequence. /// [DefaultProperty(nameof(Expression))] - [WorkflowElementCategory(ElementCategory.Condition)] [TypeDescriptionProvider(typeof(ExpressionConditionTypeDescriptionProvider))] [Description("An expression script used to filter the elements of the sequence.")] public class ExpressionCondition : SingleArgumentExpressionBuilder, IScriptingElement diff --git a/Bonsai.Scripting/ExpressionCondition.cs b/Bonsai.Scripting/ExpressionCondition.cs index de459ff36..c6c6439d9 100644 --- a/Bonsai.Scripting/ExpressionCondition.cs +++ b/Bonsai.Scripting/ExpressionCondition.cs @@ -15,7 +15,6 @@ namespace Bonsai.Scripting /// [Obsolete] [DefaultProperty(nameof(Expression))] - [WorkflowElementCategory(ElementCategory.Condition)] [TypeDescriptionProvider(typeof(ExpressionConditionTypeDescriptionProvider))] [Description("An expression script used to filter the elements of the sequence.")] public class ExpressionCondition : SingleArgumentExpressionBuilder, IScriptingElement diff --git a/Bonsai.Scripting/PythonCondition.cs b/Bonsai.Scripting/PythonCondition.cs index 0ddd9d89c..280d02760 100644 --- a/Bonsai.Scripting/PythonCondition.cs +++ b/Bonsai.Scripting/PythonCondition.cs @@ -11,7 +11,6 @@ namespace Bonsai.Scripting /// [Obsolete] [DefaultProperty(nameof(Script))] - [WorkflowElementCategory(ElementCategory.Condition)] [Description("A Python script used to determine which elements of the input sequence are accepted.")] public class PythonCondition : Combinator {