/// <summary> /// Perform necessary initializations of Classes /// </summary> /// <returns>void</returns> private static void InitialiseClasses() { TClientInfo.InitializeUnit(); TCacheableTablesManager.InitializeUnit(); new TIconCache(); // Set up Delegates for forwarding of calls for security-related Exceptions ExceptionHandling.ProcessSecurityAccessDeniedException = TMessages.MsgSecurityException; TUnhandledThreadExceptionHandler.ProcessSecurityAccessDeniedException = TMessages.MsgSecurityException; // Set up Delegates for forwarding of calls to Screens in various Assemblies TCommonScreensForwarding.OpenPartnerFindScreen = @TPartnerFindScreenManager.OpenModalForm; TCommonScreensForwarding.OpenPartnerFindByBankDetailsScreen = @TPartnerFindScreenManager.OpenModalForm; TCommonScreensForwarding.OpenBankFindDialog = @TBankFindDialogManager.OpenModalForm; TCommonScreensForwarding.OpenConferenceFindScreen = @TConferenceFindScreenManager.OpenModalForm; TCommonScreensForwarding.OpenEventFindScreen = @TEventFindScreenManager.OpenModalForm; TCommonScreensForwarding.OpenExtractFindScreen = @TExtractFindScreenManager.OpenModalForm; TCommonScreensForwarding.OpenExtractMasterScreen = @TExtractMasterScreenManager.OpenForm; TCommonScreensForwarding.OpenDonorRecipientHistoryScreen = @TDonorRecipientHistoryScreenManager.OpenForm; TCommonScreensForwarding.OpenPartnerEditScreen = @TPartnerEditScreenManager.OpenForm; TCommonScreensForwarding.OpenExtractMasterScreenHidden = @TExtractMasterScreenManager.OpenFormHidden; TCommonScreensForwarding.OpenRangeFindScreen = @TPostcodeRangeSetupManager.OpenModalForm; TCommonScreensForwarding.OpenOccupationCodeFindScreen = @TOccupationCodeSetupManager.OpenModalForm; TCommonScreensForwarding.OpenGetMergeDataDialog = @TGetMergeDataManager.OpenModalForm; TCommonScreensForwarding.OpenPrintPartnerDialog = @TPrintPartnerModal.OpenModalForm; // Set up Delegate for the opening of Forms from the Main Menu Ict.Common.Controls.TLstTasks.OpenNewOrExistingForm = @Ict.Petra.Client.CommonForms.TFormsList.OpenNewOrExistingForm; // Set up Delegate for the retrieval of the list of Currencies from the Cache Ict.Common.Controls.TTxtCurrencyTextBox.RetrieveCurrencyList = @Ict.Petra.Client.CommonControls.TControlExtensions.RetrieveCurrencyList; // Set up Delegate for the set-up of various Colours of all SourceGrid DataGrid instances from UserDefaults Ict.Common.Controls.TSgrdDataGrid.SetColourInformation = @SetDataGridColoursFromUserDefaults; // Set up Delegate for the set-up of various Colours of all Filter and Find instances from UserDefaults Ict.Petra.Client.CommonControls.TUcoFilterAndFind.SetColourInformation = @SetFilterFindColoursFromUserDefaults; // Set up Data Validation Delegates TSharedValidationHelper.SharedGetDataDelegate = @TServerLookup.TMCommon.GetData; TSharedValidationControlHelper.SharedGetDateVerificationResultDelegate = @TtxtPetraDate.GetDateVerificationResult; TSharedPartnerValidationHelper.VerifyPartnerDelegate = @TServerLookup.TMPartner.VerifyPartner; TSharedFinanceValidationHelper.GetValidPostingDateRangeDelegate = @TServerLookup.TMFinance.GetCurrentPostingRangeDates; TSharedFinanceValidationHelper.GetValidPeriodDatesDelegate = @TServerLookup.TMFinance.GetCurrentPeriodDates; // Set up Delegates for retrieval of cacheable tables when called from Shared directories on client side TSharedDataCache.TMCommon.GetCacheableCommonTableDelegate = @TDataCache.TMCommon.GetCacheableCommonTable; TSharedDataCache.TMFinance.GetCacheableFinanceTableDelegate = @TDataCache.TMFinance.GetCacheableFinanceTable; TSharedDataCache.TMPartner.GetCacheablePartnerTableDelegate = @TDataCache.TMPartner.GetCacheablePartnerTable; TSharedDataCache.TMPartner.GetCacheableMailingTableDelegate = @TDataCache.TMPartner.GetCacheableMailingTable; TSharedDataCache.TMPartner.GetCacheableSubscriptionsTableDelegate = @TDataCache.TMPartner.GetCacheableSubscriptionsTable; TSharedDataCache.TMPersonnel.GetCacheablePersonnelTableDelegate = @TDataCache.TMPersonnel.GetCacheablePersonnelTable; TSharedDataCache.TMPersonnel.GetCacheableUnitsTableDelegate = @TDataCache.TMPersonnel.GetCacheableUnitsTable; TSharedDataCache.TMConference.GetCacheableConferenceTableDelegate = @TDataCache.TMConference.GetCacheableConferenceTable; TSharedDataCache.TMSysMan.GetCacheableSysManTableDelegate = @TDataCache.TMSysMan.GetCacheableSysManTable; // I18N: assign proper font which helps to read asian characters // this is the first place where it is called, and we need to initialize the TAppSettingsManager TAppSettingsManager.InitFontI18N(); TCommonControlsHelper.SetInactiveIdentifier += delegate { return(SharedConstants.INACTIVE_VALUE_WITH_QUALIFIERS); }; }
/// <summary> /// Perform necessary initializations of Classes /// </summary> /// <returns>void</returns> private static void InitialiseClasses() { TClientInfo.InitializeUnit(); TCacheableTablesManager.InitializeUnit(); new TIconCache(); // Set up Delegates for forwarding of calls for security-related Exceptions ExceptionHandling.ProcessSecurityAccessDeniedException = TMessages.MsgSecurityException; TUnhandledThreadExceptionHandler.ProcessSecurityAccessDeniedException = TMessages.MsgSecurityException; Ict.Common.Controls.TCommonControlsSecurity.SecurityAccessDeniedMessage = TMessages.MsgSecurityException; // Delegate for an extended message box TClientTaskInstance.ShowExtendedMessageBox = @TFrmExtendedMessageBoxManager.Create; // Set up Delegates for forwarding of calls to Screens in various Assemblies TCommonScreensForwarding.OpenPartnerFindScreen = @TPartnerFindScreenManager.OpenModalForm; TCommonScreensForwarding.OpenPartnerFindByBankDetailsScreen = @TPartnerFindScreenManager.OpenModalForm; TCommonScreensForwarding.OpenBankFindDialog = @TBankFindDialogManager.OpenModalForm; TCommonScreensForwarding.OpenConferenceFindScreen = @TConferenceFindScreenManager.OpenModalForm; TCommonScreensForwarding.OpenEventFindScreen = @TEventFindScreenManager.OpenModalForm; TCommonScreensForwarding.OpenExtractFindScreen = @TExtractFindScreenManager.OpenModalForm; TCommonScreensForwarding.OpenExtractMasterScreen = @TExtractMasterScreenManager.OpenForm; TCommonScreensForwarding.OpenDonorRecipientHistoryScreen = @TDonorRecipientHistoryScreenManager.OpenForm; TCommonScreensForwarding.OpenPartnerEditScreen = @TPartnerEditScreenManager.OpenForm; TCommonScreensForwarding.OpenExtractMasterScreenHidden = @TExtractMasterScreenManager.OpenFormHidden; TCommonScreensForwarding.OpenRangeFindScreen = @TPostcodeRangeSetupManager.OpenModalForm; TCommonScreensForwarding.OpenOccupationCodeFindScreen = @TOccupationCodeSetupManager.OpenModalForm; TCommonScreensForwarding.OpenGetMergeDataDialog = @TGetMergeDataManager.OpenModalForm; TCommonScreensForwarding.OpenPrintPartnerDialog = @TPrintPartnerModal.OpenModalForm; TCommonScreensForwarding.TaxDeductiblePctAdjust = @TFrmGiftTaxDeductiblePctAdjustment.TaxDeductiblePctAdjustment; TCommonScreensForwarding.OpenPrintUnitHierarchy = @TPrintUnitHierarchy.OpenModalForm; // Set up Delegate for the opening of Forms from the Main Menu Ict.Common.Controls.TLstTasks.OpenNewOrExistingForm = @Ict.Petra.Client.CommonForms.TFormsList.OpenNewOrExistingForm; // Set up Delegate for the retrieval of the list of Currencies from the Cache Ict.Common.Controls.TTxtCurrencyTextBox.RetrieveCurrencyList = @Ict.Petra.Client.CommonControls.TControlExtensions.RetrieveCurrencyList; // Set up Delegate for checking the real module access permissions (rather than the ones in the XML) Ict.Common.Controls.TCommonControlsSecurity.CheckUserModulePermissions = @Ict.Petra.Shared.Security.TSecurityChecks.CheckUserModulePermissions; // Set up Delegate for the retrieval of the user defaults Ict.Common.Controls.TTxtNumericTextBox.RetrieveUserDefaultBoolean = @Ict.Petra.Client.CommonControls.TControlExtensions.RetrieveUserDefaultBoolean; Ict.Common.TypeConverter.TCurrencyConverter.RetrieveUserDefaultBoolean = @Ict.Petra.Client.CommonControls.TControlExtensions.RetrieveUserDefaultBoolean; Ict.Common.TypeConverter.TDecimalConverter.RetrieveUserDefaultBoolean = @Ict.Petra.Client.CommonControls.TControlExtensions.RetrieveUserDefaultBoolean; Ict.Common.IO.TTextFileEncoding.RetrieveUserDefaultBoolean = @Ict.Petra.Client.CommonControls.TControlExtensions.RetrieveUserDefaultBoolean; // Set up Delegate for the set-up of various Colours of all SourceGrid DataGrid instances from UserDefaults Ict.Common.Controls.TSgrdDataGrid.SetColourInformation = @SetDataGridColoursFromUserDefaults; // Set up Delegate for the set-up of various Colours of all Filter and Find instances from UserDefaults Ict.Petra.Client.CommonControls.TUcoFilterAndFind.SetColourInformation = @SetFilterFindColoursFromUserDefaults; // Set up Data Validation Delegates TSharedValidationHelper.SharedGetDataDelegate = @TServerLookup.TMCommon.GetData; TSharedValidationControlHelper.SharedGetDateVerificationResultDelegate = @TtxtPetraDate.GetDateVerificationResult; TSharedPartnerValidationHelper.VerifyPartnerDelegate = @TServerLookup.TMPartner.VerifyPartner; TSharedPartnerValidationHelper.PartnerHasActiveStatusDelegate = @TServerLookup.TMPartner.PartnerHasActiveStatus; TSharedPartnerValidationHelper.PartnerIsLinkedToCCDelegate = @TServerLookup.TMPartner.PartnerIsLinkedToCC; TSharedPartnerValidationHelper.PartnerOfTypeCCIsLinkedDelegate = @TServerLookup.TMPartner.PartnerOfTypeCCIsLinked; TSharedPartnerValidationHelper.PartnerHasCurrentGiftDestinationDelegate = @TServerLookup.TMPartner.PartnerHasCurrentGiftDestination; TSharedFinanceValidationHelper.GetValidPostingDateRangeDelegate = @TServerLookup.TMFinance.GetCurrentPostingRangeDates; TSharedFinanceValidationHelper.GetValidPeriodDatesDelegate = @TServerLookup.TMFinance.GetCurrentPeriodDates; // Set up Delegates for retrieval of cacheable tables when called from Shared directories on client side TSharedDataCache.TMCommon.GetCacheableCommonTableDelegate = @TDataCache.TMCommon.GetCacheableCommonTable; TSharedDataCache.TMFinance.GetCacheableFinanceTableDelegate = @TDataCache.TMFinance.GetCacheableFinanceTable; TSharedDataCache.TMPartner.GetCacheablePartnerTableDelegate = @TDataCache.TMPartner.GetCacheablePartnerTable; TSharedDataCache.TMPartner.GetCacheableMailingTableDelegate = @TDataCache.TMPartner.GetCacheableMailingTable; TSharedDataCache.TMPartner.GetCacheableSubscriptionsTableDelegate = @TDataCache.TMPartner.GetCacheableSubscriptionsTable; TSharedDataCache.TMPartner.GetPartnerCalculationsSystemCategoryAttributeTypesDelegate = @Ict.Petra.Shared.MPartner.Calculations.DetermineSystemCategoryAttributeTypes; TSharedDataCache.TMPartner.GetPartnerCalculationsPartnerContactDetailAttributeTypesDelegate = @Ict.Petra.Shared.MPartner.Calculations.DeterminePartnerContactDetailAttributeTypes; TSharedDataCache.TMPartner.GetPartnerCalculationsEmailPartnerAttributeTypesDelegate = @Ict.Petra.Shared.MPartner.Calculations.DetermineEmailPartnerAttributeTypes; TSharedDataCache.TMPartner.GetPartnerCalculationsPhonePartnerAttributeTypesDelegate = @Ict.Petra.Shared.MPartner.Calculations.DeterminePhonePartnerAttributeTypes; TSharedDataCache.TMPersonnel.GetCacheablePersonnelTableDelegate = @TDataCache.TMPersonnel.GetCacheablePersonnelTable; TSharedDataCache.TMPersonnel.GetCacheableUnitsTableDelegate = @TDataCache.TMPersonnel.GetCacheableUnitsTable; TSharedDataCache.TMConference.GetCacheableConferenceTableDelegate = @TDataCache.TMConference.GetCacheableConferenceTable; TSharedDataCache.TMSysMan.GetCacheableSysManTableDelegate = @TDataCache.TMSysMan.GetCacheableSysManTable; // I18N: assign proper font which helps to read asian characters // this is the first place where it is called, and we need to initialize the TAppSettingsManager TAppSettingsManager.InitFontI18N(); TCommonControlsHelper.SetInactiveIdentifier += delegate { return(SharedConstants.INACTIVE_VALUE_WITH_QUALIFIERS); }; TSmtpSender.GetSmtpSettings = @TServerLookup.TMSysMan.GetServerSmtpSettings; }