Exemplo n.º 1
0
        public void InitObject(Window pSourceWindow, DialogFlags pDialogFlags, string pWindowTitle, decimal pInitialValue = 0.0m, decimal pTotalOrder = 0.0m)
        {
            Size   windowSize            = new Size(524, 497);
            String fileDefaultWindowIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_window_payments.png");

            //Init MoneyPad
            _moneyPad = new MoneyPad(pSourceWindow, pInitialValue);
            _moneyPad.EntryChanged += _moneyPad_EntryChanged;
            //If pInitialValue defined, Assign it
            _amount = (pInitialValue > 0) ? pInitialValue : 0.0m;

            //Init Content
            Fixed fixedContent = new Fixed();

            fixedContent.Put(_moneyPad, 0, 0);

            //ActionArea Buttons
            _buttonOk     = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Ok);
            _buttonCancel = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Cancel);
            //Start Enable or Disable
            _buttonOk.Sensitive = (pInitialValue > 0 && pInitialValue > pTotalOrder) ? true : false;

            //ActionArea
            ActionAreaButtons actionAreaButtons = new ActionAreaButtons();

            actionAreaButtons.Add(new ActionAreaButton(_buttonOk, ResponseType.Ok));
            actionAreaButtons.Add(new ActionAreaButton(_buttonCancel, ResponseType.Cancel));

            //Init Object
            this.InitObject(this, pDialogFlags, fileDefaultWindowIcon, pWindowTitle, windowSize, fixedContent, actionAreaButtons);
        }
Exemplo n.º 2
0
        public NumberPadPos(String name, Color colorButton, Color colorRightButton, String fontButton, String fontRightButton, byte buttonWidth, byte rightButtonWidth, byte buttonHeight, byte padding = 0)
            : base(name, colorButton, fontButton, buttonWidth, buttonHeight, padding)
        {
            //Init Local Vars
            Size   sizeIcon = new Size(28, 28);
            String icon1    = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\icon_pos_numberpad_1_splitaccount.png");
            String icon2    = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\icon_pos_numberpad_2_messages.png");
            String icon3    = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\icon_pos_numberpad_3_gifts.png");
            String icon4    = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\icon_pos_numberpad_4_weight.png");

            Color colorFont = Color.Black;

            Table.Name        = name;
            Table.Homogeneous = false;
            Table.NColumns    = 4;

            TouchButtonIconWithText buttonKeySplitAccount = new TouchButtonIconWithText("buttonKeySplitAccount", colorRightButton, Resx.global_split_account, fontRightButton, colorFont, icon1, sizeIcon, rightButtonWidth, buttonHeight);
            TouchButtonIconWithText buttonKeyMessages     = new TouchButtonIconWithText("buttonKeyMessages", colorRightButton, Resx.global_messages, fontRightButton, colorFont, icon2, sizeIcon, rightButtonWidth, buttonHeight);
            TouchButtonIconWithText buttonKeyGifts        = new TouchButtonIconWithText("buttonKeyGifts", colorRightButton, Resx.global_gifts, fontRightButton, colorFont, icon3, sizeIcon, rightButtonWidth, buttonHeight);
            TouchButtonIconWithText buttonKeyWeight       = new TouchButtonIconWithText("buttonKeyWeight", colorRightButton, Resx.global_weight, fontRightButton, colorFont, icon4, sizeIcon, rightButtonWidth, buttonHeight);

            buttonKeyMessages.Sensitive = false;
            buttonKeyGifts.Sensitive    = false;

            //add column4 to base NumberPad
            Table.Attach(buttonKeySplitAccount, 3, 4, 0, 1, AttachOptions.Fill, AttachOptions.Fill, padding, padding);
            Table.Attach(buttonKeyMessages, 3, 4, 1, 2, AttachOptions.Fill, AttachOptions.Fill, padding, padding);
            Table.Attach(buttonKeyGifts, 3, 4, 2, 3, AttachOptions.Fill, AttachOptions.Fill, padding, padding);
            Table.Attach(buttonKeyWeight, 3, 4, 3, 4, AttachOptions.Fill, AttachOptions.Fill, padding, padding);
            //space between NumberPad and POS Keys
            Table.SetColSpacing(2, 6);
        }
Exemplo n.º 3
0
        public void _dashboardButton_Clicked(object sender, EventArgs e)
        {
            TouchButtonIconWithText btClicked = (TouchButtonIconWithText)sender;

            try
            {
                //Show Button Content if its a Chield Button
                if (btClicked.GetType() == typeof(TouchButtonIconWithText))
                {
                    if (btClicked.Content != null)
                    {
                        if (_nodeContent != null)
                        {
                            _hboxContent.Remove(_nodeContent);
                        }
                        _nodeContent = btClicked.Content;
                        //Store active content button nodeContentActiveButton to reference to have access to Name, used for previleges etc
                        //_accordion.CurrentChildButtonContent = btClicked;
                        _labelActiveContent.Text = btClicked.Label;

                        if (!_nodeContent.Visible)
                        {
                            _nodeContent.Visible = true;
                        }
                        _hboxContent.PackStart(_nodeContent);
                    }
                }
            }
            catch (Exception ex)
            {
                _log.Error(ex.Message, ex);
            }
        }
Exemplo n.º 4
0
        public PosEditCompanyDetails(Window pSourceWindow, DialogFlags pDialogFlags)
            : base(pSourceWindow, pDialogFlags, true, false)
        {
            //Init Local Vars
            String windowTitle           = Resx.window_title_edit_configurationpreferenceparameter;
            Size   windowSize            = new Size(600, 600);
            String fileDefaultWindowIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_window_system.png");

            //References
            _sourceWindow = pSourceWindow;

            //ActionArea Buttons
            _buttonOk = new TouchButtonIconWithText("touchButtonOk_DialogActionArea", _colorBaseDialogActionAreaButtonBackground, Resx.global_button_label_ok, _fontBaseDialogActionAreaButton, _colorBaseDialogActionAreaButtonFont, _fileActionOK, _sizeBaseDialogActionAreaButtonIcon, _sizeBaseDialogActionAreaButton.Width, _sizeBaseDialogActionAreaButton.Height)
            {
                Sensitive = false
            };

            //ActionArea
            ActionAreaButtons actionAreaButtons = new ActionAreaButtons();

            actionAreaButtons.Add(new ActionAreaButton(_buttonOk, ResponseType.Ok));

            //Init Content
            InitUI();

            //Start Validated
            Validate();

            //Init Object
            this.InitObject(this, pDialogFlags, fileDefaultWindowIcon, windowTitle, windowSize, _scrolledWindow, actionAreaButtons);

            //Set Focus to Window, To Hide Keyboard: Only Used if First SelectionBox are Hiden
            //this.GrabFocus();
        }
        public PosDocumentFinancePrintDialog(Window pSourceWindow, DialogFlags pDialogFlags, fin_documentfinancemaster pDocumentFinanceMaster)
            : base(pSourceWindow, pDialogFlags)
        {
            //Init Local Vars
            String windowTitle           = string.Format(resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "window_title_dialog_document_finance_print"), pDocumentFinanceMaster.DocumentNumber);
            Size   windowSize            = new Size(400, 259);
            String fileDefaultWindowIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_window_document_new.png");

            //Parameters
            _documentFinanceMaster = pDocumentFinanceMaster;
            //Vars
            _requestMotive = _documentFinanceMaster.DocumentType.PrintRequestMotive;
            if (_requestMotive)
            {
                windowSize.Height += 42 + 76;                //Secondcopy + Motive UI Components
            }
            //ActionArea Buttons
            _buttonOk     = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Ok);
            _buttonCancel = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Cancel);

            //ActionArea
            ActionAreaButtons actionAreaButtons = new ActionAreaButtons();

            actionAreaButtons.Add(new ActionAreaButton(_buttonOk, ResponseType.Ok));
            actionAreaButtons.Add(new ActionAreaButton(_buttonCancel, ResponseType.Cancel));

            //Call
            InitUI();

            //Init Object
            this.InitObject(this, pDialogFlags, fileDefaultWindowIcon, windowTitle, windowSize, _vboxContent, actionAreaButtons);
        }
Exemplo n.º 6
0
        public PosPayInvoicesDialog(Window pSourceWindow, DialogFlags pDialogFlags, decimal pPaymentAmountTotal, int pNoOfInvoices)
            : base(pSourceWindow, pDialogFlags)
        {
            //Parameters
            _sourceWindow       = pSourceWindow;
            _paymentAmountTotal = pPaymentAmountTotal;
            _noOfInvoices       = pNoOfInvoices;

            //Init Local Vars
            String windowTitle = resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "window_title_dialog_pay_invoices");

            _windowSize = new Size(480, 444);
            String fileDefaultWindowIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_window_pay_invoice.png");

            //ActionArea Buttons
            _buttonOk           = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Ok);
            _buttonCancel       = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Cancel);
            _buttonOk.Sensitive = false;

            //ActionArea
            ActionAreaButtons actionAreaButtons = new ActionAreaButtons();

            actionAreaButtons.Add(new ActionAreaButton(_buttonOk, ResponseType.Ok));
            actionAreaButtons.Add(new ActionAreaButton(_buttonCancel, ResponseType.Cancel));

            //Init Content
            InitUI();

            //Start Validated
            Validate();

            //Init Object
            this.InitObject(this, pDialogFlags, fileDefaultWindowIcon, windowTitle, _windowSize, _fixedContent, actionAreaButtons);
        }
Exemplo n.º 7
0
        public PosFilePickerDialog(Window pSourceWindow, DialogFlags pDialogFlags, FileFilter pFileFilter, FileChooserAction pFileChooserAction, string windowName)
            : base(pSourceWindow, pDialogFlags)
        {
            //Parameters
            _fileFilter        = pFileFilter;
            _fileChooserAction = pFileChooserAction;

            //Init Local Vars
            string windowTitle = string.Format("{0} {1}", resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "window_title_dialog_filepicker"), windowName);

            _windowSize = new Size(700, 473);
            String fileDefaultWindowIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_window_select_record.png");

            //Init Content
            _fixedContent = new Fixed();

            //Call Init UI
            InitUI();

            //ActionArea Buttons
            TouchButtonIconWithText buttonOk     = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Ok);
            TouchButtonIconWithText buttonCancel = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Cancel);

            //ActionArea
            ActionAreaButtons actionAreaButtons = new ActionAreaButtons();

            actionAreaButtons.Add(new ActionAreaButton(buttonOk, ResponseType.Ok));
            actionAreaButtons.Add(new ActionAreaButton(buttonCancel, ResponseType.Cancel));

            //Init Object
            this.InitObject(this, pDialogFlags, fileDefaultWindowIcon, windowTitle, _windowSize, _fixedContent, actionAreaButtons);
        }
Exemplo n.º 8
0
        public PosChangeUserDialog(Window pSourceWindow, DialogFlags pDialogFlags)
            : base(pSourceWindow, pDialogFlags)
        {
            //Init Local Vars
            String windowTitle           = Resx.window_title_dialog_change_user;
            Size   windowSize            = new Size(559, 562);
            String fileDefaultWindowIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_window_users.png");

            //Init Content
            _fixedContent = new Fixed();

            InitTablePadUsers();

            //ActionArea Buttons
            //_buttonOk = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Ok) { Sensitive = false };
            _buttonCancel = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Cancel);

            //ActionArea
            ActionAreaButtons actionAreaButtons = new ActionAreaButtons();

            //actionAreaButtons.Add(new ActionAreaButton(_buttonOk, ResponseType.Ok));
            actionAreaButtons.Add(new ActionAreaButton(_buttonCancel, ResponseType.Cancel));

            //Init Object
            this.InitObject(this, pDialogFlags, fileDefaultWindowIcon, windowTitle, windowSize, _fixedContent, actionAreaButtons);
        }
Exemplo n.º 9
0
        public PosDatePickerDialog(Window pSourceWindow, DialogFlags pDialogFlags, String pDialogTitle, DateTime pDateTime)
            : base(pSourceWindow, pDialogFlags)
        {
            //Parameters
            _dateTime = pDateTime;

            //Init Local Vars
            String windowTitle           = pDialogTitle;
            String fileDefaultWindowIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_window_date_picker.png");

            _windowSize = new Size(600, 373);

            //Init Content
            _fixedContent = new Fixed();

            //Call Init UI
            InitUI();

            //ActionArea Buttons
            TouchButtonIconWithText buttonOk     = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Ok);
            TouchButtonIconWithText buttonCancel = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Cancel);

            //ActionArea
            ActionAreaButtons actionAreaButtons = new ActionAreaButtons();

            actionAreaButtons.Add(new ActionAreaButton(buttonOk, ResponseType.Ok));
            actionAreaButtons.Add(new ActionAreaButton(buttonCancel, ResponseType.Cancel));

            //Init Object
            this.InitObject(this, pDialogFlags, fileDefaultWindowIcon, windowTitle, _windowSize, _fixedContent, actionAreaButtons);
        }
Exemplo n.º 10
0
        private void InitButtons()
        {
            //Settings
            String fontBaseDialogActionAreaButton = FrameworkUtils.OSSlash(GlobalFramework.Settings["fontBaseDialogActionAreaButton"]);
            String tmpFileActionOK     = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Dialogs\icon_pos_dialog_action_ok.png");
            String tmpFileActionCancel = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Dialogs\icon_pos_dialog_action_cancel.png");

            System.Drawing.Size  sizeBaseDialogActionAreaButtonIcon        = Utils.StringToSize(GlobalFramework.Settings["sizeBaseDialogActionAreaButtonIcon"]);
            System.Drawing.Size  sizeBaseDialogActionAreaButton            = Utils.StringToSize(GlobalFramework.Settings["sizeBaseDialogActionAreaButton"]);
            System.Drawing.Color colorBaseDialogActionAreaButtonBackground = FrameworkUtils.StringToColor(GlobalFramework.Settings["colorBaseDialogActionAreaButtonBackground"]);
            System.Drawing.Color colorBaseDialogActionAreaButtonFont       = FrameworkUtils.StringToColor(GlobalFramework.Settings["colorBaseDialogActionAreaButtonFont"]);

            //TODO:THEME
            if (GlobalApp.ScreenSize.Width == 800 && GlobalApp.ScreenSize.Height == 600)
            {
                sizeBaseDialogActionAreaButton.Height     -= 10;
                sizeBaseDialogActionAreaButtonIcon.Width  -= 10;
                sizeBaseDialogActionAreaButtonIcon.Height -= 10;
            }
            ;

            TouchButtonIconWithText buttonOk     = new TouchButtonIconWithText("touchButtonOk_DialogActionArea", colorBaseDialogActionAreaButtonBackground, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_button_label_ok"), fontBaseDialogActionAreaButton, colorBaseDialogActionAreaButtonFont, tmpFileActionOK, sizeBaseDialogActionAreaButtonIcon, sizeBaseDialogActionAreaButton.Width, sizeBaseDialogActionAreaButton.Height);
            TouchButtonIconWithText buttonCancel = new TouchButtonIconWithText("touchButtonCancel_DialogActionArea", colorBaseDialogActionAreaButtonBackground, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_button_label_cancel"), fontBaseDialogActionAreaButton, colorBaseDialogActionAreaButtonFont, tmpFileActionCancel, sizeBaseDialogActionAreaButtonIcon, sizeBaseDialogActionAreaButton.Width, sizeBaseDialogActionAreaButton.Height);

            //If DialogMode in View Mode, dont Show Ok Button
            if (_dialogMode != DialogMode.View)
            {
                this.AddActionWidget(buttonOk, ResponseType.Ok);
            }
            this.AddActionWidget(buttonCancel, ResponseType.Cancel);
        }
Exemplo n.º 11
0
        public PosTemplateDialog(Window pSourceWindow, DialogFlags pDialogFlags)
            : base(pSourceWindow, pDialogFlags)
        {
            //Init Local Vars
            String windowTitle           = resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "window_title_dialog_template");
            Size   windowSize            = new Size(600, 340);
            String fileDefaultWindowIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_window_default.png");

            //Init Content
            Fixed fixedContent = new Fixed();

            fixedContent.Put(new Label("Place content here"), 0, 0);

            //ActionArea Buttons
            TouchButtonIconWithText buttonOk     = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Ok);
            TouchButtonIconWithText buttonCancel = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Cancel);

            //ActionArea
            ActionAreaButtons actionAreaButtons = new ActionAreaButtons();

            actionAreaButtons.Add(new ActionAreaButton(buttonOk, ResponseType.Ok));
            actionAreaButtons.Add(new ActionAreaButton(buttonCancel, ResponseType.Cancel));

            //Init Object
            this.InitObject(this, pDialogFlags, fileDefaultWindowIcon, windowTitle, windowSize, fixedContent, actionAreaButtons);
        }
Exemplo n.º 12
0
        public PosInputTextDialog(Window pSourceWindow, DialogFlags pDialogFlags, Size pSize, string pWindowTitle, string pWindowIcon, string pEntryLabel, string pInitialValue, KeyboardMode pKeyboardMode, string pRule, bool pRequired)
            : base(pSourceWindow, pDialogFlags)
        {
            //Init Local Vars
            String windowTitle = pWindowTitle;
            Size   windowSize  = pSize;

            if (!File.Exists(pWindowIcon))
            {
                pWindowIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_window_system.png");
            }

            //Always assign  pInitialValue to Dialog.Value
            _value = pInitialValue;

            //Entry
            _entryBoxValidation = new EntryBoxValidation(this, pEntryLabel, pKeyboardMode, pRule, pRequired);
            if (pInitialValue != string.Empty)
            {
                _entryBoxValidation.EntryValidation.Text = pInitialValue;
            }

            //VBox
            _vbox = new VBox(false, 0)
            {
                WidthRequest = windowSize.Width - 12
            };
            _vbox.PackStart(_entryBoxValidation, false, false, 0);

            //Init Content
            Fixed fixedContent = new Fixed();

            fixedContent.Put(_vbox, 0, 0);

            //ActionArea Buttons
            TouchButtonIconWithText buttonOk     = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Ok);
            TouchButtonIconWithText buttonCancel = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Cancel);

            buttonOk.Sensitive = _entryBoxValidation.EntryValidation.Validated;

            //After Button Construction
            _entryBoxValidation.EntryValidation.Changed += delegate {
                _value             = _entryBoxValidation.EntryValidation.Text;
                buttonOk.Sensitive = _entryBoxValidation.EntryValidation.Validated;
            };

            //ActionArea
            ActionAreaButtons actionAreaButtons = new ActionAreaButtons();

            actionAreaButtons.Add(new ActionAreaButton(buttonOk, ResponseType.Ok));
            actionAreaButtons.Add(new ActionAreaButton(buttonCancel, ResponseType.Cancel));

            //Init Object
            this.InitObject(this, pDialogFlags, pWindowIcon, windowTitle, windowSize, fixedContent, actionAreaButtons);
        }
Exemplo n.º 13
0
        public void Init(List <PagePadPage> pPages)
        {
            string fontPagePadNavigatorButton      = GlobalFramework.Settings["fontPagePadNavigatorButton"];
            Size   sizePagesPadNavigatorButton     = Utils.StringToSize(GlobalFramework.Settings["sizePagesPadNavigatorButton"]);
            Size   sizePagesPadNavigatorButtonIcon = Utils.StringToSize(GlobalFramework.Settings["sizePagesPadNavigatorButtonIcon"]);
            string iconPrev = FrameworkUtils.OSSlash(string.Format("{0}{1}", GlobalFramework.Path["images"], @"Icons/icon_pos_pagepad_prev.png"));
            string iconNext = FrameworkUtils.OSSlash(string.Format("{0}{1}", GlobalFramework.Path["images"], @"Icons/icon_pos_pagepad_next.png"));

            //Parameters
            _pages = pPages;

            HBox navigatorButtons = new HBox(true, 0);

            _buttonPrev = new TouchButtonIconWithText("buttonPrev", _colorPagePadHotButtonBackground, Resx.pos_button_label_prev_pages_toolbar, fontPagePadNavigatorButton, Color.White, iconPrev, sizePagesPadNavigatorButtonIcon, sizePagesPadNavigatorButton.Width, sizePagesPadNavigatorButton.Height)
            {
                Sensitive = false
            };
            _buttonNext = new TouchButtonIconWithText("buttonNext", _colorPagePadHotButtonBackground, Resx.pos_button_label_next_pages_toolbar, fontPagePadNavigatorButton, Color.White, iconNext, sizePagesPadNavigatorButtonIcon, sizePagesPadNavigatorButton.Width, sizePagesPadNavigatorButton.Height);

            //Events
            _buttonPrev.Clicked += buttonPrev_Clicked;
            _buttonNext.Clicked += buttonNext_Clicked;

            //Render/Pack Navigator Buttons
            int i = 0;

            foreach (PagePadPage page in _pages)
            {
                i++;
                page.NavigatorButton = new TouchButtonIconWithText(page.PageName, Color.Transparent, page.PageName, fontPagePadNavigatorButton, Color.White, page.PageIcon, sizePagesPadNavigatorButtonIcon, 0, sizePagesPadNavigatorButton.Height);
                // Start Active Pad Button
                page.NavigatorButton.Sensitive = (i == 1) ? true : false;
                // Change color of current Button
                if ((i == 1))
                {
                    page.NavigatorButton.ModifyBg(StateType.Normal, Utils.ColorToGdkColor(_colorPagePadHotButtonBackground));
                }
                // Pack
                navigatorButtons.PackStart(page.NavigatorButton, true, true, 2);
            }

            //Final Navigator
            _navigator = new HBox(false, 0);
            _navigator.PackStart(_buttonPrev, false, false, 2);
            _navigator.PackStart(navigatorButtons, true, true, 2);
            _navigator.PackStart(_buttonNext, false, false, 2);
            //Pack Page Navigator
            PackStart(_navigator, false, false, 2);

            //Add ActivePage
            _activePage = pPages[0];
            PackStart(_activePage);
        }
        private void InitUI(DialogFlags pDialogFlags, DateTime pDateStart, DateTime pDateEnd)
        {
            //Parameters
            _dateStart = pDateStart;
            _dateEnd   = pDateEnd;

            //Init Local Vars
            String windowTitle           = resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "window_title_dialog_datepicket_startend");
            Size   windowSize            = new Size(300, 255);
            String fileDefaultWindowIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_window_date_picker.png");

            //Init Content
            _fixedContent = new Fixed();

            //Init DateEntry Start
            _entryBoxDateStart = new EntryBoxValidationDatePickerDialog(this, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_date_start"), _dateStart, SettingsApp.RegexDate, true);
            _entryBoxDateStart.EntryValidation.Text = _dateStart.ToString(SettingsApp.DateFormat);
            _entryBoxDateStart.EntryValidation.Validate();
            _entryBoxDateStart.ClosePopup += entryBoxDateStart_ClosePopup;
            //Init DateEntry End
            _entryBoxDateEnd = new EntryBoxValidationDatePickerDialog(this, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_date_end"), _dateEnd, SettingsApp.RegexDate, true);
            _entryBoxDateEnd.EntryValidation.Text = _dateEnd.ToString(SettingsApp.DateFormat);
            _entryBoxDateEnd.EntryValidation.Validate();
            _entryBoxDateEnd.ClosePopup += entryBoxDateEnd_ClosePopup;

            VBox vbox = new VBox(true, 0)
            {
                WidthRequest = 290
            };

            vbox.PackStart(_entryBoxDateStart, true, true, 2);
            vbox.PackStart(_entryBoxDateEnd, true, true, 2);

            _fixedContent.Put(vbox, 0, 0);

            //ActionArea Buttons
            _buttonOk     = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Ok);
            _buttonCancel = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Cancel);

            //ActionArea
            ActionAreaButtons actionAreaButtons = new ActionAreaButtons();

            actionAreaButtons.Add(new ActionAreaButton(_buttonOk, ResponseType.Ok));
            actionAreaButtons.Add(new ActionAreaButton(_buttonCancel, ResponseType.Cancel));

            //Start Validated
            Validate();

            //Init Object
            this.InitObject(this, pDialogFlags, fileDefaultWindowIcon, windowTitle, windowSize, _fixedContent, actionAreaButtons);
        }
Exemplo n.º 15
0
        public ActionAreaButtons GetDefaultActionAreaButtons()
        {
            //Default ActionArea Buttons
            _buttonOk           = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Ok);
            _buttonCancel       = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Cancel);
            _buttonOk.Sensitive = false;
            //ActionArea Buttons
            ActionAreaButtons actionAreaButtons = new ActionAreaButtons();

            actionAreaButtons.Add(new ActionAreaButton(_buttonOk, ResponseType.Ok));
            actionAreaButtons.Add(new ActionAreaButton(_buttonCancel, ResponseType.Cancel));

            return(actionAreaButtons);
        }
Exemplo n.º 16
0
        //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
        //Helper Methods

        private void ActivateButton(TouchButtonIconWithText pButton)
        {
            //If Changed Button, Clean old Values
            if (_selectedCashDrawerButton != pButton)
            {
                _entryBoxMovementAmountMoney.EntryValidation.Text = string.Empty;
                _entryBoxMovementDescription.EntryValidation.Text = string.Empty;
            }

            //Assign _selectedMovementType
            _selectedMovementType = (pos_worksessionmovementtype)FrameworkUtils.GetXPGuidObject(GlobalFramework.SessionXpo, typeof(pos_worksessionmovementtype), pButton.CurrentButtonOid);

            //Detect Cash open
            if (_selectedMovementType.Token == "CASHDRAWER_OPEN")
            {
                _entryBoxMovementAmountMoney.EntryValidation.Text      = FrameworkUtils.DecimalToString(_totalAmountInCashDrawer);
                _entryBoxMovementAmountMoney.EntryValidation.Sensitive = false;
                //Required to disable keyboard button
                _entryBoxMovementAmountMoney.ButtonKeyBoard.Sensitive = false;
                _entryBoxMovementAmountMoney.EntryValidation.Required = false;
                _entryBoxMovementAmountMoney.EntryValidation.Rule     = null;
            }
            else
            {
                _entryBoxMovementAmountMoney.EntryValidation.Required  = true;
                _entryBoxMovementAmountMoney.EntryValidation.Rule      = SettingsApp.RegexDecimalGreaterEqualThanZero;
                _entryBoxMovementAmountMoney.EntryValidation.Sensitive = true;
                //Required to enable keyboard button
                _entryBoxMovementAmountMoney.ButtonKeyBoard.Sensitive = true;
            }

            //Apply Requires Description for MONEY_IN and MONEY_OUT
            _entryBoxMovementDescription.EntryValidation.Required = (_selectedMovementType.Token == "CASHDRAWER_IN" || _selectedMovementType.Token == "CASHDRAWER_OUT");
            _entryBoxMovementDescription.EntryValidation.Validate();

            //Now we can UnToggle Old Selected Button
            if (_selectedCashDrawerButton != null)
            {
                //Toggle Button Off
                _selectedCashDrawerButton.ModifyBg(StateType.Normal, Utils.ColorToGdkColor(_colorBaseDialogDefaultButtonBackground));
            }

            //In the End Change reference to new Seleted Button
            _selectedCashDrawerButton = pButton;
            //Toggle Button On
            _selectedCashDrawerButton.ModifyBg(StateType.Normal, Utils.ColorToGdkColor(Utils.Lighten(_colorBaseDialogDefaultButtonBackground, 0.50f)));

            //Validate
            ValidateDialog();
        }
Exemplo n.º 17
0
        public PosPinPadDialog(Window pSourceWindow, DialogFlags pDialogFlags, sys_userdetail pUserDetail)
            : base(pSourceWindow, pDialogFlags)
        {
            //Dialog compile time preferences
            Boolean showCancel   = false;
            int     DialogHeight = (showCancel) ? 465 : 440;//465 : 400;

            //Init Local Vars Parameters
            _selectedUserDetail = pUserDetail;
            //Init Local Vars
            String            windowTitle           = resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "window_title_dialog_request_user_pin");
            Size              windowSize            = new Size(332, DialogHeight);
            String            fileDefaultWindowIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_window_users.png");
            String            fontNumberPadPinButtonKeysTextAndLabel = GlobalFramework.Settings["fontNumberPadPinButtonKeysTextAndLabel"];
            ActionAreaButtons actionAreaButtons;

            //Init Content
            Fixed fixedContent = new Fixed();

            //NumberPadPin
            _numberPadPin = new NumberPadPin(pSourceWindow, "numberPadPin", System.Drawing.Color.Transparent, fontNumberPadPinButtonKeysTextAndLabel, "12", Color.White, Color.Black, 100, 67);
            _numberPadPin.ButtonKeyOK.Clicked += ButtonKeyOK_Clicked;

            fixedContent.Put(_numberPadPin, 0, 0);

            if (showCancel)
            {
                //ActionArea Buttons
                TouchButtonIconWithText buttonCancel = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Cancel);

                //ActionArea
                actionAreaButtons = new ActionAreaButtons();
                actionAreaButtons.Add(new ActionAreaButton(buttonCancel, ResponseType.Cancel));
            }
            else
            {
                actionAreaButtons = new ActionAreaButtons();
            }

            //Init Mode
            _numberPadPin.Mode = (_selectedUserDetail.PasswordReset) ? NumberPadPinMode.PasswordOld :
                                 NumberPadPinMode.Password;

            //Events
            this.KeyReleaseEvent += PosPinPadDialog_KeyReleaseEvent;

            //Init Object
            this.InitObject(this, pDialogFlags, fileDefaultWindowIcon, windowTitle, windowSize, fixedContent, actionAreaButtons);
        }
Exemplo n.º 18
0
        public PosDeveloperTestDialog(Window pSourceWindow, DialogFlags pDialogFlags)
            : base(pSourceWindow, pDialogFlags)
        {
            //Init Local Vars
            String windowTitle           = Resx.window_title_dialog_template;
            String fileDefaultWindowIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_window_default.png");

            _windowSize = new Size(595, 740);

            //Init VBox
            _vbox = new VBox(false, 2)
            {
                WidthRequest = _windowSize.Width - 44
            };

            //Call InitUI
            InitUI1();
            //InitUI_FilePicker();
            //InitUI_LittleAdds();
            //InitUI2();
            //InitUI3();

            Viewport viewport = new Viewport()
            {
                ShadowType = ShadowType.None
            };

            viewport.ResizeMode = ResizeMode.Parent;
            viewport.Add(_vbox);

            _scrolledWindow            = new ScrolledWindow();
            _scrolledWindow.ShadowType = ShadowType.EtchedIn;
            _scrolledWindow.SetPolicy(PolicyType.Never, PolicyType.Automatic);
            _scrolledWindow.ResizeMode = ResizeMode.Parent;
            _scrolledWindow.Add(viewport);

            //ActionArea Buttons
            TouchButtonIconWithText buttonOk     = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Ok);
            TouchButtonIconWithText buttonCancel = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Cancel);

            //ActionArea
            ActionAreaButtons actionAreaButtons = new ActionAreaButtons();

            actionAreaButtons.Add(new ActionAreaButton(buttonOk, ResponseType.Ok));
            actionAreaButtons.Add(new ActionAreaButton(buttonCancel, ResponseType.Cancel));

            //Init Object
            this.InitObject(this, pDialogFlags, fileDefaultWindowIcon, windowTitle, _windowSize, _scrolledWindow, actionAreaButtons);
        }
Exemplo n.º 19
0
        //Shortcut to Dialog with Button with ResponseType and ButtonLabel
        public PosMessageDialog(Window pSourceWindow, DialogFlags pDialogFlags, System.Drawing.Size pSize, String pMessage, MessageType pMessageType, ResponseType pResponseType, String pButtonLabel, String pImageDialog = "", bool pCconfirmDialogOnEnter = true, bool pWindowTitleCloseButton = true)
            : base(pSourceWindow, pDialogFlags)
        {
            String fileImageDialogBaseMessageTypeIcon = FrameworkUtils.OSSlash(GlobalFramework.Settings["fileImageDialogBaseMessageTypeIcon"]);
            String fileImagePath = string.Format(fileImageDialogBaseMessageTypeIcon, Enum.GetName(typeof(MessageType), pMessageType).ToLower());

            TouchButtonIconWithText button = new TouchButtonIconWithText("touchButton_DialogActionArea", _colorBaseDialogActionAreaButtonBackground, pButtonLabel, _fontBaseDialogActionAreaButton, _colorBaseDialogActionAreaButtonFont, _fileActionOK, _sizeBaseDialogActionAreaButtonIcon, _sizeBaseDialogActionAreaButton.Width, _sizeBaseDialogActionAreaButton.Height);

            //Add to ActionArea
            ActionAreaButtons actionAreaButtons = new ActionAreaButtons();

            actionAreaButtons.Add(new ActionAreaButton(button, pResponseType));

            InitObject(pSourceWindow, pDialogFlags, pSize, string.Empty, pMessage, actionAreaButtons, fileImagePath, pImageDialog);
        }
Exemplo n.º 20
0
        public PosOrdersDialog(Window pSourceWindow, DialogFlags pDialogFlags, string pTable)
            : base(pSourceWindow, pDialogFlags)
        {
            //Init Local Vars
            String windowTitle           = string.Format("{0} : {1} #{2}", resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "window_title_dialog_orders"), resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_place_table"), pTable);
            Size   windowSize            = new Size(429, 205);//618 (3buts)
            String fileDefaultWindowIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_window_orders.png");

            Size sizeIcon     = new Size(50, 50);
            int  buttonWidth  = 162;
            int  buttonHeight = 88;
            uint tablePadding = 15;

            //Icons
            String fileIconListOrders = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\icon_pos_ticketpad_orderlist.png");
            String fileIconPrintOrder = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\icon_pos_print.png");
            //String fileIconListFinanceDocuments = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\icon_pos_default.png");

            //Buttons
            TouchButtonIconWithText buttonPrintOrder   = new TouchButtonIconWithText("touchButtonPrintOrder_Green", _colorBaseDialogDefaultButtonBackground, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "dialog_orders_button_label_print_order"), _fontBaseDialogButton, _colorBaseDialogDefaultButtonFont, fileIconPrintOrder, sizeIcon, buttonWidth, buttonHeight);
            TouchButtonIconWithText buttonTableConsult = new TouchButtonIconWithText("touchButtonListOrders_Green", _colorBaseDialogDefaultButtonBackground, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "dialog_orders_button_label_table_consult"), _fontBaseDialogButton, _colorBaseDialogDefaultButtonFont, fileIconListOrders, sizeIcon, buttonWidth, buttonHeight);
            //TouchButtonIconWithText buttonListFinanceDocuments = new TouchButtonIconWithText("touchButtonListFinanceDocuments_Green", _colorBaseDialogDefaultButtonBackground, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "dialog_button_label_select_record_finance_documents, _fontBaseDialogButton, _colorBaseDialogDefaultButtonFont, fileIconPrintOrder, sizeIcon, buttonWidth, buttonHeight);

            //Table
            Table table = new Table(1, 2, true);

            table.BorderWidth = tablePadding;
            //Row 1
            table.Attach(buttonPrintOrder, 0, 1, 0, 1, AttachOptions.Fill, AttachOptions.Fill, tablePadding, tablePadding);
            table.Attach(buttonTableConsult, 1, 2, 0, 1, AttachOptions.Fill, AttachOptions.Fill, tablePadding, tablePadding);
            //table.Attach(buttonListFinanceDocuments, 2, 3, 0, 1, AttachOptions.Fill, AttachOptions.Fill, tablePadding, tablePadding);

            //Init Object
            this.InitObject(this, pDialogFlags, fileDefaultWindowIcon, windowTitle, windowSize, table, null);

            //Events
            buttonPrintOrder.Clicked   += buttonPrintOrder_Clicked;
            buttonTableConsult.Clicked += buttonTableConsult_Clicked;
            //buttonListFinanceDocuments.Clicked += buttonListFinanceDocuments_Clicked;

            // Enable/Disable PrintTicket based on Printer Type, Currently PrintTicket is only Implemented in Thermal Printers
            //TK016249 - Impressoras - Diferenciação entre Tipos
            bool printerMissing = (GlobalFramework.LoggedTerminal.ThermalPrinter != null && GlobalFramework.LoggedTerminal.ThermalPrinter.PrinterType.Token.StartsWith("THERMAL_PRINTER_"));

            buttonPrintOrder.Sensitive   = printerMissing;
            buttonTableConsult.Sensitive = printerMissing;
        }
Exemplo n.º 21
0
        public PosLicenceDialog(Window pSourceWindow, DialogFlags pDialogFlags, string pHardwareId)
            : base(pSourceWindow, pDialogFlags)
        {
            //Init Local Vars
            string windowTitle = resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "window_title_license");

            System.Drawing.Size windowSize = new System.Drawing.Size(890, 630);
            string fileDefaultWindowIcon   = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_window_license.png");

            //If detected empty Hardware Id from Parameters, get it from IntelliLock
            if (string.IsNullOrEmpty(pHardwareId))
            {
                _hardwareId = GlobalFramework.PluginLicenceManager.GetHardwareID();
            }
            else
            {
                _hardwareId = pHardwareId;
            }

            //Files
            string fileActionRegister = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Dialogs\icon_pos_dialog_action_register.png");
            string fileActionContinue = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Dialogs\icon_pos_dialog_action_ok.png");

            //ActionArea Buttons
            _buttonRegister = new TouchButtonIconWithText("touchButtonRegister_DialogActionArea", System.Drawing.Color.Transparent, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "pos_button_label_licence_register"), _fontBaseDialogActionAreaButton, _colorBaseDialogActionAreaButtonFont, fileActionRegister, _sizeBaseDialogActionAreaButtonIcon, _sizeBaseDialogActionAreaButton.Width, _sizeBaseDialogActionAreaButton.Height)
            {
                Sensitive = false
            };
            _buttonContinue = new TouchButtonIconWithText("touchButtonContinue_DialogActionArea", System.Drawing.Color.Transparent, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "pos_button_label_licence_continue"), _fontBaseDialogActionAreaButton, _colorBaseDialogActionAreaButtonFont, fileActionContinue, _sizeBaseDialogActionAreaButtonIcon, _sizeBaseDialogActionAreaButton.Width, _sizeBaseDialogActionAreaButton.Height);
            _buttonClose    = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Close);

            //ActionArea
            ActionAreaButtons actionAreaButtons = new ActionAreaButtons();

            actionAreaButtons.Add(new ActionAreaButton(_buttonRegister, ResponseType.Accept));
            actionAreaButtons.Add(new ActionAreaButton(_buttonContinue, ResponseType.Ok));
            actionAreaButtons.Add(new ActionAreaButton(_buttonClose, ResponseType.Close));

            //Init Content
            InitUI();

            //Start Validated
            Validate();

            //Init Object
            this.InitObject(this, pDialogFlags, fileDefaultWindowIcon, windowTitle, windowSize, _hboxMain, actionAreaButtons);
        }
Exemplo n.º 22
0
        public PosDocumentFinanceDialog(Window pSourceWindow, DialogFlags pDialogFlags)
            : base(pSourceWindow, pDialogFlags)
        {
            //Parameters
            _sourceWindow = pSourceWindow;
            //Init Local Vars
            Size windowSize = new Size(780, 546);
            //Image Icons
            string fileDefaultWindowIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_window_document_new.png");
            string fileActionPreview     = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Dialogs\icon_pos_dialog_preview.png");
            string fileIconClearCustomer = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\icon_pos_nav_delete.png");

            InitPages();

            //Init Content
            //Fixed fixedContent = new Fixed();
            VBox boxContent = new VBox();

            boxContent.PackStart(_pagePad, true, true, 0);

            //ActionArea Buttons
            _buttonOk            = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Ok);
            _buttonCancel        = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Cancel);
            _buttonClearCustomer = ActionAreaButton.FactoryGetDialogButtonType("touchButtonClearCustomer_DialogActionArea", resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_button_label_payment_dialog_clear_client"), fileIconClearCustomer);

            _buttonPreview      = ActionAreaButton.FactoryGetDialogButtonType("touchButtonPreview_DialogActionArea", resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "widget_generictreeviewnavigator_preview"), fileActionPreview); /* IN009111 */
            _buttonOk.Sensitive = false;

            //ActionArea
            ActionAreaButtons actionAreaButtons = new ActionAreaButtons();

            actionAreaButtons.Add(new ActionAreaButton(_buttonClearCustomer, _responseTypeClearCustomer));
            actionAreaButtons.Add(new ActionAreaButton(_buttonPreview, _responseTypePreview));
            actionAreaButtons.Add(new ActionAreaButton(_buttonOk, ResponseType.Ok));
            actionAreaButtons.Add(new ActionAreaButton(_buttonCancel, ResponseType.Cancel));

            //Init Object
            this.InitObject(this, pDialogFlags, fileDefaultWindowIcon, _windowTitle, windowSize, boxContent, actionAreaButtons);

            //Hide After Init Show All
            _buttonClearCustomer.Visible = false;
            _buttonPreview.Visible       = false;
            //Hide Pages
            _pagePad.Pages[3].NavigatorButton.Visible = false;
            _pagePad.Pages[4].NavigatorButton.Visible = false;
        }
Exemplo n.º 23
0
        public PosSystemDialog(Window pSourceWindow, DialogFlags pDialogFlags)
            : base(pSourceWindow, pDialogFlags)
        {
            //Init Local Vars
            String windowTitle           = resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "window_title_dialog_system");
            Size   windowSize            = new Size(620, 205 /*321 2 rows*/);
            String fileDefaultWindowIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_window_system.png");

            Size sizeIcon     = new Size(50, 50);
            int  buttonWidth  = 162;
            int  buttonHeight = 88;
            uint tablePadding = 15;

            //Icons
            String fileIconConfiguration = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\icon_pos_configuration.png");
            String fileIconCashRegister  = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\icon_pos_ticketpad_cashregister.png");
            String fileIconReports       = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\icon_pos_reports.png");

            //Buttons
            TouchButtonIconWithText buttonSetup   = new TouchButtonIconWithText("touchButtonSetup_Green", _colorBaseDialogDefaultButtonBackground, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_application_setup"), _fontBaseDialogButton, _colorBaseDialogDefaultButtonFont, fileIconConfiguration, sizeIcon, buttonWidth, buttonHeight);
            TouchButtonIconWithText buttonCash    = new TouchButtonIconWithText("touchButtonCash_Green", _colorBaseDialogDefaultButtonBackground, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "pos_button_label_cashdrawer"), _fontBaseDialogButton, _colorBaseDialogDefaultButtonFont, fileIconCashRegister, sizeIcon, buttonWidth, buttonHeight);
            TouchButtonIconWithText buttonReports = new TouchButtonIconWithText("touchButtonReports_Green", _colorBaseDialogDefaultButtonBackground, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_reports"), _fontBaseDialogButton, _colorBaseDialogDefaultButtonFont, fileIconReports, sizeIcon, buttonWidth, buttonHeight);
            //buttonDisable1.Sensitive = false;

            //Table
            Table table = new Table(2, 4, true);

            table.BorderWidth = tablePadding;
            //Row 1
            table.Attach(buttonSetup, 0, 1, 0, 1, AttachOptions.Fill, AttachOptions.Fill, tablePadding, tablePadding);
            table.Attach(buttonCash, 1, 2, 0, 1, AttachOptions.Fill, AttachOptions.Fill, tablePadding, tablePadding);
            table.Attach(buttonReports, 2, 3, 0, 1, AttachOptions.Fill, AttachOptions.Fill, tablePadding, tablePadding);
            //Row 2
            //table.Attach(buttonFiles, 0, 1, 1, 2, AttachOptions.Fill, AttachOptions.Fill, tablePadding, tablePadding);
            //table.Attach(buttonDisable1, 1, 2, 1, 2, AttachOptions.Fill, AttachOptions.Fill, tablePadding, tablePadding);
            //table.Attach(buttonDisable2, 2, 3, 1, 2, AttachOptions.Fill, AttachOptions.Fill, tablePadding, tablePadding);

            //Init Object
            this.InitObject(this, pDialogFlags, fileDefaultWindowIcon, windowTitle, windowSize, table, null);

            //Events
            buttonSetup.Clicked   += buttonSetup_Clicked;
            buttonCash.Clicked    += buttonCash_Clicked;
            buttonReports.Clicked += buttonReports_Clicked;
        }
Exemplo n.º 24
0
        public PosCashDialog(Window pSourceWindow, DialogFlags pDialogFlags)
            : base(pSourceWindow, pDialogFlags)
        {
            //Settings
            String _fileToolbarStartStopWorkSessionPeriodDay = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\icon_pos_toolbar_start_stop_worksession_period_day.png");
            String _fileToolbarCashDrawer = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\icon_pos_toolbar_cashdrawer.png");

            //Init Local Vars
            String windowTitle           = Resx.window_title_dialog_cash;
            Size   windowSize            = new Size(428, 205);
            String fileDefaultWindowIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_window_cash_drawer.png");

            Size sizeIcon     = new Size(50, 50);
            int  buttonWidth  = 162;
            int  buttonHeight = 88;
            uint tablePadding = 15;

            //Buttons
            _touchButtonStartStopWorkSessionPeriodDay = new TouchButtonIconWithText("touchButtonStartStopWorkSessionPeriodDay_Green", _colorBaseDialogDefaultButtonBackground, Resx.global_worksession_open_day, _fontBaseDialogButton, _colorBaseDialogDefaultButtonFont, _fileToolbarStartStopWorkSessionPeriodDay, sizeIcon, buttonWidth, buttonHeight);
            _touchButtonCashDrawer = new TouchButtonIconWithText("touchButtonCashDrawer_Green", _colorBaseDialogDefaultButtonBackground, Resx.pos_button_label_cashdrawer, _fontBaseDialogButton, _colorBaseDialogDefaultButtonFont, _fileToolbarCashDrawer, sizeIcon, buttonWidth, buttonHeight)
            {
                Sensitive = false
            };

            //Table
            Table table = new Table(1, 1, true);

            table.BorderWidth = tablePadding;
            //Row 1
            table.Attach(_touchButtonStartStopWorkSessionPeriodDay, 0, 1, 0, 1, AttachOptions.Fill, AttachOptions.Fill, tablePadding, tablePadding);
            table.Attach(_touchButtonCashDrawer, 1, 2, 0, 1, AttachOptions.Fill, AttachOptions.Fill, tablePadding, tablePadding);

            //Init Object
            this.InitObject(this, pDialogFlags, fileDefaultWindowIcon, windowTitle, windowSize, table, null);

            //Update UI
            UpdateButtons();

            //Events
            _touchButtonStartStopWorkSessionPeriodDay.Clicked += _touchButtonStartStopWorkSessionPeriodDay_Clicked;
            _touchButtonCashDrawer.Clicked += _touchButtonCashDrawer_Clicked;
        }
Exemplo n.º 25
0
        public PosReadCardDialog(Window pSourceWindow, DialogFlags pDialogFlags)
            : base(pSourceWindow, pDialogFlags)
        {
            //Settings
            String regexAlfaNumericExtended = SettingsApp.RegexAlfaNumericExtended;

            //Init Local Vars
            String windowTitle           = Resx.window_title_dialog_readcard;
            Size   windowSize            = new Size(462, 320);//400 With Other Payments
            String fileDefaultWindowIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_window_read_card.png");

            //EntryDescription
            _entryBoxMovementDescription = new EntryBoxValidation(this, Resx.global_read_card, KeyboardMode.AlfaNumeric, regexAlfaNumericExtended, false);
            //_entryBoxMovementDescription.EntryValidation.Changed += delegate { ValidateDialog(); };
            //VBox
            VBox vbox = new VBox(true, 0);

            //vbox.PackStart(_entryBoxMovementAmountOtherPayments, true, true, 0);
            vbox.PackStart(_entryBoxMovementDescription, true, true, 0);

            //Init Content
            Fixed fixedContent = new Fixed();

            fixedContent.Put(vbox, 0, 0);

            //ActionArea Buttons
            _buttonOk     = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Ok);
            _buttonCancel = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Cancel);

            //ActionArea
            ActionAreaButtons actionAreaButtons = new ActionAreaButtons();

            actionAreaButtons.Add(new ActionAreaButton(_buttonOk, ResponseType.Ok));
            actionAreaButtons.Add(new ActionAreaButton(_buttonCancel, ResponseType.Cancel));

            _buttonOk.Clicked += _buttonOk_Clicked;

            this.KeyReleaseEvent += PosReadCardDialog_KeyReleaseEvent;
            //Init Object
            this.InitObject(this, pDialogFlags, fileDefaultWindowIcon, windowTitle, windowSize, fixedContent, actionAreaButtons);
        }
Exemplo n.º 26
0
        public TouchButtonIconWithText GetNewButton(string pId, string pLabel, string pIcon)
        {
            TouchButtonIconWithText result = null;

            try
            {
                String fileIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + pIcon);
                String fontBaseDialogActionAreaButton                        = FrameworkUtils.OSSlash(GlobalFramework.Settings["fontBaseDialogActionAreaButton"]);
                Color  colorBaseDialogActionAreaButtonBackground             = Color.Transparent;
                Color  colorBaseDialogActionAreaButtonFont                   = FrameworkUtils.StringToColor(GlobalFramework.Settings["colorBaseDialogActionAreaButtonFont"]);
                Size   sizeBaseDialogActionAreaBackOfficeNavigatorButton     = Utils.StringToSize(GlobalFramework.Settings["sizeBaseDialogActionAreaBackOfficeNavigatorButton"]);
                Size   sizeBaseDialogActionAreaBackOfficeNavigatorButtonIcon = Utils.StringToSize(GlobalFramework.Settings["sizeBaseDialogActionAreaBackOfficeNavigatorButtonIcon"]);

                result = new TouchButtonIconWithText(pId, colorBaseDialogActionAreaButtonBackground, pLabel, fontBaseDialogActionAreaButton, colorBaseDialogActionAreaButtonFont, fileIcon, sizeBaseDialogActionAreaBackOfficeNavigatorButtonIcon, sizeBaseDialogActionAreaBackOfficeNavigatorButton.Width, sizeBaseDialogActionAreaBackOfficeNavigatorButton.Height);
            }
            catch (Exception ex)
            {
                _log.Error(ex.Message, ex);
            }
            return(result);
        }
Exemplo n.º 27
0
        public DocumentFinanceDialogPreview(Window pSourceWindow, DialogFlags pDialogFlags, DocumentFinanceDialogPreviewMode pMode, ArticleBag pArticleBag, cfg_configurationcurrency pConfigurationCurrency)
            : base(pSourceWindow, pDialogFlags)
        {
            //Init Local Vars
            String windowTitle           = string.Empty;
            Size   windowSize            = new Size(700, 360);
            String fileDefaultWindowIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_window_preview.png");

            //Parameters
            _articleBag            = pArticleBag;
            _configurationCurrency = pConfigurationCurrency;

            //ActionArea
            ActionAreaButtons actionAreaButtons = new ActionAreaButtons();

            if (pMode == DocumentFinanceDialogPreviewMode.Preview)
            {
                windowTitle = resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "window_title_dialog_documentfinance_preview_totals_mode_preview");
                //ActionArea Buttons
                TouchButtonIconWithText buttonOk = new TouchButtonIconWithText("touchButtonOk_DialogActionArea", _colorBaseDialogActionAreaButtonBackground, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_button_label_ok"), _fontBaseDialogActionAreaButton, _colorBaseDialogActionAreaButtonFont, _fileActionOK, _sizeBaseDialogActionAreaButtonIcon, _sizeBaseDialogActionAreaButton.Width, _sizeBaseDialogActionAreaButton.Height);
                //ActionArea
                actionAreaButtons.Add(new ActionAreaButton(buttonOk, ResponseType.Ok));
            }
            else
            {
                windowTitle = resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "window_title_dialog_documentfinance_preview_totals_mode_confirm");
                //ActionArea Buttons
                TouchButtonIconWithText buttonNo  = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.No);
                TouchButtonIconWithText buttonYes = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Yes);
                //ActionArea
                actionAreaButtons.Add(new ActionAreaButton(buttonYes, ResponseType.Yes));
                actionAreaButtons.Add(new ActionAreaButton(buttonNo, ResponseType.No));
            }
            windowTitle = string.Format("{0} [{1}]", windowTitle, _configurationCurrency.Acronym);

            InitUI();

            //Init Object
            this.InitObject(this, pDialogFlags, fileDefaultWindowIcon, windowTitle, windowSize, _alignmentWindow, actionAreaButtons);
        }
Exemplo n.º 28
0
        public ActionAreaButtons GetDefaultActionAreaButtons()
        {
            //string fileActionMore = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\icon_pos_more.png");
            //string fileActionFilter = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\icon_pos_filter.png");
            //TouchButtonIconWithText _buttonMore = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.More, "touchButtonMore_Grey", string.Format(resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_button_label_more, SettingsApp.PaginationRowsPerPage), fileActionMore);
            //TouchButtonIconWithText _buttonFilter = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Filter, "touchButtonMore_Green", string.Format(resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_button_label_filter, SettingsApp.PaginationRowsPerPage), fileActionFilter);
            //_buttonMore.Clicked += _genericTreeView_ButtonMoreClicked;

            //Default ActionArea Buttons
            _buttonOk           = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Ok);
            _buttonCancel       = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Cancel);
            _buttonOk.Sensitive = false;

            //ActionArea Buttons
            ActionAreaButtons actionAreaButtons = new ActionAreaButtons();

            //actionAreaButtons.Add(new ActionAreaButton(_buttonMore, _responseTypeLoadMoreDocuments));
            //actionAreaButtons.Add(new ActionAreaButton(_buttonFilter, _responseTypeFilter));
            actionAreaButtons.Add(new ActionAreaButton(_buttonOk, ResponseType.Ok));
            actionAreaButtons.Add(new ActionAreaButton(_buttonCancel, ResponseType.Cancel));
            return(actionAreaButtons);
        }
Exemplo n.º 29
0
        public PosArticleStockDialog(Window pSourceWindow, DialogFlags pDialogFlags)
            : base(pSourceWindow, pDialogFlags)
        {
            //Init Local Vars
            String windowTitle           = resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "window_title_dialog_article_stock");
            Size   windowSize            = new Size(500, 480);
            String fileDefaultWindowIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_window_stocks.png");

            InitUI();

            //ActionArea Buttons
            _buttonOk           = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Ok);
            _buttonCancel       = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Cancel);
            _buttonOk.Sensitive = false;

            //ActionArea
            ActionAreaButtons actionAreaButtons = new ActionAreaButtons();

            actionAreaButtons.Add(new ActionAreaButton(_buttonOk, ResponseType.Ok));
            actionAreaButtons.Add(new ActionAreaButton(_buttonCancel, ResponseType.Cancel));

            //Init Object
            this.InitObject(this, pDialogFlags, fileDefaultWindowIcon, windowTitle, windowSize, _vbox, actionAreaButtons);
        }
Exemplo n.º 30
0
        public PosSplitPaymentsDialog(Window pSourceWindow, DialogFlags pDialogFlags, ArticleBag articleBag, TicketList ticketList)
            : base(pSourceWindow, pDialogFlags)
        {
            // Parameters
            _articleBag = articleBag;
            _ticketList = ticketList;

            // initSettingsValues
            initSettingsValues();

            //Init Local Vars
            // Title will be Overrided in CalculateTotalPerSplit
            string windowTitle           = Resx.window_title_dialog_split_payment;
            Size   windowSize            = new Size(600, 460);
            string fileDefaultWindowIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_window_split_payments.png");
            string fileAddSplitIcon      = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\icon_pos_nav_new.png");
            string fileRemoveSplitIcon   = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\icon_pos_nav_delete.png");

            //Init Content : ViewPort
            _vbox = new VBox(false, 2);
            Viewport viewport = new Viewport()
            {
                ShadowType = ShadowType.None
            };

            viewport.Add(_vbox);
            viewport.ResizeMode = ResizeMode.Parent;
            //ScrolledWindow
            ScrolledWindow _scrolledWindow = new ScrolledWindow();

            _scrolledWindow.ShadowType = ShadowType.EtchedIn;
            _scrolledWindow.SetPolicy(PolicyType.Automatic, PolicyType.Automatic);
            _scrolledWindow.Add(viewport);
            _scrolledWindow.ResizeMode = ResizeMode.Parent;

            //ActionArea Buttons
            _buttonOk           = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Ok);
            _buttonCancel       = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Cancel);
            _buttonOk.Sensitive = false;

            _buttonTableAddSplit = new TouchButtonIconWithText("touchButtonTableIncrementSplit_DialogActionArea", _colorBaseDialogActionAreaButtonBackground, Resx.global_add, _fontBaseDialogActionAreaButton, _colorBaseDialogActionAreaButtonFont, fileAddSplitIcon, _sizeBaseDialogActionAreaButtonIcon, _sizeBaseDialogActionAreaButton.Width, _sizeBaseDialogActionAreaButton.Height)
            {
                Sensitive = true
            };
            _buttonTableRemoveSplit = new TouchButtonIconWithText("touchButtonTableDecrementSplit_DialogActionArea", _colorBaseDialogActionAreaButtonBackground, Resx.global_remove, _fontBaseDialogActionAreaButton, _colorBaseDialogActionAreaButtonFont, fileRemoveSplitIcon, _sizeBaseDialogActionAreaButtonIcon, _sizeBaseDialogActionAreaButton.Width, _sizeBaseDialogActionAreaButton.Height)
            {
                Sensitive = true
            };

            //ActionArea
            ActionAreaButtons actionAreaButtons = new ActionAreaButtons();

            actionAreaButtons.Add(new ActionAreaButton(_buttonTableRemoveSplit, _responseTypeRemoveSplit));
            actionAreaButtons.Add(new ActionAreaButton(_buttonTableAddSplit, _responseTypeAddSplit));
            actionAreaButtons.Add(new ActionAreaButton(_buttonOk, ResponseType.Ok));
            actionAreaButtons.Add(new ActionAreaButton(_buttonCancel, ResponseType.Cancel));

            // Init Start SplitButtons : After Action Buttons
            for (int i = 0; i < _intSplitPaymentStartClients; i++)
            {
                AddSplitButton(false);
            }

            //Init Object
            this.InitObject(this, pDialogFlags, fileDefaultWindowIcon, windowTitle, windowSize, _scrolledWindow, actionAreaButtons);

            // CalculateSplit to Calc and Assign Title after Dialog Construction
            CalculateSplit();
            // UpdateActionButtons
            UpdateActionButtons();
        }