private void EditSettingsDefaults(SettingsDefaults defaults, bool minimumTaxPayerRegime, bool electronicInvoiceEnabled, bool splitPaymentApplied, Vat vat, ProvidenceFund providenceFund, WithholdingTax withholdingTax) { if (defaults.MinimumTaxPayerRegime != minimumTaxPayerRegime) { defaults.MinimumTaxPayerRegime = minimumTaxPayerRegime; } if (defaults.ElectronicInvoiceEnabled != electronicInvoiceEnabled) { defaults.ElectronicInvoiceEnabled = electronicInvoiceEnabled; } if (defaults.SplitPaymentApplied != splitPaymentApplied) { defaults.SplitPaymentApplied = splitPaymentApplied; } if (defaults.Vat?.Id != vat?.Id) { defaults.Vat = vat; } if (defaults.ProvidenceFund?.Id != providenceFund?.Id) { defaults.ProvidenceFund = providenceFund; } if (defaults.WithholdingTax?.Id != withholdingTax?.Id) { defaults.WithholdingTax = withholdingTax; } }
public void LoadDefaults() { SettingsDefaults defaults = Resources.Load <SettingsDefaults>(DefaultsFileName); AddFloatSetting(SettingsConstants.TextSpeed, defaults.textSpeed); AddFloatSetting(SettingsConstants.BGMVolume, defaults.bgmVolume); AddBoolSetting(SettingsConstants.SkipUnreadText, defaults.skipUnreadText); AddFloatSetting(SettingsConstants.SoundEffectVolume, defaults.soundEffectVolume); AddFloatSetting(SettingsConstants.AutoSpeed, defaults.autoSpeed); AddBoolSetting(SettingsConstants.SkipAtChoices, defaults.skipAtChoices); AddBoolSetting(SettingsConstants.Fullscreen, defaults.fullscreen); }
private void CreateSettingsDefaults(Guid subscriptionId, bool minimumTaxPayerRegime, bool electronicInvoiceEnabled, bool splitPaymentApplied, Vat vat, ProvidenceFund providenceFund, WithholdingTax withholdingTax) { var defaults = new SettingsDefaults { Id = Guid.NewGuid(), SubscriptionId = subscriptionId, ElectronicInvoiceEnabled = electronicInvoiceEnabled, MinimumTaxPayerRegime = minimumTaxPayerRegime, SplitPaymentApplied = splitPaymentApplied, ProvidenceFund = providenceFund, Vat = vat, WithholdingTax = withholdingTax }; _context.Add(defaults); }