/// <summary> /// Initializes the <see cref="ManagerSettings"/> class. /// </summary> static ManagerSettings() { var filePath = PathHelper.CombineDifferentPaths(Application.StartupPath, _settingsFile); _instance = new ManagerSettings(filePath); _instance.Load(filePath); }
/// <summary> /// Handles the NextVersionCreated event of the <see cref="_settings"/>. /// </summary> /// <param name="sender">The source of the event.</param> void _settings_NextVersionCreated(ManagerSettings sender) { try { btnChangeLiveVersion.Enabled = sender.DoesNextVersionExist(); } catch (Exception ex) { Debug.Fail(ex.ToString()); } }
/// <summary> /// Handles the MasterServerListChanged event of the <see cref="_settings"/>. /// </summary> /// <param name="sender">The source of the event.</param> void _settings_MasterServerListChanged(ManagerSettings sender) { try { UpdateServerListBox(lstMS, sender.MasterServers.Cast <ServerInfoBase>(), MasterServerInfo_ServerChanged); } catch (Exception ex) { Debug.Fail(ex.ToString()); } }
/// <summary> /// Handles the LiveVersionChanged event of the <see cref="_settings"/>. /// </summary> /// <param name="sender">The source of the event.</param> void _settings_LiveVersionChanged(ManagerSettings sender) { try { lblLiveVersion.Invoke((Action)(() => lblLiveVersion.Text = sender.LiveVersion.ToString())); } catch (Exception ex) { Debug.Fail(ex.ToString()); } }
/// <summary> /// Handles the MasterServerListChanged event of the <see cref="_settings"/>. /// </summary> /// <param name="sender">The source of the event.</param> void _settings_MasterServerListChanged(ManagerSettings sender) { try { UpdateServerListBox(lstMS, sender.MasterServers.Cast<ServerInfoBase>(), MasterServerInfo_ServerChanged); } catch (Exception ex) { Debug.Fail(ex.ToString()); } }
void _settings_NextVersionCreated(ManagerSettings sender) { EnqueueSyncVersion(sender.LiveVersion + 1); }
void _settings_LiveVersionChanged(ManagerSettings sender) { EnqueueSyncVersion(sender.LiveVersion); }
/// <summary> /// Handles when the master server list has changed. /// </summary> /// <param name="sender">The sender.</param> void _settings_MasterServerListChanged(ManagerSettings sender) { // Just sync the latest version, which will force the server list to update EnqueueSyncVersion(sender.LiveVersion); }