示例#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;
 }
示例#2
0
文件: Lock.cs 项目: fordream/Locks
 /// <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;
 }
示例#3
0
 public LockButtonPushResult(LockButton linkedButton, int linkedButtonContainingLockPriorPosition)
 {
     LinkedButton = linkedButton;
     LinkedButtonContainingLockPriorPosition = linkedButtonContainingLockPriorPosition;
 }
示例#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;
 }