public static InstanceCache LoadSettings()
        {
            InstanceCache cache = new InstanceCache();

            DataDeserializer dds = new DataContractXMLLoader();

            cache.AddInstance(dds);
            cache.AddInstance((DataSerializer)dds);

            DirectoryCache dirCache = new DirectoryCache();

            if (File.Exists(Settings.Default.DirectoryCacheFile))
            {
                dirCache = dds.Deserialize <DirectoryCache>(Settings.Default.DirectoryCacheFile);
            }
            dirCache.ContainerPath = Settings.Default.ContainerDirectory;
            cache.AddInstance(dirCache);

            ManagedVersionsService mvs = new ManagedVersionsService();

            if (File.Exists(Settings.Default.ManagedVersionsFile))
            {
                mvs.Load(dds);
            }
            mvs.Serializer = (DataSerializer)dds;
            cache.AddInstance(mvs);

            return(cache);
        }
        public Overview(ManagedVersionsService versionService, GameDirectoryService gameDirService)
        {
            InitializeComponent();
            _versionService = versionService;
            _gameDirService = gameDirService;
            frmOverviewDetails.Navigate(new OverviewEmpty());

            _versions = _versionService.GetManagedVersions();
            _versions.CollectionChanged += ContentCollectionChanged;
            ShowVersions();
        }
        public Replays(ManagedVersionsService localVersionsService, ReplayService replayService)
        {
            _localVersionsService = localVersionsService;
            _replayService        = replayService;
            InitializeComponent();
            ManagedVersionCollection versions = _localVersionsService.GetManagedVersions();

            versions.CollectionChanged += ContentCollectionChanged;
            UpdateVersions();
            versionPick.Visibility      = Visibility.Hidden;
            warnNotAvailable.Visibility = Visibility.Hidden;
            _buttonTimer          = new DispatcherTimer();
            _buttonTimer.Interval = new TimeSpan(0, 0, 5);
            _buttonTimer.Tick    += OnReplayLaunched;
        }