Ejemplo n.º 1
0
 /// <summary>
 ///
 /// </summary>
 void SetupDialKeypad()
 {
     if (TriList.SmartObjects.Contains(UISmartObjectJoin.VCDialKeypad))
     {
         DialKeypad = new SmartObjectNumeric(TriList.SmartObjects[UISmartObjectJoin.VCDialKeypad], true);
         DialKeypad.Digit0.SetSigFalseAction(() => DialKeypadPress("0"));
         DialKeypad.Digit1.SetSigFalseAction(() => DialKeypadPress("1"));
         DialKeypad.Digit2.SetSigFalseAction(() => DialKeypadPress("2"));
         DialKeypad.Digit3.SetSigFalseAction(() => DialKeypadPress("3"));
         DialKeypad.Digit4.SetSigFalseAction(() => DialKeypadPress("4"));
         DialKeypad.Digit5.SetSigFalseAction(() => DialKeypadPress("5"));
         DialKeypad.Digit6.SetSigFalseAction(() => DialKeypadPress("6"));
         DialKeypad.Digit7.SetSigFalseAction(() => DialKeypadPress("7"));
         DialKeypad.Digit8.SetSigFalseAction(() => DialKeypadPress("8"));
         DialKeypad.Digit9.SetSigFalseAction(() => DialKeypadPress("9"));
         DialKeypad.Misc1SigName = "*";
         DialKeypad.Misc1.SetSigFalseAction(() => DialKeypadPress("*"));
         DialKeypad.Misc2SigName = "#";
         DialKeypad.Misc2.SetSigFalseAction(() => DialKeypadPress("#"));
         //TriList.SetSigFalseAction(UIBoolJoin.VCKeypadBackspacePress, DialKeypadBackspacePress);
         TriList.SetSigHeldAction(UIBoolJoin.VCKeypadBackspacePress, 500,
                                  StartBackspaceRepeat, StopBackspaceRepeat, DialKeypadBackspacePress);
     }
     else
     {
         Debug.Console(0, "Trilist {0:x2}, VC dial keypad object {1} not found. Check SGD file or VTP",
                       TriList.ID, UISmartObjectJoin.VCDialKeypad);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Wire up the keypad and buttons
 /// </summary>
 void SetupPinModal()
 {
     TriList.SetSigFalseAction(UIBoolJoin.PinDialogCancelPress, CancelPinDialog);
     PinKeypad = new SmartObjectNumeric(TriList.SmartObjects[UISmartObjectJoin.TechPinDialogKeypad], true);
     PinKeypad.Digit0.UserObject = new Action <bool>(b => { if (b)
                                                            {
                                                                DialPinDigit('0');
                                                            }
                                                     });
     PinKeypad.Digit1.UserObject = new Action <bool>(b => { if (b)
                                                            {
                                                                DialPinDigit('1');
                                                            }
                                                     });
     PinKeypad.Digit2.UserObject = new Action <bool>(b => { if (b)
                                                            {
                                                                DialPinDigit('2');
                                                            }
                                                     });
     PinKeypad.Digit3.UserObject = new Action <bool>(b => { if (b)
                                                            {
                                                                DialPinDigit('3');
                                                            }
                                                     });
     PinKeypad.Digit4.UserObject = new Action <bool>(b => { if (b)
                                                            {
                                                                DialPinDigit('4');
                                                            }
                                                     });
     PinKeypad.Digit5.UserObject = new Action <bool>(b => { if (b)
                                                            {
                                                                DialPinDigit('5');
                                                            }
                                                     });
     PinKeypad.Digit6.UserObject = new Action <bool>(b => { if (b)
                                                            {
                                                                DialPinDigit('6');
                                                            }
                                                     });
     PinKeypad.Digit7.UserObject = new Action <bool>(b => { if (b)
                                                            {
                                                                DialPinDigit('7');
                                                            }
                                                     });
     PinKeypad.Digit8.UserObject = new Action <bool>(b => { if (b)
                                                            {
                                                                DialPinDigit('8');
                                                            }
                                                     });
     PinKeypad.Digit9.UserObject = new Action <bool>(b => { if (b)
                                                            {
                                                                DialPinDigit('9');
                                                            }
                                                     });
 }