private void InitUI() { try { //Load Initial Values Load(); //Init VBOX _vbox = new VBox(true, 0); //Supplier CriteriaOperator criteriaOperatorSupplier = CriteriaOperator.Parse("(Disabled = 0 OR Disabled is NULL) AND (Supplier = 1)"); _entryBoxSelectSupplier = new XPOEntryBoxSelectRecordValidation <erp_customer, TreeViewCustomer>(this, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_supplier"), "Name", "Oid", _initialSupplier, criteriaOperatorSupplier, SettingsApp.RegexGuid, true); _entryBoxSelectSupplier.EntryValidation.IsEditable = false; _entryBoxSelectSupplier.EntryValidation.Changed += delegate { ValidateDialog(); }; //DocumentDate _entryBoxDocumentDate = new EntryBoxValidationDatePickerDialog(this, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_date"), resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_date"), _initialDocumentDate, SettingsApp.RegexDate, true, SettingsApp.DateFormat); //_entryBoxDocumentDate.EntryValidation.Sensitive = true; _entryBoxDocumentDate.EntryValidation.Text = _initialDocumentDate.ToString(SettingsApp.DateFormat); _entryBoxDocumentDate.EntryValidation.Validate(); _entryBoxDocumentDate.EntryValidation.Sensitive = true; _entryBoxDocumentDate.ClosePopup += delegate { ValidateDialog(); }; //DocumentNumber _entryBoxDocumentNumber = new EntryBoxValidation(this, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_document_number"), KeyboardMode.Alfa, SettingsApp.RegexAlfaNumericExtended, false); if (_initialDocumentNumber != string.Empty) { _entryBoxDocumentNumber.EntryValidation.Text = _initialDocumentNumber; } _entryBoxDocumentNumber.EntryValidation.Changed += delegate { ValidateDialog(); }; //SelectArticle CriteriaOperator criteriaOperatorSelectArticle = CriteriaOperator.Parse(string.Format("(Disabled IS NULL OR Disabled <> 1) AND (Class = '{0}')", SettingsApp.XpoOidArticleDefaultClass)); _entryBoxSelectArticle = new XPOEntryBoxSelectRecordValidation <fin_article, TreeViewArticle>(this, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_article"), "Designation", "Oid", null, criteriaOperatorSelectArticle, SettingsApp.RegexGuid, true); _entryBoxSelectArticle.EntryValidation.IsEditable = false; _entryBoxSelectArticle.EntryValidation.Changed += delegate { ValidateDialog(); }; //Quantity _entryBoxQuantity = new EntryBoxValidation(this, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_quantity"), KeyboardMode.Numeric, SettingsApp.RegexDecimalPositiveAndNegative, true); _entryBoxQuantity.EntryValidation.Changed += delegate { ValidateDialog(); }; //Notes _entryBoxNotes = new EntryBoxValidation(this, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_notes"), KeyboardMode.Alfa, SettingsApp.RegexAlfaNumericExtended, false); _entryBoxNotes.EntryValidation.Changed += delegate { ValidateDialog(); }; //Final Pack _vbox.PackStart(_entryBoxSelectSupplier, false, false, 0); _vbox.PackStart(_entryBoxDocumentDate, false, false, 0); _vbox.PackStart(_entryBoxDocumentNumber, false, false, 0); _vbox.PackStart(_entryBoxSelectArticle, false, false, 0); _vbox.PackStart(_entryBoxQuantity, false, false, 0); _vbox.PackStart(_entryBoxNotes, false, false, 0); } catch (Exception ex) { _log.Error(ex.Message, ex); } }
private void InitUI() { //Initial Values FIN_ConfigurationPaymentMethod initialValueConfigurationPaymentMethod = (FIN_ConfigurationPaymentMethod)FrameworkUtils.GetXPGuidObject(typeof(FIN_ConfigurationPaymentMethod), SettingsApp.XpoOidConfigurationPaymentMethodDefaultInvoicePaymentMethod); CFG_ConfigurationCurrency intialValueConfigurationCurrency = SettingsApp.ConfigurationSystemCurrency; string initialPaymentDate = FrameworkUtils.CurrentDateTimeAtomic().ToString(SettingsApp.DateTimeFormat); //ConfigurationPaymentMethod string filterValidPaymentMethod = "(Token = 'CREDIT_CARD' OR Token = 'BANK_CHECK' OR Token = 'MONEY' OR Token = 'BANK_TRANSFER' OR Token = 'CASH_MACHINE' OR Token = 'VISA' OR Token = 'OTHER')"; CriteriaOperator criteriaOperatorConfigurationPaymentMethod = CriteriaOperator.Parse(string.Format("(Disabled IS NULL OR Disabled <> 1) AND Oid <> '{0}' AND {1}", SettingsApp.XpoOidConfigurationPaymentMethodCurrentAccount.ToString(), filterValidPaymentMethod)); _entryBoxSelectConfigurationPaymentMethod = new XPOEntryBoxSelectRecordValidation <FIN_ConfigurationPaymentMethod, TreeViewConfigurationPaymentMethod>(_sourceWindow, Resx.global_payment_method, "Designation", "Oid", initialValueConfigurationPaymentMethod, criteriaOperatorConfigurationPaymentMethod, SettingsApp.RegexGuid, true); _entryBoxSelectConfigurationPaymentMethod.EntryValidation.Changed += delegate { Validate(); }; _entryBoxSelectConfigurationPaymentMethod.EntryValidation.IsEditable = false; //ConfigurationCurrency CriteriaOperator criteriaOperatorConfigurationCurrency = CriteriaOperator.Parse(string.Format("(Disabled IS NULL OR Disabled <> 1) AND (ExchangeRate IS NOT NULL OR Oid = '{0}')", SettingsApp.ConfigurationSystemCurrency.Oid.ToString())); _entryBoxSelectConfigurationCurrency = new XPOEntryBoxSelectRecordValidation <CFG_ConfigurationCurrency, TreeViewConfigurationCurrency>(_sourceWindow, Resx.global_currency, "Designation", "Oid", intialValueConfigurationCurrency, criteriaOperatorConfigurationCurrency, SettingsApp.RegexGuid, false); _entryBoxSelectConfigurationCurrency.EntryValidation.Changed += _entryBoxSelectConfigurationCurrency_Changed; _entryBoxSelectConfigurationCurrency.EntryValidation.IsEditable = false; //PaymentAmount _entryPaymentAmount = new EntryBoxValidation(_sourceWindow, Resx.global_total_deliver, KeyboardMode.Numeric, SettingsApp.RegexDecimalGreaterEqualThanZero, true); _entryPaymentAmount.EntryValidation.Text = FrameworkUtils.DecimalToString(_paymentAmountTotal); _entryPaymentAmount.EntryValidation.Validate(); _entryPaymentAmount.EntryValidation.Changed += delegate { Validate(); UpdateTitleBar(); }; //PaymentDate _entryBoxPaymentDate = new EntryBoxValidation(_sourceWindow, Resx.global_date, KeyboardMode.Alfa, SettingsApp.RegexDateTime, true); _entryBoxPaymentDate.EntryValidation.Text = initialPaymentDate; _entryBoxPaymentDate.EntryValidation.Validate(); _entryBoxPaymentDate.EntryValidation.Changed += delegate { Validate(); }; //PaymentNotes _entryBoxDocumentPaymentNotes = new EntryBoxValidation(_sourceWindow, Resx.global_notes, KeyboardMode.Alfa, SettingsApp.RegexAlfaNumericExtended, false); _entryBoxDocumentPaymentNotes.EntryValidation.Changed += delegate { Validate(); }; //Pack VBOX VBox vbox = new VBox(false, 0); vbox.PackStart(_entryBoxSelectConfigurationPaymentMethod, true, true, 0); vbox.PackStart(_entryBoxSelectConfigurationCurrency, false, false, 0); vbox.PackStart(_entryPaymentAmount, false, false, 0); vbox.PackStart(_entryBoxPaymentDate, false, false, 0); vbox.PackStart(_entryBoxDocumentPaymentNotes, false, false, 0); vbox.PackStart(_entryBoxDocumentPaymentNotes, false, false, 0); vbox.WidthRequest = _windowSize.Width - 14; //Put in FinishContent _fixedContent = new Fixed(); _fixedContent.Put(vbox, 0, 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() { _printCopies = _documentFinanceMaster.DocumentType.PrintCopies; _vboxContent = new VBox(false, 0); Dictionary <string, bool> buttonGroup = new Dictionary <string, bool>(); buttonGroup.Add(resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_print_copy_title1"), (_printCopies >= 1)); buttonGroup.Add(resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_print_copy_title2"), (_printCopies >= 2)); buttonGroup.Add(resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_print_copy_title3"), (_printCopies >= 3)); buttonGroup.Add(resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_print_copy_title4"), (_printCopies >= 4)); //Not Used Anymore //buttonGroup.Add(resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_print_copy_title5, (_printCopies >= 5)); //buttonGroup.Add(resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_print_copy_title6, (_printCopies >= 6)); //Construct,Pack and Event _checkButtonCopyNamesBoxGroup = new CheckButtonBoxGroup(resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_print_copies"), buttonGroup); _vboxContent.PackStart(_checkButtonCopyNamesBoxGroup); _checkButtonCopyNamesBoxGroup.Clicked += checkButtonCopyNamesBoxGroup_Clicked; //If DocumentType is a RequestMotive Document Enable Motive if (_requestMotive) { //CheckButtonBoxSecondCopy _checkButtonBoxSecondCopy = new CheckButtonBox(resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_second_copy"), true); _checkButtonBoxSecondCopy.Clicked += checkButtonBoxSecondCopy_Clicked; _checkButtonBoxSecondCopy.StateChanged += checkButtonBoxSecondCopy_Clicked; //Pack EntryBox with CheckBox into Dialog _vboxContent.PackStart(_checkButtonBoxSecondCopy); _entryBoxValidationBoxMotive = new EntryBoxValidation(this, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_reprint_original_motive"), KeyboardMode.AlfaNumeric, SettingsApp.RegexAlfaNumeric, false); //Start Disabled _entryBoxValidationBoxMotive.EntryValidation.Label.Sensitive = false; _entryBoxValidationBoxMotive.EntryValidation.Sensitive = false; //Pack EntryBox with CheckBox into Dialog _vboxContent.PackStart(_entryBoxValidationBoxMotive); //Events _entryBoxValidationBoxMotive.EntryValidation.Changed += EntryValidation_Changed; //If Original Active enabled _secondCopy _secondCopy = _checkButtonCopyNamesBoxGroup.Buttons[0].Active; } //Orginal is Always Checked, use this event to Force it _checkButtonCopyNamesBoxGroup.Buttons[0].Clicked += checkButtonBox1_Clicked; //Call UpdateUI UpdateUI(); }
void EntryValidation_Changed(object sender, EventArgs e) { try { EntryBoxValidation input = ((sender as EntryValidation).Parent.Parent.Parent as EntryBoxValidation); input.EntryValidation.Validate(); if (input.EntryValidation.Validated && input.Name == "COMPANY_FISCALNUMBER") { bool isValidFiscalNumber = FiscalNumber.IsValidFiscalNumber(input.EntryValidation.Text, _entryBoxSelectSystemCountry.Value.Code2); input.EntryValidation.Validated = isValidFiscalNumber; } Validate(); } catch (Exception ex) { _log.Error(ex.Message, ex); } }
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); }
private void InitUI() { //Settings 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"]); //WIP: String fileIconSearchAdvanced = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\icon_pos_search_advanced.png"); String regexAlfaNumericExtended = SettingsApp.RegexAlfaNumericExtended; //SearchCriteria _entryBoxSearchCriteria = new EntryBoxValidation(_sourceWindow, Resx.widget_generictreeviewsearch_search_label, KeyboardMode.AlfaNumeric, regexAlfaNumericExtended, true); //TODO:THEME _entryBoxSearchCriteria.WidthRequest = (GlobalApp.ScreenSize.Width == 800 && GlobalApp.ScreenSize.Height == 600) ? 150 : 250; //_entryBoxSearchCriteria.EntryValidation.Changed += delegate { ValidateDialog(); }; //Initialize Buttons //WIP: _buttonSearchAdvanced = new TouchButtonIconWithText("touchButtonSearchAdvanced_DialogActionArea", colorBaseDialogActionAreaButtonBackground, Resx.widget_generictreeviewsearch_search_advanced, fontBaseDialogActionAreaButton, colorBaseDialogActionAreaButtonFont, fileIconSearchAdvanced, sizeBaseDialogActionAreaBackOfficeNavigatorButtonIcon, sizeBaseDialogActionAreaBackOfficeNavigatorButton.Width, sizeBaseDialogActionAreaBackOfficeNavigatorButton.Height) { Sensitive = false }; //Pack HBox hbox = new HBox(false, 0); hbox.PackStart(_entryBoxSearchCriteria, true, true, 0); //WIP: hbox.PackStart(_buttonSearchAdvanced, false, false, 0); //Final Pack PackStart(hbox); //Check if has Searchable Fields Sensitive = HasSearchableFields(); //Events _entryBoxSearchCriteria.EntryValidation.Changed += _entryBoxSearchCriteria_Changed; }
public DocumentFinanceDialogPage5(Window pSourceWindow, String pPageName, String pPageIcon, Widget pWidget, bool pEnabled = true) : base(pSourceWindow, pPageName, pPageIcon, pWidget, pEnabled) { //Init private vars _pagePad = (_sourceWindow as PosDocumentFinanceDialog).PagePad; _session = (_pagePad as DocumentFinanceDialogPagePad).Session; //Initials Values _intialValueConfigurationCountry = SettingsApp.ConfigurationSystemCountry; //ShipFrom Address _entryBoxShipFromAddressDetail = new EntryBoxValidation(_sourceWindow, Resx.global_address, KeyboardMode.Alfa, SettingsApp.RegexAlfaNumericExtended, true); _entryBoxShipFromAddressDetail.EntryValidation.Changed += delegate { Validate(); }; //ShipFrom Region _entryBoxShipFromRegion = new EntryBoxValidation(_sourceWindow, Resx.global_region, KeyboardMode.Alfa, SettingsApp.RegexAlfa, false); _entryBoxShipFromRegion.EntryValidation.Changed += delegate { Validate(); }; //ShipFrom PostalCode _entryBoxShipFromPostalCode = new EntryBoxValidation(_sourceWindow, Resx.global_zipcode, KeyboardMode.Alfa, SettingsApp.ConfigurationSystemCountry.RegExZipCode, true); _entryBoxShipFromPostalCode.EntryValidation.Changed += delegate { Validate(); }; //ShipFrom City _entryBoxShipFromCity = new EntryBoxValidation(_sourceWindow, Resx.global_city, KeyboardMode.Alfa, SettingsApp.RegexAlfa, true); _entryBoxShipFromCity.EntryValidation.Changed += delegate { Validate(); }; //ShipFrom Country CriteriaOperator criteriaOperatorCustomerCountry = CriteriaOperator.Parse("(Disabled IS NULL OR Disabled <> 1)"); _entryBoxSelectShipFromCountry = new XPOEntryBoxSelectRecordValidation <CFG_ConfigurationCountry, TreeViewConfigurationCountry>(_sourceWindow, Resx.global_country, "Designation", "Oid", _intialValueConfigurationCountry, criteriaOperatorCustomerCountry, SettingsApp.RegexGuid, true); _entryBoxSelectShipFromCountry.EntryValidation.IsEditable = false; _entryBoxSelectShipFromCountry.EntryValidation.Changed += delegate { Validate(); }; _entryBoxSelectShipFromCountry.ClosePopup += delegate { //Require to Update RegExZipCode _entryBoxShipFromPostalCode.EntryValidation.Rule = _entryBoxSelectShipFromCountry.Value.RegExZipCode; _entryBoxShipFromPostalCode.EntryValidation.Validate(); }; //ShipFromDeliveryDate _entryBoxShipFromDeliveryDate = new EntryBoxValidationDatePickerDialog(_sourceWindow, Resx.global_ship_from_delivery_date, _pagePad.DateTimeFormat, _pagePad.InitalDateTime, KeyboardMode.AlfaNumeric, SettingsApp.RegexDateTime, true, _pagePad.DateTimeFormat); _entryBoxShipFromDeliveryDate.EntryValidation.Sensitive = true; _entryBoxShipFromDeliveryDate.EntryValidation.Text = FrameworkUtils.DateTimeToString(FrameworkUtils.CurrentDateTimeAtomic()).ToString(); _entryBoxShipFromDeliveryDate.EntryValidation.Validate(); //Assign Min Date to Validation _entryBoxShipFromDeliveryDate.DateTimeMin = FrameworkUtils.CurrentDateTimeAtomic(); _entryBoxShipFromDeliveryDate.EntryValidation.Changed += _entryBoxShipFromDeliveryDate_ClosePopup; _entryBoxShipFromDeliveryDate.ClosePopup += _entryBoxShipFromDeliveryDate_ClosePopup; //ShipFromDeliveryID _entryBoxShipFromDeliveryID = new EntryBoxValidation(_sourceWindow, Resx.global_ship_from_delivery_id, KeyboardMode.Alfa, SettingsApp.RegexAlfaNumericExtended, false); _entryBoxShipFromDeliveryID.EntryValidation.Changed += delegate { Validate(); }; //ShipFromWarehouseID _entryBoxShipFromWarehouseID = new EntryBoxValidation(_sourceWindow, Resx.global_ship_from_warehouse_id, KeyboardMode.Alfa, SettingsApp.RegexAlfaNumericExtended, false); _entryBoxShipFromWarehouseID.EntryValidation.MaxLength = 50; _entryBoxShipFromWarehouseID.EntryValidation.Changed += delegate { Validate(); }; //ShipFromLocationID _entryBoxShipFromLocationID = new EntryBoxValidation(_sourceWindow, Resx.global_ship_from_location_id, KeyboardMode.Alfa, SettingsApp.RegexAlfaNumericExtended, false); _entryBoxShipFromLocationID.EntryValidation.MaxLength = 30; _entryBoxShipFromLocationID.EntryValidation.Changed += delegate { Validate(); }; //HBox hboxDeliveryDate+DeliveryID HBox hboxDeliveryDateAndDeliveryID = new HBox(true, 0); hboxDeliveryDateAndDeliveryID.PackStart(_entryBoxShipFromDeliveryDate, true, true, 0); hboxDeliveryDateAndDeliveryID.PackStart(_entryBoxShipFromDeliveryID, true, true, 0); //HBox ZipCode+City+Country HBox hboxZipCodeAndCityAndCountry = new HBox(true, 0); hboxZipCodeAndCityAndCountry.PackStart(_entryBoxShipFromPostalCode, true, true, 0); hboxZipCodeAndCityAndCountry.PackStart(_entryBoxShipFromCity, true, true, 0); hboxZipCodeAndCityAndCountry.PackStart(_entryBoxSelectShipFromCountry, true, true, 0); //HBox hboxWarehouseID+LocationID HBox hboxhboxWarehouseIDAndLocationID = new HBox(true, 0); hboxhboxWarehouseIDAndLocationID.PackStart(_entryBoxShipFromWarehouseID, true, true, 0); hboxhboxWarehouseIDAndLocationID.PackStart(_entryBoxShipFromLocationID, true, true, 0); //Pack VBOX VBox vbox = new VBox(false, 2); vbox.PackStart(_entryBoxShipFromAddressDetail, false, false, 0); vbox.PackStart(_entryBoxShipFromRegion, false, false, 0); vbox.PackStart(hboxZipCodeAndCityAndCountry, false, false, 0); vbox.PackStart(hboxDeliveryDateAndDeliveryID, false, false, 0); vbox.PackStart(hboxhboxWarehouseIDAndLocationID, false, false, 0); PackStart(vbox); }
private void InitUI1() { //EntryBoxValidation with KeyBoard Input EntryBoxValidation entryBoxValidation = new EntryBoxValidation(this, "EntryBoxValidation", KeyboardMode.Alfa, SettingsApp.RegexAlfaNumericExtended, true); entryBoxValidation.EntryValidation.Sensitive = false; entryBoxValidation.ButtonKeyBoard.Sensitive = false; _vbox.PackStart(entryBoxValidation, true, true, _padding); //EntryBoxValidation with KeyBoard Input and Custom Buttons : Start without KeyBoard, and KeyBoard Button After all Others _entryBoxValidationCustomButton1 = new EntryBoxValidation(this, "EntryBoxValidationCustomButton", KeyboardMode.None, SettingsApp.RegexAlfaNumericExtended, false); TouchButtonIcon customButton1 = _entryBoxValidationCustomButton1.AddButton("CustomButton1", @"Icons/Windows/icon_window_orders.png"); TouchButtonIcon customButton2 = _entryBoxValidationCustomButton1.AddButton("CustomButton2", @"Icons/Windows/icon_window_pay_invoice.png"); TouchButtonIcon customButton3 = _entryBoxValidationCustomButton1.AddButton("CustomButton3", @"Icons/Windows/icon_window_orders.png"); //Now we manually Init Keyboard _entryBoxValidationCustomButton1.EntryValidation.KeyboardMode = KeyboardMode.AlfaNumeric; _entryBoxValidationCustomButton1.InitKeyboard(_entryBoxValidationCustomButton1.EntryValidation); //Test Required Rule customButton1.Clicked += customButton1_Clicked; customButton2.Clicked += customButton2_Clicked; customButton3.Clicked += customSharedButton_Clicked; _vbox.PackStart(_entryBoxValidationCustomButton1, true, true, _padding); //EntryBoxValidationButton EntryBoxValidationButton entryBoxValidationButton = new EntryBoxValidationButton(this, "EntryBoxValidationButton", KeyboardMode.AlfaNumeric, SettingsApp.RegexAlfaNumericExtended, true); entryBoxValidationButton.Button.Clicked += customSharedButton_Clicked; _vbox.PackStart(entryBoxValidationButton, true, true, _padding); //Test XPOEntryBoxSelectRecordValidation without KeyBoard Input FIN_DocumentFinanceType defaultValueDocumentFinanceType = (FIN_DocumentFinanceType)FrameworkUtils.GetXPGuidObject(GlobalFramework.SessionXpo, typeof(FIN_DocumentFinanceType), SettingsApp.XpoOidDocumentFinanceTypeInvoice); CriteriaOperator criteriaOperatorDocumentFinanceType = CriteriaOperator.Parse("(Disabled IS NULL OR Disabled <> 1)"); XPOEntryBoxSelectRecordValidation <FIN_DocumentFinanceType, TreeViewDocumentFinanceType> entryBoxSelectDocumentFinanceType = new XPOEntryBoxSelectRecordValidation <FIN_DocumentFinanceType, TreeViewDocumentFinanceType>(this, Resx.global_documentfinanceseries_documenttype, "Designation", "Oid", defaultValueDocumentFinanceType, criteriaOperatorDocumentFinanceType, SettingsApp.RegexGuid, true); //entryBoxSelectDocumentFinanceType.EntryValidation.IsEditable = false; entryBoxSelectDocumentFinanceType.ClosePopup += delegate { }; _vbox.PackStart(entryBoxSelectDocumentFinanceType, true, true, _padding); //Test XPOEntryBoxSelectRecordValidation with KeyBoard Input CriteriaOperator criteriaOperatorXPOEntryBoxSelectRecordValidationTextMode = null; _xPOEntryBoxSelectRecordValidationTextMode = new XPOEntryBoxSelectRecordValidation <ERP_Customer, TreeViewCustomer>(this, "XPOEntryBoxSelectRecordValidationTextMode", "Name", "Name", null, criteriaOperatorXPOEntryBoxSelectRecordValidationTextMode, KeyboardMode.AlfaNumeric, SettingsApp.RegexAlfaNumericExtended, false); //_xPOEntryBoxSelectRecordValidationTextMode.EntryValidation.Sensitive = false; //Start Disabled //_xPOEntryBoxSelectRecordValidationTextMode.ButtonKeyBoard.Sensitive = false; _xPOEntryBoxSelectRecordValidationTextMode.ClosePopup += delegate { }; _vbox.PackStart(_xPOEntryBoxSelectRecordValidationTextMode, true, true, _padding); //Test XPOEntryBoxSelectRecordValidation without KeyBoard Input / Guid CriteriaOperator criteriaOperatorXPOEntryBoxSelectRecordValidationGuidMode = null; XPOEntryBoxSelectRecordValidation <ERP_Customer, TreeViewCustomer> xPOEntryBoxSelectRecordValidationGuidMode = new XPOEntryBoxSelectRecordValidation <ERP_Customer, TreeViewCustomer>(this, "XPOEntryBoxSelectRecordValidationGuidMode", "Name", "Oid", null, criteriaOperatorXPOEntryBoxSelectRecordValidationGuidMode, KeyboardMode.None, SettingsApp.RegexGuid, true); _xPOEntryBoxSelectRecordValidationTextMode.ClosePopup += delegate { }; _vbox.PackStart(xPOEntryBoxSelectRecordValidationGuidMode, true, true, _padding); //Test DateTime Picker DateTime initalDateTime = DateTime.Now; EntryBoxValidationDatePickerDialog entryBoxShipToDeliveryDate = new EntryBoxValidationDatePickerDialog(this, Resx.global_ship_to_delivery_date, "dateFormat", DateTime.Now, SettingsApp.RegexDate, true, SettingsApp.DateFormat); //entryBoxShipToDeliveryDate.EntryValidation.Sensitive = true; entryBoxShipToDeliveryDate.EntryValidation.Text = initalDateTime.ToString(SettingsApp.DateFormat); //entryBoxShipToDeliveryDate.EntryValidation.Validate(); //entryBoxShipToDeliveryDate.ClosePopup += delegate { }; _vbox.PackStart(entryBoxShipToDeliveryDate, true, true, _padding); //Test DateTime Picker with KeyBoard EntryBoxValidationDatePickerDialog entryBoxShipToDeliveryDateKeyboard = new EntryBoxValidationDatePickerDialog(this, Resx.global_ship_to_delivery_date, SettingsApp.DateTimeFormat, DateTime.Now, KeyboardMode.AlfaNumeric, SettingsApp.RegexDateTime, true, SettingsApp.DateTimeFormat); entryBoxShipToDeliveryDateKeyboard.EntryValidation.Sensitive = false; entryBoxShipToDeliveryDateKeyboard.ButtonKeyBoard.Sensitive = false; //entryBoxShipToDeliveryDate.EntryValidation.Sensitive = true; entryBoxShipToDeliveryDateKeyboard.EntryValidation.Text = initalDateTime.ToString(SettingsApp.DateTimeFormat); _vbox.PackStart(entryBoxShipToDeliveryDateKeyboard, true, true, _padding); //Simple ListView List <string> itemList = new List <string>(); itemList.Add("Looking for Kiosk mode in Android Lollipop 5.0"); itemList.Add("Think of a hypothetical ATM machine that is running Android"); itemList.Add("In this article we provide a brief overview of how"); itemList.Add("Kiosk Mode can be implemented without any modifications"); itemList.Add("The Home key brings you back to the Home screen"); //ListComboBox ListComboBox listComboBox = new ListComboBox(itemList, itemList[3]); _vbox.PackStart(listComboBox, true, true, _padding); //ListComboBoxTouch ListComboBoxTouch listComboBoxTouch = new ListComboBoxTouch(this, "ListComboBoxTouch (Todo: Highlight Validation in Component)", itemList, itemList[4]); _vbox.PackStart(listComboBoxTouch, true, true, _padding); //EntryMultiline entryTouchMultiline = new EntryMultiline(this, KeyboardMode.AlfaNumeric, SettingsApp.RegexAlfaNumericExtended, true, 100, 10); //vbox.PackStart(entryTouchMultiline, true, true, padding); EntryBoxValidationMultiLine entryBoxMultiLine = new EntryBoxValidationMultiLine(this, "EntryBoxMultiLine", KeyboardMode.AlfaNumeric, SettingsApp.RegexAlfaNumericExtended, true, 18, 6) { HeightRequest = 200 }; //Start Disabled entryBoxMultiLine.EntryMultiline.Sensitive = false; entryBoxMultiLine.ButtonKeyBoard.Sensitive = false; _vbox.PackStart(entryBoxMultiLine, true, true, _padding); /* * ListRadioButtonTouch listRadioButtonTouch = new ListRadioButtonTouch(this, "Label", itemList, itemList[4]); * _fixedContent.Put(listRadioButtonTouch, 100, 320); * * string initialShipFromDeliveryDate = FrameworkUtils.CurrentDateTimeAtomic().ToString(SettingsApp.DateFormat); * //EntryBoxValidationButton entryBoxDate = new EntryBoxValidationButton(this, Resx.global_ship_from_delivery_date, KeyboardModes.Alfa, regexDate, false); * //entryBoxDate.EntryValidation.Text = initialShipFromDeliveryDate; * //entryBoxDate.EntryValidation.Validate(); * * EntryBoxValidationDatePickerDialog entryBoxDate = new EntryBoxValidationDatePickerDialog(this, Resx.global_ship_from_delivery_date, SettingsApp.RegexDate, false); * entryBoxDate.EntryValidation.Text = initialShipFromDeliveryDate; * entryBoxDate.EntryValidation.Validate(); * entryBoxDate.ClosePopup += delegate * { * _log.Debug(string.Format("entryBoxDate.Value: [{0}]", entryBoxDate.Value)); * }; * vbox.PackStart(entryBoxDate, true, true, padding); */ }
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); } }
private void InitUI() { //Files string fileAppBanner = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Licence\licence.png"); //Init int padding = 3; //Init Fonts //MockData bool useMockData = false; string mockName = (useMockData) ? "Carlos Fernandes" : string.Empty; string mockCompany = (useMockData) ? "LogicPulse" : string.Empty; string mockFiscalNumber = (useMockData) ? "503218820" : string.Empty; string mockAddress = (useMockData) ? "Rua Capitão Salgueiro Maia, nº7, 3080-245 Figueira da Foz" : string.Empty; string mockPhone = (useMockData) ? "+351 233 042 347" : string.Empty; string mockEmail = (useMockData) ? "*****@*****.**" : string.Empty; //Init Content _hboxMain = new HBox(false, 0) { BorderWidth = (uint)padding }; //Inner Image appBanner = new Image(fileAppBanner) { WidthRequest = 200 }; VBox vboxMain = new VBox(false, padding); _hboxMain.PackStart(appBanner, false, false, (uint)padding); _hboxMain.PackStart(vboxMain, true, true, (uint)padding); //Pack VBoxMain : Welcome Label labelWelcome = new Label(resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "window_license_label_welcome")); labelWelcome.SetAlignment(0.0F, 0.0F); labelWelcome.ModifyFont(FontDescription.FromString("Arial 12 bold")); vboxMain.PackStart(labelWelcome, false, false, (uint)padding); //Pack VBoxMain : Info Label lableInfo = new Label(resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "window_license_label_info")); lableInfo.WidthRequest = 630; lableInfo.ModifyFont(FontDescription.FromString("Arial 11")); lableInfo.Wrap = true; lableInfo.SetAlignment(0.0F, 0.0F); vboxMain.PackStart(lableInfo, true, true, (uint)padding); //Pack hboxInner HBox hboxInner = new HBox(false, 0); vboxMain.PackStart(hboxInner, false, false, 0); //Pack VBoxMain : HBoxInner VBox vboxInnerLeft = new VBox(false, 0); vboxInnerLeft.WidthRequest = 390; VBox vboxInnerRight = new VBox(false, 0); VBox vboxHardwareId = new VBox(false, 0); hboxInner.PackStart(vboxInnerLeft, false, false, 0); hboxInner.PackStart(vboxInnerRight, false, false, (uint)padding * 2); //VBoxInnerLeft Label labelInternetRegistration = new Label(resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "window_license_label_internet_registration")); labelInternetRegistration.SetAlignment(0.0F, 0.0F); labelInternetRegistration.ModifyFont(FontDescription.FromString("Arial 10 bold")); vboxInnerLeft.PackStart(labelInternetRegistration, false, false, 0); //EntryBoxName _entryBoxName = new EntryBoxValidation(this, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_name"), KeyboardMode.AlfaNumeric, SettingsApp.RegexAlfaNumericExtended, true); _entryBoxName.EntryValidation.ModifyFont(FontDescription.FromString("Courier 10")); _entryBoxName.EntryValidation.Text = mockName; _entryBoxName.EntryValidation.Changed += delegate { Validate(); }; vboxInnerLeft.PackStart(_entryBoxName, false, false, 0); //EntryBoxCompany _entryBoxCompany = new EntryBoxValidation(this, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_company"), KeyboardMode.AlfaNumeric, SettingsApp.RegexAlfaNumericExtended, true); _entryBoxCompany.EntryValidation.Text = mockCompany; _entryBoxCompany.EntryValidation.ModifyFont(FontDescription.FromString("Courier 10")); _entryBoxCompany.EntryValidation.Changed += delegate { Validate(); }; vboxInnerLeft.PackStart(_entryBoxCompany, false, false, 0); //EntryFiscalNumber _entryBoxFiscalNumber = new EntryBoxValidation(this, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_fiscal_number"), KeyboardMode.Numeric, SettingsApp.RegexIntegerGreaterThanZero, true); _entryBoxFiscalNumber.EntryValidation.ModifyFont(FontDescription.FromString("Courier 10")); _entryBoxFiscalNumber.EntryValidation.Text = mockFiscalNumber; _entryBoxFiscalNumber.EntryValidation.Changed += delegate { Validate(); }; vboxInnerLeft.PackStart(_entryBoxFiscalNumber, false, false, 0); //EntryBoxAddress _entryBoxAddress = new EntryBoxValidation(this, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_address"), KeyboardMode.AlfaNumeric, SettingsApp.RegexAlfaNumericExtended, true); _entryBoxAddress.EntryValidation.ModifyFont(FontDescription.FromString("Courier 10")); _entryBoxAddress.EntryValidation.Text = mockAddress; _entryBoxAddress.EntryValidation.Changed += delegate { Validate(); }; vboxInnerLeft.PackStart(_entryBoxAddress, false, false, 0); //EntryBoxEmail _entryBoxEmail = new EntryBoxValidation(this, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_email"), KeyboardMode.AlfaNumeric, SettingsApp.RegexEmail, true); _entryBoxEmail.EntryValidation.ModifyFont(FontDescription.FromString("Courier 10")); _entryBoxEmail.EntryValidation.Text = mockEmail; _entryBoxEmail.EntryValidation.Changed += delegate { Validate(); }; vboxInnerLeft.PackStart(_entryBoxEmail, false, false, 0); //EntryBoxPhone _entryBoxPhone = new EntryBoxValidation(this, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_phone"), KeyboardMode.AlfaNumeric, SettingsApp.RegexAlfaNumericExtended, true); _entryBoxPhone.EntryValidation.ModifyFont(FontDescription.FromString("Courier 10")); _entryBoxPhone.EntryValidation.Text = mockPhone; _entryBoxPhone.EntryValidation.Changed += delegate { Validate(); }; vboxInnerLeft.PackStart(_entryBoxPhone, false, false, 0); //EntryBoxHardwareId _entryBoxHardwareId = new EntryBoxValidation(this, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_hardware_id"), KeyboardMode.None, SettingsApp.RegexAlfaNumericExtended, true); _entryBoxHardwareId.EntryValidation.ModifyFont(FontDescription.FromString("Courier 6 bold")); _entryBoxHardwareId.EntryValidation.Text = _hardwareId; _entryBoxHardwareId.EntryValidation.Sensitive = false; _entryBoxHardwareId.EntryValidation.HeightRequest = 30; vboxInnerLeft.PackStart(_entryBoxHardwareId, false, false, 0); //VBoxInnerRight Label labelWithoutInternetRegistration = new Label(resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "window_license_label_without_internet_registration")); labelWithoutInternetRegistration.SetAlignment(0.0F, 0.0F); labelWithoutInternetRegistration.ModifyFont(FontDescription.FromString("Arial 9")); vboxInnerRight.PackStart(labelWithoutInternetRegistration, false, false, 0); //Info Label labelWithoutInternetContactInfo = new Label(resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "window_license_label_without_internet_contact_info")); labelWithoutInternetContactInfo.Wrap = true; labelWithoutInternetContactInfo.ModifyFont(FontDescription.FromString("Arial 9")); labelWithoutInternetContactInfo.SetAlignment(0.0F, 0.0F); vboxInnerRight.PackStart(labelWithoutInternetContactInfo, false, false, 0); //Company Label labelWithoutInternetContactCompanyNameLabel = new Label(resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_company")); labelWithoutInternetContactCompanyNameLabel.SetAlignment(0.0F, 0.0F); labelWithoutInternetContactCompanyNameLabel.ModifyFont(FontDescription.FromString("Arial 10 bold")); vboxInnerRight.PackStart(labelWithoutInternetContactCompanyNameLabel, false, false, (uint)padding * 2); Label labelWithoutInternetContactCompanyNameValue = new Label(SettingsApp.AppCompanyName); labelWithoutInternetContactCompanyNameValue.SetAlignment(0.0F, 0.0F); labelWithoutInternetContactCompanyNameValue.ModifyFont(FontDescription.FromString("Courier 10")); vboxInnerRight.PackStart(labelWithoutInternetContactCompanyNameValue, false, false, 0); //Phone string[] primaryPhones = SettingsApp.AppCompanyPhone.Split(new string[] { " / " }, StringSplitOptions.None); Label labelWithoutInternetContactCompanyPhoneLabel = new Label(resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_phone")); labelWithoutInternetContactCompanyPhoneLabel.SetAlignment(0.0F, 0.0F); labelWithoutInternetContactCompanyPhoneLabel.ModifyFont(FontDescription.FromString("Arial 10 bold")); vboxInnerRight.PackStart(labelWithoutInternetContactCompanyPhoneLabel, false, false, (uint)padding * 2); Label labelWithoutInternetContactCompanyPhoneValue = new Label(primaryPhones[0]); labelWithoutInternetContactCompanyPhoneValue.SetAlignment(0.0F, 0.0F); labelWithoutInternetContactCompanyPhoneValue.ModifyFont(FontDescription.FromString("Courier 10")); vboxInnerRight.PackStart(labelWithoutInternetContactCompanyPhoneValue, false, false, 0); //Email Label labelWithoutInternetContactCompanyEmailLabel = new Label(resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_email")); labelWithoutInternetContactCompanyEmailLabel.SetAlignment(0.0F, 0.0F); labelWithoutInternetContactCompanyEmailLabel.ModifyFont(FontDescription.FromString("Arial 10 bold")); vboxInnerRight.PackStart(labelWithoutInternetContactCompanyEmailLabel, false, false, (uint)padding * 2); Label labelWithoutInternetContactCompanyEmailValue = new Label(SettingsApp.AppCompanyEmail); labelWithoutInternetContactCompanyEmailValue.SetAlignment(0.0F, 0.0F); labelWithoutInternetContactCompanyEmailValue.ModifyFont(FontDescription.FromString("Courier 10")); vboxInnerRight.PackStart(labelWithoutInternetContactCompanyEmailValue, false, false, 0); //Email Label labelWithoutInternetContactCompanyWebLabel = new Label(resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_website")); labelWithoutInternetContactCompanyWebLabel.SetAlignment(0.0F, 0.0F); labelWithoutInternetContactCompanyWebLabel.ModifyFont(FontDescription.FromString("Arial 10 bold")); vboxInnerRight.PackStart(labelWithoutInternetContactCompanyWebLabel, false, false, (uint)padding * 2); Label labelWithoutInternetContactCompanyWebValue = new Label(SettingsApp.AppCompanyWeb); labelWithoutInternetContactCompanyWebValue.SetAlignment(0.0F, 0.0F); labelWithoutInternetContactCompanyWebValue.ModifyFont(FontDescription.FromString("Courier 10")); vboxInnerRight.PackStart(labelWithoutInternetContactCompanyWebValue, false, false, 0); }
private void InitUI(bool useDataDemo) { //Get Values from Config Guid systemCountry; Guid systemCurrency; //bool debug = false; bool useDatabaseDataDemo = Convert.ToBoolean(GlobalFramework.Settings["useDatabaseDataDemo"]); if (GlobalFramework.Settings["xpoOidConfigurationCountrySystemCountry"] != string.Empty) { systemCountry = new Guid(GlobalFramework.Settings["xpoOidConfigurationCountrySystemCountry"]); } else { systemCountry = SettingsApp.XpoOidConfigurationCountryPortugal; } if (GlobalFramework.Settings["xpoOidConfigurationCurrencySystemCurrency"] != string.Empty) { systemCurrency = new Guid(GlobalFramework.Settings["xpoOidConfigurationCurrencySystemCurrency"]); } else { systemCurrency = SettingsApp.XpoOidConfigurationCurrencyEuro; } //Init Inital Values cfg_configurationcountry intialValueConfigurationCountry = (cfg_configurationcountry)FrameworkUtils.GetXPGuidObject(typeof(cfg_configurationcountry), systemCountry); cfg_configurationcurrency intialValueConfigurationCurrency = (cfg_configurationcurrency)FrameworkUtils.GetXPGuidObject(typeof(cfg_configurationcurrency), systemCurrency); try { //Init dictionary for Parameters + Widgets _dictionaryObjectBag = new Dictionary <cfg_configurationpreferenceparameter, EntryBoxValidation>(); //Pack VBOX VBox vbox = new VBox(true, 2) { WidthRequest = 300 }; //Country CriteriaOperator criteriaOperatorSystemCountry = CriteriaOperator.Parse("(Disabled IS NULL OR Disabled <> 1) AND (RegExFiscalNumber IS NOT NULL)"); _entryBoxSelectSystemCountry = new XPOEntryBoxSelectRecordValidation <cfg_configurationcountry, TreeViewConfigurationCountry>(this, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_country"), "Designation", "Oid", intialValueConfigurationCountry, criteriaOperatorSystemCountry, SettingsApp.RegexGuid, true); _entryBoxSelectSystemCountry.EntryValidation.IsEditable = false; _entryBoxSelectSystemCountry.EntryValidation.Validate(_entryBoxSelectSystemCountry.Value.Oid.ToString()); //Disabled, Now Country and Currency are disabled _entryBoxSelectSystemCountry.ButtonSelectValue.Sensitive = true; _entryBoxSelectSystemCountry.EntryValidation.Sensitive = true; _entryBoxSelectSystemCountry.ClosePopup += delegate { ////Require to Update RegEx _entryBoxZipCode.EntryValidation.Rule = _entryBoxSelectSystemCountry.Value.RegExZipCode; _entryBoxZipCode.EntryValidation.Validate(); //Require to Update RegEx and Criteria to filter Country Clients Only _entryBoxFiscalNumber.EntryValidation.Rule = _entryBoxSelectSystemCountry.Value.RegExFiscalNumber; _entryBoxFiscalNumber.EntryValidation.Validate(); if (_entryBoxFiscalNumber.EntryValidation.Validated) { bool isValidFiscalNumber = FiscalNumber.IsValidFiscalNumber(_entryBoxFiscalNumber.EntryValidation.Text, _entryBoxSelectSystemCountry.Value.Code2); _entryBoxFiscalNumber.EntryValidation.Validated = isValidFiscalNumber; } //Call Main Validate Validate(); }; //Currency CriteriaOperator criteriaOperatorSystemCurrency = CriteriaOperator.Parse("(Disabled IS NULL OR Disabled <> 1)"); _entryBoxSelectSystemCurrency = new XPOEntryBoxSelectRecordValidation <cfg_configurationcurrency, TreeViewConfigurationCurrency>(this, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_currency"), "Designation", "Oid", intialValueConfigurationCurrency, criteriaOperatorSystemCurrency, SettingsApp.RegexGuid, true); _entryBoxSelectSystemCurrency.EntryValidation.IsEditable = false; _entryBoxSelectSystemCurrency.EntryValidation.Validate(_entryBoxSelectSystemCurrency.Value.Oid.ToString()); //Disabled, Now Country and Currency are disabled //_entryBoxSelectSystemCurrency.ButtonSelectValue.Sensitive = false; //_entryBoxSelectSystemCurrency.EntryValidation.Sensitive = false; _entryBoxSelectSystemCurrency.ClosePopup += delegate { //Call Main Validate Validate(); }; //Add to Vbox vbox.PackStart(_entryBoxSelectSystemCountry, true, true, 0); vbox.PackStart(_entryBoxSelectSystemCurrency, true, true, 0); //Start Render Dynamic Inputs CriteriaOperator criteriaOperator = CriteriaOperator.Parse("(Disabled = 0 OR Disabled is NULL) AND (FormType = 1 AND FormPageNo = 1)"); SortProperty[] sortProperty = new SortProperty[2]; sortProperty[0] = new SortProperty("Ord", SortingDirection.Ascending); XPCollection xpCollection = new XPCollection(GlobalFramework.SessionXpo, typeof(cfg_configurationpreferenceparameter), criteriaOperator, sortProperty); if (xpCollection.Count > 0) { string label = string.Empty; string regEx = string.Empty; object regExObj = null; bool required = false; foreach (cfg_configurationpreferenceparameter item in xpCollection) { label = (item.ResourceString != null && resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], item.ResourceString) != null) ? resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], item.ResourceString) : string.Empty; regExObj = FrameworkUtils.GetFieldValueFromType(typeof(SettingsApp), item.RegEx); regEx = (regExObj != null) ? regExObj.ToString() : string.Empty; required = Convert.ToBoolean(item.Required); //Override Db Regex if (item.Token == "COMPANY_POSTALCODE") { regEx = _entryBoxSelectSystemCountry.Value.RegExZipCode; } if (item.Token == "COMPANY_FISCALNUMBER") { regEx = _entryBoxSelectSystemCountry.Value.RegExFiscalNumber; } //IN009295 Start POS - Capital Social com valor por defeito if (item.Token == "COMPANY_STOCK_CAPITAL") { item.Value = "1"; } //Debug //_log.Debug(string.Format("Label: [{0}], RegEx: [{1}], Required: [{2}]", label, regEx, required)); EntryBoxValidation entryBoxValidation = new EntryBoxValidation( this, label, KeyboardMode.AlfaNumeric, regEx, required ) { Name = item.Token }; //Use demo data to fill values if (useDataDemo) { if (item.Token == "COMPANY_NAME") { entryBoxValidation.EntryValidation.Text = "LogicPulse"; } if (item.Token == "COMPANY_BUSINESS_NAME") { entryBoxValidation.EntryValidation.Text = "Technologies, Ltda"; } if (item.Token == "COMPANY_ADDRESS") { entryBoxValidation.EntryValidation.Text = "Rua Capitão Salgueiro Maia, 7"; } if (item.Token == "COMPANY_CITY") { entryBoxValidation.EntryValidation.Text = "Figueira da Foz"; } if (item.Token == "COMPANY_POSTALCODE") { entryBoxValidation.EntryValidation.Text = "3080-000"; } if (item.Token == "COMPANY_COUNTRY") { entryBoxValidation.EntryValidation.Text = "Portugal"; } if (item.Token == "COMPANY_FISCALNUMBER") { entryBoxValidation.EntryValidation.Text = "999999990"; } if (item.Token == "COMPANY_STOCK_CAPITAL") { entryBoxValidation.EntryValidation.Text = "1000"; } if (item.Token == "COMPANY_EMAIL") { entryBoxValidation.EntryValidation.Text = "*****@*****.**"; } if (item.Token == "COMPANY_WEBSITE") { entryBoxValidation.EntryValidation.Text = "www.logicpulse.com"; } } //Only Assign Value if Debugger Attached: Now the value for normal user is cleaned in Init Database, we keep this code here, may be usefull //if (Debugger.IsAttached == true || useDatabaseDataDemo && !useDataDemo) { entryBoxValidation.EntryValidation.Text = item.Value; } //if (Debugger.IsAttached == true) //{ // if (debug) _log.Debug(String.Format("[{0}:{1}]:item.Value: [{2}], entryBoxValidation.EntryValidation.Text: [{3}]", Debugger.IsAttached == true, useDatabaseDataDemo, item.Value, entryBoxValidation.EntryValidation.Text)); //} //Assign shared Event entryBoxValidation.EntryValidation.Changed += EntryValidation_Changed; //If is ZipCode Assign it to _entryBoxZipCode Reference if (item.Token == "COMPANY_POSTALCODE") { _entryBoxZipCode = entryBoxValidation; _entryBoxZipCode.EntryValidation.Rule = _entryBoxSelectSystemCountry.Value.RegExZipCode; } //If is FiscalNumber Assign it to entryBoxSelectCustomerFiscalNumber Reference else if (item.Token == "COMPANY_FISCALNUMBER") { _entryBoxFiscalNumber = entryBoxValidation; _entryBoxFiscalNumber.EntryValidation.Rule = _entryBoxSelectSystemCountry.Value.RegExFiscalNumber; } if (item.Token == "COMPANY_TAX_ENTITY") { entryBoxValidation.EntryValidation.Text = "Global"; } //Call Validate entryBoxValidation.EntryValidation.Validate(); //Pack and Add to ObjectBag vbox.PackStart(entryBoxValidation, true, true, 0); _dictionaryObjectBag.Add(item, entryBoxValidation); } } Viewport viewport = new Viewport() { ShadowType = ShadowType.None }; viewport.Add(vbox); _scrolledWindow = new ScrolledWindow(); _scrolledWindow.ShadowType = ShadowType.EtchedIn; _scrolledWindow.SetPolicy(PolicyType.Automatic, PolicyType.Automatic); _scrolledWindow.Add(viewport); viewport.ResizeMode = ResizeMode.Parent; _scrolledWindow.ResizeMode = ResizeMode.Parent; } catch (Exception ex) { _log.Error(ex.Message, ex); } }
private void InitUI() { //Init Local Vars //Default Values (INSERT) FIN_Article initialValueSelectArticle = (_dataSourceRow["Article.Code"] as FIN_Article); string initialValuePrice = FrameworkUtils.DecimalToString(0); string initialValuePriceDisplay = FrameworkUtils.DecimalToString(0); string initialValueQuantity = FrameworkUtils.DecimalToString(0); string initialValueDiscount = FrameworkUtils.DecimalToString(0); string initialValueTotalNet = FrameworkUtils.DecimalToString(0); string initialValueTotalFinal = FrameworkUtils.DecimalToString(0); string initialValueNotes = string.Empty; FIN_ConfigurationVatRate initialValueSelectConfigurationVatRate = (FIN_ConfigurationVatRate)GlobalFramework.SessionXpo.GetObjectByKey(typeof(FIN_ConfigurationVatRate), SettingsApp.XpoOidArticleDefaultVatDirectSelling); FIN_ConfigurationVatExemptionReason initialValueSelectConfigurationVatExemptionReason = null; //Update Record : Override Default Values if (initialValueSelectArticle != null && initialValueSelectArticle.Oid != Guid.Empty) { //Always display Values from DataRow, for Both INSERT and UPDATE Modes, We Have defaults comming from ColumnProperties initialValuePrice = FrameworkUtils.StringToDecimalAndToStringAgain(_dataSourceRow["Price"].ToString()); initialValuePriceDisplay = FrameworkUtils.StringToDecimalAndToStringAgain(_dataSourceRow["PriceDisplay"].ToString()); initialValueQuantity = FrameworkUtils.StringToDecimalAndToStringAgain(_dataSourceRow["Quantity"].ToString()); initialValueDiscount = FrameworkUtils.StringToDecimalAndToStringAgain(_dataSourceRow["Discount"].ToString()); initialValueTotalNet = FrameworkUtils.StringToDecimalAndToStringAgain(_dataSourceRow["TotalNet"].ToString()); initialValueTotalFinal = FrameworkUtils.StringToDecimalAndToStringAgain(_dataSourceRow["TotalFinal"].ToString()); initialValueSelectConfigurationVatRate = (_dataSourceRow["ConfigurationVatRate.Value"] as FIN_ConfigurationVatRate); initialValueSelectConfigurationVatExemptionReason = (_dataSourceRow["VatExemptionReason.Acronym"] as FIN_ConfigurationVatExemptionReason); initialValueNotes = _dataSourceRow["Notes"].ToString(); //Required, Else Wrong Calculation in UPDATES, when Price is not Defined : //Reverse Price if not in default System Currency, else use value from Input _articlePrice = (_currencyDefaultSystem == _currencyDisplay) ? FrameworkUtils.StringToDecimal(initialValuePriceDisplay) : (FrameworkUtils.StringToDecimal(initialValuePriceDisplay) / _currencyDisplay.ExchangeRate) ; } //Initialize crudWidgetsList _crudWidgetList = new GenericCRUDWidgetListDataTable(); //SelectArticle CriteriaOperator criteriaOperatorSelectArticle = CriteriaOperator.Parse("(Disabled IS NULL OR Disabled <> 1)"); _entryBoxSelectArticle = new XPOEntryBoxSelectRecord <FIN_Article, TreeViewArticle>(this, Resx.global_article, "Designation", "Oid", initialValueSelectArticle, criteriaOperatorSelectArticle); _entryBoxSelectArticle.Entry.IsEditable = false; //Add to WidgetList _crudWidgetSelectArticle = new GenericCRUDWidgetDataTable(_entryBoxSelectArticle, _entryBoxSelectArticle.Label, _dataSourceRow, "Oid", _regexGuid, true); _crudWidgetList.Add(_crudWidgetSelectArticle); //Used only to Update DataRow Column from Widget : Used to force Assign XPGuidObject ChildNames to Columns _crudWidgetList.Add(new GenericCRUDWidgetDataTable(_entryBoxSelectArticle, new Label(), _dataSourceRow, "Article.Code")); _crudWidgetList.Add(new GenericCRUDWidgetDataTable(_entryBoxSelectArticle, new Label(), _dataSourceRow, "Article.Designation")); //Events _entryBoxSelectArticle.ClosePopup += _entryBoxSelectArticle_ClosePopup; //Price : Used only in Debug Mode, to Inspect SystemCurrency Values : To View add it to hboxPriceQuantityDiscountAndTotals.PackStart //Note #1 //Removed. this will trigger an error when use a zero Price WayBill to issue an Invoice, better use discount 100% //If not Saft Document Type 2, required greater than zero in Price, else we can have zero or greater from Document Type 2 (ex Transportation Guide) //string regExPrice = (!_listSaftDocumentType2.Contains(_documentFinanceType.Oid.ToString())) ? _regexDecimalGreaterThanZero : _regexDecimalGreaterEqualThanZero; // Now all regExPrice must be greater than Zero string regExPrice = _regexDecimalGreaterThanZero; _entryBoxValidationPrice = new EntryBoxValidation(this, "Price EUR(*)", KeyboardMode.Numeric, regExPrice, true); _entryBoxValidationPrice.EntryValidation.Text = initialValuePrice; _entryBoxValidationPrice.EntryValidation.Sensitive = false; //Add to WidgetList _crudWidgetPrice = new GenericCRUDWidgetDataTable(_entryBoxValidationPrice, _entryBoxValidationPrice.Label, _dataSourceRow, "Price", regExPrice, true); _crudWidgetList.Add(_crudWidgetPrice); //PriceDisplay //Note #1 //If not Saft Document Type 2, required greater than zero in Price, else we can have zero or greater from Document Type 2 (ex Transportation Guide) _entryBoxValidationPriceDisplay = new EntryBoxValidation(this, Resx.global_price, KeyboardMode.Numeric, regExPrice, true); _entryBoxValidationPriceDisplay.EntryValidation.Text = initialValuePriceDisplay; //Add to WidgetList _crudWidgetPriceDisplay = new GenericCRUDWidgetDataTable(_entryBoxValidationPriceDisplay, _entryBoxValidationPriceDisplay.Label, _dataSourceRow, "PriceDisplay", regExPrice, true); _crudWidgetList.Add(_crudWidgetPriceDisplay); //Events _entryBoxValidationPriceDisplay.EntryValidation.Changed += delegate { if (_crudWidgetPriceDisplay.Validated) { //Reverse Price if not in default System Currency, else use value from Input _articlePrice = (_currencyDefaultSystem == _currencyDisplay) ? FrameworkUtils.StringToDecimal(_entryBoxValidationPriceDisplay.EntryValidation.Text) : (FrameworkUtils.StringToDecimal(_entryBoxValidationPriceDisplay.EntryValidation.Text) / _currencyDisplay.ExchangeRate); //Assign to System Currency Price _entryBoxValidationPrice.EntryValidation.Text = FrameworkUtils.DecimalToString(_articlePrice); UpdatePriceProperties(); } }; _entryBoxValidationPriceDisplay.EntryValidation.FocusOutEvent += delegate { _entryBoxValidationPriceDisplay.EntryValidation.Text = FrameworkUtils.StringToDecimalAndToStringAgain(_entryBoxValidationPriceDisplay.EntryValidation.Text); }; //Start with _articlePrice Assigned: DISABLED //_articlePrice = (_currencyDefaultSystem == _currencyDisplay) // ? FrameworkUtils.StringToDecimal(_entryBoxValidationPriceDisplay.EntryValidation.Text) // : (FrameworkUtils.StringToDecimal(_entryBoxValidationPriceDisplay.EntryValidation.Text) / _currencyDisplay.ExchangeRate) // ; //Quantity _entryBoxValidationQuantity = new EntryBoxValidation(this, Resx.global_quantity, KeyboardMode.Numeric, _regexDecimalGreaterThanZero, true); _entryBoxValidationQuantity.EntryValidation.Text = initialValueQuantity; //Add to WidgetList _crudWidgetQuantity = new GenericCRUDWidgetDataTable(_entryBoxValidationQuantity, _entryBoxValidationQuantity.Label, _dataSourceRow, "Quantity", _regexDecimalGreaterThanZero, true); _crudWidgetList.Add(_crudWidgetQuantity); //Events _entryBoxValidationQuantity.EntryValidation.Changed += delegate { UpdatePriceProperties(); }; _entryBoxValidationQuantity.EntryValidation.FocusOutEvent += delegate { _entryBoxValidationQuantity.EntryValidation.Text = FrameworkUtils.StringToDecimalAndToStringAgain(_entryBoxValidationQuantity.EntryValidation.Text); }; //Discount _entryBoxValidationDiscount = new EntryBoxValidation(this, Resx.global_discount, KeyboardMode.Numeric, _regexPercentage, true); _entryBoxValidationDiscount.EntryValidation.Text = initialValueDiscount; //Add to WidgetList _crudWidgetDiscount = new GenericCRUDWidgetDataTable(_entryBoxValidationDiscount, _entryBoxValidationDiscount.Label, _dataSourceRow, "Discount", _regexPercentage, true); _crudWidgetList.Add(_crudWidgetDiscount); //Events _entryBoxValidationDiscount.EntryValidation.Changed += delegate { UpdatePriceProperties(); }; _entryBoxValidationDiscount.EntryValidation.FocusOutEvent += delegate { _entryBoxValidationDiscount.EntryValidation.Text = FrameworkUtils.StringToDecimalAndToStringAgain(_entryBoxValidationDiscount.EntryValidation.Text); }; //TotalGross _entryBoxValidationTotalNet = new EntryBoxValidation(this, Resx.global_totalnet, KeyboardMode.None); _entryBoxValidationTotalNet.EntryValidation.Text = initialValueTotalNet; _entryBoxValidationTotalNet.EntryValidation.Sensitive = false; //Used only to Update DataRow Column from Widget _crudWidgetList.Add(new GenericCRUDWidgetDataTable(_entryBoxValidationTotalNet, new Label(), _dataSourceRow, "TotalNet")); //TotalFinal _entryBoxValidationTotalFinal = new EntryBoxValidation(this, Resx.global_total, KeyboardMode.None); _entryBoxValidationTotalFinal.EntryValidation.Text = initialValueTotalFinal; _entryBoxValidationTotalFinal.EntryValidation.Sensitive = false; //Used only to Update DataRow Column from Widget _crudWidgetList.Add(new GenericCRUDWidgetDataTable(_entryBoxValidationTotalFinal, new Label(), _dataSourceRow, "TotalFinal")); //HBox PriceQuantityDiscountAndTotals HBox hboxPriceQuantityDiscountAndTotals = new HBox(true, 0); //Invisible, only used to Debug, to View Values in System Currency //hboxPriceQuantityDiscountAndTotals.PackStart(_entryBoxValidationPrice, true, true, 0); hboxPriceQuantityDiscountAndTotals.PackStart(_entryBoxValidationPriceDisplay, true, true, 0); hboxPriceQuantityDiscountAndTotals.PackStart(_entryBoxValidationQuantity, true, true, 0); hboxPriceQuantityDiscountAndTotals.PackStart(_entryBoxValidationDiscount, true, true, 0); hboxPriceQuantityDiscountAndTotals.PackStart(_entryBoxValidationTotalNet, true, true, 0); hboxPriceQuantityDiscountAndTotals.PackStart(_entryBoxValidationTotalFinal, true, true, 0); //SelectVatRate CriteriaOperator criteriaOperatorSelectVatRate = CriteriaOperator.Parse("(Disabled = 0 OR Disabled IS NULL)"); _entryBoxSelectVatRate = new XPOEntryBoxSelectRecord <FIN_ConfigurationVatRate, TreeViewConfigurationVatRate>(this, Resx.global_vat_rate, "Designation", "Oid", initialValueSelectConfigurationVatRate, criteriaOperatorSelectVatRate); _entryBoxSelectVatRate.WidthRequest = 149; _entryBoxSelectVatRate.Entry.IsEditable = false; _entryBoxSelectVatRate.Entry.Changed += _entryBoxSelectVatRate_EntryValidation_Changed; //Add to WidgetList _crudWidgetSelectVatRate = new GenericCRUDWidgetDataTable(_entryBoxSelectVatRate, _entryBoxSelectVatRate.Label, _dataSourceRow, "ConfigurationVatRate.Value", _regexGuid, true); _crudWidgetList.Add(_crudWidgetSelectVatRate); //SelectVatExemptionReason CriteriaOperator criteriaOperatorSelectVatExemptionReason = CriteriaOperator.Parse("(Disabled = 0 OR Disabled IS NULL)"); _entryBoxSelectVatExemptionReason = new XPOEntryBoxSelectRecord <FIN_ConfigurationVatExemptionReason, TreeViewConfigurationVatExceptionReason>(this, Resx.global_vat_exemption_reason, "Designation", "Oid", initialValueSelectConfigurationVatExemptionReason, criteriaOperatorSelectVatExemptionReason); _entryBoxSelectVatExemptionReason.Entry.IsEditable = false; //Add to WidgetList _crudWidgetSelectVatExemptionReason = new GenericCRUDWidgetDataTable(_entryBoxSelectVatExemptionReason, _entryBoxSelectVatExemptionReason.Label, _dataSourceRow, "VatExemptionReason.Acronym", _regexGuid, true); _crudWidgetList.Add(_crudWidgetSelectVatExemptionReason); //ToggleMode: Edit Active/Inactive ToggleVatExemptionReasonEditMode(); //HBox VatRateAndVatExemptionReason HBox hboxVatRateAndVatExemptionReason = new HBox(false, 0); hboxVatRateAndVatExemptionReason.PackStart(_entryBoxSelectVatRate, false, false, 0); hboxVatRateAndVatExemptionReason.PackStart(_entryBoxSelectVatExemptionReason, true, true, 0); //Token1 _entryBoxValidationToken1 = new EntryBoxValidation(this, "Token1", KeyboardMode.None); _entryBoxValidationToken1.EntryValidation.Sensitive = false; //Used only to Update DataRow Column from Widget _crudWidgetList.Add(new GenericCRUDWidgetDataTable(_entryBoxValidationToken1, new Label(), _dataSourceRow, "Token1")); //Token2 _entryBoxValidationToken2 = new EntryBoxValidation(this, "Token2", KeyboardMode.None); _entryBoxValidationToken2.EntryValidation.Sensitive = false; //Used only to Update DataRow Column from Widget _crudWidgetList.Add(new GenericCRUDWidgetDataTable(_entryBoxValidationToken2, new Label(), _dataSourceRow, "Token2")); //Notes _entryBoxValidationNotes = new EntryBoxValidation(this, "Notes", KeyboardMode.AlfaNumeric, SettingsApp.RegexAlfaNumericExtended, false); _entryBoxValidationNotes.EntryValidation.Text = initialValueNotes; _crudWidgetList.Add(new GenericCRUDWidgetDataTable(_entryBoxValidationNotes, new Label(), _dataSourceRow, "Notes")); //Uncomment to Show Invisible Widgets //HBox Token1AndToken2 //HBox hboxToken1AndToken2 = new HBox(false, 0); //hboxToken1AndToken2.PackStart(_entryBoxToken1, false, false, 0); //hboxToken1AndToken2.PackStart(_entryBoxToken2, true, true, 0); //Pack in VBox _vboxEntrys = new VBox(true, 0); _vboxEntrys.PackStart(_entryBoxSelectArticle); _vboxEntrys.PackStart(hboxPriceQuantityDiscountAndTotals); _vboxEntrys.PackStart(hboxVatRateAndVatExemptionReason); //Uncomment to Show Invisible Widgets //_vboxEntrys.PackStart(hboxToken1AndToken2); _vboxEntrys.PackStart(_entryBoxValidationNotes); _vboxEntrys.WidthRequest = _windowSize.Width - 13; // CreditNote : Protect all components, only Quantity is Editable in CreditMode if (_documentFinanceType.Oid == SettingsApp.XpoOidDocumentFinanceTypeCreditNote) { //Article _entryBoxSelectArticle.Entry.Sensitive = false; _entryBoxSelectArticle.ButtonSelectValue.Sensitive = false; //PriceDisplay _entryBoxValidationPriceDisplay.EntryValidation.Sensitive = false; _entryBoxValidationPriceDisplay.ButtonKeyBoard.Sensitive = false; //Discount _entryBoxValidationDiscount.EntryValidation.Sensitive = false; _entryBoxValidationDiscount.ButtonKeyBoard.Sensitive = false; //VatRate _entryBoxSelectVatRate.Entry.Sensitive = false; _entryBoxSelectVatRate.ButtonSelectValue.Sensitive = false; //VatExemptionReason _entryBoxSelectVatExemptionReason.Entry.Sensitive = false; _entryBoxSelectVatExemptionReason.ButtonSelectValue.Sensitive = false; } }
private void InitUI(bool showFilterAndMoreButtons) { //Settings String fontBaseDialogActionAreaButton = FrameworkUtils.OSSlash(GlobalFramework.Settings["fontBaseDialogActionAreaButton"]); Color colorBaseDialogActionAreaButtonBackground = Color.Transparent; Color colorBaseDialogActionAreaButtonFont = FrameworkUtils.StringToColor(GlobalFramework.Settings["colorBaseDialogActionAreaButtonFont"]); Size sizeBaseDialogActionAreaBackOfficeNavigatorButton = ExpressionEvaluatorExtended.sizePosToolbarButtonSizeDefault; Size sizeBaseDialogActionAreaBackOfficeNavigatorButtonIcon = ExpressionEvaluatorExtended.sizePosToolbarButtonIconSizeDefault; //WIP: String fileIconSearchAdvanced = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\icon_pos_search_advanced.png"); String regexAlfaNumericExtended = SettingsApp.RegexAlfaNumericExtended; //SearchCriteria _entryBoxSearchCriteria = new EntryBoxValidation(_sourceWindow, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "widget_generictreeviewsearch_search_label"), KeyboardMode.AlfaNumeric, regexAlfaNumericExtended, false); //TODO:THEME _entryBoxSearchCriteria.WidthRequest = (GlobalApp.ScreenSize.Width == 800 && GlobalApp.ScreenSize.Height == 600) ? 150 : 250; //_entryBoxSearchCriteria.EntryValidation.Changed += delegate { ValidateDialog(); }; //Initialize Buttons //WIP: _buttonSearchAdvanced = new TouchButtonIconWithText("touchButtonSearchAdvanced_DialogActionArea", colorBaseDialogActionAreaButtonBackground, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "widget_generictreeviewsearch_search_advanced, fontBaseDialogActionAreaButton, colorBaseDialogActionAreaButtonFont, fileIconSearchAdvanced, sizeBaseDialogActionAreaBackOfficeNavigatorButtonIcon, sizeBaseDialogActionAreaBackOfficeNavigatorButton.Width, sizeBaseDialogActionAreaBackOfficeNavigatorButton.Height) { Sensitive = false }; //TouchButtonIconWithText _buttonFilter = TouchButtonIconWithText(ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Filter, "touchButtonMore_Green", string.Format(resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_button_label_filter, SettingsApp.PaginationRowsPerPage), fileActionFilter); //ActionAreaButtons actionAreaButtons = new ActionAreaButtons(); //actionAreaButtons.Add(new ActionAreaButton(_buttonMore, _responseTypeLoadMoreDocuments)); //Pack HBox hbox = new HBox(false, 0); hbox.PackStart(_entryBoxSearchCriteria, true, true, 0); //WIP:hbox.PackStart(_buttonSearchAdvanced, false, false, 0); //Final Pack PackStart(hbox); //Check if has Searchable Fields Sensitive = HasSearchableFields(); //Events _entryBoxSearchCriteria.EntryValidation.Changed += _entryBoxSearchCriteria_Changed; //if ("Base Dialog Window".Equals(_sourceWindow.Title)) if (showFilterAndMoreButtons) { TouchButtonIconWithText buttonMore; TouchButtonIconWithText buttonFilter; String fileActionMore = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\icon_pos_more.png"); String fileActionFilter = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\icon_pos_filter.png"); buttonMore = new TouchButtonIconWithText("touchButtonSearchAdvanced_DialogActionArea", colorBaseDialogActionAreaButtonBackground, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_button_label_more"), ExpressionEvaluatorExtended.fontDocumentsSizeDefault, colorBaseDialogActionAreaButtonFont, fileActionMore, sizeBaseDialogActionAreaBackOfficeNavigatorButtonIcon, sizeBaseDialogActionAreaBackOfficeNavigatorButton.Width, sizeBaseDialogActionAreaBackOfficeNavigatorButton.Height) { Sensitive = true }; buttonFilter = new TouchButtonIconWithText("touchButtonSearchAdvanced_DialogActionArea", colorBaseDialogActionAreaButtonBackground, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_button_label_filter"), ExpressionEvaluatorExtended.fontDocumentsSizeDefault, colorBaseDialogActionAreaButtonFont, fileActionFilter, sizeBaseDialogActionAreaBackOfficeNavigatorButtonIcon, sizeBaseDialogActionAreaBackOfficeNavigatorButton.Width, sizeBaseDialogActionAreaBackOfficeNavigatorButton.Height) { Sensitive = true }; hbox.PackStart(buttonMore, false, false, 0); hbox.PackStart(buttonFilter, false, false, 0); buttonMore.Clicked += _genericTreeViewSearch_ButtonMoreClicked; buttonFilter.Clicked += _genericTreeViewSearch_ButtonFilterClicked; } }
public DocumentFinanceDialogPage8(Window pSourceWindow, String pPageName, String pPageIcon, Widget pWidget, bool pEnabled = true) : base(pSourceWindow, pPageName, pPageIcon, pWidget, pEnabled) { //Init private vars _pagePad = (_sourceWindow as PosDocumentFinanceDialog).PagePad; _session = (_pagePad as DocumentFinanceDialogPagePad).Session; _crudWidgetList = new GenericCRUDWidgetListXPO(_session); //Get Target Object //Guid customerGuid = new Guid("0cf40622-578b-417d-b50f-e945fefb5d68");//Consumidor Final|0.0 Guid customerGuid = new Guid("765859cc-29c2-4925-be89-0486d03684f2");//Carlos Fernandes|5.0 //Guid customerGuid = new Guid("78c08879-6d08-4146-9cc9-914f427926c6");//Cristina Janeiro|12.5 _valueCustomer = (erp_customer)FrameworkUtils.GetXPGuidObject(_session, typeof(erp_customer), customerGuid); //Client (Used in _crudWidgetList) _entryBoxClient = new EntryBoxValidation(_sourceWindow, string.Format("{0}/WL", resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_customer")), KeyboardMode.Alfa, SettingsApp.RegexAlfaNumericExtended, true); _entryBoxClient.EntryValidation.Changed += delegate { Validate(); }; _entryBoxClientValidation = new EntryBoxValidation(_sourceWindow, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_customer"), KeyboardMode.Alfa, SettingsApp.RegexAlfaNumericExtended, true); _entryBoxClientValidation.EntryValidation.Changed += delegate { Validate(); }; //FiscalNumber _entryBoxFiscalNumber = new EntryBoxValidation(_sourceWindow, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_fiscal_number"), KeyboardMode.Alfa, _valueCustomer.Country.RegExFiscalNumber, true); _entryBoxFiscalNumber.EntryValidation.Changed += delegate { /*ValidateFiscalNumber();*/ Validate(); }; //Address _entryBoxAddress = new EntryBoxValidation(_sourceWindow, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_address"), KeyboardMode.Alfa, SettingsApp.RegexAlfaNumericExtended, false); //_entryBoxAddress.WidthRequest = _pagePad.EntryBoxMaxWidth; _entryBoxAddress.EntryValidation.Changed += delegate { Validate(); }; //Locality _entryBoxLocality = new EntryBoxValidation(_sourceWindow, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_locality"), KeyboardMode.Alfa, SettingsApp.RegexAlfa, false); //_entryBoxLocality.WidthRequest = _pagePad.EntryBoxMaxWidth; _entryBoxLocality.EntryValidation.Changed += delegate { Validate(); }; //ZipCode _entryBoxZipCode = new EntryBoxValidation(_sourceWindow, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_zipcode"), KeyboardMode.Alfa, _valueCustomer.Country.RegExZipCode, false); _entryBoxZipCode.WidthRequest = 200; _entryBoxZipCode.EntryValidation.Changed += delegate { Validate(); }; //City _entryBoxCity = new EntryBoxValidation(_sourceWindow, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_city"), KeyboardMode.Alfa, SettingsApp.RegexAlfa, false); //_entryBoxCity.WidthRequest = _pagePad.EntryBoxMaxWidth - 200; _entryBoxCity.EntryValidation.Changed += delegate { Validate(); }; //Country (Used in _crudWidgetList) CriteriaOperator criteriaOperator = CriteriaOperator.Parse("CurrencyCode = 'EUR'"); _entryBoxSelectCountry = new XPOEntryBoxSelectRecord <cfg_configurationcountry, TreeViewConfigurationCountry>(_sourceWindow, string.Format("{0}/WL", resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_country")), "Designation", "Oid", _valueCustomer.Country, criteriaOperator); //_entryBoxSelectCountry.WidthRequest = _pagePad.EntryBoxMaxWidth; _entryBoxSelectCountry.Entry.IsEditable = false; //CountryValidation _entryBoxSelectCountryValidation = new XPOEntryBoxSelectRecordValidation <cfg_configurationcountry, TreeViewConfigurationCountry>(_sourceWindow, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_country"), "Designation", "Oid", _valueCustomer.Country, criteriaOperator, SettingsApp.RegexGuid, true); //_entryBoxSelectCountryValidation.WidthRequest = _pagePad.EntryBoxMaxWidth; _entryBoxSelectCountryValidation.EntryValidation.IsEditable = false; //Test _selectedXPGuidObject :) //_entryBoxSelectCountryValidation.EntryValidation.Changed += delegate { // _log.Debug(string.Format("_entryBoxCountryValidation.Selected.Code3: [{0}]", _entryBoxSelectCountryValidation.Value.Code3)); //}; //Notes _entryBoxNotes = new EntryBoxValidation(_sourceWindow, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_notes"), KeyboardMode.Alfa, SettingsApp.RegexAlfaNumericExtended, false); //_entryBoxNotes.WidthRequest = _pagePad.EntryBoxMaxWidth; _entryBoxNotes.EntryValidation.Changed += delegate { Validate(); }; ////OPTIONAL: REQUIRE Assign Values TO Work On NON XpoWidget Mode ELSE Leave Blanck and XPOWidget Init Will fill Initial Values //_entryBoxClient.Entry.Text = xCustomer.Name; _entryBoxClientValidation.EntryValidation.Text = _valueCustomer.Name; ////Assign Value First //_entryBoxCountry.Value = xCustomer.Country; //_entryBoxCountry.Entry.Text = xCustomer.Country.Designation; ////Assign Value First //_entryBoxCountryValidation.Value = xCustomer.Country; //_entryBoxCountryValidation.EntryValidation.Text = xCustomer.Country.Designation; //Using Labels ;) GenericCRUDWidget <XPGuidObject> crudWidgetClientName = new GenericCRUDWidgetXPO(_entryBoxClient, _entryBoxClient.Label, _valueCustomer, "Name", SettingsApp.RegexAlfaNumericExtended, true); GenericCRUDWidget <XPGuidObject> crudWidgetClientCountry = new GenericCRUDWidgetXPO(_entryBoxSelectCountry, _entryBoxSelectCountry.Label, _valueCustomer, "Country", SettingsApp.RegexGuid, true); _crudWidgetList.Add(crudWidgetClientName); _crudWidgetList.Add(crudWidgetClientCountry); Button button = new Button("VALIDATE & UpdateRecord"); button.Clicked += delegate { if (_crudWidgetList.ValidateRecord()) { //Using WidgetList _crudWidgetList.UpdateRecord(DialogMode.Update); } }; //Pack VBOX VBox vbox = new VBox(false, 2); vbox.PackStart(_entryBoxClient, false, false, 0); vbox.PackStart(_entryBoxClientValidation, false, false, 0); vbox.PackStart(_entryBoxSelectCountry, false, false, 0); vbox.PackStart(_entryBoxSelectCountryValidation, false, false, 0); vbox.PackStart(button, true, true, 0); PackStart(vbox); }
public PosPaymentsDialog(Window pSourceWindow, DialogFlags pDialogFlags, ArticleBag pArticleBag, bool pEnablePartialPaymentButtons, bool pEnableCurrentAccountButton, bool pSkipPersistFinanceDocument, ProcessFinanceDocumentParameter pProcessFinanceDocumentParameter, string pSelectedPaymentMethodButtonName) : base(pSourceWindow, pDialogFlags, false) { try { //Init Local Vars _sourceWindow = pSourceWindow; string windowTitle = Resx.window_title_dialog_payments; //TODO:THEME Size windowSize = new Size(598, 620); string fileDefaultWindowIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_window_payments.png"); //Parameters _articleBagFullPayment = pArticleBag; _skipPersistFinanceDocument = pSkipPersistFinanceDocument; _processFinanceDocumentParameter = pProcessFinanceDocumentParameter; bool enablePartialPaymentButtons = pEnablePartialPaymentButtons; bool enableCurrentAccountButton = pEnableCurrentAccountButton; if (enablePartialPaymentButtons) { enablePartialPaymentButtons = (_articleBagFullPayment.TotalQuantity > 1) ? true : false; } //Files string fileIconClearCustomer = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\icon_pos_nav_delete.png"); string fileIconFullPayment = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\icon_pos_payment_full.png"); string fileIconPartialPayment = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\icon_pos_payment_partial.png"); //Colors Color colorPosPaymentsDialogTotalPannelBackground = FrameworkUtils.StringToColor(GlobalFramework.Settings["colorPosPaymentsDialogTotalPannelBackground"]); //Objects _intialValueConfigurationCountry = SettingsApp.ConfigurationSystemCountry; //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //Payment Buttons //Get Custom Select Data string executeSql = @"SELECT Oid, Token, ResourceString FROM fin_configurationpaymentmethod ORDER BY Ord;"; XPSelectData xPSelectData = FrameworkUtils.GetSelectedDataFromQuery(executeSql); //Get Required XpObjects from Selected Data FIN_ConfigurationPaymentMethod xpoMoney = (FIN_ConfigurationPaymentMethod)xPSelectData.GetXPGuidObjectFromField(typeof(FIN_ConfigurationPaymentMethod), "Token", "MONEY"); FIN_ConfigurationPaymentMethod xpoCheck = (FIN_ConfigurationPaymentMethod)xPSelectData.GetXPGuidObjectFromField(typeof(FIN_ConfigurationPaymentMethod), "Token", "BANK_CHECK"); FIN_ConfigurationPaymentMethod xpoMB = (FIN_ConfigurationPaymentMethod)xPSelectData.GetXPGuidObjectFromField(typeof(FIN_ConfigurationPaymentMethod), "Token", "CASH_MACHINE"); FIN_ConfigurationPaymentMethod xpoCreditCard = (FIN_ConfigurationPaymentMethod)xPSelectData.GetXPGuidObjectFromField(typeof(FIN_ConfigurationPaymentMethod), "Token", "CREDIT_CARD"); FIN_ConfigurationPaymentMethod xpoVisa = (FIN_ConfigurationPaymentMethod)xPSelectData.GetXPGuidObjectFromField(typeof(FIN_ConfigurationPaymentMethod), "Token", "VISA"); FIN_ConfigurationPaymentMethod xpoCurrentAccount = (FIN_ConfigurationPaymentMethod)xPSelectData.GetXPGuidObjectFromField(typeof(FIN_ConfigurationPaymentMethod), "Token", "CURRENT_ACCOUNT"); FIN_ConfigurationPaymentMethod xpoCustomerCard = (FIN_ConfigurationPaymentMethod)xPSelectData.GetXPGuidObjectFromField(typeof(FIN_ConfigurationPaymentMethod), "Token", "CUSTOMER_CARD"); //Instantiate Buttons TouchButtonIconWithText buttonMoney = new TouchButtonIconWithText("touchButtonMoney_Green", _colorBaseDialogDefaultButtonBackground, Resx.ResourceManager.GetString(xpoMoney.ResourceString), _fontBaseDialogButton, _colorBaseDialogDefaultButtonFont, FrameworkUtils.OSSlash(string.Format("{0}{1}", GlobalFramework.Path["images"], xpoMoney.ButtonIcon)), _sizeBaseDialogDefaultButtonIcon, _sizeBaseDialogDefaultButton.Width, _sizeBaseDialogDefaultButton.Height) { CurrentButtonOid = xpoMoney.Oid, Sensitive = (xpoMoney.Disabled) ? false : true }; TouchButtonIconWithText buttonCheck = new TouchButtonIconWithText("touchButtonCheck_Green", _colorBaseDialogDefaultButtonBackground, Resx.ResourceManager.GetString(xpoCheck.ResourceString), _fontBaseDialogButton, _colorBaseDialogDefaultButtonFont, FrameworkUtils.OSSlash(string.Format("{0}{1}", GlobalFramework.Path["images"], xpoCheck.ButtonIcon)), _sizeBaseDialogDefaultButtonIcon, _sizeBaseDialogDefaultButton.Width, _sizeBaseDialogDefaultButton.Height) { CurrentButtonOid = xpoCheck.Oid, Sensitive = (xpoCheck.Disabled) ? false : true }; TouchButtonIconWithText buttonMB = new TouchButtonIconWithText("touchButtonMB_Green", _colorBaseDialogDefaultButtonBackground, Resx.ResourceManager.GetString(xpoMB.ResourceString), _fontBaseDialogButton, _colorBaseDialogDefaultButtonFont, FrameworkUtils.OSSlash(string.Format("{0}{1}", GlobalFramework.Path["images"], xpoMB.ButtonIcon)), _sizeBaseDialogDefaultButtonIcon, _sizeBaseDialogDefaultButton.Width, _sizeBaseDialogDefaultButton.Height) { CurrentButtonOid = xpoMB.Oid, Sensitive = (xpoMB.Disabled) ? false : true }; TouchButtonIconWithText buttonCreditCard = new TouchButtonIconWithText("touchButtonCreditCard_Green", _colorBaseDialogDefaultButtonBackground, Resx.ResourceManager.GetString(xpoCreditCard.ResourceString), _fontBaseDialogButton, _colorBaseDialogDefaultButtonFont, FrameworkUtils.OSSlash(string.Format("{0}{1}", GlobalFramework.Path["images"], xpoCreditCard.ButtonIcon)), _sizeBaseDialogDefaultButtonIcon, _sizeBaseDialogDefaultButton.Width, _sizeBaseDialogDefaultButton.Height) { CurrentButtonOid = xpoCreditCard.Oid, Sensitive = (xpoCreditCard.Disabled) ? false : true }; TouchButtonIconWithText buttonVisa = new TouchButtonIconWithText("touchButtonVisa_Green", _colorBaseDialogDefaultButtonBackground, Resx.ResourceManager.GetString(xpoVisa.ResourceString), _fontBaseDialogButton, _colorBaseDialogDefaultButtonFont, FrameworkUtils.OSSlash(string.Format("{0}{1}", GlobalFramework.Path["images"], xpoVisa.ButtonIcon)), _sizeBaseDialogDefaultButtonIcon, _sizeBaseDialogDefaultButton.Width, _sizeBaseDialogDefaultButton.Height) { CurrentButtonOid = xpoVisa.Oid, Sensitive = (xpoVisa.Disabled) ? false : true }; TouchButtonIconWithText buttonCurrentAccount = new TouchButtonIconWithText("touchButtonCurrentAccount_Green", _colorBaseDialogDefaultButtonBackground, Resx.ResourceManager.GetString(xpoCurrentAccount.ResourceString), _fontBaseDialogButton, _colorBaseDialogDefaultButtonFont, FrameworkUtils.OSSlash(string.Format("{0}{1}", GlobalFramework.Path["images"], xpoCurrentAccount.ButtonIcon)), _sizeBaseDialogDefaultButtonIcon, _sizeBaseDialogDefaultButton.Width, _sizeBaseDialogDefaultButton.Height) { CurrentButtonOid = xpoCurrentAccount.Oid, Sensitive = (xpoCurrentAccount.Disabled) ? false : true }; TouchButtonIconWithText buttonCustomerCard = new TouchButtonIconWithText("touchButtonCustomerCard_Green", _colorBaseDialogDefaultButtonBackground, Resx.ResourceManager.GetString(xpoCustomerCard.ResourceString), _fontBaseDialogButton, _colorBaseDialogDefaultButtonFont, FrameworkUtils.OSSlash(string.Format("{0}{1}", GlobalFramework.Path["images"], xpoCustomerCard.ButtonIcon)), _sizeBaseDialogDefaultButtonIcon, _sizeBaseDialogDefaultButton.Width, _sizeBaseDialogDefaultButton.Height) { CurrentButtonOid = xpoCustomerCard.Oid, Sensitive = (xpoCustomerCard.Disabled) ? false : true }; //Secondary Buttons //Events buttonMoney.Clicked += buttonMoney_Clicked; buttonCheck.Clicked += buttonCheck_Clicked; buttonMB.Clicked += buttonMB_Clicked; buttonCreditCard.Clicked += buttonCredit_Clicked; buttonVisa.Clicked += buttonVisa_Clicked; buttonCurrentAccount.Clicked += buttonCurrentAccount_Clicked; buttonCustomerCard.Clicked += buttonCustomerCard_Clicked; //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //Table uint tablePaymentsPadding = 0; Table tablePayments = new Table(2, 3, true) { BorderWidth = 2 }; //Row 1 tablePayments.Attach(buttonMoney, 0, 1, 0, 1, AttachOptions.Fill, AttachOptions.Fill, tablePaymentsPadding, tablePaymentsPadding); tablePayments.Attach(buttonMB, 1, 2, 0, 1, AttachOptions.Fill, AttachOptions.Fill, tablePaymentsPadding, tablePaymentsPadding); tablePayments.Attach(buttonVisa, 2, 3, 0, 1, AttachOptions.Fill, AttachOptions.Fill, tablePaymentsPadding, tablePaymentsPadding); //Row 2 tablePayments.Attach(buttonCheck, 0, 1, 1, 2, AttachOptions.Fill, AttachOptions.Fill, tablePaymentsPadding, tablePaymentsPadding); tablePayments.Attach(buttonCreditCard, 1, 2, 1, 2, AttachOptions.Fill, AttachOptions.Fill, tablePaymentsPadding, tablePaymentsPadding); if (enableCurrentAccountButton) { tablePayments.Attach( (SettingsApp.PosPaymentsDialogUseCurrentAccount) ? buttonCurrentAccount : buttonCustomerCard , 2, 3, 1, 2, AttachOptions.Fill, AttachOptions.Fill, tablePaymentsPadding, tablePaymentsPadding ); } //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //Labels Label labelTotal = new Label(Resx.global_total_price_to_pay + ":"); Label labelDelivery = new Label(Resx.global_total_deliver + ":"); Label labelChange = new Label(Resx.global_total_change + ":"); _labelTotalValue = new Label(FrameworkUtils.DecimalToStringCurrency(_articleBagFullPayment.TotalFinal)) { //Total Width WidthRequest = 120 }; _labelDeliveryValue = new Label(FrameworkUtils.DecimalToStringCurrency(0)); _labelChangeValue = new Label(FrameworkUtils.DecimalToStringCurrency(0)); //Colors labelTotal.ModifyFg(StateType.Normal, Utils.ColorToGdkColor(Color.FromArgb(101, 137, 171))); labelDelivery.ModifyFg(StateType.Normal, Utils.ColorToGdkColor(Color.FromArgb(101, 137, 171))); labelChange.ModifyFg(StateType.Normal, Utils.ColorToGdkColor(Color.FromArgb(101, 137, 171))); _labelTotalValue.ModifyFg(StateType.Normal, Utils.ColorToGdkColor(Color.White)); _labelDeliveryValue.ModifyFg(StateType.Normal, Utils.ColorToGdkColor(Color.White)); _labelChangeValue.ModifyFg(StateType.Normal, Utils.ColorToGdkColor(Color.White)); //Alignments labelTotal.SetAlignment(0, 0.5F); labelDelivery.SetAlignment(0, 0.5F); labelChange.SetAlignment(0, 0.5F); _labelTotalValue.SetAlignment(1, 0.5F); _labelDeliveryValue.SetAlignment(1, 0.5F); _labelChangeValue.SetAlignment(1, 0.5F); //labels Font Pango.FontDescription fontDescription = Pango.FontDescription.FromString("Bold 10"); labelTotal.ModifyFont(fontDescription); labelDelivery.ModifyFont(fontDescription); labelChange.ModifyFont(fontDescription); Pango.FontDescription fontDescriptionValue = Pango.FontDescription.FromString("Bold 12"); _labelTotalValue.ModifyFont(fontDescriptionValue); _labelDeliveryValue.ModifyFont(fontDescriptionValue); _labelChangeValue.ModifyFont(fontDescriptionValue); //Table TotalPannel uint totalPannelPadding = 9; Table tableTotalPannel = new Table(3, 2, false); tableTotalPannel.HeightRequest = 132; //Row 1 tableTotalPannel.Attach(labelTotal, 0, 1, 0, 1, AttachOptions.Fill, AttachOptions.Fill, totalPannelPadding, totalPannelPadding); tableTotalPannel.Attach(_labelTotalValue, 1, 2, 0, 1, AttachOptions.Fill, AttachOptions.Fill, totalPannelPadding, totalPannelPadding); //Row 2 tableTotalPannel.Attach(labelDelivery, 0, 1, 1, 2, AttachOptions.Fill, AttachOptions.Fill, totalPannelPadding, totalPannelPadding); tableTotalPannel.Attach(_labelDeliveryValue, 1, 2, 1, 2, AttachOptions.Fill, AttachOptions.Fill, totalPannelPadding, totalPannelPadding); //Row 3 tableTotalPannel.Attach(labelChange, 0, 1, 2, 3, AttachOptions.Fill, AttachOptions.Fill, totalPannelPadding, totalPannelPadding); tableTotalPannel.Attach(_labelChangeValue, 1, 2, 2, 3, AttachOptions.Fill, AttachOptions.Fill, totalPannelPadding, totalPannelPadding); //TotalPannel EventBox eventboxTotalPannel = new EventBox(); eventboxTotalPannel.BorderWidth = 3; eventboxTotalPannel.ModifyBg(StateType.Normal, Utils.ColorToGdkColor(colorPosPaymentsDialogTotalPannelBackground)); eventboxTotalPannel.Add(tableTotalPannel); //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //Customer Name CriteriaOperator criteriaOperatorCustomerName = null; _entryBoxSelectCustomerName = new XPOEntryBoxSelectRecordValidation <ERP_Customer, TreeViewCustomer>(_sourceWindow, Resx.global_customer, "Name", "Name", null, criteriaOperatorCustomerName, KeyboardMode.Alfa, SettingsApp.RegexAlfaNumeric, false); _entryBoxSelectCustomerName.ClosePopup += delegate { GetCustomerDetails("Oid", _entryBoxSelectCustomerName.Value.Oid.ToString()); Validate(); }; _entryBoxSelectCustomerName.EntryValidation.Changed += _entryBoxSelectCustomerName_Changed; //Customer Discount _entryBoxCustomerDiscount = new EntryBoxValidation(_sourceWindow, Resx.global_discount, KeyboardMode.Alfa, SettingsApp.RegexPercentage, true); _entryBoxCustomerDiscount.EntryValidation.Text = FrameworkUtils.DecimalToString(0.0m); _entryBoxCustomerDiscount.EntryValidation.Sensitive = false; _entryBoxCustomerDiscount.EntryValidation.Changed += _entryBoxCustomerDiscount_Changed; _entryBoxCustomerDiscount.EntryValidation.FocusOutEvent += delegate { _entryBoxCustomerDiscount.EntryValidation.Text = FrameworkUtils.StringToDecimalAndToStringAgain(_entryBoxCustomerDiscount.EntryValidation.Text); }; //Address _entryBoxCustomerAddress = new EntryBoxValidation(this, Resx.global_address, KeyboardMode.Alfa, SettingsApp.RegexAlfaNumericExtended, false); _entryBoxCustomerAddress.EntryValidation.Changed += delegate { Validate(); }; //Locality _entryBoxCustomerLocality = new EntryBoxValidation(this, Resx.global_locality, KeyboardMode.Alfa, SettingsApp.RegexAlfa, false); _entryBoxCustomerLocality.EntryValidation.Changed += delegate { Validate(); }; //ZipCode _entryBoxCustomerZipCode = new EntryBoxValidation(this, Resx.global_zipcode, KeyboardMode.Alfa, SettingsApp.ConfigurationSystemCountry.RegExZipCode, false); _entryBoxCustomerZipCode.WidthRequest = 150; _entryBoxCustomerZipCode.EntryValidation.Changed += delegate { Validate(); }; //City _entryBoxCustomerCity = new EntryBoxValidation(this, Resx.global_city, KeyboardMode.Alfa, SettingsApp.RegexAlfa, false); _entryBoxCustomerCity.WidthRequest = 200; _entryBoxCustomerCity.EntryValidation.Changed += delegate { Validate(); }; //Country CriteriaOperator criteriaOperatorCustomerCountry = CriteriaOperator.Parse("(Disabled IS NULL OR Disabled <> 1) AND (RegExFiscalNumber IS NOT NULL AND RegExZipCode IS NOT NULL)"); _entryBoxSelectCustomerCountry = new XPOEntryBoxSelectRecordValidation <CFG_ConfigurationCountry, TreeViewConfigurationCountry>(pSourceWindow, Resx.global_country, "Designation", "Oid", _intialValueConfigurationCountry, criteriaOperatorCustomerCountry, SettingsApp.RegexGuid, true); _entryBoxSelectCustomerCountry.WidthRequest = 235; //Extra Protection to prevent Customer without Country if (_entryBoxSelectCustomerCountry.Value != null) { _entryBoxSelectCustomerCountry.EntryValidation.Validate(_entryBoxSelectCustomerCountry.Value.Oid.ToString()); } _entryBoxSelectCustomerCountry.EntryValidation.IsEditable = false; _entryBoxSelectCustomerCountry.ButtonSelectValue.Sensitive = false; _entryBoxSelectCustomerCountry.ClosePopup += delegate { _selectedCountry = _entryBoxSelectCustomerCountry.Value; //Require to Update RegEx and Criteria to filter Country Clients Only _entryBoxSelectCustomerFiscalNumber.EntryValidation.Rule = _entryBoxSelectCustomerCountry.Value.RegExFiscalNumber; _entryBoxCustomerZipCode.EntryValidation.Rule = _entryBoxSelectCustomerCountry.Value.RegExZipCode; //Clear Customer Fields, Except Country ClearCustomer(false); //Apply Criteria Operators ApplyCriteriaToCustomerInputs(); //Call Main Validate Validate(); }; //FiscalNumber CriteriaOperator criteriaOperatorFiscalNumber = null; _entryBoxSelectCustomerFiscalNumber = new XPOEntryBoxSelectRecordValidation <ERP_Customer, TreeViewCustomer>(_sourceWindow, Resx.global_fiscal_number, "FiscalNumber", "FiscalNumber", null, criteriaOperatorFiscalNumber, KeyboardMode.AlfaNumeric, _intialValueConfigurationCountry.RegExFiscalNumber, false); _entryBoxSelectCustomerFiscalNumber.EntryValidation.Changed += _entryBoxSelectCustomerFiscalNumber_Changed; //CardNumber CriteriaOperator criteriaOperatorCardNumber = null;//Now Criteria is assigned in ApplyCriteriaToCustomerInputs(); _entryBoxSelectCustomerCardNumber = new XPOEntryBoxSelectRecordValidation <ERP_Customer, TreeViewCustomer>(_sourceWindow, Resx.global_card_number, "CardNumber", "CardNumber", null, criteriaOperatorCardNumber, KeyboardMode.AlfaNumeric, SettingsApp.RegexAlfaNumericExtended, false); _entryBoxSelectCustomerCardNumber.ClosePopup += delegate { if (_entryBoxSelectCustomerCardNumber.EntryValidation.Validated) { GetCustomerDetails("CardNumber", _entryBoxSelectCustomerCardNumber.EntryValidation.Text); } Validate(); }; //Notes _entryBoxCustomerNotes = new EntryBoxValidation(this, Resx.global_notes, KeyboardMode.Alfa, SettingsApp.RegexAlfaNumericExtended, false); _entryBoxCustomerNotes.EntryValidation.Changed += delegate { Validate(); }; //Fill Dialog Inputs with Defaults FinalConsumerEntity Values if (_processFinanceDocumentParameter == null) { //If ProcessFinanceDocumentParameter is not null fill Dialog with value from ProcessFinanceDocumentParameter, implemented for SplitPayments GetCustomerDetails("Oid", SettingsApp.XpoOidDocumentFinanceMasterFinalConsumerEntity.ToString()); } //Fill Dialog Inputs with Stored Values, ex when we Work with SplitPayments else { //Apply Default Customer Entity GetCustomerDetails("Oid", _processFinanceDocumentParameter.Customer.ToString()); //Assign Totasl and Discounts Values _totalDelivery = _processFinanceDocumentParameter.TotalDelivery; _totalChange = _processFinanceDocumentParameter.TotalChange; _discountGlobal = _processFinanceDocumentParameter.ArticleBag.DiscountGlobal; // Update Visual Components _labelDeliveryValue.Text = FrameworkUtils.DecimalToStringCurrency(_totalDelivery); _labelChangeValue.Text = FrameworkUtils.DecimalToStringCurrency(_totalChange); // Selects _selectedCustomer = (ERP_Customer)FrameworkUtils.GetXPGuidObject(typeof(ERP_Customer), _processFinanceDocumentParameter.Customer); _selectedCountry = _selectedCustomer.Country; // PaymentMethod _selectedPaymentMethod = (FIN_ConfigurationPaymentMethod)FrameworkUtils.GetXPGuidObject(typeof(FIN_ConfigurationPaymentMethod), _processFinanceDocumentParameter.PaymentMethod); // Restore Selected Payment Method, require to associate button reference to selectedPaymentMethodButton if (!string.IsNullOrEmpty(pSelectedPaymentMethodButtonName)) { switch (pSelectedPaymentMethodButtonName) { case "touchButtonMoney_Green": _selectedPaymentMethodButton = buttonMoney; break; case "touchButtonCheck_Green": _selectedPaymentMethodButton = buttonCheck; break; case "touchButtonMB_Green": _selectedPaymentMethodButton = buttonMB; break; case "touchButtonCreditCard_Green": _selectedPaymentMethodButton = buttonCreditCard; break; case "touchButtonVisa_Green": _selectedPaymentMethodButton = buttonVisa; break; case "touchButtonCurrentAccount_Green": _selectedPaymentMethodButton = buttonCurrentAccount; break; case "touchButtonCustomerCard_Green": _selectedPaymentMethodButton = buttonCustomerCard; break; } //Assign Payment Method after have Reference AssignPaymentMethod(_selectedPaymentMethodButton); } //UpdateChangeValue, if we add/remove Splits we must recalculate ChangeValue UpdateChangeValue(); } //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //Pack Content HBox hboxPaymenstAndTotals = new HBox(false, 0); hboxPaymenstAndTotals.PackStart(tablePayments, true, true, 0); hboxPaymenstAndTotals.PackStart(eventboxTotalPannel, true, true, 0); HBox hboxCustomerNameAndCustomerDiscount = new HBox(true, 0); hboxCustomerNameAndCustomerDiscount.PackStart(_entryBoxSelectCustomerName, true, true, 0); hboxCustomerNameAndCustomerDiscount.PackStart(_entryBoxCustomerDiscount, true, true, 0); HBox hboxFiscalNumberAndCardNumber = new HBox(true, 0); hboxFiscalNumberAndCardNumber.PackStart(_entryBoxSelectCustomerFiscalNumber, true, true, 0); hboxFiscalNumberAndCardNumber.PackStart(_entryBoxSelectCustomerCardNumber, true, true, 0); HBox hboxZipCodeCityAndCountry = new HBox(false, 0); hboxZipCodeCityAndCountry.PackStart(_entryBoxCustomerZipCode, false, false, 0); hboxZipCodeCityAndCountry.PackStart(_entryBoxCustomerCity, false, false, 0); hboxZipCodeCityAndCountry.PackStart(_entryBoxSelectCustomerCountry, true, true, 0); VBox vboxContent = new VBox(false, 0); vboxContent.PackStart(hboxPaymenstAndTotals, true, true, 0); vboxContent.PackStart(hboxFiscalNumberAndCardNumber, true, true, 0); vboxContent.PackStart(hboxCustomerNameAndCustomerDiscount, true, true, 0); vboxContent.PackStart(_entryBoxCustomerAddress, true, true, 0); vboxContent.PackStart(_entryBoxCustomerLocality, true, true, 0); vboxContent.PackStart(hboxZipCodeCityAndCountry, true, true, 0); vboxContent.PackStart(_entryBoxCustomerNotes, true, true, 0); //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //ActionArea Buttons _buttonOk = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Ok); _buttonCancel = ActionAreaButton.FactoryGetDialogButtonType(PosBaseDialogButtonType.Cancel); _buttonClearCustomer = ActionAreaButton.FactoryGetDialogButtonType("touchButtonClearCustomer_DialogActionArea", Resx.global_button_label_payment_dialog_clear_client, fileIconClearCustomer); _buttonFullPayment = ActionAreaButton.FactoryGetDialogButtonType("touchButtonFullPayment_DialogActionArea", Resx.global_button_label_payment_dialog_full_payment, fileIconFullPayment); _buttonPartialPayment = ActionAreaButton.FactoryGetDialogButtonType("touchButtonPartialPayment_DialogActionArea", Resx.global_button_label_payment_dialog_partial_payment, fileIconPartialPayment); // Enable if has selectedPaymentMethod defined, ex when working with SplitPayments _buttonOk.Sensitive = (_selectedPaymentMethod != null); _buttonFullPayment.Sensitive = false; //ActionArea ActionAreaButtons actionAreaButtons = new ActionAreaButtons(); actionAreaButtons.Add(new ActionAreaButton(_buttonClearCustomer, _responseTypeClearCustomer)); if (enablePartialPaymentButtons) { actionAreaButtons.Add(new ActionAreaButton(_buttonFullPayment, _responseTypeFullPayment)); actionAreaButtons.Add(new ActionAreaButton(_buttonPartialPayment, _responseTypePartialPayment)); } actionAreaButtons.Add(new ActionAreaButton(_buttonOk, ResponseType.Ok)); actionAreaButtons.Add(new ActionAreaButton(_buttonCancel, ResponseType.Cancel)); //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //Init Object this.InitObject(this, pDialogFlags, fileDefaultWindowIcon, windowTitle, windowSize, vboxContent, actionAreaButtons); } catch (Exception ex) { _log.Error(ex.Message, ex); } }