Example #1
0
 /// <summary>
 /// Create a new LockButton contained on the specified Lock, linked to the specified button.
 /// </summary>
 /// <param name="containingLock">Containing lock.</param>
 /// <param name="linkedButton">Linked button.</param>
 /// <param name="on">If set to <c>true</c> on.</param>
 public LockButton(Lock containingLock, int containingLockIndex, LockButton linkedButton, bool isOn)
 {
     ContainingLock = containingLock;
     ContainingLockIndex = containingLockIndex;
     LinkedButton = linkedButton;
     IsOn = isOn;
 }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Models.Lock"/> class with the specified number of buttons.
 /// </summary>
 /// <param name="buttonCount">Button count.</param>
 public Lock(int gridRow, int gridCol, int buttonCount, int currentPosition)
 {
     GridRow = gridRow;
     GridCol = gridCol;
     Buttons = new LockButton[buttonCount];
     for (int buttonIndex=0; buttonIndex<buttonCount; buttonIndex++) {
         Buttons [buttonIndex] = new LockButton (this, buttonIndex, null, false);
     }
     CurrentPosition = currentPosition;
 }
Example #3
0
 public LockButtonPushResult(LockButton linkedButton, int linkedButtonContainingLockPriorPosition)
 {
     LinkedButton = linkedButton;
     LinkedButtonContainingLockPriorPosition = linkedButtonContainingLockPriorPosition;
 }
Example #4
0
 /// <summary>
 /// Link this button with the specified button.
 /// </summary>
 /// <param name="lockButton">Lock button.</param>
 public void LinkWithButton(Models.LockButton lockButton)
 {
     LinkedButton = lockButton;
     lockButton.LinkedButton = this;
 }