mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Fixed Windows Profile (auto) enabling
This commit is contained in:
parent
6436942e47
commit
449c811bde
@ -31,6 +31,7 @@ namespace Artemis.Models
|
|||||||
// Called every frame
|
// Called every frame
|
||||||
public abstract void Update();
|
public abstract void Update();
|
||||||
|
|
||||||
|
// Used by profile system
|
||||||
public IDataModel DataModel { get; set; }
|
public IDataModel DataModel { get; set; }
|
||||||
public ProfileModel Profile { get; set; }
|
public ProfileModel Profile { get; set; }
|
||||||
|
|
||||||
|
|||||||
@ -34,9 +34,9 @@
|
|||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||||
<Label Content="Enable effect" Margin="0 3 0 0" HorizontalAlignment="Right" />
|
<Label Content="Enable effect" Margin="0 3 0 0" HorizontalAlignment="Right" />
|
||||||
<ToggleButton x:Name="EffectEnabled" Margin="0 3 0 0" Width="25" Height="25"
|
<ToggleButton x:Name="EffectEnabled" Margin="0 3 0 0" Width="25" Height="25"
|
||||||
IsChecked="{Binding Path=GameSettings.Enabled, Mode=TwoWay}"
|
|
||||||
Style="{DynamicResource MetroCircleToggleButtonStyle}"
|
Style="{DynamicResource MetroCircleToggleButtonStyle}"
|
||||||
cal:Message.Attach="[Event Click] = [Action ToggleEffect]" />
|
cal:Message.Attach="[Event Click] = [Action ToggleEffect]"
|
||||||
|
ToolTip="Note: You can't enable an effect when Artemis is disabled" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
|
|||||||
@ -19,12 +19,13 @@ namespace Artemis.Modules.Effects.WindowsProfile
|
|||||||
DisplayName = "Windows Profile";
|
DisplayName = "Windows Profile";
|
||||||
PFactory = pFactory;
|
PFactory = pFactory;
|
||||||
ProfilePreviewModel = profilePreviewModel;
|
ProfilePreviewModel = profilePreviewModel;
|
||||||
EffectSettings = ((WindowsProfileModel) EffectModel).Settings;
|
EffectSettings = ((WindowsProfileModel)EffectModel).Settings;
|
||||||
|
|
||||||
ProfileEditor = PFactory.CreateProfileEditorVm(events, main, (WindowsProfileModel) EffectModel,
|
ProfileEditor = PFactory.CreateProfileEditorVm(events, main, (WindowsProfileModel)EffectModel,
|
||||||
((WindowsProfileSettings) EffectSettings).LastProfile);
|
((WindowsProfileSettings)EffectSettings).LastProfile);
|
||||||
ProfilePreviewModel.Profile = ProfileEditor.SelectedProfile;
|
ProfilePreviewModel.Profile = ProfileEditor.SelectedProfile;
|
||||||
ProfileEditor.PropertyChanged += ProfileUpdater;
|
ProfileEditor.PropertyChanged += ProfileUpdater;
|
||||||
|
MainManager.EffectManager.EffectModels.Add(EffectModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ProfileEditorViewModel ProfileEditor { get; set; }
|
public ProfileEditorViewModel ProfileEditor { get; set; }
|
||||||
@ -42,7 +43,7 @@ namespace Artemis.Modules.Effects.WindowsProfile
|
|||||||
if (e.PropertyName != "SelectedProfile" || !ProfileEditor.ProfileViewModel.Activated ||
|
if (e.PropertyName != "SelectedProfile" || !ProfileEditor.ProfileViewModel.Activated ||
|
||||||
ProfileEditor.ProfileViewModel.SelectedProfile == null)
|
ProfileEditor.ProfileViewModel.SelectedProfile == null)
|
||||||
return;
|
return;
|
||||||
((WindowsProfileSettings) EffectSettings).LastProfile = ProfileEditor.ProfileViewModel.SelectedProfile.Name;
|
((WindowsProfileSettings)EffectSettings).LastProfile = ProfileEditor.ProfileViewModel.SelectedProfile.Name;
|
||||||
EffectSettings.Save();
|
EffectSettings.Save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user