Inheritance: ObservableModel, IDisposable
コード例 #1
0
        public AccountUpdater(AccountModel account)
        {
            _account = account;

            _tmSync = new DispatcherTimer();
            _tmSync.Tick += SyncBanges;
            Interval = new TimeSpan(0, 5, 0);

            _tmCounter = new DispatcherTimer();
            _tmCounter.Tick += UpdateSecondCounter;
            _tmCounter.Interval = new TimeSpan(0, 0, 1);
        }
コード例 #2
0
        private void LaunchCardIdle(object sender, StartupEventArgs e)
        {
            //Thread.CurrentThread.CurrentUICulture = new CultureInfo("en");
            //Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("ru-Ru");

            // http://stackoverflow.com/questions/1472498/wpf-global-exception-handler
            // http://stackoverflow.com/a/1472562/1506454
            DispatcherUnhandledException += LogUnhandledDispatcherException;
            AppDomain.CurrentDomain.UnhandledException += LogUnhandledDomainException;
            TaskScheduler.UnobservedTaskException += LogTaskSchedulerUnobservedTaskException;

            Logger.Info(String.Format("{0} {1}bit", Environment.OSVersion, Environment.Is64BitOperatingSystem ? 64 : 32));

            LoadVisuals();

            _account = new AccountModel();
            var w = new BadgesWindow { DataContext = _account};
            w.Show();

            _account.InitSteamTimer();
            _account.LoadAccount();
        }
コード例 #3
0
 public IdleManager(AccountModel acc)
 {
     _account = acc;
     _maxIdleInstanceCount = DefaultIdleInstanceCount;
 }
コード例 #4
0
 public IdleManager(AccountModel acc)
 {
     _account = acc;
     _maxIdleInstanceCount = DefaultIdleInstanceCount;
     _switchSeconds        = DefaultSwitchSeconds;
 }