mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Made SurfaceService solely responsible for keeping the surface and the config in sync and saved
This commit is contained in:
1 parent
9badc666e8
commit
3dc8fa6b1c
5 files changed
+85
-89
No files matched your search
@@ -152,6 +152,11 @@
|
||||
<Compile Include="Extensions\RgbColorExtensions.cs" />
|
||||
<Compile Include="Extensions\RgbRectangleExtensions.cs" />
|
||||
<Compile Include="Ninject\UIModule.cs" />
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Services\Interfaces\IArtemisUIService.cs" />
|
||||
<Compile Include="Stylet\ArtemisViewManager.cs" />
|
||||
<Compile Include="Stylet\NinjectBootstrapper.cs" />
|
||||
@@ -214,11 +219,6 @@
|
||||
<Compile Include="Properties\AssemblyInfo.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
@@ -226,6 +226,7 @@
|
||||
</Compile>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<None Include="packages.config" />
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace Artemis.UI.ViewModels.Screens
|
||||
if (activeConfig == null)
|
||||
{
|
||||
activeConfig = AddSurfaceConfiguration("Default");
|
||||
_surfaceService.ActiveSurfaceConfiguration = activeConfig;
|
||||
_surfaceService.SetActiveSurfaceConfiguration(activeConfig);
|
||||
}
|
||||
|
||||
Execute.OnUIThread(() =>
|
||||
@@ -106,7 +106,7 @@ namespace Artemis.UI.ViewModels.Screens
|
||||
});
|
||||
});
|
||||
|
||||
_surfaceService.ActiveSurfaceConfiguration = SelectedSurfaceConfiguration;
|
||||
_surfaceService.SetActiveSurfaceConfiguration(SelectedSurfaceConfiguration);
|
||||
}
|
||||
|
||||
#region Overrides of Screen
|
||||
@@ -275,9 +275,7 @@ namespace Artemis.UI.ViewModels.Screens
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var device in Devices)
|
||||
device.DeviceConfiguration.ApplyToDevice();
|
||||
_surfaceService.SaveToRepository(SelectedSurfaceConfiguration, true);
|
||||
_surfaceService.UpdateSurfaceConfiguration(SelectedSurfaceConfiguration, true);
|
||||
}
|
||||
|
||||
Mouse.OverrideCursor = null;
|
||||
|
||||
Reference in new issue
Block a user