Exemplo n.º 1
0
        /// <summary>
        /// Initializes the <see cref="ManagerSettings"/> class.
        /// </summary>
        static ManagerSettings()
        {
            var filePath = PathHelper.CombineDifferentPaths(Application.StartupPath, _settingsFile);

            _instance = new ManagerSettings(filePath);
            _instance.Load(filePath);
        }
Exemplo n.º 2
0
 /// <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());
     }
 }
Exemplo n.º 3
0
 /// <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());
     }
 }
Exemplo n.º 4
0
 /// <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());
     }
 }
Exemplo n.º 5
0
 /// <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());
     }
 }
Exemplo n.º 6
0
 /// <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());
     }
 }
Exemplo n.º 7
0
 /// <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());
     }
 }
Exemplo n.º 8
0
 void _settings_NextVersionCreated(ManagerSettings sender)
 {
     EnqueueSyncVersion(sender.LiveVersion + 1);
 }
Exemplo n.º 9
0
 void _settings_LiveVersionChanged(ManagerSettings sender)
 {
     EnqueueSyncVersion(sender.LiveVersion);
 }
Exemplo n.º 10
0
 /// <summary>
 /// Initializes the <see cref="ManagerSettings"/> class.
 /// </summary>
 static ManagerSettings()
 {
     var filePath = PathHelper.CombineDifferentPaths(Application.StartupPath, _settingsFile);
     _instance = new ManagerSettings(filePath);
     _instance.Load(filePath);
 }
Exemplo n.º 11
0
 /// <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);
 }
Exemplo n.º 12
0
 /// <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);
 }
Exemplo n.º 13
0
 void _settings_NextVersionCreated(ManagerSettings sender)
 {
     EnqueueSyncVersion(sender.LiveVersion + 1);
 }
Exemplo n.º 14
0
 void _settings_LiveVersionChanged(ManagerSettings sender)
 {
     EnqueueSyncVersion(sender.LiveVersion);
 }