Ejemplo n.º 1
0
        public FontObject(IFileAcManager manager, string id, bool enabled) : base(manager, id, enabled)
        {
            AcId = id.ApartFromLast(FontExtension);

            _usingsCarsIds = ValuesStorage.GetStringList(KeyUsingsCarsIds).ToArray();
            IsUsed         = _usingsCarsIds.Any();
        }
 public TrackExtraLayoutObject(IFileAcManager manager, [NotNull] TrackObject parent, bool enabled, string fixedLocation)
         : base(manager, parent.Id, enabled) {
     _location = fixedLocation;
     MainTrackObject = parent;
     LayoutId = Path.GetFileName(fixedLocation) ?? "";
     IdWithLayout = $"{Id}/{LayoutId}";
 }
Ejemplo n.º 3
0
        public TrackObject(IFileAcManager manager, string id, bool enabled)
                : base(manager, id, enabled) {
            InitializeLocationsOnce();

            try {
                var information = GetLayouts();
                if (information != null) {
                    _layoutLocation = information.MainLayout;
                    InitializeLocationsInner(_layoutLocation);

                    LayoutId = information.SimpleMainLayout ? null : Path.GetFileName(_layoutLocation);
                    IdWithLayout = information.SimpleMainLayout ? Id : $@"{Id}/{LayoutId}";
                    MultiLayouts = new BetterObservableCollection<TrackObjectBase>(
                            information.AdditionalLayouts.Select(x => {
                                var c = new TrackExtraLayoutObject(manager, this, enabled, x);
                                c.PropertyChanged += Configuration_PropertyChanged;
                                return c;
                            }).Prepend((TrackObjectBase)this));
                    return;
                }
            } catch (AcErrorException e) {
                AddError(e.AcError);
            }

            InitializeLocationsInner(Path.Combine(Location, "ui"));
            _layoutLocation = null;
            LayoutId = null;
            IdWithLayout = Id;
            MultiLayouts = null;
        }
Ejemplo n.º 4
0
        public TrackObject(IFileAcManager manager, string id, bool enabled)
            : base(manager, id, enabled)
        {
            InitializeLocationsOnce();

            try {
                var information = GetLayouts();
                if (information != null)
                {
                    _layoutLocation = information.MainLayout;
                    InitializeLocationsInner(_layoutLocation);

                    LayoutId     = information.SimpleMainLayout ? null : Path.GetFileName(_layoutLocation);
                    IdWithLayout = information.SimpleMainLayout ? Id : $@"{Id}/{LayoutId}";
                    MultiLayouts = new BetterObservableCollection <TrackObjectBase>(
                        information.AdditionalLayouts.Select(x => {
                        var c              = new TrackExtraLayoutObject(manager, this, enabled, x);
                        c.PropertyChanged += Configuration_PropertyChanged;
                        return(c);
                    }).Prepend((TrackObjectBase)this));
                    return;
                }
            } catch (AcErrorException e) {
                AddError(e.AcError);
            }

            InitializeLocationsInner(Path.Combine(Location, "ui"));
            _layoutLocation = null;
            LayoutId        = null;
            IdWithLayout    = Id;
            MultiLayouts    = null;
        }
Ejemplo n.º 5
0
 public CarObject(IFileAcManager manager, string id, bool enabled) : base(manager, id, enabled) {
     InitializeLocationsOnce();
     SkinsManager = new CarSkinsManager(Id, new InheritingAcDirectories(manager.Directories, SkinsDirectory), Skins_CollectionReady) {
         ScanWrapper = this
     };
     SkinsManager.Created += SkinsManager_Created;
 }
 public TrackExtraLayoutObject(IFileAcManager manager, [NotNull] TrackObject parent, bool enabled, string fixedLocation)
     : base(manager, parent.Id, enabled)
 {
     _location       = fixedLocation;
     MainTrackObject = parent;
     LayoutId        = Path.GetFileName(fixedLocation) ?? "";
     IdWithLayout    = $"{Id}/{LayoutId}";
 }
Ejemplo n.º 7
0
 public ServerPresetObject(IFileAcManager manager, string id, bool enabled) : base(manager, id, enabled)
 {
     Sessions = new ChangeableObservableCollection <ServerSessionEntry>(new[] {
         new ServerSessionEntry("BOOK", ToolsStrings.Session_Booking, false, false),
         new ServerSessionEntry("PRACTICE", ToolsStrings.Session_Practice, true, true),
         new ServerSessionEntry("QUALIFY", ToolsStrings.Session_Qualification, true, true),
         new ServerRaceSessionEntry("RACE", ToolsStrings.Session_Race, true, true),
     });
 }
Ejemplo n.º 8
0
 public CarObject(IFileAcManager manager, string id, bool enabled) : base(manager, id, enabled)
 {
     InitializeLocationsOnce();
     SkinsManager = new CarSkinsManager(Id, new InheritingAcDirectories(manager.Directories, SkinsDirectory), Skins_CollectionReady)
     {
         ScanWrapper = this
     };
     SkinsManager.Created += SkinsManager_Created;
 }
Ejemplo n.º 9
0
 public KunosCareerObject(IFileAcManager manager, string id, bool enabled)
     : base(manager, id, enabled)
 {
     ChampionshipDrivers     = new BetterObservableCollection <ChampionshipDriverEntry>();
     ChampionshipDriversView = new BetterListCollectionView(ChampionshipDrivers)
     {
         CustomSort = this
     };
 }
Ejemplo n.º 10
0
        public ServerPresetObject(IFileAcManager manager, string id, bool enabled) : base(manager, id, enabled)
        {
            SimpleSessions = new[] {
                new ServerSessionEntry("BOOK", ToolsStrings.Session_Booking, false, false),
                new ServerSessionEntry("PRACTICE", ToolsStrings.Session_Practice, true, true),
                new ServerQualificationSessionEntry("QUALIFY", ToolsStrings.Session_Qualification, true, true)
            };

            RaceSession = new ServerRaceSessionEntry("RACE", ToolsStrings.Session_Race, true, true);
            Sessions    = new ChangeableObservableCollection <ServerSessionEntry>(SimpleSessions.Append(RaceSession));
            Sessions.ItemPropertyChanged += OnSessionEntryPropertyChanged;
        }
Ejemplo n.º 11
0
 public CarSkinObject([NotNull] string carId, IFileAcManager manager, string id, bool enabled)
     : base(manager, id, enabled)
 {
     CarId       = carId;
     _nameFromId = new Lazy <string>(() => {
         var cut = Regex.Replace(Id, @"^\d\d?_", "");
         if (string.IsNullOrEmpty(cut))
         {
             cut = Id;
         }
         return(AcStringValues.NameFromId(cut));
     });
 }
Ejemplo n.º 12
0
        public CarSetupObject(string carId, IFileAcManager manager, string id, bool enabled)
            : base(manager, id, enabled)
        {
            CarId = carId;

            foreach (var tyrePressure in TyresPressure)
            {
                tyrePressure.PropertyChanged += (sender, args) => {
                    if (args.PropertyName == nameof(tyrePressure.Value))
                    {
                        Changed = true;
                    }
                };
            }
        }
Ejemplo n.º 13
0
 // ReSharper disable once NotNullMemberIsNotInitialized
 protected AcCommonObject(IFileAcManager manager, string id, bool enabled)
     : base(manager, id, enabled)
 {
     FileAcManager = manager;
 }
Ejemplo n.º 14
0
 public WeatherObject(IFileAcManager manager, string id, bool enabled)
     : base(manager, id, enabled)
 {
     _temperatureDiapasonLazier = Lazier.Create(() => TemperatureDiapason == null ? null : Diapason.CreateDouble(TemperatureDiapason));
     _timeDiapasonLazier        = Lazier.Create(() => TimeDiapason == null ? null : Diapason.CreateTime(TimeDiapason));
 }
Ejemplo n.º 15
0
 public CarObject(IFileAcManager manager, string id, bool enabled) : base(manager, id, enabled)
 {
     InitializeLocationsOnce();
     SkinsManager = InitializeSkins();
 }
Ejemplo n.º 16
0
 protected AcCommonSingleFileObject(IFileAcManager manager, string id, bool enabled)
         : base(manager, id, enabled) { }
Ejemplo n.º 17
0
 public PythonAppObject(IFileAcManager manager, string id, bool enabled) : base(manager, id, enabled)
 {
     AppIcon = Lazier.CreateAsync(TryToFindAppIconAsync);
     Windows = Lazier.CreateAsync(() => Task.Run(() => GetWindows().ToIReadOnlyListIfItIsNot()));
 }
Ejemplo n.º 18
0
 public PpFilterObject(IFileAcManager manager, string id, bool enabled)
         : base(manager, id, enabled) { }
Ejemplo n.º 19
0
 protected TrackObjectBase(IFileAcManager manager, string id, bool enabled) : base(manager, id, enabled)
 {
 }
Ejemplo n.º 20
0
 public ShowroomObject(IFileAcManager manager, string id, bool enabled) : base(manager, id, enabled)
 {
 }
Ejemplo n.º 21
0
 protected TrackObjectBase(IFileAcManager manager, string id, bool enabled) : base(manager, id, enabled) { }
Ejemplo n.º 22
0
 public ServerPresetObject(IFileAcManager manager, string id, bool enabled) : base(manager, id, enabled) {}
Ejemplo n.º 23
0
 protected AcIniObject(IFileAcManager manager, string id, bool enabled)
     : base(manager, id, enabled)
 {
 }
Ejemplo n.º 24
0
 public KunosCareerEventObject(string kunosCareerId, KunosCareerObjectType type, IFileAcManager manager, string id, bool enabled)
         : base(manager, id, enabled) {
     KunosCareerId = kunosCareerId;
     EventNumber = FlexibleParser.ParseInt(id.Substring(@"event".Length)) - 1;
     KunosCareerType = type;
 }
Ejemplo n.º 25
0
 public PythonAppObject(IFileAcManager manager, string id, bool enabled) : base(manager, id, enabled)
 {
 }
Ejemplo n.º 26
0
 protected AcJsonObjectNew(IFileAcManager manager, string id, bool enabled)
         : base(manager, id, enabled) {
     Tags = new TagsCollection();
 }
Ejemplo n.º 27
0
 public ReplayObject(IFileAcManager manager, string id, bool enabled)
     : base(manager, id, enabled)
 {
 }
Ejemplo n.º 28
0
 public ReplayObject(IFileAcManager manager, string id, bool enabled)
         : base(manager, id, enabled) { }
Ejemplo n.º 29
0
 protected AcCommonSingleFileObject(IFileAcManager manager, string id, bool enabled)
     : base(manager, id, enabled)
 {
 }
Ejemplo n.º 30
0
 public TrackSkinObject([NotNull] string carId, IFileAcManager manager, string id, bool enabled)
     : base(manager, id, enabled)
 {
     TrackId = carId;
 }
Ejemplo n.º 31
0
 public ShowroomObject(IFileAcManager manager, string id, bool enabled) : base(manager, id, enabled) {}
Ejemplo n.º 32
0
 public PpFilterObject(IFileAcManager manager, string id, bool enabled)
     : base(manager, id, enabled)
 {
 }
Ejemplo n.º 33
0
        public FontObject(IFileAcManager manager, string id, bool enabled) : base(manager, id, enabled) {
            AcId = id.ApartFromLast(FontExtension);

            _usingsCarsIds = ValuesStorage.GetStringList(KeyUsingsCarsIds).ToArray();
            IsUsed = _usingsCarsIds.Any();
        }
Ejemplo n.º 34
0
 public SpecialEventObject(IFileAcManager manager, string id, bool enabled)
     : base(manager, id, enabled)
 {
 }
Ejemplo n.º 35
0
 public CarSkinObject(string carId, IFileAcManager manager, string id, bool enabled)
     : base(manager, id, enabled)
 {
     CarId = carId;
 }
Ejemplo n.º 36
0
 protected AcIniObject(IFileAcManager manager, string id, bool enabled)
         : base(manager, id, enabled) {
 }
Ejemplo n.º 37
0
 public CarSkinObject(string carId, IFileAcManager manager, string id, bool enabled)
         : base(manager, id, enabled) {
     CarId = carId;
 }
Ejemplo n.º 38
0
 protected KunosEventObjectBase(IFileAcManager manager, string id, bool enabled) : base(manager, id, enabled) {}
Ejemplo n.º 39
0
 public PythonAppObject(IFileAcManager manager, string id, bool enabled) : base(manager, id, enabled) {}
Ejemplo n.º 40
0
 public KunosCareerEventObject(string kunosCareerId, KunosCareerObjectType type, IFileAcManager manager, string id, bool enabled)
     : base(manager, id, enabled)
 {
     KunosCareerId   = kunosCareerId;
     EventNumber     = FlexibleParser.ParseInt(id.Substring(@"event".Length)) - 1;
     KunosCareerType = type;
 }
Ejemplo n.º 41
0
 public TrueTypeFontObject(IFileAcManager manager, string id, bool enabled)
     : base(manager, id, enabled)
 {
 }
Ejemplo n.º 42
0
 protected AcJsonObjectNew(IFileAcManager manager, string id, bool enabled)
     : base(manager, id, enabled)
 {
     Tags = new TagsCollection();
 }
Ejemplo n.º 43
0
 protected KunosEventObjectBase(IFileAcManager manager, string id, bool enabled) : base(manager, id, enabled)
 {
 }
Ejemplo n.º 44
0
 // ReSharper disable once NotNullMemberIsNotInitialized
 protected AcCommonObject(IFileAcManager manager, string id, bool enabled)
         : base(manager, id, enabled) {
     FileAcManager = manager;
 }