예제 #1
0
        //Shared Button Key for Numbers
        void buttonKey_Clicked(object sender, EventArgs e)
        {
            TouchButtonText button = (TouchButtonText)sender;

            ClearEntryPinStatusMessage();
            _entryPin.InsertText(button.LabelText, ref _tempCursorPosition);
            //_entryPin.Position = _tempCursorPosition;
            _entryPin.GrabFocus();
            _entryPin.Position = _entryPin.Text.Length;
        }
예제 #2
0
        void buttonKeyMB_Clicked(object sender, EventArgs e)
        {
            TouchButtonText button = (TouchButtonText)sender;
            decimal         value  = 0.0m;

            switch (button.Name)
            {
            //Left
            case "touchButtonKeyMBL1_Green":
                value = _decimalMoneyButtonL1Value;
                break;

            case "touchButtonKeyMBL2_Green":
                value = _decimalMoneyButtonL2Value;
                break;

            case "touchButtonKeyMBL3_Green":
                value = _decimalMoneyButtonL3Value;
                break;

            case "touchButtonKeyMBL4_Green":
                value = _decimalMoneyButtonL4Value;
                break;

            case "touchButtonKeyMBL5_Green":
                value = _decimalMoneyButtonL5Value;
                break;

            //Right
            case "touchButtonKeyMBR1_Green":
                value = _decimalMoneyButtonR1Value;
                break;

            case "touchButtonKeyMBR2_Green":
                value = _decimalMoneyButtonR2Value;
                break;

            case "touchButtonKeyMBR3_Green":
                value = _decimalMoneyButtonR3Value;
                break;

            case "touchButtonKeyMBR4_Green":
                value = _decimalMoneyButtonR4Value;
                break;

            case "touchButtonKeyMBR5_Green":
                value = _decimalMoneyButtonR5Value;
                break;
            }
            AddMoney(value);
        }
예제 #3
0
        void _numberPad_Clicked(object sender, EventArgs e)
        {
            TouchButtonText button = (TouchButtonText)sender;

            if (_moneyPadMode != MoneyPadMode.NumberPad)
            {
                _entryDeliveryValue.Text = string.Empty;
                _tempCursorPosition      = 0;
                _moneyPadMode            = MoneyPadMode.NumberPad;
            }

            switch (button.LabelText)
            {
            case "CE":
                _entryDeliveryValue.DeleteText(_entryDeliveryValue.Position - 1, _entryDeliveryValue.Position);
                _tempCursorPosition = _entryDeliveryValue.Position;
                break;

            default:
                _entryDeliveryValue.InsertText(button.LabelText, ref _tempCursorPosition);
                _entryDeliveryValue.Position = _tempCursorPosition;
                break;
            }
        }
예제 #4
0
        public MoneyPad(Window pSourceWindow, decimal pInitialValue = 0.0m)
        {
            //Settings
            string fontMoneyPadButtonKeys = GlobalFramework.Settings["fontMoneyPadButtonKeys"];
            string fontMoneyPadTextEntry  = GlobalFramework.Settings["fontMoneyPadTextEntry"];
            //ButtonLabels
            string moneyButtonL1Label = FrameworkUtils.DecimalToStringCurrency(_decimalMoneyButtonL1Value);
            string moneyButtonL2Label = FrameworkUtils.DecimalToStringCurrency(_decimalMoneyButtonL2Value);
            string moneyButtonL3Label = FrameworkUtils.DecimalToStringCurrency(_decimalMoneyButtonL3Value);
            string moneyButtonL4Label = FrameworkUtils.DecimalToStringCurrency(_decimalMoneyButtonL4Value);
            string moneyButtonL5Label = FrameworkUtils.DecimalToStringCurrency(_decimalMoneyButtonL5Value);
            string moneyButtonR1Label = FrameworkUtils.DecimalToStringCurrency(_decimalMoneyButtonR1Value);
            string moneyButtonR2Label = FrameworkUtils.DecimalToStringCurrency(_decimalMoneyButtonR2Value);
            string moneyButtonR3Label = FrameworkUtils.DecimalToStringCurrency(_decimalMoneyButtonR3Value);
            string moneyButtonR4Label = FrameworkUtils.DecimalToStringCurrency(_decimalMoneyButtonR4Value);
            string moneyButtonR5Label = FrameworkUtils.DecimalToStringCurrency(_decimalMoneyButtonR5Value);

            //Local Vars
            Color colorFont           = Color.White;
            Size  numberPadButtonSize = new Size(100, 80);
            Size  moneyButtonSize     = new Size(100, 64);

            //Delivery Entry
            string initialValue = (pInitialValue > 0) ? FrameworkUtils.DecimalToString(pInitialValue) : string.Empty;

            _entryDeliveryValue = new EntryValidation(pSourceWindow, KeyboardMode.None, SettingsApp.RegexDecimal, true)
            {
                Text = initialValue, Alignment = 0.5F
            };
            _entryDeliveryValue.ModifyFont(Pango.FontDescription.FromString(fontMoneyPadTextEntry));
            //Dialog Validated Equal to Entry, Its the Only Entry in Dialog
            _validated = _entryDeliveryValue.Validated;
            //Event
            _entryDeliveryValue.Changed += _entry_Changed;

            //NumberPad
            _numberPad          = new NumberPad("numberPad", Color.Transparent, fontMoneyPadButtonKeys, (byte)numberPadButtonSize.Width, (byte)numberPadButtonSize.Height);
            _numberPad.Clicked += _numberPad_Clicked;

            //MoneyButtons Left
            _buttonKeyMBL1 = new TouchButtonText("touchButtonKeyMBL1_Green", Color.Transparent, moneyButtonL1Label, fontMoneyPadButtonKeys, colorFont, (byte)moneyButtonSize.Width, (byte)moneyButtonSize.Height);
            _buttonKeyMBL2 = new TouchButtonText("touchButtonKeyMBL2_Green", Color.Transparent, moneyButtonL2Label, fontMoneyPadButtonKeys, colorFont, (byte)moneyButtonSize.Width, (byte)moneyButtonSize.Height);
            _buttonKeyMBL3 = new TouchButtonText("touchButtonKeyMBL3_Green", Color.Transparent, moneyButtonL3Label, fontMoneyPadButtonKeys, colorFont, (byte)moneyButtonSize.Width, (byte)moneyButtonSize.Height);
            _buttonKeyMBL4 = new TouchButtonText("touchButtonKeyMBL4_Green", Color.Transparent, moneyButtonL4Label, fontMoneyPadButtonKeys, colorFont, (byte)moneyButtonSize.Width, (byte)moneyButtonSize.Height);
            _buttonKeyMBL5 = new TouchButtonText("touchButtonKeyMBL5_Green", Color.Transparent, moneyButtonL5Label, fontMoneyPadButtonKeys, colorFont, (byte)moneyButtonSize.Width, (byte)moneyButtonSize.Height);
            //MoneyButtons Right
            _buttonKeyMBR1 = new TouchButtonText("touchButtonKeyMBR1_Green", Color.Transparent, moneyButtonR1Label, fontMoneyPadButtonKeys, colorFont, (byte)moneyButtonSize.Width, (byte)moneyButtonSize.Height);
            _buttonKeyMBR2 = new TouchButtonText("touchButtonKeyMBR2_Green", Color.Transparent, moneyButtonR2Label, fontMoneyPadButtonKeys, colorFont, (byte)moneyButtonSize.Width, (byte)moneyButtonSize.Height);
            _buttonKeyMBR3 = new TouchButtonText("touchButtonKeyMBR3_Green", Color.Transparent, moneyButtonR3Label, fontMoneyPadButtonKeys, colorFont, (byte)moneyButtonSize.Width, (byte)moneyButtonSize.Height);
            _buttonKeyMBR4 = new TouchButtonText("touchButtonKeyMBR4_Green", Color.Transparent, moneyButtonR4Label, fontMoneyPadButtonKeys, colorFont, (byte)moneyButtonSize.Width, (byte)moneyButtonSize.Height);
            _buttonKeyMBR5 = new TouchButtonText("touchButtonKeyMBR5_Green", Color.Transparent, moneyButtonR5Label, fontMoneyPadButtonKeys, colorFont, (byte)moneyButtonSize.Width, (byte)moneyButtonSize.Height);
            //Events
            _buttonKeyMBL1.Clicked += buttonKeyMB_Clicked;
            _buttonKeyMBL2.Clicked += buttonKeyMB_Clicked;
            _buttonKeyMBL3.Clicked += buttonKeyMB_Clicked;
            _buttonKeyMBL4.Clicked += buttonKeyMB_Clicked;
            _buttonKeyMBL5.Clicked += buttonKeyMB_Clicked;
            _buttonKeyMBR1.Clicked += buttonKeyMB_Clicked;
            _buttonKeyMBR2.Clicked += buttonKeyMB_Clicked;
            _buttonKeyMBR3.Clicked += buttonKeyMB_Clicked;
            _buttonKeyMBR4.Clicked += buttonKeyMB_Clicked;
            _buttonKeyMBR5.Clicked += buttonKeyMB_Clicked;

            VBox vboxMoneyButtonsLeft = new VBox(true, 0);

            vboxMoneyButtonsLeft.PackStart(_buttonKeyMBL1, true, true, 0);
            vboxMoneyButtonsLeft.PackStart(_buttonKeyMBL2, true, true, 0);
            vboxMoneyButtonsLeft.PackStart(_buttonKeyMBL3, true, true, 0);
            vboxMoneyButtonsLeft.PackStart(_buttonKeyMBL4, true, true, 0);
            vboxMoneyButtonsLeft.PackStart(_buttonKeyMBL5, true, true, 0);

            VBox vboxMoneyButtonsRight = new VBox(true, 0);

            vboxMoneyButtonsRight.PackStart(_buttonKeyMBR1, true, true, 0);
            vboxMoneyButtonsRight.PackStart(_buttonKeyMBR2, true, true, 0);
            vboxMoneyButtonsRight.PackStart(_buttonKeyMBR3, true, true, 0);
            vboxMoneyButtonsRight.PackStart(_buttonKeyMBR4, true, true, 0);
            vboxMoneyButtonsRight.PackStart(_buttonKeyMBR5, true, true, 0);

            HBox hboxInput = new HBox(false, 5);

            hboxInput.PackStart(vboxMoneyButtonsLeft);
            hboxInput.PackStart(_numberPad);
            hboxInput.PackStart(vboxMoneyButtonsRight);

            //Vbox
            VBox vboxNumberPad = new VBox(false, 0);

            vboxNumberPad.PackStart(_entryDeliveryValue, false, true, 5);
            vboxNumberPad.PackStart(hboxInput, true, true, 5);

            //Pack It
            this.Add(vboxNumberPad);
        }
예제 #5
0
        public NumberPadPin(Window pSourceWindow, string pName, Color pButtonColor, string pFont, string pFontLabelStatus, Color pFontColor, Color pFontColorLabelStatus, byte pButtonWidth, byte pButtonHeight, bool pShowSystemButtons = false, bool pVisibleWindow = false, uint pRowSpacingLabelStatus = 20, uint pRowSpacingSystemButtons = 40, byte pPadding = 3)
        {
            _sourceWindow = pSourceWindow;
            this.Name     = pName;

            //Show or Hide System Buttons (Startup Visible, Pos Change User Invisible)
            uint tableRows = (pShowSystemButtons) ? (uint)5 : (uint)3;

            _eventbox = new EventBox()
            {
                VisibleWindow = pVisibleWindow
            };

            _table             = new Table(tableRows, 3, true);
            _table.Homogeneous = false;

            //Pin Entry
            _entryPin = new EntryValidation(pSourceWindow, KeyboardMode.None, SettingsApp.RegexLoginPin, true)
            {
                InvisibleChar = '*', Visibility = false
            };
            _entryPin.ModifyFont(Pango.FontDescription.FromString(pFont));
            _entryPin.Alignment = 0.5F;

            //ResetPassword
            string numberPadPinButtonPasswordResetImageFileName = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Other\pinpad_password_reset.png");

            _buttonKeyResetPassword = new TouchButtonIcon("touchButtonKeyPasswordReset", System.Drawing.Color.Transparent, numberPadPinButtonPasswordResetImageFileName, new Size(20, 20), 25, 25)
            {
                Sensitive = false
            };

            //Start Validated
            _entryPin.Validate();
            //Event
            _entryPin.Changed         += _entryPin_Changed;
            _entryPin.KeyReleaseEvent += _entryPin_KeyReleaseEvent;

            //Label Status
            _labelStatus = new Label(resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "pos_pinpad_message_type_password"));
            _labelStatus.ModifyFont(Pango.FontDescription.FromString(pFontLabelStatus));
            _labelStatus.ModifyFg(StateType.Normal, Utils.ColorToGdkColor(pFontColorLabelStatus));
            _labelStatus.SetAlignment(0.5F, 0.5f);

            //Initialize Buttons
            TouchButtonText buttonKey1  = new TouchButtonText("touchButtonKey1", pButtonColor, "1", pFont, pFontColor, pButtonWidth, pButtonHeight);
            TouchButtonText buttonKey2  = new TouchButtonText("touchButtonKey2", pButtonColor, "2", pFont, pFontColor, pButtonWidth, pButtonHeight);
            TouchButtonText buttonKey3  = new TouchButtonText("touchButtonKey3", pButtonColor, "3", pFont, pFontColor, pButtonWidth, pButtonHeight);
            TouchButtonText buttonKey4  = new TouchButtonText("touchButtonKey4", pButtonColor, "4", pFont, pFontColor, pButtonWidth, pButtonHeight);
            TouchButtonText buttonKey5  = new TouchButtonText("touchButtonKey5", pButtonColor, "5", pFont, pFontColor, pButtonWidth, pButtonHeight);
            TouchButtonText buttonKey6  = new TouchButtonText("touchButtonKey6", pButtonColor, "6", pFont, pFontColor, pButtonWidth, pButtonHeight);
            TouchButtonText buttonKey7  = new TouchButtonText("touchButtonKey7", pButtonColor, "7", pFont, pFontColor, pButtonWidth, pButtonHeight);
            TouchButtonText buttonKey8  = new TouchButtonText("touchButtonKey8", pButtonColor, "8", pFont, pFontColor, pButtonWidth, pButtonHeight);
            TouchButtonText buttonKey9  = new TouchButtonText("touchButtonKey9", pButtonColor, "9", pFont, pFontColor, pButtonWidth, pButtonHeight);
            TouchButtonText buttonKey0  = new TouchButtonText("touchButtonKey0", pButtonColor, "0", pFont, pFontColor, pButtonWidth, pButtonHeight);
            TouchButtonText buttonKeyCE = new TouchButtonText("touchButtonKeyCE_Red", pButtonColor, "CE", pFont, pFontColor, pButtonWidth, pButtonHeight);

            //Shared Button,can be OK or Quit based on ShowSystemButtons
            TouchButtonText _buttonQuitOrOk;

            //Outside Reference Buttons (Public)
            _buttonKeyOK = new TouchButtonText("touchButtonKeyOK_Green", pButtonColor, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "widget_pospinpad_ok"), pFont, pFontColor, pButtonWidth, pButtonHeight)
            {
                Sensitive = false
            };
            //_buttonKeyResetPassword = new TouchButtonText("touchButtonKeyReset_Red", pButtonColor, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "widget_pospinpad_change_password, pFont, pFontColor, pButtonWidth, pButtonHeight) { Sensitive = false };

            if (pShowSystemButtons)
            {
                _buttonKeyFrontOffice = new TouchButtonText("touchButtonKeyFrontOffice_DarkGrey", pButtonColor, "FO", pFont, pFontColor, pButtonWidth, pButtonHeight)
                {
                    Sensitive = false, Visible = false
                };
                _buttonKeyQuit       = new TouchButtonText("touchButtonKeyQuit_DarkGrey", pButtonColor, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_quit_title"), pFont, pFontColor, pButtonWidth, pButtonHeight);
                _buttonKeyBackOffice = new TouchButtonText("touchButtonKeyBackOffice_DarkGrey", pButtonColor, "BO", pFont, pFontColor, pButtonWidth, pButtonHeight)
                {
                    Sensitive = false, Visible = false
                };
                _buttonQuitOrOk = _buttonKeyQuit;
            }
            else
            {
                _buttonQuitOrOk = _buttonKeyOK;
            }

            //_buttonKeyOK.Style.SetBgPixmap(StateType.Active, Utils.FileToPixmap("Assets/Themes/Default/Backgrounds/Windows/test.png"));
            //_buttonKeyOK.Style = Utils.GetThemeStyleBackground(@"Backgrounds/Windows/test.png");

            //Events
            buttonKey1.Clicked  += buttonKey_Clicked;
            buttonKey2.Clicked  += buttonKey_Clicked;
            buttonKey3.Clicked  += buttonKey_Clicked;
            buttonKey4.Clicked  += buttonKey_Clicked;
            buttonKey5.Clicked  += buttonKey_Clicked;
            buttonKey6.Clicked  += buttonKey_Clicked;
            buttonKey7.Clicked  += buttonKey_Clicked;
            buttonKey8.Clicked  += buttonKey_Clicked;
            buttonKey9.Clicked  += buttonKey_Clicked;
            buttonKey0.Clicked  += buttonKey_Clicked;
            buttonKeyCE.Clicked += buttonKeyCE_Clicked;

            //Prepare Table

            //row0
            int entryPinTablePos = (pShowSystemButtons) ? 2 : 3;

            //Without ResetPassword Button
            if (!pShowSystemButtons)
            {
                _table.Attach(_entryPin, 0, 3, 0, 1, AttachOptions.Fill, AttachOptions.Fill, pPadding, pPadding);
            }
            //With ResetPassword Button
            else
            {
                _table.Attach(_entryPin, 0, 2, 0, 1, AttachOptions.Fill, AttachOptions.Fill, pPadding, pPadding);
                _table.Attach(_buttonKeyResetPassword, 2, 3, 0, 1, AttachOptions.Fill, AttachOptions.Fill, pPadding, pPadding);
            }
            //row1
            _table.Attach(buttonKey7, 0, 1, 1, 2, AttachOptions.Fill, AttachOptions.Fill, pPadding, pPadding);
            _table.Attach(buttonKey8, 1, 2, 1, 2, AttachOptions.Fill, AttachOptions.Fill, pPadding, pPadding);
            _table.Attach(buttonKey9, 2, 3, 1, 2, AttachOptions.Fill, AttachOptions.Fill, pPadding, pPadding);
            //row2
            _table.Attach(buttonKey4, 0, 1, 2, 3, AttachOptions.Fill, AttachOptions.Fill, pPadding, pPadding);
            _table.Attach(buttonKey5, 1, 2, 2, 3, AttachOptions.Fill, AttachOptions.Fill, pPadding, pPadding);
            _table.Attach(buttonKey6, 2, 3, 2, 3, AttachOptions.Fill, AttachOptions.Fill, pPadding, pPadding);
            //row3
            _table.Attach(buttonKey1, 0, 1, 3, 4, AttachOptions.Fill, AttachOptions.Fill, pPadding, pPadding);
            _table.Attach(buttonKey2, 1, 2, 3, 4, AttachOptions.Fill, AttachOptions.Fill, pPadding, pPadding);
            _table.Attach(buttonKey3, 2, 3, 3, 4, AttachOptions.Fill, AttachOptions.Fill, pPadding, pPadding);
            //row4
            _table.Attach(buttonKeyCE, 0, 1, 4, 5, AttachOptions.Fill, AttachOptions.Fill, pPadding, pPadding);
            _table.Attach(buttonKey0, 1, 2, 4, 5, AttachOptions.Fill, AttachOptions.Fill, pPadding, pPadding);
            _table.Attach(_buttonQuitOrOk, 2, 3, 4, 5, AttachOptions.Fill, AttachOptions.Fill, pPadding, pPadding);
            //Row5
            _table.Attach(_labelStatus, 0, 3, 5, 6, AttachOptions.Fill, AttachOptions.Fill, pPadding, pPadding);
            _table.SetRowSpacing(4, pRowSpacingLabelStatus);
            //row6
            if (pShowSystemButtons)
            {
                //_table.Attach(_buttonKeyFrontOffice, 0, 1, 5, 6, AttachOptions.Fill, AttachOptions.Fill, pPadding, pPadding);
                //_table.Attach(_buttonKeyOK, 0, 3, 7, 8, AttachOptions.Fill, AttachOptions.Fill, pPadding, pPadding);
                //_table.Attach(_buttonKeyBackOffice, 2, 3, 5, 6, AttachOptions.Fill, AttachOptions.Fill, pPadding, pPadding);
                _table.Attach(_buttonKeyOK, 0, 3, 7, 8, AttachOptions.Fill, AttachOptions.Fill, pPadding, pPadding);
                //space between Status Message and POS Keys
                _table.SetRowSpacing(5, pRowSpacingSystemButtons);
            }

            _eventbox.Add(_table);
            this.Add(_eventbox);
        }
예제 #6
0
        public NumberPad(String name, Color color, String font, byte buttonWidth, byte buttonHeight, byte padding = 0)
        {
            this.Name = name;

            Color colorFont        = Color.White;
            char  decimalSeparator = (char)GlobalFramework.CurrentCulture.NumberFormat.NumberDecimalSeparator[0];

            EventBox eventbox = new EventBox()
            {
                VisibleWindow = false
            };

            _table             = new Table(4, 3, true);
            _table.Homogeneous = true;

            TouchButtonText buttonKey1   = new TouchButtonText("touchButtonKey1_DarkGrey", color, "1", font, colorFont, buttonWidth, buttonHeight);
            TouchButtonText buttonKey2   = new TouchButtonText("touchButtonKey2_DarkGrey", color, "2", font, colorFont, buttonWidth, buttonHeight);
            TouchButtonText buttonKey3   = new TouchButtonText("touchButtonKey3_DarkGrey", color, "3", font, colorFont, buttonWidth, buttonHeight);
            TouchButtonText buttonKey4   = new TouchButtonText("touchButtonKey4_DarkGrey", color, "4", font, colorFont, buttonWidth, buttonHeight);
            TouchButtonText buttonKey5   = new TouchButtonText("touchButtonKey5_DarkGrey", color, "5", font, colorFont, buttonWidth, buttonHeight);
            TouchButtonText buttonKey6   = new TouchButtonText("touchButtonKey6_DarkGrey", color, "6", font, colorFont, buttonWidth, buttonHeight);
            TouchButtonText buttonKey7   = new TouchButtonText("touchButtonKey7_DarkGrey", color, "7", font, colorFont, buttonWidth, buttonHeight);
            TouchButtonText buttonKey8   = new TouchButtonText("touchButtonKey8_DarkGrey", color, "8", font, colorFont, buttonWidth, buttonHeight);
            TouchButtonText buttonKey9   = new TouchButtonText("touchButtonKey9_DarkGrey", color, "9", font, colorFont, buttonWidth, buttonHeight);
            TouchButtonText buttonKey0   = new TouchButtonText("touchButtonKey0_DarkGrey", color, "0", font, colorFont, buttonWidth, buttonHeight);
            TouchButtonText buttonKeyDot = new TouchButtonText("touchButtonKeyDOT_DarkGrey", color, decimalSeparator.ToString(), font, colorFont, buttonWidth, buttonHeight);
            TouchButtonText buttonKeyCE  = new TouchButtonText("touchButtonKeyCE_DarkGrey", color, "CE", font, colorFont, buttonWidth, buttonHeight);

            //prepare _table
            //row0
            _table.Attach(buttonKey7, 0, 1, 0, 1, AttachOptions.Fill, AttachOptions.Fill, padding, padding);
            _table.Attach(buttonKey8, 1, 2, 0, 1, AttachOptions.Fill, AttachOptions.Fill, padding, padding);
            _table.Attach(buttonKey9, 2, 3, 0, 1, AttachOptions.Fill, AttachOptions.Fill, padding, padding);
            //row1
            _table.Attach(buttonKey4, 0, 1, 1, 2, AttachOptions.Fill, AttachOptions.Fill, padding, padding);
            _table.Attach(buttonKey5, 1, 2, 1, 2, AttachOptions.Fill, AttachOptions.Fill, padding, padding);
            _table.Attach(buttonKey6, 2, 3, 1, 2, AttachOptions.Fill, AttachOptions.Fill, padding, padding);
            //row2
            _table.Attach(buttonKey1, 0, 1, 2, 3, AttachOptions.Fill, AttachOptions.Fill, padding, padding);
            _table.Attach(buttonKey2, 1, 2, 2, 3, AttachOptions.Fill, AttachOptions.Fill, padding, padding);
            _table.Attach(buttonKey3, 2, 3, 2, 3, AttachOptions.Fill, AttachOptions.Fill, padding, padding);
            //row3
            _table.Attach(buttonKey0, 0, 1, 3, 4, AttachOptions.Fill, AttachOptions.Fill, padding, padding);
            _table.Attach(buttonKeyDot, 1, 2, 3, 4, AttachOptions.Fill, AttachOptions.Fill, padding, padding);
            _table.Attach(buttonKeyCE, 2, 3, 3, 4, AttachOptions.Fill, AttachOptions.Fill, padding, padding);

            //PackIt
            eventbox.Add(_table);
            this.Add(eventbox);

            //Events
            buttonKey1.Clicked   += buttonKey_Clicked;
            buttonKey2.Clicked   += buttonKey_Clicked;
            buttonKey3.Clicked   += buttonKey_Clicked;
            buttonKey4.Clicked   += buttonKey_Clicked;
            buttonKey5.Clicked   += buttonKey_Clicked;
            buttonKey6.Clicked   += buttonKey_Clicked;
            buttonKey7.Clicked   += buttonKey_Clicked;
            buttonKey8.Clicked   += buttonKey_Clicked;
            buttonKey9.Clicked   += buttonKey_Clicked;
            buttonKey0.Clicked   += buttonKey_Clicked;
            buttonKeyDot.Clicked += buttonKey_Clicked;
            buttonKeyCE.Clicked  += buttonKey_Clicked;
        }