Beispiel #1
0
 private void InvokeUpdate()
 {
     if (OnValueUpdated != null)
     {
         OnValueUpdated.Invoke();
     }
 }
Beispiel #2
0
        public virtual void TriggerValueChange()
        {
            OnValueUpdated?.Invoke(this);

            if (parentGraph != null)
            {
                if ((parentGraph.ParentNode == null || parentGraph is FunctionGraph) &&
                    parentGraph.State == GraphState.Ready)
                {
                    parentGraph.Schedule(this);
                }
                else if (parentGraph.ParentNode != null)
                {
                    //go up heirachy to trigger real parent node
                    Node n = parentGraph.ParentNode;
                    while (n.parentGraph.ParentNode != null)
                    {
                        Node tmp = n.parentGraph.ParentNode;
                        if (tmp == null)
                        {
                            break;
                        }

                        n = tmp;
                    }

                    if (n.parentGraph.State == GraphState.Ready)
                    {
                        n.TriggerValueChange();
                    }
                }
            }
        }
Beispiel #3
0
    private void OnLinesDestroyed(int linesCount)
    {
        LastDeletedLinesCount = linesCount;
        LinesCount           += linesCount;

        _uiUpdater.UpdateLines(LinesCount);
        OnValueUpdated?.Invoke();
    }
Beispiel #4
0
        public void SetValue(int val)
        {
            int oldVal = value;

            value = val;
            if (oldVal != value)
            {
                OnValueUpdated?.Invoke(oldVal, value);
            }
        }
 public void SetValue(string newValue)
 {
     Value = newValue;
     OnValueUpdated?.Invoke(newValue);
 }
Beispiel #6
0
 public void FireValueUpdate(int value)
 {
     OnValueUpdated?.Invoke(this, new MyValueEventArgs(value));
 }
Beispiel #7
0
 protected virtual void TriggerValueUpdated(ushort address, bool value)
 {
     OnValueUpdated?.Invoke(this, address, value);
 }