-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #101 from Difegue/dev
2.7.0
- Loading branch information
Showing
37 changed files
with
1,092 additions
and
231 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,6 +65,10 @@ jobs: | |
- name: Setup MSBuild.exe | ||
uses: microsoft/[email protected] | ||
|
||
- name: Add Toolkit Labs nuget feed | ||
run: | | ||
nuget sources add -name "CommunityToolkit-Labs" -source "https://pkgs.dev.azure.com/dotnet/CommunityToolkit/_packaging/CommunityToolkit-Labs/nuget/v3/index.json" | ||
# Restore the application | ||
- name: Restore the application | ||
working-directory: ./Sources | ||
|
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
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
42 changes: 42 additions & 0 deletions
42
Sources/Stylophone.Common/ViewModels/Items/OutputViewModel.cs
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,42 @@ | ||
using CommunityToolkit.Mvvm.ComponentModel; | ||
using CommunityToolkit.Mvvm.DependencyInjection; | ||
using MpcNET; | ||
using MpcNET.Commands.Output; | ||
using MpcNET.Types; | ||
using Stylophone.Common.Interfaces; | ||
using Stylophone.Common.Services; | ||
|
||
namespace Stylophone.Common.ViewModels.Items | ||
{ | ||
public partial class OutputViewModel: ObservableObject | ||
{ | ||
[ObservableProperty] | ||
private string _name; | ||
|
||
[ObservableProperty] | ||
private string _plugin; | ||
|
||
[ObservableProperty] | ||
private bool _isEnabled; | ||
|
||
private int _id; | ||
|
||
public OutputViewModel() { } | ||
|
||
public OutputViewModel(MpdOutput o) | ||
{ | ||
_id = o.Id; | ||
_name = o.Name; | ||
_plugin = o.Plugin; | ||
_isEnabled = o.IsEnabled; | ||
} | ||
|
||
partial void OnIsEnabledChanged(bool value) | ||
{ | ||
IMpcCommand<string> command = value ? new EnableOutputCommand(_id) : new DisableOutputCommand(_id); | ||
|
||
Ioc.Default.GetRequiredService<MPDConnectionService>().SafelySendCommandAsync(command); | ||
} | ||
|
||
} | ||
} |
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
36 changes: 36 additions & 0 deletions
36
Sources/Stylophone.Localization/Strings/Resources.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.