Пример #1
0
        public SaleGrid()
        {
            NavigationCacheMode = NavigationCacheMode.Enabled;
            this.InitializeComponent();

            _log = InfonetLogManager.GetLogger(GetType());

            _startTime = DateTime.Now;

            Loaded -= OnLoaded;
            Loaded += OnLoaded;

            if (!SaleGridVM.AreScanEventsAttached)
            {
                SaleGridVM.AreScanEventsAttached   = true;
                Window.Current.CoreWindow.KeyDown -= CoreWindowKeyDown;
                Window.Current.CoreWindow.KeyDown += CoreWindowKeyDown;

                _timer          = new DispatcherTimer();
                _timer.Interval = new TimeSpan(0, 0, 1);
                _timer.Tick    -= TimerTick;
                _timer.Tick    += TimerTick;
                _timer.Start();
            }
        }
Пример #2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="loginRestClient">Login rest client</param>
 /// <param name="cacheManager">Cache manager</param>
 public LoginSerializeAction(ILoginRestClient loginRestClient, ICacheManager cacheManager) :
     base("Login")
 {
     _restClient   = loginRestClient;
     _cacheManager = cacheManager;
     _log          = InfonetLogManager.GetLogger <LoginRestClient>();
 }
Пример #3
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="stockRestClient">Stock Rest Client</param>
 /// <param name="cacheManager">Cache manager</param>
 public GetAllTaxesSerializeAction(IStockRestClient stockRestClient, ICacheManager cacheManager)
     : base("GetAllTaxes")
 {
     _restClient   = stockRestClient;
     _cacheManager = cacheManager;
     _log          = InfonetLogManager.GetLogger <GetAllTaxesSerializeAction>();
 }
Пример #4
0
 public HttpRestClient(bool addCompressionHandler = false)
 {
     _clientHandler = new HttpClientHandler()
     {
         AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate
     };
     _log     = InfonetLogManager.GetLogger <HttpRestClient>();
     _tracker = new Stopwatch();
 }
Пример #5
0
 public MaintenanceVM(IMaintenanceBussinessLogic maintenanceBussinessLogic,
                      IFuelPumpBusinessLogic fuelPumpBusinessLogic)
 {
     _log = InfonetLogManager.GetLogger <MaintenanceVM>();
     InitializeCommands();
     _maintenanceBussinessLogic = maintenanceBussinessLogic;
     _fuelPumpBusinessLogic     = fuelPumpBusinessLogic;
     RegisterMessages();
 }
Пример #6
0
        public VMBase()
        {
            Width  = Window.Current.Bounds.Width;
            Height = Window.Current.Bounds.Height;

            ShutDownApplicationCommand       = new RelayCommand(ShutDownApplication);
            FirstFrameBackNavigationCommand  = new RelayCommand(NavigateService.Instance.NavigateToHome);
            SecondFrameBackNavigationCommand = new RelayCommand(NavigateService.Instance.SecondFrameBackNavigation);
            InvokeKeyboardCommand            = new RelayCommand(InvokeKeyBoardEvent);
            _log = Log = InfonetLogManager.GetLogger(GetType());
        }
Пример #7
0
        public ExtendedSplashScreenVM(ILoginBussinessLogic loginBussinessLogic,
                                      IThemeBusinessLogic themeBusinessLogic)
        {
            _log = InfonetLogManager.GetLogger <ExtendedSplashScreenVM>();
            _loginBussinessLogic = loginBussinessLogic;
            _themeBusinessLogic  = themeBusinessLogic;
            // TODO: Not a correct way to create Data file
            new Helper().EnsureDataFileExists();
            SimpleIoc.Default.GetInstance <UtilsVM>();
            SetLoginPolicy();
            CacheBusinessLogic.FramePriorSwitchUserNavigation = string.Empty;
            CacheBusinessLogic.AreFuelPricesSaved             = true;
            CacheBusinessLogic.PreviousAuthKey = string.Empty;

            try
            {
                new SignaturePad();
            }
            catch (Exception ex)
            {
            }
        }