public BandwidthManager() { syncRoot = new object(); bandwidthChanged = new DefaultPublicEvent(); timer = new Timer(new TimerCallback(Callback), null, Refresh, Refresh); Reset(); }
public Hotkeys() { syncRoot = new object(); hotkeys = new Dictionary <string, CommandList>(); added = new HotkeyShortcutChangedPublicEvent(); removed = new HotkeyShortcutChangedPublicEvent(); updated = new HotkeyShortcutChangedPublicEvent(); cleared = new DefaultPublicEvent(); }
internal PacketLogging(ISettings settings) { changed = new DefaultPublicEvent(); enable = new SettingBoolEntry(settings, false, "Enable", "Config", "PacketLogging"); clientToPhoenix = new SettingBoolEntry(settings, true, "ClientToPhoenix", "Config", "PacketLogging"); phoenixToServer = new SettingBoolEntry(settings, false, "PhoenixToServer", "Config", "PacketLogging"); serverToPhoenix = new SettingBoolEntry(settings, true, "ServerToPhoenix", "Config", "PacketLogging"); phoenixToClient = new SettingBoolEntry(settings, false, "PhoenixToClient", "Config", "PacketLogging"); enable.Changed += new EventHandler(packetLogging_Changed); clientToPhoenix.Changed += new EventHandler(packetLogging_Changed); phoenixToServer.Changed += new EventHandler(packetLogging_Changed); serverToPhoenix.Changed += new EventHandler(packetLogging_Changed); phoenixToClient.Changed += new EventHandler(packetLogging_Changed); }
internal ProfileConfig(string profilesFolder) { profileChanged = new DefaultPublicEvent(); loader = new SettingsLoader(profilesFolder); profileName = null; settings = new SynchronizedSettings("Profile"); userSettings = new SettingsFragment(settings, "UserSettings"); maxJournalLen = new SettingInt32Entry(settings, 500, "MaxJournalLen", "Config"); overrideSpeechColor = new SettingBoolEntry(settings, false, "OverrideSpeechColor", "Config"); colors = new ColorsConfig(settings); window = new WindowConfig(settings); fpsLimit = new SettingInt32Entry(settings, 0, "fps", "Config", "FpsLimiter"); }
/// <summary> /// Default constructor. /// </summary> /// <param name="settings">ISettings which will be object assigned to.</param> /// <param name="defaultValue">Default value used when settings entry is missing.</param> /// <param name="attribute">Attribute name.</param> /// <param name="path">Element path.</param> public SettingEntry(ISettings settings, T defaultValue, string attribute, params object[] path) { if (settings == null) { throw new ArgumentNullException("settings"); } settings.Loaded += new EventHandler(settings_Loaded); settings.Saving += new EventHandler(settings_Saving); this.path = path; this.attribute = attribute; this.defaultValue = defaultValue; this.value = defaultValue; changed = new DefaultPublicEvent(); saving = new DefaultPublicEvent(); }
static World() { itemList = new Dictionary <uint, RealItem>(128); charList = new Dictionary <uint, RealCharacter>(16); ground = new ItemsCollection(0x00000000, false); playerSerial = World.InvalidSerial; uoplayer = new UOPlayer(World.InvalidSerial); sunLight = 0xFF; sunLightChanged = new DefaultPublicEvent(); cleanUpInterval = Config.InternalSettings.GetAttribute(5, "CleanUpInterval", "Config", "World"); cleanUpDistance = Config.InternalSettings.GetAttribute(30, "CleanUpDistance", "Config", "World"); cleanUpTimer = new Timer(new TimerCallback(CleanUpCallback), null, 10000, cleanUpInterval * 1000); worldCleaned = new DefaultPublicEvent(); findDistance = Config.GroundFindDistance; }
static World() { itemList = new Dictionary<uint, RealItem>(128); charList = new Dictionary<uint, RealCharacter>(16); ground = new ItemsCollection(0x00000000, false); playerSerial = World.InvalidSerial; uoplayer = new UOPlayer(World.InvalidSerial); sunLight = 0xFF; sunLightChanged = new DefaultPublicEvent(); cleanUpInterval = Config.InternalSettings.GetAttribute(5, "CleanUpInterval", "Config", "World"); cleanUpDistance = Config.InternalSettings.GetAttribute(30, "CleanUpDistance", "Config", "World"); cleanUpTimer = new Timer(new TimerCallback(CleanUpCallback), null, 10000, cleanUpInterval * 1000); worldCleaned = new DefaultPublicEvent(); findDistance = Config.GroundFindDistance; }