Пример #1
0
 /// <summary>
 /// Changes the style of wires by name.
 /// </summary>
 /// <param name="wireID">The name of the wires to change.</param>
 /// <param name="style">The style to change to.</param>
 public void ChangeWireStyle(string wireID, VisualizerStyle style)
 {
     foreach (var wire in Wires[wireID])
     {
         wire.VisualizerStyle = style;
     }
 }
Пример #2
0
 /// <summary>
 /// Tries to change the wire style.
 /// </summary>
 /// <returns><c>true</c>, if change wire style was changed, or <c>false</c> otherwise.</returns>
 /// <param name="wireID">The name of the wires to change.</param>
 /// <param name="style">The style to change to.</param>
 public bool TryChangeWireStyle(string wireID, VisualizerStyle style)
 {
     if (Wires.ContainsKey(wireID))
     {
         ChangeWireStyle(wireID, style);
         return(true);
     }
     return(false);
 }
Пример #3
0
 /// <summary>
 /// Sets the styles of all the wires.
 /// </summary>
 /// <param name="style">The style to change to.</param>
 public void SetAllWiresStyle(VisualizerStyle style)
 {
     foreach (var wireList in Wires.Values)
     {
         foreach (var wire in wireList)
         {
             wire.VisualizerStyle = style;
         }
     }
 }