示例#1
0
        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;
        }
示例#2
0
        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);
        }
示例#3
0
        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;
            }
        }
示例#4
0
 public BaseTests()
 {
     CurrencySettings = new CurrencySettings();
 }
示例#5
0
 private static void OnRestaurantChanged(ICurrencySettings currencySettings)
 {
     CurrencySettings = currencySettings;
 }
 public FloatRatesProvider(ICurrencySettings currencySettings)
 {
     _currencySettings = currencySettings;
 }
示例#7
0
 public CurrencyService(ICurrencySettings currencySettings)
 {
     _currencySettings = currencySettings;
 }