public static NumberFormatInfo BuildNumberFormat(ICurrencySettings CurrencySettings) { var numberFormat = new NumberFormatInfo(); numberFormat.CurrencySymbol = CurrencySettings.CurrencySymbol; numberFormat.CurrencyDecimalDigits = CurrencySettings.CurrencyDecimalDigits; numberFormat.CurrencyDecimalSeparator = CurrencySettings.CurrencyDecimalSeparator; numberFormat.CurrencyGroupSeparator = CurrencySettings.CurrencyGroupSeparator; numberFormat.CurrencyGroupSizes = CurrencySettings.CurrencyGroupSizes; numberFormat.CurrencyNegativePattern = CurrencySettings.CurrencyNegativePattern; numberFormat.CurrencyPositivePattern = CurrencySettings.CurrencyPositivePattern; return numberFormat; }
public static NumberFormatInfo BuildNumberFormat(ICurrencySettings CurrencySettings) { var numberFormat = new NumberFormatInfo(); numberFormat.CurrencySymbol = CurrencySettings.CurrencySymbol; numberFormat.CurrencyDecimalDigits = CurrencySettings.CurrencyDecimalDigits; numberFormat.CurrencyDecimalSeparator = CurrencySettings.CurrencyDecimalSeparator; numberFormat.CurrencyGroupSeparator = CurrencySettings.CurrencyGroupSeparator; numberFormat.CurrencyGroupSizes = CurrencySettings.CurrencyGroupSizes; numberFormat.CurrencyNegativePattern = CurrencySettings.CurrencyNegativePattern; numberFormat.CurrencyPositivePattern = CurrencySettings.CurrencyPositivePattern; return(numberFormat); }
public CustomerScreenPlugin() { var screenHelper = new ScreenHelper(); if (!screenHelper.IsSecondMonitorExists) { PluginContext.Shutdown("Can't show customer screen. There is no second monitor."); return; } try { CustomerScreenConfig.Init(PluginContext.Integration.GetConfigsDirectoryPath()); InitializeUiDispatcher(PluginContext.Operations.GetHostTerminalCultureInfo()); CurrencySettings = PluginContext.Operations.GetHostRestaurant().Currency; Application.Current.Dispatcher.Invoke(() => { vmOrder = new Order(); unsubscribe.Add(PluginContext.Notifications.ScreenChanged .ObserveOn(DispatcherScheduler.Current) .Subscribe(OnScreenChanged)); unsubscribe.Add(PluginContext.Notifications .ChangeSumChanged.ObserveOn(DispatcherScheduler.Current) .Subscribe(OnChangeSumChanged)); unsubscribe.Add(PluginContext.Notifications.OrderChanged .ObserveOn(DispatcherScheduler.Current) .Where(e => Equals(vmOrder.OrderSource, e.Entity)) .Select(e => e.Entity) .Subscribe(vmOrder.Update)); unsubscribe.Add(PluginContext.Notifications.RestaurantChanged .ObserveOn(DispatcherScheduler.Current) .Subscribe(r => OnRestaurantChanged(r.Currency))); ShowCustomerScreen(screenHelper); }); } catch { Dispose(); throw; } }
public BaseTests() { CurrencySettings = new CurrencySettings(); }
private static void OnRestaurantChanged(ICurrencySettings currencySettings) { CurrencySettings = currencySettings; }
public FloatRatesProvider(ICurrencySettings currencySettings) { _currencySettings = currencySettings; }
public CurrencyService(ICurrencySettings currencySettings) { _currencySettings = currencySettings; }