Пример #1
0
        public MainWindow(AppSettings settings)
        {
            _settings = settings;

            InitializeComponent();
            GithubButton.Content = "v" + Assembly.GetExecutingAssembly().GetName().Version.ToString();

            _tracker             = new RlTracker();
            _trackedUsersManager = new TrackedUsersManager(_tracker, _settings);
            _trackedUsersManager.Users.CollectionChanged += Users_CollectionChanged;
            _trackedUsersManager.StartMonitor();

            CachedImage.FileCache.AppCacheMode = CachedImage.FileCache.CacheMode.Dedicated;

            this.DataContext = vm;
            CheckForUpdates();
        }
        public MainWindow(AppSettings settings)
        {
            _settings = settings;

            InitializeComponent();
            GithubButton.Content = "v" + Assembly.GetExecutingAssembly().GetName().Version.ToString();

            _tracker             = new RlTracker();
            _trackedUsersManager = new TrackedUsersManager(_tracker, _settings);
            _trackedUsersManager.Users.CollectionChanged += Users_CollectionChanged;
            _trackedUsersManager.SessionUserUpdated      += _trackedUsersManager_SessionUserUpdated;
            _trackedUsersManager.StartMonitor();

            CachedImage.FileCache.AppCacheMode = CachedImage.FileCache.CacheMode.Dedicated;

            this.DataContext = vm;
            CheckForUpdates();

            //Start timer to show next refresh time
            System.Windows.Threading.DispatcherTimer dispatcherTimer = new System.Windows.Threading.DispatcherTimer();
            dispatcherTimer.Tick    += DispatcherTimer_Tick;
            dispatcherTimer.Interval = new TimeSpan(0, 0, 1);
            dispatcherTimer.Start();
        }