Esempio n. 1
0
 public KomBankTnCViewModel(KomBankE komBankE, IniFile iniFile, IMyLog logFile, IWindowManager windowManager, ChangesViewModel changesViewModel)
 {
     _komBankE         = komBankE;
     _iniFile          = iniFile;
     _logFile          = logFile;
     _windowManager    = windowManager;
     _changesViewModel = changesViewModel;
 }
Esempio n. 2
0
 public KomBankViewModel(IniFile iniFile, KomBankE komBank, IMyLog logFile, IWindowManager windowManager, ChangesViewModel changesViewModel)
 {
     _iniFile          = iniFile;
     KomBank           = komBank;
     _logFile          = logFile;
     _windowManager    = windowManager;
     _changesViewModel = changesViewModel;
     _baliApiUrl       = iniFile.Read(IniSection.General, IniKey.BaliApiUrl, "localhost:11082");
 }
Esempio n. 3
0
        public ShellViewModel(IniFile iniFile, IMyLog logFile, IWindowManager windowManager, ShellVm shellVm, ChangesViewModel changesViewModel)
        {
            _windowManager    = windowManager;
            _changesViewModel = changesViewModel;
            Model             = shellVm;

            StartNbRbPoller();
            Task.Delay(3000).Wait();
            StartBelStockPoller();
            StartTradingViewPollers();

            StartKomBankPollers(iniFile, logFile);
        }
Esempio n. 4
0
        public async void Start(IniFile iniFile, IMyLog logFile, IWindowManager windowManager, ChangesViewModel changesViewModel)
        {
            _logFile = logFile;
            _logFile.AppendLine("Kom banks listening started");

            foreach (var komBank in _firstPageList)
            {
                var viewModel = await new KomBankViewModel(iniFile, komBank, _logFile, windowManager, changesViewModel).GetSomeLast();
                Application.Current.Dispatcher.Invoke(() => Banks.Add(viewModel));
                var unused = await Task.Factory.StartNew(viewModel.StartPolling);
            }
        }