Add project files.
This commit is contained in:
@@ -0,0 +1,164 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using Blynclight;
|
||||
|
||||
namespace Tasklight.Controller
|
||||
{
|
||||
public abstract class MainWindowModel : ModelBase
|
||||
{
|
||||
private BlynclightController _lightController;
|
||||
private bool _lightConnected;
|
||||
private Visibility _connectVisible;
|
||||
private Visibility _commandsVisible;
|
||||
|
||||
private int _red;
|
||||
private int _green;
|
||||
private int _blue;
|
||||
|
||||
private ICommand _lightConnect;
|
||||
private ICommand _lightUpdate;
|
||||
private ICommand _lightReset;
|
||||
private ICommand _lightDisconnect;
|
||||
|
||||
private ICommand _redSet;
|
||||
private ICommand _greenSet;
|
||||
private ICommand _blueSet;
|
||||
private ICommand _yellowSet;
|
||||
private ICommand _magentaSet;
|
||||
private ICommand _cyanSet;
|
||||
private ICommand _whiteSet;
|
||||
private ICommand _orangeSet;
|
||||
|
||||
private ICommand _colorPick;
|
||||
|
||||
private bool _flashEnabled;
|
||||
private string _flashType;
|
||||
private bool _dimmed;
|
||||
|
||||
public BlynclightController LightController
|
||||
{
|
||||
get { return _lightController; }
|
||||
set { SetProperty(ref _lightController, value, nameof(LightController)); }
|
||||
}
|
||||
public bool LightConnected
|
||||
{
|
||||
get { return _lightConnected; }
|
||||
set { SetProperty(ref _lightConnected, value, nameof(LightConnected)); }
|
||||
}
|
||||
public Visibility ConnectVisible
|
||||
{
|
||||
get { return _connectVisible; }
|
||||
set { SetProperty(ref _connectVisible, value, nameof(ConnectVisible)); }
|
||||
}
|
||||
public Visibility CommandsVisible
|
||||
{
|
||||
get { return _commandsVisible; }
|
||||
set { SetProperty(ref _commandsVisible, value, nameof(CommandsVisible)); }
|
||||
}
|
||||
|
||||
public int Red
|
||||
{
|
||||
get { return _red; }
|
||||
set { SetProperty(ref _red, value, nameof(Red)); }
|
||||
}
|
||||
public int Green
|
||||
{
|
||||
get { return _green; }
|
||||
set { SetProperty(ref _green, value, nameof(Green)); }
|
||||
}
|
||||
public int Blue
|
||||
{
|
||||
get { return _blue; }
|
||||
set { SetProperty(ref _blue, value, nameof(Blue)); }
|
||||
}
|
||||
|
||||
public ICommand LightConnect
|
||||
{
|
||||
get { return _lightConnect; }
|
||||
set { SetProperty(ref _lightConnect, value, nameof(LightConnect)); }
|
||||
}
|
||||
public ICommand LightUpdate
|
||||
{
|
||||
get { return _lightUpdate; }
|
||||
set { SetProperty(ref _lightUpdate, _lightUpdate, nameof(LightUpdate)); }
|
||||
}
|
||||
public ICommand LightReset
|
||||
{
|
||||
get { return _lightReset; }
|
||||
set { SetProperty(ref _lightReset, value, nameof(LightReset)); }
|
||||
}
|
||||
public ICommand LightDisconnect
|
||||
{
|
||||
get { return _lightDisconnect; }
|
||||
set { SetProperty(ref _lightDisconnect, value, nameof(LightDisconnect)); }
|
||||
}
|
||||
|
||||
public ICommand RedSet
|
||||
{
|
||||
get { return _redSet; }
|
||||
set { SetProperty(ref _redSet, value, nameof(RedSet)); }
|
||||
}
|
||||
public ICommand GreenSet
|
||||
{
|
||||
get { return _greenSet; }
|
||||
set { SetProperty(ref _greenSet, value, nameof(GreenSet)); }
|
||||
}
|
||||
public ICommand BlueSet
|
||||
{
|
||||
get { return _blueSet; }
|
||||
set { SetProperty(ref _blueSet, value, nameof(BlueSet)); }
|
||||
}
|
||||
public ICommand YellowSet
|
||||
{
|
||||
get { return _yellowSet; }
|
||||
set { SetProperty(ref _yellowSet, value, nameof(YellowSet)); }
|
||||
}
|
||||
public ICommand MagentaSet
|
||||
{
|
||||
get { return _magentaSet; }
|
||||
set { SetProperty(ref _magentaSet, value, nameof(MagentaSet)); }
|
||||
}
|
||||
public ICommand CyanSet
|
||||
{
|
||||
get { return _cyanSet; }
|
||||
set { SetProperty(ref _cyanSet, value, nameof(CyanSet)); }
|
||||
}
|
||||
public ICommand WhiteSet
|
||||
{
|
||||
get { return _whiteSet; }
|
||||
set { SetProperty(ref _whiteSet, value, nameof(WhiteSet)); }
|
||||
}
|
||||
public ICommand OrangeSet
|
||||
{
|
||||
get { return _orangeSet; }
|
||||
set { SetProperty(ref _orangeSet, value, nameof(OrangeSet)); }
|
||||
}
|
||||
|
||||
public ICommand ColorPick
|
||||
{
|
||||
get { return _colorPick; }
|
||||
set { SetProperty(ref _colorPick, value, nameof(ColorPick)); }
|
||||
}
|
||||
|
||||
public bool FlashEnabled
|
||||
{
|
||||
get { return _flashEnabled; }
|
||||
set { SetProperty(ref _flashEnabled, value, nameof(FlashEnabled)); }
|
||||
}
|
||||
public string FlashType
|
||||
{
|
||||
get { return _flashType; }
|
||||
set { SetProperty(ref _flashType, value, nameof(FlashType)); }
|
||||
}
|
||||
public bool Dimmed
|
||||
{
|
||||
get { return _dimmed; }
|
||||
set { SetProperty(ref _dimmed, value, nameof(Dimmed)); }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user