mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Added shared UI library and finished the ColorPicker
This commit is contained in:
1 parent
5e876dc8ca
commit
b9471abdec
30 files changed
+875
-321
No files matched your search
@@ -1,38 +1,18 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media;
|
||||
using Stylet;
|
||||
|
||||
namespace Artemis.UI.Screens.Workshop
|
||||
{
|
||||
public class WorkshopViewModel : Screen, IScreenViewModel
|
||||
{
|
||||
public Color TestColor { get; set; }
|
||||
public bool TestPopupOpen { get; set; }
|
||||
public string Title => "Workshop";
|
||||
|
||||
public WorkshopViewModel()
|
||||
public void UpdateValues()
|
||||
{
|
||||
PropertyChanged += OnPropertyChanged;
|
||||
}
|
||||
|
||||
private void OnPropertyChanged(object sender, PropertyChangedEventArgs e)
|
||||
{
|
||||
Console.WriteLine("Property changed:" + e.PropertyName);
|
||||
Console.WriteLine(TestColor);
|
||||
}
|
||||
|
||||
public Color TestColor { get; set; }
|
||||
|
||||
|
||||
protected override void OnActivate()
|
||||
{
|
||||
TestColor = Color.FromRgb(255, 0, 0);
|
||||
base.OnActivate();
|
||||
}
|
||||
|
||||
protected override void OnDeactivate()
|
||||
{
|
||||
Console.WriteLine(TestColor);
|
||||
base.OnDeactivate();
|
||||
TestPopupOpen = !TestPopupOpen;
|
||||
TestColor = Color.FromRgb(5, 174, 255);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user