mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
fix: event naming style in DalamudPluginInterface.cs (closes #458)
This commit is contained in:
parent
84f516b11e
commit
b1a596a598
4 changed files with 14 additions and 14 deletions
|
|
@ -13,7 +13,7 @@ namespace Dalamud.Test
|
|||
{
|
||||
var workingDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
|
||||
this.localization = new Localization(workingDir, "dalamud_");
|
||||
this.localization.OnLocalizationChanged += code => this.currentLangCode = code;
|
||||
this.localization.LocalizationChanged += code => this.currentLangCode = code;
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ namespace Dalamud.Configuration.Internal
|
|||
private string configPath;
|
||||
|
||||
/// <summary>
|
||||
/// Delegate for the <see cref="OnDalamudConfigurationSaved"/> event that occurs when the dalamud configuration is saved.
|
||||
/// Delegate for the <see cref="DalamudConfiguration.DalamudConfigurationSaved"/> event that occurs when the dalamud configuration is saved.
|
||||
/// </summary>
|
||||
/// <param name="dalamudConfiguration">The current dalamud configuration.</param>
|
||||
public delegate void DalamudConfigurationSavedDelegate(DalamudConfiguration dalamudConfiguration);
|
||||
|
|
@ -27,7 +27,7 @@ namespace Dalamud.Configuration.Internal
|
|||
/// <summary>
|
||||
/// Event that occurs when dalamud configuration is saved.
|
||||
/// </summary>
|
||||
public event DalamudConfigurationSavedDelegate OnDalamudConfigurationSaved;
|
||||
public event DalamudConfigurationSavedDelegate DalamudConfigurationSaved;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a list of muted works.
|
||||
|
|
@ -219,7 +219,7 @@ namespace Dalamud.Configuration.Internal
|
|||
public void Save()
|
||||
{
|
||||
File.WriteAllText(this.configPath, JsonConvert.SerializeObject(this, Formatting.Indented));
|
||||
this.OnDalamudConfigurationSaved?.Invoke(this);
|
||||
this.DalamudConfigurationSaved?.Invoke(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ namespace Dalamud
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delegate for the <see cref="OnLocalizationChanged"/> event that occurs when the language is changed.
|
||||
/// Delegate for the <see cref="Localization.LocalizationChanged"/> event that occurs when the language is changed.
|
||||
/// </summary>
|
||||
/// <param name="langCode">The language code of the new language.</param>
|
||||
public delegate void LocalizationChangedDelegate(string langCode);
|
||||
|
|
@ -49,7 +49,7 @@ namespace Dalamud
|
|||
/// <summary>
|
||||
/// Event that occurs when the language is changed.
|
||||
/// </summary>
|
||||
public event LocalizationChangedDelegate OnLocalizationChanged;
|
||||
public event LocalizationChangedDelegate LocalizationChanged;
|
||||
|
||||
/// <summary>
|
||||
/// Search the set-up localization data for the provided assembly for the given string key and return it.
|
||||
|
|
@ -95,7 +95,7 @@ namespace Dalamud
|
|||
/// </summary>
|
||||
public void SetupWithFallbacks()
|
||||
{
|
||||
this.OnLocalizationChanged?.Invoke(FallbackLangCode);
|
||||
this.LocalizationChanged?.Invoke(FallbackLangCode);
|
||||
Loc.SetupWithFallbacks(this.assembly);
|
||||
}
|
||||
|
||||
|
|
@ -111,7 +111,7 @@ namespace Dalamud
|
|||
return;
|
||||
}
|
||||
|
||||
this.OnLocalizationChanged?.Invoke(langCode);
|
||||
this.LocalizationChanged?.Invoke(langCode);
|
||||
|
||||
try
|
||||
{
|
||||
|
|
|
|||
|
|
@ -60,8 +60,8 @@ namespace Dalamud.Plugin
|
|||
this.UiLanguage = "en";
|
||||
}
|
||||
|
||||
localization.OnLocalizationChanged += this.OnLocalizationChanged;
|
||||
configuration.OnDalamudConfigurationSaved += this.OnDalamudConfigurationSaved;
|
||||
localization.LocalizationChanged += this.OnLocalizationChanged;
|
||||
configuration.DalamudConfigurationSaved += this.OnDalamudConfigurationSaved;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -73,7 +73,7 @@ namespace Dalamud.Plugin
|
|||
/// <summary>
|
||||
/// Event that gets fired when loc is changed
|
||||
/// </summary>
|
||||
public event LanguageChangedDelegate OnLanguageChanged;
|
||||
public event LanguageChangedDelegate LanguageChanged;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the reason this plugin was loaded.
|
||||
|
|
@ -228,14 +228,14 @@ namespace Dalamud.Plugin
|
|||
{
|
||||
this.UiBuilder.Dispose();
|
||||
Service<ChatGui>.Get().RemoveChatLinkHandler(this.pluginName);
|
||||
Service<Localization>.Get().OnLocalizationChanged -= this.OnLocalizationChanged;
|
||||
Service<DalamudConfiguration>.Get().OnDalamudConfigurationSaved -= this.OnDalamudConfigurationSaved;
|
||||
Service<Localization>.Get().LocalizationChanged -= this.OnLocalizationChanged;
|
||||
Service<DalamudConfiguration>.Get().DalamudConfigurationSaved -= this.OnDalamudConfigurationSaved;
|
||||
}
|
||||
|
||||
private void OnLocalizationChanged(string langCode)
|
||||
{
|
||||
this.UiLanguage = langCode;
|
||||
this.OnLanguageChanged?.Invoke(langCode);
|
||||
this.LanguageChanged?.Invoke(langCode);
|
||||
}
|
||||
|
||||
private void OnDalamudConfigurationSaved(DalamudConfiguration dalamudConfiguration)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue