コード例 #1
0
 private void rootPanel_eventVisibilityChanged(UIComponent component, bool value)
 {
     // Only save and apply the configuration if the rootpanel was visible but isn't anymore (meaning the user closed the window)
     if (_wasVisible && !value)
     {
         _configuration.SaveConfiguration();
         _configuration.ApplyConfiguration();
     }
     this._wasVisible = value;
 }
コード例 #2
0
ファイル: Mod.cs プロジェクト: gertjanstulp/CSWorkshopMonitor
 private void Unload()
 {
     try
     {
         _configuration.SaveConfiguration();
     }
     catch (Exception ex)
     {
         ModLogger.Warning("An error occured while saving mod configuration to file '{0}', mod configuration is not saved", _settingsFilePath);
         ModLogger.Exception(ex);
     }
 }