Exemplo n.º 1
0
        public void AddRecent(Server server)
        {
            var recentServer = new RecentServer(server);

            Recent.AddLocked(recentServer);
            server.LastJoinedOn = null;
            SaveSettings();
        }
Exemplo n.º 2
0
        private void AddToDictionary(RecentServer recent)
        {
            var key = GetKey(recent.Server);

            if (!_serverDictionary.ContainsKey(key))
            {
                _serverDictionary.Add(key, new List <RecentServer>());
            }
            _serverDictionary[key].Add(recent);
        }
Exemplo n.º 3
0
 void OnDeserialized(StreamingContext context)
 {
     // WORKAROUND F'ING DATALOSS POSSIBILITIES
     if (Collection != null && Collection.Id == Guid.Empty)
     {
         Collection = null;
     }
     if (Mission != null && Mission.Key == null)
     {
         Mission = null;
     }
     if (Server != null && Server.Address == null)
     {
         Server = null;
     }
 }
Exemplo n.º 4
0
        void OnDeserialized(StreamingContext context)
        {
            if (!string.IsNullOrWhiteSpace(_gameUuid))
            {
                _realGameUuid = FindGameUuidMatch(_gameUuid).GetValueOrDefault();
                _gameUuid     = null;
            }

            if (EnabledMods == null)
            {
                EnabledMods = new Mod[0];
            }

            if (_realGameUuid == default(Guid))
            {
                _realGameUuid = DefaultGameUuid;
            }
            if (_Mods == null)
            {
                _Mods = new List <string>();
            }
            if (_additionalMods == null)
            {
                _additionalMods = new List <string>();
            }
            if (_optionalMods == null)
            {
                _optionalMods = new List <string>();
            }
            if (_disabledItems == null)
            {
                _disabledItems = new List <string>();
            }

            if (RequiredMods == null)
            {
                RequiredMods = new List <string>();
            }

            if (Items == null)
            {
                Items = new ReactiveList <IContent>();
            }

            if (Versions == null)
            {
                Versions = new Dictionary <string, string>();
            }
            if (Orders == null)
            {
                Orders = new Dictionary <string, int>();
            }

            // WORKAROUND F'ING DATALOSS POSSIBILITIES
            if (_recentMission != null && _recentMission.Key == null)
            {
                _recentMission = null;
            }
            if (_recentServer != null && _recentServer.Address == null)
            {
                _recentServer = null;
            }
        }