예제 #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);
        }
예제 #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());
     }
 }
예제 #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());
     }
 }
예제 #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());
     }
 }
예제 #5
0
파일: MainForm.cs 프로젝트: wtfcolt/game
 /// <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());
     }
 }
예제 #6
0
파일: MainForm.cs 프로젝트: wtfcolt/game
 /// <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());
     }
 }
예제 #7
0
파일: MainForm.cs 프로젝트: wtfcolt/game
 /// <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());
     }
 }
예제 #8
0
 void _settings_NextVersionCreated(ManagerSettings sender)
 {
     EnqueueSyncVersion(sender.LiveVersion + 1);
 }
예제 #9
0
 void _settings_LiveVersionChanged(ManagerSettings sender)
 {
     EnqueueSyncVersion(sender.LiveVersion);
 }
예제 #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);
 }
예제 #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);
 }
예제 #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);
 }
예제 #13
0
 void _settings_NextVersionCreated(ManagerSettings sender)
 {
     EnqueueSyncVersion(sender.LiveVersion + 1);
 }
예제 #14
0
 void _settings_LiveVersionChanged(ManagerSettings sender)
 {
     EnqueueSyncVersion(sender.LiveVersion);
 }