Beispiel #1
0
        private void UpdateDirectories() {
            CarsDirectories?.Obsolete();
            TracksDirectories?.Obsolete();
            ShowroomsDirectories?.Obsolete();
            WeatherDirectories?.Obsolete();
            PpFiltersDirectories?.Obsolete();
            DriverModelsDirectories?.Obsolete();
            PythonAppsDirectories?.Obsolete();

            CarsDirectories = Value == null ? null : new AcDirectories(AcPaths.GetCarsDirectory(Value));
            TracksDirectories = Value == null ? null : new AcDirectories(AcPaths.GetTracksDirectory(Value));
            ShowroomsDirectories = Value == null ? null : new AcDirectories(AcPaths.GetShowroomsDirectory(Value));
            WeatherDirectories = Value == null ? null : new AcDirectories(AcPaths.GetWeatherDirectory(Value));
            PpFiltersDirectories = Value == null ? null : new AcDirectories(AcPaths.GetPpFiltersDirectory(Value));
            DriverModelsDirectories = Value == null ? null : new AcDirectories(AcPaths.GetDriverModelsDirectory(Value));
            PythonAppsDirectories = Value == null ? null : new AcDirectories(AcPaths.GetPythonAppsDirectory(Value));
            FontsDirectories = Value == null ? null : new AcDirectories(AcPaths.GetFontsDirectory(Value));
            KunosCareerDirectories = Value == null ? null : new AcDirectories(AcPaths.GetKunosCareerDirectory(Value));

            FileUtils.EnsureDirectoryExists(AcPaths.GetReplaysDirectory());
            ReplaysDirectories = ReplaysDirectories ?? new MultiDirectories(AcPaths.GetReplaysDirectory(), null);
            UserChampionshipsDirectories = UserChampionshipsDirectories ?? new AcDirectories(Path.Combine(AcPaths.GetDocumentsDirectory(), "champs"));

            CarsDirectories?.CreateIfMissing();
            TracksDirectories?.CreateIfMissing();
            ShowroomsDirectories?.CreateIfMissing();
            WeatherDirectories?.CreateIfMissing();
            PpFiltersDirectories?.CreateIfMissing();
            DriverModelsDirectories?.CreateIfMissing();
            PythonAppsDirectories?.CreateIfMissing();
            UserChampionshipsDirectories?.CreateIfMissing();
        }
Beispiel #2
0
        public void Initialize()
        {
            this.OnActualUnload(_discordPresence);

            DataContext = new ViewModel(Filter.Create(AcObjectTester.Instance, "enabled+"));
            InitializeComponent();

            if (!KunosCareerManager.Instance.ShowIntro)
            {
                return;
            }

            var startVideo = Path.Combine(AcPaths.GetKunosCareerDirectory(AcRootDirectory.Instance.RequireValue), "start.ogv");

            if (!File.Exists(startVideo) /* || !VideoViewer.IsSupported()*/)
            {
                return;
            }

            new VideoViewer(startVideo, AppStrings.KunosCareer_Title).ShowDialog();
            KunosCareerManager.Instance.ShowIntro = false;
        }