1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00
Artemis/Artemis/Artemis/ViewModels/Profiles/Layers/LayerPropertiesViewModel.cs
Robert Beekman 8d9272f47c Layer refactor (#118)
* Expanded Trace logging for Overwatch and RL, updated The Witcher 3 mod for 1.22

* Events WIP

* Moved some views around, added event views

* Implemented events

* Some improvements to Overwatch parsing.. some.

* Improved Overwatch parsing to work well with events

* Fixed ultimate ready false positive during ultimate usage

* Added debug window which currently shows Razer SDK keyboard output

* Expanded Overwatch data model (todo: sticky values to avoid false-positives)

* Added sticky values to Overwatch datamodel, should resolve most flickering/false positives

* Layer refactor WIP

* Moved layer types, animations, conditions and events to interfaces. (WIP)

* Code cleanup, moved all profile related models to their own folder/namespace

* Finished most of the profile refactoring

* More profile refactoring, app compiles again

* Switched from XML to JSON for profiles (refactor broke existing profiles anyway)

* Made animation event expiration generic and fixed all serialization issues I've come across so far

* Cleaned up settings, rigged basic LayerEditorView(Model) to refactored models

* Rigged most layer type viewmodels back up to the new models

* Fixed most view(models).
Added animations to mice and headset.
Replaced serialization-based cloning with NClone
Fixed some rendering issues that came up with refactoring

* Added Current Time to WindowsProfile

* Cloning fixes
Replaced glitchy cloning package with a simple serialization clone (that package looked so good :c)
Removed serialization cloning from render process

* Expanded Trace logging for Overwatch and RL, updated The Witcher 3 mod for 1.22

* Events WIP

* Moved some views around, added event views

* Implemented events

* Some improvements to Overwatch parsing.. some.

* Improved Overwatch parsing to work well with events

* Fixed ultimate ready false positive during ultimate usage

* Added debug window which currently shows Razer SDK keyboard output

* Expanded Overwatch data model (todo: sticky values to avoid false-positives)

* Added sticky values to Overwatch datamodel, should resolve most flickering/false positives

* Layer refactor WIP

* Moved layer types, animations, conditions and events to interfaces. (WIP)

* Code cleanup, moved all profile related models to their own folder/namespace

* Finished most of the profile refactoring

* More profile refactoring, app compiles again

* Switched from XML to JSON for profiles (refactor broke existing profiles anyway)

* Made animation event expiration generic and fixed all serialization issues I've come across so far

* Cleaned up settings, rigged basic LayerEditorView(Model) to refactored models

* Rigged most layer type viewmodels back up to the new models

* Fixed most view(models).
Added animations to mice and headset.
Replaced serialization-based cloning with NClone
Fixed some rendering issues that came up with refactoring

* Added Current Time to WindowsProfile

* Cloning fixes
Replaced glitchy cloning package with a simple serialization clone (that package looked so good :c)
Removed serialization cloning from render process
2016-07-06 20:17:46 +02:00

47 lines
1.2 KiB
C#

using System.Drawing;
using Artemis.Models.Interfaces;
using Artemis.Profiles.Layers.Models;
using Caliburn.Micro;
using Brush = System.Windows.Media.Brush;
namespace Artemis.ViewModels.Profiles.Layers
{
public abstract class LayerPropertiesViewModel : PropertyChangedBase
{
private LayerModel _layerModel;
private Brush _brush;
protected LayerPropertiesViewModel(LayerModel layerModel, IDataModel dataModel)
{
LayerModel = layerModel;
DataModel = dataModel;
Brush = LayerModel.Properties.Brush.Clone();
}
public Brush Brush
{
get { return _brush; }
set
{
if (Equals(value, _brush)) return;
_brush = value;
NotifyOfPropertyChange(() => Brush);
}
}
public LayerModel LayerModel
{
get { return _layerModel; }
set
{
if (Equals(value, _layerModel)) return;
_layerModel = value;
NotifyOfPropertyChange(() => LayerModel);
}
}
public IDataModel DataModel { get; set; }
public abstract void ApplyProperties();
}
}