Exemplo n.º 1
0
 public NodePropertyChangedEventArgs(Node node, NodeProperty property, object oldValue, object newValue)
 {
     _node     = node;
     _property = property;
     _oldValue = oldValue;
     _newValue = newValue;
 }
Exemplo n.º 2
0
            private void AddProperty(string root, string propertyID, bool settable)
            {
                var prop = new NodeProperty(root + propertyID, propertyID, settable);

                prop.ChangeEvent += (diff) => PropertyChangeEvent?.Invoke(this, diff);
                Properties.Add(prop);
            }
Exemplo n.º 3
0
        public PropertyVm(NodeProperty target)
        {
            this.Name = target.Name;
            this.Url = target.Url;
            this.Value = target.Value;
            this.ValueType = target.ValueType.FullName;

        }
Exemplo n.º 4
0
        public static float GetNodeValue(int index, NodeProperty code)
        {
            CheckEpanetIndex(index);

            float value = 0;

            ENgetnodevalue(index, (int)code, ref value);
            return(value);
        }
Exemplo n.º 5
0
        private IAutoEvaluationTheoremProvider <NodeProperty> GetTheoremProvider(NodeProperty property)
        {
            ITheoremProvider provider;

            if (!_library.TryLookupTheoremType(property.Friendly.DerivePostfix("PropertyTheorem"), out provider))
            {
                return(null);
            }
            return(provider as IAutoEvaluationTheoremProvider <NodeProperty>);
        }
Exemplo n.º 6
0
        public void PropertyAspectTest()
        {
            MathIdentifier propertyId = new MathIdentifier("T0_PA", "FundamentTest");
            NodeProperty   property   = NodeProperty.Register(propertyId, typeof(string), typeof(FundamentTest));

            NodeObject n = new NodeObject();

            _counter = 0;
            n.AddHandler(property.PropertyChangedEvent, new EventHandler <NodePropertyChangedEventArgs>(OnPropertyChanged));

            Assert.AreEqual(0, _counter, "X1");
            Assert.IsFalse(n.IsPropertySet(property, false), "A01");
            Assert.IsFalse(n.IsPropertySet(property, true), "A02");
            Assert.IsFalse(n.IsPropertyDirty(property), "A03");
            Assert.AreEqual("nothing", n.GetProperty(property, "nothing", false), "A04");
            Assert.AreEqual("nothing", n.GetProperty(property, "nothing", true), "A05");

            n.SetProperty(property, "myvalue");
            Assert.AreEqual(1, _counter, "X2");
            Assert.AreEqual(null, _lastPropertyChangedEventArgs.OldValue, "X2a");
            Assert.AreEqual("myvalue", _lastPropertyChangedEventArgs.NewValue, "X2b");
            Assert.IsTrue(n.IsPropertySet(property, false), "B01");
            Assert.IsTrue(n.IsPropertySet(property, true), "B02");
            Assert.IsFalse(n.IsPropertyDirty(property), "B03");
            Assert.AreEqual("myvalue", n.GetProperty(property, "nothing", false), "B04");
            Assert.AreEqual("myvalue", n.GetProperty(property, "nothing", true), "B05");

            n.DirtyPropertyIfSet(property);
            Assert.AreEqual(1, _counter, "X3");
            Assert.IsFalse(n.IsPropertySet(property, false), "C01");
            Assert.IsTrue(n.IsPropertySet(property, true), "C02");
            Assert.IsTrue(n.IsPropertyDirty(property), "C03");
            Assert.AreEqual("nothing", n.GetProperty(property, "nothing", false), "C04");
            Assert.AreEqual("myvalue", n.GetProperty(property, "nothing", true), "C05");

            n.SetProperty(property, "newvalue");
            Assert.AreEqual(2, _counter, "X4");
            Assert.AreEqual("myvalue", _lastPropertyChangedEventArgs.OldValue, "X4a");
            Assert.AreEqual("newvalue", _lastPropertyChangedEventArgs.NewValue, "X4b");
            Assert.IsTrue(n.IsPropertySet(property, false), "D01");
            Assert.IsTrue(n.IsPropertySet(property, true), "D02");
            Assert.IsFalse(n.IsPropertyDirty(property), "D03");
            Assert.AreEqual("newvalue", n.GetProperty(property, "nothing", false), "D04");
            Assert.AreEqual("newvalue", n.GetProperty(property, "nothing", true), "D05");

            n.ClearProperty(property);
            Assert.AreEqual(3, _counter, "X5");
            Assert.AreEqual("newvalue", _lastPropertyChangedEventArgs.OldValue, "X5a");
            Assert.AreEqual(null, _lastPropertyChangedEventArgs.NewValue, "X5b");
            Assert.IsFalse(n.IsPropertySet(property, false), "E01");
            Assert.IsFalse(n.IsPropertySet(property, true), "E02");
            Assert.IsFalse(n.IsPropertyDirty(property), "E03");
            Assert.AreEqual("nothing", n.GetProperty(property, "nothing", false), "E04");
            Assert.AreEqual("nothing", n.GetProperty(property, "nothing", true), "E05");
        }
Exemplo n.º 7
0
        public RTPropertyAnimation(int nodeIdx, NodeProperty nodeProperty, RTSegment[] segments)
        {
            if (segments == null || segments.Length == 0)
            {
                throw new ArgumentException("The segments array must not be null or empty.");
            }

            NodeIdx            = nodeIdx;
            NodeProperty       = nodeProperty;
            _segments          = segments;
            _currentSegmentIdx = 0;
        }
    /// <summary>
    /// Set properties related to the default style
    /// </summary>
    public void SetDefaultStyle(NodeProperty newProperties)
    {
        if (m_SettingsRef == null)
        {
            "Settings were not serialized properly and cannot be loaded.".BTDebugLog();
            return;
        }

        m_SettingsRef.FindProperty("DefaultStyleProperties").FindPropertyRelative("TitleBarColor").colorValue  = newProperties.TitleBarColor;
        m_SettingsRef.FindProperty("DefaultStyleProperties").FindPropertyRelative("Icon").objectReferenceValue = newProperties.Icon;

        SaveSettingsFile();
    }
Exemplo n.º 9
0
        //修改节点命令执行函数
        private void ModifyNodeCommand_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            //获取值
            string       strKey, strValue;
            NodeProperty npDel = null;

            strKey   = ModifyPropertyComboBox.Text;
            strValue = ModifyPropertyTextBox.Text;
            if (strKey == "")
            {
                ShowStatus("Modify Property Failed, Key field can't be empty.");
                return;
            }
            if (curModifyNode == null)
            {
                ShowStatus("Modify Property Failed, no node be selected.");
                return;
            }
            //如果存在该key则修改
            foreach (NodeProperty np in curModifyNode.Properties)
            {
                if (strKey != np.Key)
                {
                    continue;
                }
                if (strValue == "")
                {
                    npDel = np;
                    break;
                }
                np.Value = strValue;
                ShowStatus("Modify Property Success.");
                return;
            }
            //如果value为空则删除该属性
            if (npDel != null)
            {
                curModifyNode.Properties.Remove(npDel);
                ShowStatus("Delete Property Success.");
                return;
            }
            if (strValue == "")
            {
                ShowStatus("Add Property Failed, Value field can't be empty.");
                return;
            }
            //如果不存在则插入新属性
            curModifyNode.Properties.Add(new NodeProperty(strKey, strValue));
            ShowStatus("Add Property Success.");
            return;
        }
        // Locating main text algorithm 2, 3 (pp.301)
        int[] CreateNodeProperty(HtmlElement node, int d = -1)
        {
            if (node == null)
            {
                return(new int[] { 0, 0 });
            }

            int textLength = 0;

            try
            {
                textLength = node.InnerText.Length;
            }
            catch { }

            int linkTextLength = 0;

            if (node.TagName.Equals("A"))
            {
                linkTextLength += textLength;
            }

            int skipTextLength = 0;

            if (SkipTagName.Contains(node.TagName))
            {
                skipTextLength += textLength;
            }

            foreach (HtmlElement e in node.Children)
            {
                int[] tmp = CreateNodeProperty(e, d + 1);

                linkTextLength += tmp[0];
                skipTextLength += tmp[1];
            }

            NodeProperty nodeProperty = new NodeProperty();

            nodeProperty.width          = node.OffsetRectangle.Width;
            nodeProperty.textLength     = textLength - skipTextLength;
            nodeProperty.linkTextLength = linkTextLength;

            _NodeProperty[node] = nodeProperty;

            //for (int i = 0; i < d; i++)
            //    Console.Write(" ");
            //Console.WriteLine(string.Format("{0} {1} {2} {3}", node.TagName, textLength, linkTextLength, skipTextLength));

            return(new int[] { linkTextLength, skipTextLength });
        }
    /// <summary>
    /// Get the style information for a specific script
    /// </summary>
    public NodeProperty GetNodeStyleDetails(object scriptToFind)
    {
        NodeProperty node = DataFile.OverrideStyleProperties.FirstOrDefault(x => scriptToFind.GetType().Equals(x.Script.GetClass()));

        if (node == null)
        {
            node = DataFile.MainStyleProperties.FirstOrDefault(x => scriptToFind.GetType().IsSubclassOf(x.Script.GetClass()) || scriptToFind.GetType().Equals(x.Script.GetClass()));
        }

        if (node == null)
        {
            node = DataFile.DefaultStyleProperties;
        }

        return(node);
    }
Exemplo n.º 12
0
        public void AutoEvaluateProperty(Bus bus, NodeProperty property)
        {
            IAutoEvaluationTheoremProvider <NodeProperty> provider = GetTheoremProvider(property);

            if (provider == null)
            {
                return;
            }

            IAutoEvaluationTheorem <NodeProperty> theorem;
            GroupCollection groups;

            if (!provider.TryLookupBest(bus, out theorem, out groups))
            {
                return;
            }

            theorem.AutoEvaluate(bus, groups);
        }
Exemplo n.º 13
0
        void ParseProperty(AstNode parent)
        {
            if (CurrentToken == null || !CurrentToken.IsProperty)
            {
                return;
            }
            NodeProperty property = new NodeProperty();

            property.Predicate = CurrentToken;
            Advance(); //past 'Property Name
            //else
            if (CurrentToken != null && !CurrentToken.IsLineList && !CurrentToken.IsProperty)
            {
                property.Object = CurrentToken;
                //Advance(); //past 'Property Value
            }
            //
            parent.AddProperty(property);
        }
Exemplo n.º 14
0
        public void PropertyTriggerTest()
        {
            MathIdentifier propertyId = new MathIdentifier("T2_PT", "FundamentTest");

            NodeEvent clearEvent      = NodeEvent.Register(propertyId.DerivePostfix("ClearTrigger"), typeof(EventHandler), typeof(FundamentTest));
            NodeEvent clear2Event     = NodeEvent.Register(propertyId.DerivePostfix("Clear2Trigger"), typeof(EventHandler), typeof(FundamentTest));
            NodeEvent clear3Event     = NodeEvent.Register(propertyId.DerivePostfix("Clear3Trigger"), typeof(EventHandler), typeof(FundamentTest));
            NodeEvent reevaluateEvent = NodeEvent.Register(propertyId.DerivePostfix("ReevaluateTrigger"), typeof(EventHandler), typeof(FundamentTest));

            NodeProperty property = NodeProperty.Register(propertyId, typeof(string), typeof(FundamentTest),
                                                          new NodeEventTrigger(EventTriggerAction.Clear, clearEvent, clear2Event),
                                                          new NodeEventTrigger(EventTriggerAction.Clear, clear3Event),
                                                          new NodeEventTrigger(EventTriggerAction.Reevaluate, reevaluateEvent));

            NodeObject n = new NodeObject();

            Assert.IsFalse(n.IsPropertySet(property), "A01");

            n.SetProperty(property, "test");
            Assert.IsTrue(n.IsPropertySet(property), "B01");

            n.RaiseEvent(clearEvent, EventArgs.Empty);
            Assert.IsFalse(n.IsPropertySet(property), "C01");

            n.SetProperty(property, "test2");
            Assert.IsTrue(n.IsPropertySet(property), "D01");
            Assert.AreEqual("test2", n.GetProperty(property), "D02");

            n.RaiseEvent(reevaluateEvent, EventArgs.Empty);
            Assert.IsTrue(n.IsPropertySet(property), "E01");
            Assert.AreEqual("test2", n.GetProperty(property), "E02");

            n.RaiseEvent(clear2Event, EventArgs.Empty);
            Assert.IsFalse(n.IsPropertySet(property), "F01");

            n.SetProperty(property, "test3");
            Assert.IsTrue(n.IsPropertySet(property), "G01");

            n.RaiseEvent(clear3Event, EventArgs.Empty);
            Assert.IsFalse(n.IsPropertySet(property), "H01");
        }
    /// <summary>
    /// Set properties for either a main or override style
    /// </summary>
    /// <param name="propertyName">The name of the list to adjust - should be either "MainStyleProperties" or "OverrideStyleProperties"</param>
    /// <param name="newValue">New style data to save</param>
    /// <param name="originalScript">Script previously stored if style is being updated</param>
    public void SetMainOrOverrideStyle(string propertyName, NodeProperty newValue, MonoScript originalScript = null)
    {
        if (m_SettingsRef == null)
        {
            "Settings were not serialized properly and cannot be loaded.".BTDebugLog();
            return;
        }

        var property = m_SettingsRef.FindProperty(propertyName);
        int index    = property.arraySize;

        //Look for an existing script reference
        for (int i = 0; i < property.arraySize; i++)
        {
            MonoScript script = property.GetArrayElementAtIndex(i).FindPropertyRelative("Script").objectReferenceValue as MonoScript;

            if (script == originalScript || script == newValue.Script)
            {
                index = i;
                break;
            }
        }

        //Need to add a new empty element to update because nothing was found
        if (index == property.arraySize)
        {
            property.InsertArrayElementAtIndex(index);
        }

        //Update each of the properties

        property.GetArrayElementAtIndex(index).FindPropertyRelative("Script").objectReferenceValue = newValue.Script;
        property.GetArrayElementAtIndex(index).FindPropertyRelative("TitleBarColor").colorValue    = newValue.TitleBarColor;
        property.GetArrayElementAtIndex(index).FindPropertyRelative("Icon").objectReferenceValue   = newValue.Icon;
        property.GetArrayElementAtIndex(index).FindPropertyRelative("IsDecorator").boolValue       = newValue.IsDecorator;
        property.GetArrayElementAtIndex(index).FindPropertyRelative("InvertResult").boolValue      = newValue.InvertResult;

        SaveSettingsFile();
    }
Exemplo n.º 16
0
 public override bool IsNodePropertyInherited(NodeProperty property)
 {
    return this.ChildNodes.All(n => n.IsNodePropertyInherited(property));
 }
Exemplo n.º 17
0
public static System.Web.WebPages.HelperResult Property(HtmlHelper html, NodeProperty property)
{
return new System.Web.WebPages.HelperResult(__razor_helper_writer => {



#line 107 "..\..\Helpers\NoodlesHelper.cshtml"
 
    var vm = property.ToPropertyVm();
    vm.Readonly = true;
    html.RenderPartial("FormFactory/Form.Property", vm);

#line default
#line hidden

});

}
Exemplo n.º 18
0
 /// <summary>
 /// 通过属性名<paramref name="propertyName"/>访问属性对象<paramref name="value"/>。
 /// </summary>
 /// <returns>当属性存在则返回true,否则返回false。</returns>
 public bool TryGetProperty(string propertyName, out NodeProperty value)
 {
     try
     {
         value = GetProperty(propertyName);
         return true;
     }
     catch
     {
         value = null;
         return false;
     }
 }
Exemplo n.º 19
0
 /// <summary>
 /// Converts a NodeProperty to a BooleanNodeProperty.
 /// </summary>
 /// <param name="property">The NodeProperty to convert.</param>
 public static BooleanNodeProperty ToBooleanProperty(NodeProperty property)
 {
    return (BooleanNodeProperty)Enum.ToObject(typeof(BooleanNodeProperty), property);
 }
Exemplo n.º 20
0
 public virtual Object GetNodeProperty(NodeProperty property)
 {
    if (NodeProperties.IsBooleanProperty(property))
       return this.GetNodeProperty(NodeProperties.ToBooleanProperty(property));
    else
    {
       switch (property)
       {
          case NodeProperty.Name: return this.Name;
          case NodeProperty.WireColor: return this.WireColor;
          default: return null;
       }
    }
 }
Exemplo n.º 21
0
 public static TextBox AddTextBoxForPropertyEditing(this Panel panel, NodeProperty property)
 {
     panel.Children.Add(new TextBlock {Text = property.PropertyName});
     var textBox = new TextBox {Text = property.Value.ToString()};
     panel.Children.Add(textBox);
     return textBox;
 }
Exemplo n.º 22
0
 private void OnNodePropertyChange(DeviceNode node, NodeProperty property)
 {
     HomieHub.Clients.All.InvokeAsync("DeviceNodePropertyUpdate", HMDeviceID, node.NodeID, property);
 }
Exemplo n.º 23
0
 public float this[NodeProperty index]
 {
     get => _values[index];
Exemplo n.º 24
0
 protected override void OnAutoEvaluateProperty(NodeProperty property)
 {
 }
Exemplo n.º 25
0
 public virtual Boolean IsNodePropertyInherited(NodeProperty property)
 {
    return false;
 }
Exemplo n.º 26
0
 public virtual void SetNodeProperty(NodeProperty property, object value) 
 {
    if (NodeProperties.IsBooleanProperty(property))
       this.SetNodeProperty(NodeProperties.ToBooleanProperty(property), (Boolean)value);
    else
    {
       switch (property)
       {
          case NodeProperty.Name:
             this.Name = (String)value;
             break;
          case NodeProperty.WireColor:
             this.WireColor = (Color)value;
             break;
          default:
             break;
       }
    }
 }
Exemplo n.º 27
0
 public static void SetNodeValue(int index, NodeProperty code, float value)
 {
     CheckEpanetIndex(index);
     ENsetnodevalue(index, (int)code, value);
 }
Exemplo n.º 28
0
            protected internal NodeState(Timer parentNode, NodeScopeState parentNodeScopeState, string parentNodeInitialBasicName, NodeTechniqueDetermination initialActiveTechniqueDetermination)
                : base(parentNode, parentNodeScopeState, parentNodeInitialBasicName, initialActiveTechniqueDetermination)
            {
                // This constructor is called when the parent node is created.
                // To create each property, we call AddProperty (rather to GetProperty).

                UpdateObjectProperty = AddProperty(NameOfUpdateObject);
                UpdateIntervalProperty = AddProperty(NameOfInterval);
                ResetProperty = AddProperty(NameOfReset);
                frameProperty = AddProperty(NameOfFrame);
            }
Exemplo n.º 29
0
 /// <summary>
 /// Tests if the given NodeProperty is a render property.
 /// </summary>
 /// <param name="property">The NodeProperty to test.</param>
 public static Boolean IsRenderProperty(NodeProperty property)
 {
    return (RenderProperties & property) != 0;
 }
Exemplo n.º 30
0
      public override bool IsNodePropertyInherited(NodeProperty property)
      {
         IILayer layer = this.ILayer;
         IINodeLayerProperties layerProperties = this.NodeLayerProperties;

         if (property == NodeProperty.IsHidden)
            return layer != null && layer.IsHidden;
         else if (property == NodeProperty.IsFrozen)
            return layer != null && layer.IsFrozen;
         else if (property == NodeProperty.WireColor)
            return this.NodeLayerProperties.ColorByLayer;
         else if (NodeProperties.IsDisplayProperty(property))
            return layerProperties.DisplayByLayer;
         else if (NodeProperties.IsRenderProperty(property))
            return layerProperties.RenderByLayer;
         else
            return false;
      }
Exemplo n.º 31
0
      public override bool IsNodePropertyInherited(NodeProperty property)
      {
         if (!NodeProperties.IsBooleanProperty(property))
            return false;

         return NestedLayers.IsPropertyInherited(this.ILayer, NodeProperties.ToBooleanProperty(property));
      }
Exemplo n.º 32
0
 protected override void OnAutoEvaluateProperty(NodeProperty property)
 {
     Service <IAutoEvaluator> .Instance.AutoEvaluateProperty(this, property);
 }
        private NodeProperty ParseNodeProperty(out bool success)
        {
            int errorCount = Errors.Count;
            NodeProperty nodeProperty = new NodeProperty();

            while (true)
            {
                int seq_start_position1 = position;
                nodeProperty.Tag = ParseTag(out success);
                if (!success)
                {
                    Error("Failed to parse Tag of NodeProperty.");
                    break;
                }

                while (true)
                {
                    int seq_start_position2 = position;
                    ParseSeparationLines(out success);
                    if (!success)
                    {
                        Error("Failed to parse SeparationLines of NodeProperty.");
                        break;
                    }

                    nodeProperty.Anchor = ParseAnchor(out success);
                    if (!success)
                    {
                        Error("Failed to parse Anchor of NodeProperty.");
                        position = seq_start_position2;
                    }
                    break;
                }
                success = true;
                break;
            }
            if (success) { ClearError(errorCount); return nodeProperty; }

            while (true)
            {
                int seq_start_position3 = position;
                nodeProperty.Anchor = ParseAnchor(out success);
                if (!success)
                {
                    Error("Failed to parse Anchor of NodeProperty.");
                    break;
                }

                while (true)
                {
                    int seq_start_position4 = position;
                    ParseSeparationLines(out success);
                    if (!success)
                    {
                        Error("Failed to parse SeparationLines of NodeProperty.");
                        break;
                    }

                    nodeProperty.Tag = ParseTag(out success);
                    if (!success)
                    {
                        Error("Failed to parse Tag of NodeProperty.");
                        position = seq_start_position4;
                    }
                    break;
                }
                success = true;
                break;
            }
            if (success) { ClearError(errorCount); return nodeProperty; }

            return nodeProperty;
        }
Exemplo n.º 34
0
 set => SetValue(NodeProperty, value);
Exemplo n.º 35
0
 /// <summary>
 /// Initializes a new instance of the NodePropertySorter class, with SortOrder.Ascending.
 /// </summary>
 /// <param name="property">The property to sort by.</param>
 public NodePropertySorter(NodeProperty property) 
    : this(property, SortOrder.Ascending) { }
Exemplo n.º 36
0
 protected override void OnAutoEvaluateProperty(NodeProperty property)
 {
     Service<IAutoEvaluator>.Instance.AutoEvaluateProperty(this, property);
 }
Exemplo n.º 37
0
 /// <summary>
 /// Initializes a new instance of the NodePropertySorter class.
 /// </summary>
 /// <param name="property">The property to sort by.</param>
 /// <param name="sortOrder">The order to sort by.</param>
 public NodePropertySorter(NodeProperty property, SortOrder sortOrder)
    : base(sortOrder)
 {
    this.Property = property;
 }
Exemplo n.º 38
0
 protected override void OnAutoEvaluateProperty(NodeProperty property)
 {
 }
 public NodePropertyDirtiedEventArgs(Node node, NodeProperty property)
 {
     _node = node;
     _property = property;
 }
 public NodePropertyDirtiedEventArgs(Node node, NodeProperty property)
 {
     _node     = node;
     _property = property;
 }
Exemplo n.º 41
0
 /// <summary>
 /// Initializes a new instance of the LayerPropertyChangedParam struct.
 /// </summary>
 /// <param name="layer">The layer of which a property has changed.</param>
 /// <param name="property">The property that changed.</param>
 public LayerPropertyChangedParam(IILayer layer, NodeProperty property)
 {
    this.layer = layer;
    this.property = property;
 }
Exemplo n.º 42
0
            // For cloning.
            protected NodeState(NodeState source, NodeScopeState parentNodeScopeState)
                : base(source, parentNodeScopeState)
            {
                // This constructor is called whenever the node state is copied.
                // To copy each property, we call GetProperty (rather than AddProperty).

                UpdateObjectProperty = GetProperty(NameOfUpdateObject);
                UpdateIntervalProperty = GetProperty(NameOfInterval);
                ResetProperty = GetProperty(NameOfReset);
                frameProperty = GetProperty(NameOfFrame);
            }
Exemplo n.º 43
0
 private IAutoEvaluationTheoremProvider<NodeProperty> GetTheoremProvider(NodeProperty property)
 {
     ITheoremProvider provider;
     if(!_library.TryLookupTheoremType(property.Friendly.DerivePostfix("PropertyTheorem"), out provider))
         return null;
     return provider as IAutoEvaluationTheoremProvider<NodeProperty>;
 }
Exemplo n.º 44
0
 /// <summary>
 /// Tests if the supplied NodeProperty is also a BooleanNodeProperty.
 /// </summary>
 /// <param name="property">The NodeProperty to test.</param>
 public static Boolean IsBooleanProperty(NodeProperty property)
 {
    return Enum.IsDefined(typeof(BooleanNodeProperty), (int)property);
 }
Exemplo n.º 45
0
        public void AutoEvaluateProperty(Signal signal, NodeProperty property)
        {
            IAutoEvaluationTheoremProvider<NodeProperty> provider = GetTheoremProvider(property);
            if(provider == null)
                return;

            IAutoEvaluationTheorem<NodeProperty> theorem;
            GroupCollection groups;
            if(!provider.TryLookupBest(signal, out theorem, out groups))
                return;

            theorem.AutoEvaluate(signal, groups);
        }
Exemplo n.º 46
0
 /// <summary>
 /// Tests if the given NodeProperty is a display property.
 /// </summary>
 /// <param name="property">The NodeProperty to test.</param>
 public static Boolean IsDisplayProperty(NodeProperty property)
 {
    return (DisplayProperties & property) != 0;
 }
Exemplo n.º 47
0
 protected virtual void LayerPropertyChanged(IMaxNode layer, NodeProperty property)
 {
    Boolean sort = NodeSorter.RequiresSort(this.Tree.NodeSorter as NodeSorter, property);
    this.InvalidateObject(layer.BaseObject, false, sort);
    foreach (object child in layer.ChildBaseObjects)
    {
       this.InvalidateObject(child, false, sort);
    }
 }