コード例 #1
0
 public void TurnOff()
 {
     foreach (CircuitSymbol symbol in this.circuitSymbol)
     {
         if (symbol.HasCreatedGlyph)
         {
             ButtonControl button = this.ProbeView(symbol);
             button.ButtonStateChanged = null;
             if (this.isToggle)
             {
                 FunctionButton.DrawState(button, State.Off);
             }
         }
     }
 }
コード例 #2
0
 public void TurnOn()
 {
     foreach (CircuitSymbol symbol in this.circuitSymbol)
     {
         if (symbol.HasCreatedGlyph)
         {
             ButtonControl button    = this.ProbeView(symbol);
             bool          turnedOff = (button.ButtonStateChanged == null);
             button.ButtonStateChanged = this.StateChangedAction;
             if (turnedOff && this.isToggle)
             {
                 FunctionButton.DrawState(button, this.State);
             }
         }
     }
 }
コード例 #3
0
 public void Redraw()
 {
     if (this.isToggle)
     {
         ButtonControl button = null;
         if (this.circuitSymbol.Count == 1)
         {
             button = (ButtonControl)this.circuitSymbol[0].ProbeView;
         }
         else
         {
             LogicalCircuit currentCircuit = this.project.LogicalCircuit;
             CircuitSymbol  symbol         = this.circuitSymbol.First(s => s.LogicalCircuit == currentCircuit);
             button = this.ProbeView(symbol);
         }
         FunctionButton.DrawState(button, this.State);
     }
 }