-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
76 changed files
with
2,991 additions
and
983 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,26 @@ | ||
using hass_workstation_service.Communication.InterProcesCommunication.Models; | ||
using ReactiveUI; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace UserInterface.ViewModels | ||
{ | ||
public class AddCommandViewModel : ViewModelBase | ||
{ | ||
private AvailableCommands selectedType; | ||
private string description; | ||
private AvailableCommands _selectedType; | ||
private string _name; | ||
private string _description; | ||
private bool _showCommandInput; | ||
private bool _showKeyInput; | ||
private string _moreInfoLink; | ||
private string _command; | ||
private string _key; | ||
|
||
public string Description { get => description; set => this.RaiseAndSetIfChanged(ref description, value); } | ||
public bool ShowCommandInput { get => showCommandInput; set => this.RaiseAndSetIfChanged(ref showCommandInput, value); } | ||
public bool ShowKeyInput { get => showKeyInput; set => this.RaiseAndSetIfChanged(ref showKeyInput, value); } | ||
|
||
private string moreInfoLink; | ||
private bool showCommandInput; | ||
private bool showKeyInput; | ||
|
||
public string MoreInfoLink | ||
{ | ||
get { return moreInfoLink; } | ||
set { this.RaiseAndSetIfChanged(ref moreInfoLink, value); } | ||
} | ||
|
||
public AvailableCommands SelectedType { get => selectedType; set => this.RaiseAndSetIfChanged(ref selectedType, value); } | ||
|
||
public string Name { get; set; } | ||
public string Command { get; set; } | ||
public string Key { get; set; } | ||
public AvailableCommands SelectedType { get => _selectedType; set => this.RaiseAndSetIfChanged(ref _selectedType, value); } | ||
public string Name { get => _name; set => this.RaiseAndSetIfChanged(ref _name, value); } | ||
public string Description { get => _description; set => this.RaiseAndSetIfChanged(ref _description, value); } | ||
public bool ShowCommandInput { get => _showCommandInput; set => this.RaiseAndSetIfChanged(ref _showCommandInput, value); } | ||
public bool ShowKeyInput { get => _showKeyInput; set => this.RaiseAndSetIfChanged(ref _showKeyInput, value); } | ||
public string MoreInfoLink { get => _moreInfoLink; set => this.RaiseAndSetIfChanged(ref _moreInfoLink, value); } | ||
public string Command { get => _command; set => this.RaiseAndSetIfChanged(ref _command, value); } | ||
public string Key { get => _key; set => this.RaiseAndSetIfChanged(ref _key, value); } | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,28 @@ | ||
using hass_workstation_service.Communication.InterProcesCommunication.Models; | ||
using ReactiveUI; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace UserInterface.ViewModels | ||
{ | ||
public class AddSensorViewModel : ViewModelBase | ||
{ | ||
private AvailableSensors selectedType; | ||
private string description; | ||
private bool showQueryInput; | ||
|
||
public string Description { get => description; set => this.RaiseAndSetIfChanged(ref description, value); } | ||
public bool ShowQueryInput { get => showQueryInput; set => this.RaiseAndSetIfChanged(ref showQueryInput, value); } | ||
public bool ShowWindowNameInput { get => showWindowNameInput; set => this.RaiseAndSetIfChanged(ref showWindowNameInput, value); } | ||
|
||
public bool ShowDetectionModeOptions { get => showDetectionModeOptions; set => this.RaiseAndSetIfChanged(ref showDetectionModeOptions, value); } | ||
|
||
private string moreInfoLink; | ||
private int updateInterval; | ||
private bool showWindowNameInput; | ||
private bool showDetectionModeOptions; | ||
|
||
public string MoreInfoLink | ||
{ | ||
get { return moreInfoLink; } | ||
set { this.RaiseAndSetIfChanged(ref moreInfoLink, value); } | ||
} | ||
|
||
|
||
public AvailableSensors SelectedType { get => selectedType; set => this.RaiseAndSetIfChanged(ref selectedType, value); } | ||
|
||
public string Name { get; set; } | ||
public string Query { get; set; } | ||
public string WindowName { get; set; } | ||
public int UpdateInterval { get => updateInterval; set => this.RaiseAndSetIfChanged(ref updateInterval, value); } | ||
private AvailableSensors _selectedType; | ||
private string _name; | ||
private int _updateInterval; | ||
private string _description; | ||
private bool _showQueryInput; | ||
private bool _showWindowNameInput; | ||
private string _moreInfoLink; | ||
private string _query; | ||
private string _windowName; | ||
|
||
public AvailableSensors SelectedType { get => _selectedType; set => this.RaiseAndSetIfChanged(ref _selectedType, value); } | ||
public string Name { get => _name; set => this.RaiseAndSetIfChanged(ref _name, value); } | ||
public int UpdateInterval { get => _updateInterval; set => this.RaiseAndSetIfChanged(ref _updateInterval, value); } | ||
public string Description { get => _description; set => this.RaiseAndSetIfChanged(ref _description, value); } | ||
public bool ShowQueryInput { get => _showQueryInput; set => this.RaiseAndSetIfChanged(ref _showQueryInput, value); } | ||
public bool ShowWindowNameInput { get => _showWindowNameInput; set => this.RaiseAndSetIfChanged(ref _showWindowNameInput, value); } | ||
public string MoreInfoLink { get => _moreInfoLink; set => this.RaiseAndSetIfChanged(ref _moreInfoLink, value); } | ||
public string Query { get => _query; set => this.RaiseAndSetIfChanged(ref _query, value); } | ||
public string WindowName { get => _windowName; set => this.RaiseAndSetIfChanged(ref _windowName, value); } | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using hass_workstation_service.Communication.InterProcesCommunication.Models; | ||
using hass_workstation_service.Data; | ||
using ReactiveUI; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel.DataAnnotations; | ||
using System.Text; | ||
|
||
namespace UserInterface.ViewModels | ||
{ | ||
public class GeneralSettingsViewModel : ViewModelBase | ||
{ | ||
private string namePrefix; | ||
|
||
public string NamePrefix { get => namePrefix; set => this.RaiseAndSetIfChanged(ref namePrefix, value); } | ||
|
||
public void Update(GeneralSettings settings) | ||
{ | ||
this.NamePrefix = settings.NamePrefix; | ||
} | ||
} | ||
} |
Oops, something went wrong.