Example #1
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);
        }
Example #2
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);
        }
Example #3
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();
        }
Example #4
0
        private HBox GetActionAreaButtonsHbox(ActionAreaButtons pActionAreaRightButtons, TextDirection pTextDirection)
        {
            int  pos;
            HBox hboxActionArea = new HBox(false, 5)
            {
                Direction = pTextDirection
            };

            for (int i = 0; i < pActionAreaRightButtons.Count; i++)
            {
                //Reverse Index
                pos = pActionAreaRightButtons.Count - 1 - i;
                pActionAreaRightButtons[pos].Button.SetSizeRequest(_sizeBaseDialogActionAreaButton.Width, _sizeBaseDialogActionAreaButton.Height);
                pActionAreaRightButtons[pos].Clicked += Button_Clicked;
                hboxActionArea.PackStart(pActionAreaRightButtons[pos].Button, false, false, 0);

                //Detect Confirmation Button and Assign it to actionAreaConfirmButton, used in KeyReleaseEvent
                if (_actionAreaConfirmButton == null)
                {
                    switch (pActionAreaRightButtons[pos].Response)
                    {
                    case ResponseType.Accept:
                    case ResponseType.Apply:
                    case ResponseType.Ok:
                    case ResponseType.Yes:
                        _actionAreaConfirmButton = pActionAreaRightButtons[pos].Button;
                        break;
                    }
                }
            }
            return(hboxActionArea);
        }
        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);
        }
Example #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);
        }
Example #7
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);
        }
Example #8
0
        //XPO Mode: Prepare GenericTreeView to Use in InitObject : Constructor OverLoad 2
        public PosSelectRecordDialog(
            Window pSourceWindow,
            DialogFlags pDialogFlags,
            string pWindowsTitle,
            Size pSize,
            XPGuidObject pDefaultValue,
            CriteriaOperator pXpoCriteria,
            GenericTreeViewMode pGenericTreeViewMode,
            ActionAreaButtons pActionAreaButtons
            )
            : base(pSourceWindow, pDialogFlags)
        {
            try
            {
                //We can use InitObject Here because we dont have pColumnProperties, pDataSource and pDialogType
                //We must create instance with Activator to use Generic parameter constructors, and Send it to InitObject
                _genericTreeView = (T3)Activator.CreateInstance(typeof(T3), new object[] {
                    pSourceWindow,
                    pDefaultValue,
                    pXpoCriteria,
                    null,          //DialogType
                    pGenericTreeViewMode,
                    GenericTreeViewNavigatorMode.HideToolBar
                });

                //InitObject
                InitObject(pSourceWindow, pDialogFlags, pWindowsTitle, pSize, _genericTreeView, pGenericTreeViewMode, pActionAreaButtons);
            }
            catch (Exception ex)
            {
                _log.Error(ex.Message, ex);
            }
        }
Example #9
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);
        }
Example #10
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);
        }
Example #11
0
        public void InitObject(Window pSourceWindow, DialogFlags pDialogFlags, String pIcon, String pTitle, System.Drawing.Size pSize, Widget pContent, Widget pActionAreaLeftContent, ActionAreaButtons pActionAreaRightButtons)
        {
            //parameters
            _sourceWindow           = pSourceWindow;
            _windowSize             = pSize;
            _windowTitle            = pTitle;
            _windowIcon             = pIcon;
            _content                = pContent;
            _actionAreaLeftContent  = pActionAreaLeftContent;
            _actionAreaRightButtons = pActionAreaRightButtons;
            Modal          = false;//require else cant drag and drop on linux
            Decorated      = false;
            Resizable      = false;
            WindowPosition = WindowPosition.Center;
            SetSizeRequest(pSize.Width, pSize.Height);
            DefaultResponse = ResponseType.Cancel;
            ModifyBg(StateType.Normal, Utils.ColorToGdkColor(_colorBaseDialogWindowBackgroundBorder));
            TransientFor = _sourceWindow;
            //ActionArea
            //ActionArea.HeightRequest = _buttonSize.Height + 10 + (int) (BorderWidth * 2);

            //Events
            KeyReleaseEvent += PosBaseDialog_KeyReleaseEvent;

            Build();
        }
Example #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);
        }
        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);
        }
        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);
        }
Example #15
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);
        }
        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);
        }
Example #17
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);
        }
Example #18
0
        public void InitObject(
            Window pSourceWindow,
            DialogFlags pDialogFlags,
            string pWindowsTitle,
            Size pSize,
            //Type pTreeViewType,
            //CriteriaOperator pCriteria,
            T3 pGenericTreeView,
            GenericTreeViewMode pGenericTreeViewMode,
            ActionAreaButtons pActionAreaButtons
            )
        {
            //Init private Vars from Parameters
            String windowTitle = pWindowsTitle;
            Size   windowSize  = pSize;// new Size(900, 700);

            _genericTreeView     = pGenericTreeView;
            _genericTreeViewMode = pGenericTreeViewMode;
            //_actionAreaButtons = (pActionAreaButtons != null) ? pActionAreaButtons : GetDefaultActionAreaButtons();
            _actionAreaButtons = pActionAreaButtons;

            //Init Local Vars
            String fileDefaultWindowIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_window_select_record.png");
            Size   usefullAreaSize       = new Size(windowSize.Width - 14, windowSize.Height - 124);

            //Modify default genericTreeView properties
            _genericTreeView.SetSizeRequest(usefullAreaSize.Width, usefullAreaSize.Height);
            _genericTreeView.AllowRecordUpdate = false;
            //Format Columns FontSizes for Touch
            _genericTreeView.FormatColumnPropertiesForTouch();


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

            fixedContent.Put(_genericTreeView, 0, 0);

            //Events
            this.KeyReleaseEvent += PosSelectRecordDialog_KeyReleaseEvent;

            //Capture EventHandlers from GenericTreeView
            _genericTreeView.CursorChanged   += _genericTreeView_CursorChanged;
            _genericTreeView.CheckBoxToggled += _genericTreeView_CheckBoxToggled;

            //Init Object
            this.InitObject(this, pDialogFlags, fileDefaultWindowIcon, windowTitle, windowSize, fixedContent, _genericTreeView.Navigator.TreeViewSearch, _actionAreaButtons);
        }
Example #19
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);
        }
        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;
        }
Example #21
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);
        }
        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);
        }
Example #23
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);
        }
Example #24
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);
        }
Example #25
0
        public PosTablesDialog(Window pSourceWindow, DialogFlags pDialogFlags, TableFilterMode pFilterMode = TableFilterMode.Default)
            : base(pSourceWindow, pDialogFlags)
        {
            //Init Local Vars
            String windowTitle = Resx.window_title_dialog_orders;
            //TODO:THEME
            //Size windowSize = new Size(837, 650);
            Size   windowSize            = new Size(720, 580);
            String fileDefaultWindowIcon = string.Empty;

            if (_appOperationModeToken.ToUpper() == "RETAIL")
            {
                fileDefaultWindowIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_window_tables_retail.png");
            }
            else
            {
                fileDefaultWindowIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_window_tables.png");
            }

            //ActionArea Icons
            String fileActionTableReservation    = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\icon_pos_table_reservation.png");
            String fileActionTableFilterAll      = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\icon_pos_table_filter_all.png");
            String fileActionTableFilterFree     = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\icon_pos_table_filter_free.png");
            String fileActionTableFilterOpen     = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\icon_pos_table_filter_open.png");
            String fileActionTableFilterReserved = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\icon_pos_table_filter_reserved.png");
            String fileActionTableViewOrders     = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\icon_pos_table_view_order.png");
            String fileActionTableViewTables     = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\icon_pos_table_view_tables.png");

            //Parameters
            _FilterMode = pFilterMode;

            //Init Content
            _fixedContent = new Fixed();

            //Init Base Queries
            _sqlPlaceBase = @"
                SELECT 
                    Oid as id, Designation as name, NULL as label, ButtonImage as image, {0}
                FROM 
                    pos_configurationplace as p 
                WHERE 
                    (Disabled IS NULL or Disabled  <> 1)
            ";

            //Used to filter Places Tab, based o View Mode (Order or Table)
            _sqlPlaceBaseOrder = string.Format(_sqlPlaceBase,
                                               string.Format(@"
                    (SELECT COUNT(*) FROM fin_documentordermain as om LEFT JOIN pos_configurationplacetable as pt ON om.PlaceTable = pt.Oid WHERE (om.OrderStatus = {0} AND pt.Place = p.Oid)) as childs", (int)OrderStatus.Open)
                                               );
            _sqlPlaceBaseTable = string.Format(_sqlPlaceBase, @"(SELECT COUNT(*) FROM pos_configurationplacetable WHERE (Disabled IS NULL or Disabled <> 1) AND Place = p.Oid) as childs");

            //Build TablePads
            BuildPlace();
            BuildOrders();
            BuildTable();

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

            //Table Actions
            _buttonTableReservation = new TouchButtonIconWithText("touchButtonTableReservation_DialogActionArea", _colorBaseDialogActionAreaButtonBackground, Resx.pos_button_label_table_reservation, _fontBaseDialogActionAreaButton, _colorBaseDialogActionAreaButtonFont, fileActionTableReservation, _sizeBaseDialogActionAreaButtonIcon, _sizeBaseDialogActionAreaButton.Width, _sizeBaseDialogActionAreaButton.Height)
            {
                Sensitive = false
            };
            //Tables
            _buttonTableFilterAll = new TouchButtonIconWithText("touchButtonTableFilterAll_Green", Color.Transparent, Resx.dialog_orders_button_label_tables_all, _fontBaseDialogActionAreaButton, _colorBaseDialogActionAreaButtonFont, fileActionTableFilterAll, _sizeBaseDialogActionAreaButtonIcon, _sizeBaseDialogActionAreaButton.Width, _sizeBaseDialogActionAreaButton.Height)
            {
                Visible = false, Sensitive = false
            };
            _buttonTableFilterFree = new TouchButtonIconWithText("touchButtonTableFilterFree_Green", Color.Transparent, Resx.dialog_orders_button_label_tables_free, _fontBaseDialogActionAreaButton, _colorBaseDialogActionAreaButtonFont, fileActionTableFilterFree, _sizeBaseDialogActionAreaButtonIcon, _sizeBaseDialogActionAreaButton.Width, _sizeBaseDialogActionAreaButton.Height)
            {
                Visible = false
            };
            _buttonTableFilterOpen = new TouchButtonIconWithText("touchButtonTableFilterOpen_Green", Color.Transparent, Resx.dialog_orders_button_label_tables_open, _fontBaseDialogActionAreaButton, _colorBaseDialogActionAreaButtonFont, fileActionTableFilterOpen, _sizeBaseDialogActionAreaButtonIcon, _sizeBaseDialogActionAreaButton.Width, _sizeBaseDialogActionAreaButton.Height)
            {
                Visible = false
            };
            _buttonTableFilterReserved = new TouchButtonIconWithText("touchButtonTableFilterReserved_Green", Color.Transparent, Resx.dialog_orders_button_label_tables_reserved, _fontBaseDialogActionAreaButton, _colorBaseDialogActionAreaButtonFont, fileActionTableFilterReserved, _sizeBaseDialogActionAreaButtonIcon, _sizeBaseDialogActionAreaButton.Width, _sizeBaseDialogActionAreaButton.Height)
            {
                Visible = false
            };
            //Views
            _buttonTableViewOrders = new TouchButtonIconWithText("touchButtonViewOrders_Red", Color.Transparent, Resx.dialog_orders_button_label_view_orders, _fontBaseDialogActionAreaButton, _colorBaseDialogActionAreaButtonFont, fileActionTableViewOrders, _sizeBaseDialogActionAreaButtonIcon, _sizeBaseDialogActionAreaButton.Width, _sizeBaseDialogActionAreaButton.Height);
            _buttonTableViewTables = new TouchButtonIconWithText("touchButtonViewTables_Green", Color.Transparent, Resx.dialog_orders_button_label_view_tables, _fontBaseDialogActionAreaButton, _colorBaseDialogActionAreaButtonFont, fileActionTableViewTables, _sizeBaseDialogActionAreaButtonIcon, _sizeBaseDialogActionAreaButton.Width, _sizeBaseDialogActionAreaButton.Height);
            //Orders
            //_buttonOrderChangeTable = new TouchButtonIconWithText("touchButtonOrderChangeTable_Red", Color.Transparent, Resx.pos_button_label_change_table, _fontBaseDialogActionAreaButton, _colorBaseDialogActionAreaButtonFont, _fileActionDefault, _sizeBaseDialogActionAreaButtonIcon, _sizeBaseDialogActionAreaButton.Width, _sizeBaseDialogActionAreaButton.Height) { Sensitive = false };

            //ActionArea
            ActionAreaButtons actionAreaButtons = new ActionAreaButtons();

            //Orders
            //actionAreaButtons.Add(new ActionAreaButton(_buttonOrderChangeTable, _responseTypeOrderChangeTable));
            //Tables
            if (_appOperationModeToken.ToUpper() == "DEFAULT")
            {
                actionAreaButtons.Add(new ActionAreaButton(_buttonTableFilterAll, (ResponseType)_tablesStatusShowAllIndex));
                actionAreaButtons.Add(new ActionAreaButton(_buttonTableFilterFree, (ResponseType)TableStatus.Free));
                actionAreaButtons.Add(new ActionAreaButton(_buttonTableFilterOpen, (ResponseType)TableStatus.Open));
                actionAreaButtons.Add(new ActionAreaButton(_buttonTableFilterReserved, (ResponseType)TableStatus.Reserved));
                //ViewMode
                actionAreaButtons.Add(new ActionAreaButton(_buttonTableViewOrders, _responseTypeViewOrders));
                actionAreaButtons.Add(new ActionAreaButton(_buttonTableViewTables, _responseTypeViewTables));
                //Modal Result
                actionAreaButtons.Add(new ActionAreaButton(_buttonTableReservation, _responseTypeTableReservation));
            }
            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);

            this.ExposeEvent += delegate
            {
                //Disable Buttons if in OnlyFreeTables FilterMode
                if (_FilterMode == TableFilterMode.OnlyFreeTables)
                {
                    //Filter Buttons
                    _buttonTableFilterAll.Visible      = false;
                    _buttonTableFilterFree.Visible     = false;
                    _buttonTableFilterOpen.Visible     = false;
                    _buttonTableFilterReserved.Visible = false;
                    //Other ActionButtons
                    _buttonTableViewOrders.Visible  = false;
                    _buttonTableReservation.Visible = false;
                }
            };

            //After Init, Disabled Widgets
            ToggleViewMode();
        }
Example #26
0
        private void InitObject(Window pSourceWindow, DialogFlags pDialogFlags, System.Drawing.Size pSize, String pTitle, String pMessage, ActionAreaButtons pActionAreaButtons, String pImageWindowIcon, String pImageDialog = "")
        {
            //Init Local Vars
            String windowTitle = resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "window_title_dialog_message_dialog");

            System.Drawing.Size windowSize = pSize;
            String fileDefaultWindowIcon   = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_window_default.png");

            if (!pTitle.Equals(string.Empty))
            {
                windowTitle = pTitle;
            }

            if (!pImageWindowIcon.Equals(string.Empty))
            {
                fileDefaultWindowIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + pImageWindowIcon);
            }

            //Text View
            System.Drawing.Size sizeTextView = new System.Drawing.Size(pSize.Width - 40, pSize.Height - 130);
            _textviewLog = new TextView()
            {
                BorderWidth   = 0,
                CursorVisible = false,
                Editable      = false
            };
            _textviewLog.SetSizeRequest(sizeTextView.Width, sizeTextView.Height);
            _textviewLog.ModifyFont(Pango.FontDescription.FromString("14"));
            _textviewLog.SizeAllocated += new SizeAllocatedHandler(ScrollTextViewLog);
            _textviewLog.WrapMode       = WrapMode.Word;
            _textviewLog.Sensitive      = false;
            //Removed to be Transparent - CHANGE COLOR ex to System.Drawing.Color.Aqua to View TextView to Position
            _textviewLog.ModifyBase(StateType.Insensitive, Utils.ColorToGdkColor(System.Drawing.Color.Transparent));

            TextBuffer _textBuffer = _textviewLog.Buffer;

            _textBuffer.InsertAtCursor(pMessage);

            ScrolledWindow scrolledWindowTextviewLog = new ScrolledWindow();

            scrolledWindowTextviewLog.SetPolicy(PolicyType.Automatic, PolicyType.Automatic);
            scrolledWindowTextviewLog.SetSizeRequest(sizeTextView.Width, sizeTextView.Height);
            scrolledWindowTextviewLog.Add(_textviewLog);

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

            //Add content, with or without ImageDialog
            String fileImageDialog = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + pImageDialog);

            if (pImageDialog != string.Empty && File.Exists(fileImageDialog))
            {
                Gdk.Pixbuf pixBuf      = Utils.FileToPixBuf(fileImageDialog);
                Image      imageDialog = new Image(pixBuf);
                scrolledWindowTextviewLog.WidthRequest -= pixBuf.Width;
                fixedContent.Put(imageDialog, 10, 10);
                fixedContent.Put(scrolledWindowTextviewLog, pixBuf.Width + 25, 10);
            }
            else
            {
                fixedContent.Put(scrolledWindowTextviewLog, 0, 0);
            }

            ActionAreaButtons actionAreaButtons;

            //Default ActionArea Buttons if Not Defined
            if (pActionAreaButtons == null)
            {
                //ActionArea Buttons
                TouchButtonIconWithText buttonOk     = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Ok);
                TouchButtonIconWithText buttonCancel = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Cancel);
                //Add to ActionArea
                actionAreaButtons = new ActionAreaButtons();
                actionAreaButtons.Add(new ActionAreaButton(buttonOk, ResponseType.Ok));
                actionAreaButtons.Add(new ActionAreaButton(buttonCancel, ResponseType.Cancel));
            }
            else
            {
                //Use ActionAreaButtons from Parameters
                actionAreaButtons = pActionAreaButtons;
            }

            //Detect Autosize
            //if (windowSize.Height == 0 )
            //{
            //  int maxSize = 700;
            //  int targetSize = _textviewLog.HeightRequest + 125;
            //  windowSize.Height = (targetSize < maxSize) ? targetSize : maxSize;
            //  _log.Debug(string.Format("Message: [{0}] [{1}] [{2}] [{3}]", _textviewLog.HeightRequest, targetSize, pSize.Height, windowSize.Height));
            //}

            //Init Object
            this.InitObject(pSourceWindow /*this*/, pDialogFlags, fileDefaultWindowIcon, windowTitle, windowSize, fixedContent, actionAreaButtons);
        }
Example #27
0
 public PosMessageDialog(Window pSourceWindow, DialogFlags pDialogFlags, System.Drawing.Size pSize, String pTitle, String pMessage, ActionAreaButtons pActionAreaButtons, String pImageWindowIcon, String pImageDialog = "")
     : base(pSourceWindow, pDialogFlags)
 {
     InitObject(pSourceWindow, pDialogFlags, pSize, pTitle, pMessage, pActionAreaButtons, pImageWindowIcon, pImageDialog);
 }
Example #28
0
        public PosCashDrawerDialog(Window pSourceWindow, DialogFlags pDialogFlags)
        //Disable WindowTitleCloseButton
            : base(pSourceWindow, pDialogFlags, true, false)
        {
            try
            {
                //Parameters
                _sourceWindow = pSourceWindow;

                //If has a valid open session
                if (GlobalFramework.WorkSessionPeriodTerminal != null)
                {
                    //Get From MoneyInCashDrawer, Includes CASHDRAWER_START and Money Movements
                    _totalAmountInCashDrawer = ProcessWorkSessionPeriod.GetSessionPeriodMovementTotal(GlobalFramework.WorkSessionPeriodTerminal, MovementTypeTotal.MoneyInCashDrawer);
                }
                //Dont have Open Terminal Session YET, use from last Closed CashDrawer
                else
                {
                    //Default Last Closed Cash Value
                    _totalAmountInCashDrawer = ProcessWorkSessionPeriod.GetSessionPeriodCashDrawerOpenOrCloseAmount("CASHDRAWER_CLOSE");
                }

                //Init Local Vars
                String windowTitle           = string.Format(resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "window_title_dialog_cashdrawer"), FrameworkUtils.DecimalToStringCurrency(_totalAmountInCashDrawer));
                Size   windowSize            = new Size(462, 310);//400 With Other Payments
                String fileDefaultWindowIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_window_cash_drawer.png");
                String fileActionPrint       = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Dialogs\icon_pos_dialog_action_print.png");

                //Get SeletedData from WorkSessionMovementType Buttons
                string       executeSql   = @"SELECT Oid, Token, ResourceString, ButtonIcon, Disabled FROM pos_worksessionmovementtype WHERE (Token LIKE 'CASHDRAWER_%') AND (Disabled IS NULL or Disabled  <> 1) ORDER BY Ord;";
                XPSelectData xPSelectData = FrameworkUtils.GetSelectedDataFromQuery(executeSql);
                //Init Dictionary
                string buttonBagKey;
                bool   buttonDisabled;
                Dictionary <string, TouchButtonIconWithText> buttonBag = new Dictionary <string, TouchButtonIconWithText>();
                TouchButtonIconWithText touchButtonIconWithText;
                HBox hboxCashDrawerButtons = new HBox(true, 5);
                bool buttonOkSensitive;

                //Generate Buttons
                foreach (SelectStatementResultRow row in xPSelectData.Data)
                {
                    buttonBagKey   = row.Values[xPSelectData.GetFieldIndex("Token")].ToString();
                    buttonDisabled = Convert.ToBoolean(row.Values[xPSelectData.GetFieldIndex("Disabled")]);

                    touchButtonIconWithText = new TouchButtonIconWithText(
                        string.Format("touchButton{0}_Green", buttonBagKey),
                        Color.Transparent /*_colorBaseDialogDefaultButtonBackground*/,
                        resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], row.Values[xPSelectData.GetFieldIndex("ResourceString")].ToString()),
                        _fontBaseDialogButton,
                        _colorBaseDialogDefaultButtonFont,
                        FrameworkUtils.OSSlash(string.Format("{0}{1}", GlobalFramework.Path["images"], row.Values[xPSelectData.GetFieldIndex("ButtonIcon")].ToString())),
                        _sizeBaseDialogDefaultButtonIcon,
                        _sizeBaseDialogDefaultButton.Width,
                        _sizeBaseDialogDefaultButton.Height
                        )
                    {
                        CurrentButtonOid = new Guid(row.Values[xPSelectData.GetFieldIndex("Oid")].ToString()),
                        Sensitive        = !buttonDisabled
                    };
                    //Add to Dictionary
                    buttonBag.Add(buttonBagKey, touchButtonIconWithText);
                    //pack to VBhox
                    hboxCashDrawerButtons.PackStart(touchButtonIconWithText, true, true, 0);
                    //Events
                    buttonBag[buttonBagKey].Clicked += PosCashDrawerDialog_Clicked;
                }

                //Initial Button Status, Based on Open/Close Terminal Session
                string initialButtonToken;
                if (GlobalFramework.WorkSessionPeriodTerminal != null && GlobalFramework.WorkSessionPeriodTerminal.SessionStatus == WorkSessionPeriodStatus.Open)
                {
                    buttonBag["CASHDRAWER_OPEN"].Sensitive  = false;
                    buttonBag["CASHDRAWER_CLOSE"].Sensitive = true;
                    buttonBag["CASHDRAWER_IN"].Sensitive    = true;
                    buttonBag["CASHDRAWER_OUT"].Sensitive   = true;
                    initialButtonToken = "CASHDRAWER_CLOSE";
                    buttonOkSensitive  = true;
                }
                else
                {
                    buttonBag["CASHDRAWER_OPEN"].Sensitive  = true;
                    buttonBag["CASHDRAWER_CLOSE"].Sensitive = false;
                    buttonBag["CASHDRAWER_IN"].Sensitive    = false;
                    buttonBag["CASHDRAWER_OUT"].Sensitive   = false;
                    initialButtonToken = "CASHDRAWER_OPEN";
                    buttonOkSensitive  = false;
                }
                //Initial Dialog Values
                _selectedCashDrawerButton = buttonBag[initialButtonToken];
                _selectedCashDrawerButton.ModifyBg(StateType.Normal, Utils.ColorToGdkColor(Utils.Lighten(_colorBaseDialogDefaultButtonBackground, 0.50f)));
                _selectedMovementType       = (pos_worksessionmovementtype)FrameworkUtils.GetXPGuidObject(GlobalFramework.SessionXpo, typeof(pos_worksessionmovementtype), _selectedCashDrawerButton.CurrentButtonOid);
                _selectedMovementType.Token = initialButtonToken;

                //EntryAmountMoney
                _entryBoxMovementAmountMoney = new EntryBoxValidation(this, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_money"), KeyboardMode.Money, SettingsApp.RegexDecimalGreaterEqualThanZero, true);
                _entryBoxMovementAmountMoney.EntryValidation.Changed += delegate { ValidateDialog(); };

                //TODO: Enable Other Payments
                //EntryAmountOtherPayments
                //_entryBoxMovementAmountOtherPayments = new EntryBox(resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_other_payments, KeyboardModes.Money, regexDecimalGreaterThanZero, false);
                //_entryBoxMovementAmountOtherPayments.EntryValidation.Changed += delegate { ValidateDialog(); };

                //EntryDescription
                _entryBoxMovementDescription = new EntryBoxValidation(this, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_description"), KeyboardMode.AlfaNumeric, SettingsApp.RegexAlfaNumericExtended, false);
                _entryBoxMovementDescription.EntryValidation.Changed += delegate { ValidateDialog(); };

                //VBox
                VBox vbox = new VBox(false, 0);
                vbox.PackStart(hboxCashDrawerButtons, false, false, 0);
                vbox.PackStart(_entryBoxMovementAmountMoney, false, false, 0);
                //vbox.PackStart(_entryBoxMovementAmountOtherPayments, false, false, 0);
                vbox.PackStart(_entryBoxMovementDescription, false, false, 0);

                //Init Content
                Fixed fixedContent = new Fixed();
                fixedContent.Put(vbox, 0, 0);

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

                //ActionArea
                ActionAreaButtons actionAreaButtons = new ActionAreaButtons();
                actionAreaButtons.Add(new ActionAreaButton(_buttonPrint, _responseTypePrint));
                actionAreaButtons.Add(new ActionAreaButton(_buttonOk, ResponseType.Ok));
                actionAreaButtons.Add(new ActionAreaButton(_buttonCancel, ResponseType.Cancel));

                //Call Activate Button Helper Method
                ActivateButton(buttonBag[initialButtonToken]);

                //Init Object
                this.InitObject(this, pDialogFlags, fileDefaultWindowIcon, windowTitle, windowSize, fixedContent, actionAreaButtons);
            }
            catch (Exception ex)
            {
                _log.Error(ex.Message, ex);
            }
        }
Example #29
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();
        }
Example #30
0
 public void InitObject(Window pSourceWindow, DialogFlags pDialogFlags, String pIcon, String pTitle, System.Drawing.Size pSize, Widget pContent, ActionAreaButtons pActionAreaRightButtons)
 {
     InitObject(pSourceWindow, pDialogFlags, pIcon, pTitle, pSize, pContent, null, pActionAreaRightButtons);
 }