Esempio n. 1
0
        public MainWindow()
        {
            InitializeComponent();

            NHibernateProfiler.Initialize();

            apiKeyTextBox.Text = MainSettings.Default.APIKey;
            realmsList.Items.AddRange(MainSettings.Default.Servers.ToList());

            _sessionFactory = CreateSessionFactory();
   
            _timer = new TimerPlus {Interval = 600000};
            _timer.Elapsed += (a, b) => LoadData();

            _infoTimer = new Timer(1000);
            _infoTimer.Elapsed += (a, b) => UpdateInfo(_lastTimeStamp, _totalRecords, _timer.Enabled ? (int)(_timer.TimeLeft / 1000) : -1);

            _infoTimer.Start();
            _timer.Start();

            //LoadData();
        }
Esempio n. 2
0
        public MainWindow()
        {
            InitializeComponent();

            NHibernateProfiler.Initialize();

            apiKeyTextBox.Text = MainSettings.Default.APIKey;
            realmsList.Items.AddRange(MainSettings.Default.Servers.ToList());

            _sessionFactory = CreateSessionFactory();

            _timer = new TimerPlus {
                Interval = 600000
            };
            _timer.Elapsed += (a, b) => LoadData();

            _infoTimer          = new Timer(1000);
            _infoTimer.Elapsed += (a, b) => UpdateInfo(_lastTimeStamp, _totalRecords, _timer.Enabled ? (int)(_timer.TimeLeft / 1000) : -1);

            _infoTimer.Start();
            _timer.Start();

            //LoadData();
        }