mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 11:26:27 +00:00
Core - Avoid restart loop if failing to drop admin permissions
Profile editor - Close brush/effect dialog if said brush/effect is unloaded Webserver - Fixed ServerUrl value containing a wildcard instead of localhost
This commit is contained in:
1 parent
ebb4aaa46c
commit
a2df88bab9
6 files changed
+43
-26
No files matched your search
@@ -32,6 +32,8 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.Tree
|
||||
private readonly IDialogService _dialogService;
|
||||
private readonly IProfileEditorService _profileEditorService;
|
||||
private readonly IWindowManager _windowManager;
|
||||
private LayerBrushSettingsWindowViewModel? _layerBrushSettingsWindowVm;
|
||||
private LayerEffectSettingsWindowViewModel _layerEffectSettingsWindowVm;
|
||||
|
||||
public TreeGroupViewModel(LayerPropertyGroupViewModel layerPropertyGroupViewModel, IProfileEditorService profileEditorService, IDialogService dialogService, IWindowManager windowManager)
|
||||
{
|
||||
@@ -73,7 +75,8 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.Tree
|
||||
ConstructorArgument argument = new(brushParameter.Name, layerBrush);
|
||||
BrushConfigurationViewModel viewModel = (BrushConfigurationViewModel) layerBrush.Descriptor.Provider.Plugin.Kernel.Get(configurationViewModel.Type, argument);
|
||||
|
||||
_windowManager.ShowDialog(new LayerBrushSettingsWindowViewModel(viewModel));
|
||||
_layerBrushSettingsWindowVm = new LayerBrushSettingsWindowViewModel(viewModel);
|
||||
_windowManager.ShowDialog(_layerBrushSettingsWindowVm);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -98,7 +101,9 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.Tree
|
||||
ParameterInfo effectParameter = constructors.First().GetParameters().First(p => typeof(BaseLayerEffect).IsAssignableFrom(p.ParameterType));
|
||||
ConstructorArgument argument = new(effectParameter.Name, layerEffect);
|
||||
EffectConfigurationViewModel viewModel = (EffectConfigurationViewModel) layerEffect.Descriptor.Provider.Plugin.Kernel.Get(configurationViewModel.Type, argument);
|
||||
_windowManager.ShowDialog(new LayerEffectSettingsWindowViewModel(viewModel));
|
||||
|
||||
_layerEffectSettingsWindowVm = new LayerEffectSettingsWindowViewModel(viewModel);
|
||||
_windowManager.ShowDialog(_layerEffectSettingsWindowVm);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -185,6 +190,11 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.Tree
|
||||
protected override void OnClose()
|
||||
{
|
||||
LayerPropertyGroupViewModel.PropertyChanged -= LayerPropertyGroupViewModelOnPropertyChanged;
|
||||
|
||||
// Clean up windows that may be open, sorry but your brush/effect is closed!
|
||||
_layerBrushSettingsWindowVm?.RequestClose();
|
||||
_layerEffectSettingsWindowVm?.RequestClose();
|
||||
|
||||
base.OnClose();
|
||||
}
|
||||
|
||||
|
||||
@@ -18,13 +18,18 @@
|
||||
d:DesignWidth="800"
|
||||
d:DataContext="{d:DesignInstance windows:LayerBrushSettingsWindowViewModel}"
|
||||
Icon="/Resources/Images/Logo/logo-512.png">
|
||||
<DockPanel>
|
||||
<controls:AppBar Type="Dense" Title="{Binding ActiveItem.LayerBrush.Descriptor.DisplayName}" DockPanel.Dock="Top" Margin="-18 0 0 0" ShowShadow="False">
|
||||
<controls:AppBar.AppIcon>
|
||||
<materialDesign:PackIcon Kind="{Binding ActiveItem.LayerBrush.Descriptor.Icon}" Width="20" Height="28" />
|
||||
</controls:AppBar.AppIcon>
|
||||
</controls:AppBar>
|
||||
<materialDesign:DialogHost IsTabStop="False"
|
||||
Focusable="False"
|
||||
Identifier="BrushSettingsDialog"
|
||||
DialogTheme="Inherit">
|
||||
<DockPanel>
|
||||
<controls:AppBar Type="Dense" Title="{Binding ActiveItem.LayerBrush.Descriptor.DisplayName}" DockPanel.Dock="Top" Margin="-18 0 0 0" ShowShadow="False">
|
||||
<controls:AppBar.AppIcon>
|
||||
<materialDesign:PackIcon Kind="{Binding ActiveItem.LayerBrush.Descriptor.Icon}" Width="20" Height="28" />
|
||||
</controls:AppBar.AppIcon>
|
||||
</controls:AppBar>
|
||||
|
||||
<ContentControl s:View.Model="{Binding ActiveItem}" />
|
||||
</DockPanel>
|
||||
<ContentControl s:View.Model="{Binding ActiveItem}" />
|
||||
</DockPanel>
|
||||
</materialDesign:DialogHost>
|
||||
</controls:MaterialWindow>
|
||||
Reference in new issue
Block a user