Ejemplo n.º 1
0
 void PinControl_StateChanged(PinControl sender, LogicState s)
 {
     Console.WriteLine(Name + " : " + State.ToString());
     ToolTip = new ToolTip()
     {
         Content = (State == LogicState.High) ? "High" : (State == LogicState.Low) ? "Low" : "Indeterminate"
     };
     if (_state == LogicState.High && !_transp)
     {
         ellipse.Fill = new SolidColorBrush(new Color()
         {
             A = 255, R = 255, G = 188, B = 188
         });
     }
     else if (_state == LogicState.Low && !_transp)
     {
         ellipse.Fill = new SolidColorBrush(new Color()
         {
             A = 255, R = 20, G = 20, B = 20
         });
     }
     else
     {
         ellipse.Fill = new SolidColorBrush(new Color()
         {
             A = 255, R = 121, G = 157, B = 255
         });
     }
 }
Ejemplo n.º 2
0
 private void B_StateChanged(PinControl sender, LogicState s)
 {
     Eval();
 }