상속: INotifyPropertyChanged
예제 #1
0
        public PluginSettings()
        {
            // Default is 12 hours
            _start = DateTime.Now;
            _newUserTransportDistance = 500;
            _backupAsteroids = true;

            _greetingItem = new SettingsGreetingDialogItem();
            _greetingItem.PropertyChanged += OnPropertyChanged;
            _greetingNewUserItem = new SettingsGreetingDialogItem();
            _greetingNewUserItem.PropertyChanged += OnPropertyChanged;

            _informationItems = new MTObservableCollection<InformationItem>();
            _restartNotificationItems = new MTObservableCollection<RestartNotificationItem>();
            _restartTimeItems = new MTObservableCollection<RestartTimeItem>();
            _backupItems = new MTObservableCollection<BackupItem>();
            _protectedItems = new MTObservableCollection<ProtectedItem>();
            _informationItems.CollectionChanged += ItemsCollectionChanged;
            _restartNotificationItems.CollectionChanged += ItemsCollectionChanged;
            _restartTimeItems.CollectionChanged += ItemsCollectionChanged;
            _backupItems.CollectionChanged += ItemsCollectionChanged;
            _protectedItems.CollectionChanged += ItemsCollectionChanged;

            _backupDateFormat = "yyyy-MM-dd_HH-mm";
            _backupDateFormatSubDirectory = "yyyy-MM-dd";

            _greetingMessage = "";

            _dynamicConcealDistance = 8000;
            _dynamicShowMessages = false;
            _dynamicTurretTargetDistance = 2000;
            _dynamicTurretManagementEnabled = false;
            _dynamicVoxelManagementEnabled = false;
            _dynamicVoxelDistance = 20000;

            _dockingShipsPerZone = 1;

            _newUserTransportAsteroidDistance = 0;

            _waypointServerItems = new MTObservableCollection<ServerWaypointItem>();
            _waypointServerItems.CollectionChanged += ItemsCollectionChanged;
            _waypointDefaultItems = new MTObservableCollection<ServerWaypointItem>();
            _waypointDefaultItems.CollectionChanged += ItemsCollectionChanged;

            _cleanupTriggerItems = new MTObservableCollection<SettingsCleanupTriggerItem>();
            _cleanupTriggerItems.CollectionChanged += ItemsCollectionChanged;
            _cleanupTimedItems = new MTObservableCollection<SettingsCleanupTimedItem>();
            _cleanupTimedItems.CollectionChanged += ItemsCollectionChanged;
            _cleanupNotificationItems = new MTObservableCollection<SettingsCleanupNotificationItem>();
            _cleanupNotificationItems.CollectionChanged += ItemsCollectionChanged;

            _blockEnforcementItems = new MTObservableCollection<SettingsBlockEnforcementItem>();
            _blockEnforcementItems.CollectionChanged += ItemsCollectionChanged;
        }
예제 #2
0
        public PluginSettings()
        {
            // Default is 12 hours
            Start = DateTime.Now;
            _backupAsteroids = true;

            _greetingItem = new SettingsGreetingDialogItem();
            _greetingItem.PropertyChanged += OnPropertyChanged;
            _greetingNewUserItem = new SettingsGreetingDialogItem();
            _greetingNewUserItem.PropertyChanged += OnPropertyChanged;

            _informationItems = new MTObservableCollection<InformationItem>();
            _restartNotificationItems = new MTObservableCollection<RestartNotificationItem>();
            _restartTimeItems = new MTObservableCollection<RestartTimeItem>();
            _backupItems = new MTObservableCollection<BackupItem>();
            _protectedItems = new List<ProtectedItem>();
            _informationItems.CollectionChanged += ItemsCollectionChanged;
            _restartNotificationItems.CollectionChanged += ItemsCollectionChanged;
            _restartTimeItems.CollectionChanged += ItemsCollectionChanged;
            _backupItems.CollectionChanged += ItemsCollectionChanged;

            _reservedSlotsEnabled = false;
            _reservedSlotsCount = 5;
            _reservedSlotsGroup = 0;
            _reservedSlotsAdmins = false;

            _stopShipsOnStart = false;
            _promotedAdminCommands = false;

            _loginEnabled = true;

            _serverChatName = "Server";
            _factionChatPrefix = true;
            _whisperChatPrefix = true;

            _backupDateFormat = "MM-dd-yyyy_HH-mm";
            _backupDateFormatSubDirectory = "MM-dd-yyyy";

            _greetingMessage = "";

            _dynamicConcealDistance = 8000;
            _dynamicConcealPirates = false;
            _dynamicConcealPhysics = false;
            _dynamicConcealProduction = true;
            _dynamicShowMessages = false;
            _dynamicTurretTargetDistance = 2000;
            _dynamicTurretManagementEnabled = false;

            _dockingShipsPerZone = 1;

            _waypointServerItems = new MTObservableCollection<ServerWaypointItem>();
            _waypointServerItems.CollectionChanged += ItemsCollectionChanged;
            _waypointDefaultItems = new MTObservableCollection<ServerWaypointItem>();
            _waypointDefaultItems.CollectionChanged += ItemsCollectionChanged;

            _cleanupTriggerItems = new MTObservableCollection<SettingsCleanupTriggerItem>();
            _cleanupTriggerItems.CollectionChanged += ItemsCollectionChanged;
            _cleanupTimedItems = new MTObservableCollection<SettingsCleanupTimedItem>();
            _cleanupTimedItems.CollectionChanged += ItemsCollectionChanged;
            _cleanupNotificationItems = new MTObservableCollection<SettingsCleanupNotificationItem>();
            _cleanupNotificationItems.CollectionChanged += ItemsCollectionChanged;

            _blockEnforcementItems = new MTObservableCollection<SettingsBlockEnforcementItem>();
            _blockEnforcementItems.CollectionChanged += ItemsCollectionChanged;

            _playerBlockEnforcementItems = new MTObservableCollection<SettingsBlockEnforcementItem>();
            _playerBlockEnforcementItems.CollectionChanged += ItemsCollectionChanged;

            _timedCommandsEnabled = false;
            _timedCommandsItem = new MTObservableCollection<TimedCommandItem>(  );
            _timedCommandsItem.CollectionChanged += ItemsCollectionChanged;

            _blacklistItems = new MTObservableCollection<BlacklistItem>();
            _blacklistItems.CollectionChanged += ItemsCollectionChanged;
            _blacklistItems.CollectionChanged += BlacklistManager.Instance._blacklistItems_CollectionChanged;

            _atmosphericCargoShipsEnabled = false;
            _atmosphericCargoShipSpawnTime = 10.0f;

            _ticketPlayers = new List<TicketPlayerItem>();
        }