mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Core - Corrected disposable pattern usage
Core - Further nullable refactoring..
This commit is contained in:
1 parent
27e25f22ed
commit
b185b28645
38 files changed
+429
-162
No files matched your search
@@ -107,12 +107,12 @@ namespace Artemis.Core.Services
|
||||
Profile profile = new Profile(profileDescriptor.ProfileModule, profileEntity);
|
||||
InstantiateProfile(profile);
|
||||
|
||||
void ActivatingProfileSurfaceUpdate(object sender, SurfaceConfigurationEventArgs e)
|
||||
void ActivatingProfileSurfaceUpdate(object? sender, SurfaceConfigurationEventArgs e)
|
||||
{
|
||||
profile.PopulateLeds(e.Surface);
|
||||
}
|
||||
|
||||
void ActivatingProfilePluginToggle(object sender, PluginEventArgs e)
|
||||
void ActivatingProfilePluginToggle(object? sender, PluginEventArgs e)
|
||||
{
|
||||
InstantiateProfile(profile);
|
||||
}
|
||||
@@ -292,12 +292,12 @@ namespace Artemis.Core.Services
|
||||
|
||||
#region Event handlers
|
||||
|
||||
private void OnActiveSurfaceConfigurationSelected(object sender, SurfaceConfigurationEventArgs e)
|
||||
private void OnActiveSurfaceConfigurationSelected(object? sender, SurfaceConfigurationEventArgs e)
|
||||
{
|
||||
ActiveProfilesPopulateLeds(e.Surface);
|
||||
}
|
||||
|
||||
private void OnSurfaceConfigurationUpdated(object sender, SurfaceConfigurationEventArgs e)
|
||||
private void OnSurfaceConfigurationUpdated(object? sender, SurfaceConfigurationEventArgs e)
|
||||
{
|
||||
if (e.Surface.IsActive)
|
||||
ActiveProfilesPopulateLeds(e.Surface);
|
||||
|
||||
@@ -201,7 +201,7 @@ namespace Artemis.Core.Services
|
||||
|
||||
#region Event handlers
|
||||
|
||||
private void RgbServiceOnDeviceLoaded(object sender, DeviceEventArgs e)
|
||||
private void RgbServiceOnDeviceLoaded(object? sender, DeviceEventArgs e)
|
||||
{
|
||||
lock (_surfaceConfigurations)
|
||||
{
|
||||
@@ -212,7 +212,7 @@ namespace Artemis.Core.Services
|
||||
UpdateSurfaceConfiguration(ActiveSurface, true);
|
||||
}
|
||||
|
||||
private void RenderScaleSettingOnSettingChanged(object sender, EventArgs e)
|
||||
private void RenderScaleSettingOnSettingChanged(object? sender, EventArgs e)
|
||||
{
|
||||
foreach (ArtemisSurface surfaceConfiguration in SurfaceConfigurations)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user