/// <summary> /// This adds a setting to the top of the list of recently used settings. /// /// </summary> /// <param name="ASettingsName">the name of the setting, which should be most recent</param> /// <returns>the list of names of recently used settings, which exist at the moment /// </returns> public StringCollection UpdateRecentlyUsedSettings(String ASettingsName) { StringCollection RecentlyUsedSettings; RecentlyUsedSettings = GetRecentlyUsedSettings(); // is the setting already the most recent one? then exit if (RecentlyUsedSettings.IndexOf(ASettingsName) == 0) { return(RecentlyUsedSettings); } // remove the current setting if it is already there if (RecentlyUsedSettings.Contains(ASettingsName)) { RecentlyUsedSettings.Remove(ASettingsName); } // add the current setting at the front RecentlyUsedSettings.Insert(0, ASettingsName); // if too many settings, then remove the last one if (RecentlyUsedSettings.Count > MAX_NUMBER_OF_RECENT_SETTINGS) { RecentlyUsedSettings.RemoveAt(RecentlyUsedSettings.Count - 1); } TUserDefaults.SetDefault("RptStg" + FReportName, StringHelper.StrMerge(RecentlyUsedSettings, ',')); return(RecentlyUsedSettings); }
public static bool SetLanguageAndCulture(string ALanguageCode, string ACultureCode) { TUserDefaults.SetDefault(MSysManConstants.USERDEFAULT_UILANGUAGE, ALanguageCode, true); TUserDefaults.SetDefault(MSysManConstants.USERDEFAULT_UICULTURE, ACultureCode, true); return(true); }
private void SetTaskTileSize(int ATaskTileSize) { if (ATaskTileSize == 1) { dsbContent.MaxTaskWidth = 340; mniViewTaskSizeLarge.Checked = true; mniViewTaskSizeMedium.Checked = false; mniViewTaskSizeSmall.Checked = false; } else if (ATaskTileSize == 2) { dsbContent.MaxTaskWidth = 280; mniViewTaskSizeMedium.Checked = true; mniViewTaskSizeLarge.Checked = false; mniViewTaskSizeSmall.Checked = false; } else { dsbContent.MaxTaskWidth = 210; mniViewTaskSizeSmall.Checked = true; mniViewTaskSizeLarge.Checked = false; mniViewTaskSizeMedium.Checked = false; } TUserDefaults.SetDefault(TUserDefaults.MAINMENU_VIEWOPTIONS_TILESIZE, ATaskTileSize); }
/// <summary> /// Shows a message that the user will need to have different Module permissions for the editing of data /// in *this* screen. Call this Method if the screen is read-only and the user has admin rights for the /// Module in which the screen is listed in the Main Menu. /// The user can choose to not get that message shown again (handled inside this called Method) - this /// choice is stored in a UserDefault. /// </summary> /// <param name="AParentForm">Reference to the calling Form.</param> /// <param name="AShownOnMenuForConvenience">The Module in which the screen is listed in the /// Main Menu.</param> /// <param name="AModuleThatDataIsAssociatedWith">Module that the data that this Form allows to edit /// is associated with.</param> /// <param name="AAdminModulePermission">The Module Permission required for editing data in the screen /// that differs from the Module Permission that is required for editing data of Setup screens in the /// respective Module.</param> /// <param name="AUserDefaultNameForNotShowingTheMessageBoxAgain">Name of the UserDefault. /// Gets prefixed with <see cref="TUserDefaults.NamedDefaults.SUPPRESS_MESSAGE_PREFIX"/>!</param> public static void MsgUserWillNeedToHaveDifferentAdminModulePermissionForEditing(Form AParentForm, string AShownOnMenuForConvenience, string AModuleThatDataIsAssociatedWith, string AAdminModulePermission, string AUserDefaultNameForNotShowingTheMessageBoxAgain) { TFrmExtendedMessageBox ExtendedMessageBox = new TFrmExtendedMessageBox(AParentForm); bool DoNotShowMessageBoxAgain; string FinalUserDefaultName = TUserDefaults.NamedDefaults.SUPPRESS_MESSAGE_PREFIX + AUserDefaultNameForNotShowingTheMessageBoxAgain; if (!TUserDefaults.GetBooleanDefault(FinalUserDefaultName, false)) { ExtendedMessageBox.ShowDialog( String.Format(MCommonResourcestrings.StrDiffentPermissionRequiredForEditingData, AAdminModulePermission) + Environment.NewLine + String.Format( MCommonResourcestrings.StrDiffentPermissionRequiredForEditingDataMenuHint, AShownOnMenuForConvenience, AModuleThatDataIsAssociatedWith), MCommonResourcestrings.StrReadOnlyInformationTitle, MCommonResourcestrings.StrDontShowThisMessageAgain, TFrmExtendedMessageBox.TButtons.embbOK, TFrmExtendedMessageBox.TIcon.embiInformation); // We don't care about the return value because there is only an 'OK' Button shown... ExtendedMessageBox.GetResult(out DoNotShowMessageBoxAgain); if (DoNotShowMessageBoxAgain) { TUserDefaults.SetDefault(FinalUserDefaultName, DoNotShowMessageBoxAgain); } } }
private void SaveGUISettings() { string options = string.Format("{0};{1};{2};{3};{4};{5};{6};{7};{8};{9};{10}", rbtFromFile.Checked ? 1 : 0, (int)nudPartnerKeyColumn.Value, (int)nudTaxCodeColumn.Value, chkFirstRowIsHeader.Checked ? 1 : 0, rbtSkipEmptyTaxCode.Checked ? 1 : rbtDeleteEmptyTaxCode.Checked ? 2 : 0, chkFailIfNotPerson.Checked ? 1 : 0, chkFailInvalidPartner.Checked ? 1 : 0, chkOverwriteExistingTaxCode.Checked ? 1 : 0, chkCreateExtract.Checked ? 1 : 0, chkCreateOutFile.Checked ? 1 : 0, chkIncludePartnerDetails.Checked ? 1 : 0); TUserDefaults.SetDefault(PARTNER_IMPORT_TAX_CODE_OPTIONS, options); if (txtFileName.Text.Length > 0) { TUserDefaults.SetDefault(PARTNER_IMPORT_TAX_CODE_INFILE, txtFileName.Text); } if (txtOutputFileName.Text.Length > 0) { TUserDefaults.SetDefault(PARTNER_IMPORT_TAX_CODE_OUTFILE, txtOutputFileName.Text); } }
/// <summary> /// If the Email preferences are not already in UserDefaults, this loads them. /// </summary> public static void LoadEmailDefaults() { if (!TUserDefaults.HasDefault("SmtpFromAccount") || (TUserDefaults.GetStringDefault("SmtpFromAccount") == "")) { TUserDefaults.SetDefault("SmtpFromAccount", TAppSettingsManager.GetValue("SmtpFromAccount", "")); } if (!TUserDefaults.HasDefault("SmtpDisplayName") || (TUserDefaults.GetStringDefault("SmtpDisplayName") == "")) { TUserDefaults.SetDefault("SmtpDisplayName", TAppSettingsManager.GetValue("SmtpDisplayName", "")); } if (!TUserDefaults.HasDefault("SmtpReplyTo")) { TUserDefaults.SetDefault("SmtpReplyTo", TAppSettingsManager.GetValue("SmtpReplyTo", "")); } if (!TUserDefaults.HasDefault("SmtpCcTo")) { TUserDefaults.SetDefault("SmtpCcTo", TAppSettingsManager.GetValue("SmtpCcTo", "")); } if (!TUserDefaults.HasDefault("SmtpEmailBody")) { TUserDefaults.SetDefault("SmtpEmailBody", TAppSettingsManager.GetValue("SmtpEmailBody", "")); } if (!TUserDefaults.HasDefault("SmtpSendAsAttachment")) { TUserDefaults.SetDefault("SmtpSendAsAttachment", TAppSettingsManager.GetValue("SmtpSendAsAttachment", "")); } }
private void TFrmMaintainUsers_FormClosing(object sender, FormClosingEventArgs e) { // When the form is closing we remember the current state of the 'Retired Users' filter CheckBox chk = (CheckBox)FFilterAndFindObject.FilterPanelControls.FindControlByName("chkRetired"); TUserDefaults.SetDefault("MaintainUsers_InitialFilter", ((int)chk.CheckState).ToString()); }
private void SetTasksSingleClickExecution(bool ASingleClick) { dsbContent.SingleClickExecution = ASingleClick; mniViewTasksSingleClickExecution.Checked = ASingleClick; TUserDefaults.SetDefault(TUserDefaults.MAINMENU_VIEWOPTIONS_SINGLECLICKEXECUTION, ASingleClick); }
/// <summary> /// todoComment /// </summary> /// <param name="ATipIndex"></param> /// <param name="ATipsUserDefault"></param> /// <param name="ATipsUserDefaultValue"></param> /// <param name="ASetStatus"></param> public static void SetTipStatus(Int16 ATipIndex, String ATipsUserDefault, String ATipsUserDefaultValue, Char ASetStatus) { // MessageBox.Show('TUserTips.SetTipStatus for Index ' + // EnumValue.ToString + ' to ''' + Convert.ToString(ASetStatus) + ''''); SetTipValueInternal(ATipIndex, ref ATipsUserDefaultValue, ASetStatus); // MessageBox.Show('UserDefault has changed updating.'); TUserDefaults.SetDefault(ATipsUserDefault, ATipsUserDefaultValue); }
private static void SaveOptions(TDlgSelectCSVSeparator ASeparatorDialog) { string impOptions = ASeparatorDialog.SelectedSeparator; impOptions += ASeparatorDialog.NumberFormat; TUserDefaults.SetDefault("Imp Options", impOptions); TUserDefaults.SetDefault("Imp Date", ASeparatorDialog.DateFormat); TUserDefaults.SaveChangedUserDefaults(); }
/// <summary> /// Gets the data from all UserControls on this TabControl. /// </summary> /// <returns>void</returns> public void GetDataFromControls() { TUserDefaults.SetDefault("SmtpFromAccount", txtSenderAddress.Text); TUserDefaults.SetDefault("SmtpDisplayName", txtDisplayName.Text); TUserDefaults.SetDefault("SmtpReplyTo", txtReplyTo.Text); TUserDefaults.SetDefault("SmtpCcTo", txtCopyMessagesTo.Text); TUserDefaults.SetDefault("SmtpEmailBody", txtEmailBody.Text); TUserDefaults.SetDefault("SmtpSendAsAttachment", chkReportsAsAttachment.Checked); }
private void ViewTasksAsList(object sender, EventArgs e) { dsbContent.TaskAppearance = TaskAppearance.staListEntry; mniViewTasksList.Checked = true; mniViewTasksTiles.Checked = false; TUserDefaults.SetDefault(TUserDefaults.MAINMENU_VIEWOPTIONS_VIEWTASKS, VIEWTASKS_LIST); }
private void mniNewDonorWarning_Click(Object sender, EventArgs e) { // toggle menu tick mniNewDonorWarning.Checked = !mniNewDonorWarning.Checked; FNewDonorWarning = mniNewDonorWarning.Checked; // change user default TUserDefaults.SetDefault(TUserDefaults.FINANCE_NEW_DONOR_WARNING, FNewDonorWarning); }
private void SaveUserDefaults() { String expOptions = ConvertDelimiter((String)cmbDelimiter.SelectedItem, false); expOptions += ConvertNumberFormat(cmbNumberFormat); TUserDefaults.SetDefault("Exp Options", expOptions); TUserDefaults.SetDefault("Exp Filename", txtFilename.Text); TUserDefaults.SetDefault("Exp Date", (String)cmbDateFormat.SelectedItem); TUserDefaults.SaveChangedUserDefaults(); }
/// <summary> /// /// </summary> /// <param name="AExchangeRateDT">The corporate or daily exchange rate table</param> /// <param name="AImportMode">Determines whether corporate or daily exchange rates specified - either 'Daily' or 'Corporate'</param> /// <param name="AResultCollection">A validation collection to which errors will be added</param> /// <returns>The number of rows that were actually imported. Rows that duplicate existing rows do not count. /// This is usually because this is an attempt to import again after a failed previous attempt.</returns> public static int ImportCurrencyExRates(TTypedDataTable AExchangeRateDT, string AImportMode, TVerificationResultCollection AResultCollection) { OpenFileDialog DialogBox = new OpenFileDialog(); DialogBox.Title = Catalog.GetString("Import exchange rates from spreadsheet file"); DialogBox.Filter = Catalog.GetString("Spreadsheet files (*.csv)|*.csv"); if (DialogBox.ShowDialog() == DialogResult.OK) { String dateFormatString = TUserDefaults.GetStringDefault("Imp Date", "MDY"); String impOptions = TUserDefaults.GetStringDefault("Imp Options", ";" + TDlgSelectCSVSeparator.NUMBERFORMAT_AMERICAN); TDlgSelectCSVSeparator DlgSeparator = new TDlgSelectCSVSeparator(false); Boolean fileCanOpen = DlgSeparator.OpenCsvFile(DialogBox.FileName); if (!fileCanOpen) { MessageBox.Show(Catalog.GetString("Unable to open file."), Catalog.GetString("Import Exchange Rates"), MessageBoxButtons.OK, MessageBoxIcon.Stop); return(0); } DlgSeparator.DateFormat = dateFormatString; if (impOptions.Length > 1) { DlgSeparator.NumberFormat = impOptions.Substring(1); } DlgSeparator.SelectedSeparator = impOptions.Substring(0, 1); if (DlgSeparator.ShowDialog() == DialogResult.OK) { // Save the settings that we specified impOptions = DlgSeparator.SelectedSeparator; impOptions += DlgSeparator.NumberFormat; TUserDefaults.SetDefault("Imp Options", impOptions); TUserDefaults.SetDefault("Imp Date", DlgSeparator.DateFormat); TUserDefaults.SaveChangedUserDefaults(); // Do the import and retuen the number of rows imported and any messages return(ImportCurrencyExRatesFromCSV(AExchangeRateDT, DialogBox.FileName, DlgSeparator.SelectedSeparator, DlgSeparator.NumberFormat, DlgSeparator.DateFormat, AImportMode, AResultCollection)); } } return(0); }
public static bool SetLanguageAndCulture(string ALanguageCode, string ACultureCode) { TLanguageCulture.SetLanguageAndCulture(ALanguageCode, ACultureCode); TUserDefaults.SetDefault(MSysManConstants.USERDEFAULT_UILANGUAGE, ALanguageCode, false); TUserDefaults.SetDefault(MSysManConstants.USERDEFAULT_UICULTURE, ACultureCode, false); TUserDefaults.SaveUserDefaultsFromServerSide(); return(true); }
private void TFindOptionsForm_Closing(System.Object sender, System.ComponentModel.CancelEventArgs e) { if (FSaveChangedOptions == true) { TUserDefaults.SetDefault(TUserDefaults.PARTNER_FINDOPTIONS_CRITERIAFIELDSLEFT, MakeCriteriaListString(FCriteriaFieldsLeft)); TUserDefaults.SetDefault(TUserDefaults.PARTNER_FINDOPTIONS_CRITERIAFIELDSRIGHT, MakeCriteriaListString(FCriteriaFieldsRight)); TUserDefaults.SetDefault(TUserDefaults.PARTNER_FINDOPTIONS_EXACTPARTNERKEYMATCHSEARCH, chkExactPartnerKeyMatchSearch.Checked); TUserDefaults.SetDefault(TUserDefaults.PARTNER_FINDOPTIONS_SHOWMATCHBUTTONS, chkShowMatchButtons.Checked); } }
/// <summary> /// Saves any changed preferences to s_user_defaults /// </summary> /// <returns>void</returns> public bool SaveGiftTab() { //New Donor alert if (FNewDonorAlert != chkNewDonorAlert.Checked) { FNewDonorAlert = chkNewDonorAlert.Checked; TUserDefaults.SetDefault(TUserDefaults.FINANCE_GIFT_NEW_DONOR_ALERT, FNewDonorAlert); } //Donor zero is valid if (FDonorZeroIsValid != chkDonorZeroIsValid.Checked) { FDonorZeroIsValid = chkDonorZeroIsValid.Checked; TUserDefaults.SetDefault(TUserDefaults.FINANCE_GIFT_DONOR_ZERO_IS_VALID, FDonorZeroIsValid); } //Auto-copying fields if (FAutoCopyIncludeMailingCode != chkAutoCopyIncludeMailingCode.Checked) { FAutoCopyIncludeMailingCode = chkAutoCopyIncludeMailingCode.Checked; TUserDefaults.SetDefault(TUserDefaults.FINANCE_GIFT_AUTO_COPY_INCLUDE_MAILING_CODE, FAutoCopyIncludeMailingCode); } if (FAutoCopyIncludeComments != chkAutoCopyIncludeComments.Checked) { FAutoCopyIncludeComments = chkAutoCopyIncludeComments.Checked; TUserDefaults.SetDefault(TUserDefaults.FINANCE_GIFT_AUTO_COPY_INCLUDE_COMMENTS, FAutoCopyIncludeComments); } //Recipient zero is valid if (FRecipientZeroIsValid != chkRecipientZeroIsValid.Checked) { FRecipientZeroIsValid = chkRecipientZeroIsValid.Checked; TUserDefaults.SetDefault(TUserDefaults.FINANCE_GIFT_RECIPIENT_ZERO_IS_VALID, FRecipientZeroIsValid); } //Allow auto-saving of form if (FAutoSave != chkAutoSave.Checked) { FAutoSave = chkAutoSave.Checked; TUserDefaults.SetDefault(TUserDefaults.FINANCE_GIFT_AUTO_SAVE, FAutoSave); } //Warn of inactive values on posting if (FWarnOfInactiveValuesOnPosting != chkWarnOfInactiveValuesOnPosting.Checked) { FWarnOfInactiveValuesOnPosting = chkWarnOfInactiveValuesOnPosting.Checked; TUserDefaults.SetDefault(TUserDefaults.FINANCE_GIFT_WARN_OF_INACTIVE_VALUES_ON_POSTING, FWarnOfInactiveValuesOnPosting); } return(false); }
private void SaveUserDefaults(OpenFileDialog dialog, String impOptions) { if (dialog != null) { TUserDefaults.SetDefault("Imp Filename", dialog.FileName); } impOptions = FdlgSeparator.SelectedSeparator; impOptions += FdlgSeparator.NumberFormat; TUserDefaults.SetDefault("Imp Options", impOptions); TUserDefaults.SetDefault("Imp Date", FdlgSeparator.DateFormat); TUserDefaults.SaveChangedUserDefaults(); }
/// <summary> /// Gets the data from all UserControls on this TabControl. /// </summary> /// <returns>void</returns> public void GetDataFromControls() { TUserDefaults.SetDefault("SmtpHost", txtServerName.Text); TUserDefaults.SetDefault("SmtpPort", Convert.ToInt16(txtPort.Text)); TUserDefaults.SetDefault("SmtpUseSsl", chkUseSsl.Checked); TUserDefaults.SetDefault("SmtpUser", txtAccountName.Text); TUserDefaults.SetDefault("SmtpPassword", txtAccountPswd.Text); TUserDefaults.SetDefault("SmtpFromAccount", txtSenderAddress.Text); TUserDefaults.SetDefault("SmtpDisplayName", txtDisplayName.Text); TUserDefaults.SetDefault("SmtpReplyTo", txtReplyTo.Text); TUserDefaults.SetDefault("SmtpCcTo", txtCopyMessagesTo.Text); TUserDefaults.SetDefault("SmtpEmailBody", txtEmailBody.Text); TUserDefaults.SetDefault("SmtpSendAsAttachment", chkReportsAsAttachment.Checked); }
/// <summary> /// add new value of combobox to the user defaults, or move existing value to the front; /// limits the number of values to MAX_COMBOBOX_HISTORY /// </summary> /// <param name="Sender"></param> /// <param name="e"></param> public void AddComboBoxHistory(System.Object Sender, TAcceptNewEntryEventArgs e) { string keyName = "CmbHistory" + ((Control)Sender).Name; StringCollection values = StringHelper.StrSplit(TUserDefaults.GetStringDefault(keyName, ""), ","); values.Remove(e.ItemString); values.Insert(0, e.ItemString); while (values.Count > MAX_COMBOBOX_HISTORY) { values.RemoveAt(values.Count - 1); } TUserDefaults.SetDefault(keyName, StringHelper.StrMerge(values, ',')); }
private void SaveUserDefaults() { TUserDefaults.SetDefault("Imp Filename", txtFilename.Text); String expOptions = (rbtDetail.Checked) ? "D" : "S"; expOptions += (rbtOriginalTransactionCurrency.Checked) ? "Trans" : "Base"; TUserDefaults.SetDefault("Exp Options", expOptions); String impOptions = ConvertDelimiter((String)cmbDelimiter.SelectedItem, false); impOptions += ConvertNumberFormat(cmbNumberFormat); TUserDefaults.SetDefault("Imp Options", impOptions); TUserDefaults.SetDefault("Imp Date", (String)cmbDateFormat.SelectedItem); TUserDefaults.SaveChangedUserDefaults(); }
/// <summary> /// Saves any changed preferences to s_user_defaults /// </summary> /// <returns>void</returns> public bool SaveFinanceTab() { int NewLedger = cmbDefaultLedger.GetSelectedInt32(); if (FCurrentLedger != NewLedger) { TUserDefaults.SetDefault(TUserDefaults.FINANCE_DEFAULT_LEDGERNUMBER, NewLedger); // change the current ledger in the main window Form MainWindow = FPetraUtilsObject.GetCallerForm(); PropertyInfo CurrentLedgerProperty = MainWindow.GetType().GetProperty("CurrentLedger"); CurrentLedgerProperty.SetValue(MainWindow, NewLedger, null); return(true); } if (FNewDonorWarning != chkNewDonorWarning.Checked) { FNewDonorWarning = chkNewDonorWarning.Checked; TUserDefaults.SetDefault(TUserDefaults.FINANCE_NEW_DONOR_WARNING, FNewDonorWarning); } if (FAutoSave != chkAutoSave.Checked) { FAutoSave = chkAutoSave.Checked; TUserDefaults.SetDefault(TUserDefaults.FINANCE_AUTO_SAVE_GIFT_SCREEN, FAutoSave); } if (FShowMoneyAsCurrency != chkMoneyFormat.Checked) { FShowMoneyAsCurrency = chkMoneyFormat.Checked; TUserDefaults.SetDefault(StringHelper.FINANCE_CURRENCY_FORMAT_AS_CURRENCY, FShowMoneyAsCurrency); } if (FShowDecimalsAsCurrency != chkDecimalFormat.Checked) { FShowDecimalsAsCurrency = chkDecimalFormat.Checked; TUserDefaults.SetDefault(StringHelper.FINANCE_DECIMAL_FORMAT_AS_CURRENCY, FShowDecimalsAsCurrency); } if (FShowThousands != chkShowThousands.Checked) { FShowThousands = chkShowThousands.Checked; TUserDefaults.SetDefault(StringHelper.FINANCE_CURRENCY_SHOW_THOUSANDS, FShowThousands); } return(false); }
/// <summary> /// Saves any changed preferences to s_user_defaults /// </summary> /// <returns>void</returns> public bool SaveFinanceTab() { int NewLedger = cmbDefaultLedger.GetSelectedInt32(); if (FInitiallySelectedLedger != NewLedger) { TUserDefaults.SetDefault(TUserDefaults.FINANCE_DEFAULT_LEDGERNUMBER, NewLedger); // change the current ledger in the main window Form MainWindow = FPetraUtilsObject.GetCallerForm(); PropertyInfo CurrentLedgerProperty = MainWindow.GetType().GetProperty("CurrentLedger"); CurrentLedgerProperty.SetValue(MainWindow, NewLedger, null); return(true); } if (FInactiveValuesWarningOnGLPosting != chkInactiveValuesWarningOnGLPosting.Checked) { FInactiveValuesWarningOnGLPosting = chkInactiveValuesWarningOnGLPosting.Checked; TUserDefaults.SetDefault(TUserDefaults.FINANCE_GL_WARN_OF_INACTIVE_VALUES_ON_POSTING, FInactiveValuesWarningOnGLPosting); } if (FShowMoneyAsCurrency != chkMoneyFormat.Checked) { FShowMoneyAsCurrency = chkMoneyFormat.Checked; TUserDefaults.SetDefault(StringHelper.FINANCE_CURRENCY_FORMAT_AS_CURRENCY, FShowMoneyAsCurrency); } if (FShowDecimalsAsCurrency != chkDecimalFormat.Checked) { FShowDecimalsAsCurrency = chkDecimalFormat.Checked; TUserDefaults.SetDefault(StringHelper.FINANCE_DECIMAL_FORMAT_AS_CURRENCY, FShowDecimalsAsCurrency); } if (FShowThousands != chkShowThousands.Checked) { FShowThousands = chkShowThousands.Checked; TUserDefaults.SetDefault(StringHelper.FINANCE_CURRENCY_SHOW_THOUSANDS, FShowThousands); } if (FDatesMayLookLikeIntegers != chkDatesMayBeIntegers.Checked) { FDatesMayLookLikeIntegers = chkDatesMayBeIntegers.Checked; TUserDefaults.SetDefault(MCommonConstants.USERDEFAULT_IMPORTEDDATESMAYBEINTEGERS, FDatesMayLookLikeIntegers); } return(false); }
private void BtnOK_Click(object sender, EventArgs e) { FAccountCode = cmbSelectBankAccount.GetSelectedString(); if (FAccountCode.Length > 0) { TUserDefaults.SetDefault(TUserDefaults.FINANCE_BANKIMPORT_PLUGIN, cmbSelectPlugin.GetSelectedString()); TUserDefaults.SetDefault(TUserDefaults.FINANCE_BANKIMPORT_BANKACCOUNT, cmbSelectBankAccount.GetSelectedString()); TUserDefaults.SaveChangedUserDefault(TUserDefaults.FINANCE_BANKIMPORT_PLUGIN); this.DialogResult = System.Windows.Forms.DialogResult.OK; this.Close(); } }
/// <summary> /// todoComment /// </summary> /// <param name="ATipIndex"></param> /// <param name="ATipsUserDefault"></param> /// <param name="ATipsUserDefaultValue"></param> /// <param name="ASetViewedStatus"></param> /// <returns></returns> public static Char CheckTipStatus(Int16 ATipIndex, String ATipsUserDefault, String ATipsUserDefaultValue, Char ASetViewedStatus) { Char ReturnValue; // MessageBox.Show('TUserTips.CheckTipStatus for Index ' + // EnumValue.ToString + '...'); ReturnValue = GetTipValueInternal(ATipIndex, ATipsUserDefaultValue, ASetViewedStatus); // MessageBox.Show('TUserTips.CheckTipStatus for Index ' + // EnumValue.ToString + ' = ' + Result.ToString); if ((ASetViewedStatus != (char)(0)) && (ASetViewedStatus != ReturnValue)) { // MessageBox.Show('UserDefault has changed updating.'); TUserDefaults.SetDefault(ATipsUserDefault, ATipsUserDefaultValue); } return(ReturnValue); }
/// <summary> /// todoComment /// </summary> /// <param name="ATipIndex"></param> /// <param name="ATipsUserDefault"></param> /// <param name="ATipsUserDefaultValue"></param> /// <param name="ASetViewed"></param> /// <returns></returns> public static Boolean CheckTipNotViewed(Int16 ATipIndex, String ATipsUserDefault, String ATipsUserDefaultValue, Boolean ASetViewed) { Boolean ReturnValue; // MessageBox.Show('TUserTips.CheckTipNotViewed for Index ' + // ATipIndex.ToString + '...'); ReturnValue = CheckTipNotViewedInternal(ATipIndex, ref ATipsUserDefaultValue, ASetViewed); // MessageBox.Show('TUserTips.CheckTipNotViewed for Index ' + // ATipIndex.ToString + ' = ' + Result.ToString); if (ReturnValue && ASetViewed) { // MessageBox.Show('UserDefault has changed updating.'); TUserDefaults.SetDefault(ATipsUserDefault, ATipsUserDefaultValue); } return(ReturnValue); }
private void BtnOK_Click(Object Sender, EventArgs e) { if (cmbEmail.Text.Trim().Length == 0) { MessageBox.Show(Catalog.GetString("Please enter an Email Address"), Catalog.GetString("Invalid Data entered"), MessageBoxButtons.OK, MessageBoxIcon.Stop); return; } TVerificationResult verification = TStringChecks.ValidateEmail(cmbEmail.Text, true); if ((verification != null) && (verification.ResultSeverity == TResultSeverity.Resv_Critical)) { MessageBox.Show(Catalog.GetString("The Email addresses are in invalid format. Use comma or semicolon to separate multiple addresses."), Catalog.GetString("Invalid Data entered"), MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (!AttachExcelFile && !AttachCSVFile && !AttachPDF) { MessageBox.Show(Catalog.GetString("You need to select at least one file to be attached to the Email."), Catalog.GetString("Invalid Data entered"), MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (!cmbEmail.Items.Contains(cmbEmail.Text)) { cmbEmail.Items.Insert(0, cmbEmail.Text); } TUserDefaults.SetDefault(TSmtpSender.RECENTADDRS, String.Join("|", cmbEmail.Items.Cast <String>().Take(10).ToArray())); this.DialogResult = System.Windows.Forms.DialogResult.OK; this.Close(); }
private void SaveUserDefaults() { TUserDefaults.SetDefault("Imp Filename", txtFilename.Text); String expOptions = (rbtDetail.Checked) ? "D" : "S"; expOptions += (chkIncludeUnposted.Checked) ? "U+" : "U-"; expOptions += (chkTransactionsOnly.Checked) ? "T+" : "T-"; expOptions += (FGiftExtraColumnsUserDefault == '+') ? "X+" : "X-"; expOptions += (rbtBatchNumberSelection.Checked) ? "N" : "D"; expOptions += (rbtOriginalTransactionCurrency.Checked) ? "Trans" : "Base"; TUserDefaults.SetDefault("Exp Options", expOptions); String impOptions = ConvertDelimiter((String)cmbDelimiter.SelectedItem, false); impOptions += ConvertNumberFormat(cmbNumberFormat); TUserDefaults.SetDefault("Imp Options", impOptions); TUserDefaults.SetDefault("Imp Date", cmbDateFormat.GetSelectedString()); TUserDefaults.SaveChangedUserDefaults(); }
private void BtnOK_Click(Object Sender, EventArgs e) { Boolean ExportDonationData = chkDonationData.Checked; Boolean ExportFieldData = chkFieldData.Checked; Boolean ExportPersonData = chkPersonData.Checked; TUserDefaults.SetDefault("IntranetExportDonations", ExportDonationData); TUserDefaults.SetDefault("IntranetExportField", ExportFieldData); TUserDefaults.SetDefault("IntranetExportPerson", ExportPersonData); String ServerStr = TRemote.MSysMan.ImportExport.WebConnectors.ExportToIntranet(ExportDonationData, ExportFieldData, ExportPersonData, FSettingsPage.ServerEmailAddress, FSettingsPage.Password, FSettingsPage.DonationDays, FSettingsPage.OptionalMetadata, FSettingsPage.ReplyToEmail); MessageBox.Show(ServerStr, this.Text); Close(); }