Renamed settings view model to LANCommanderSettingsViewModel
This commit is contained in:
parent
b28ef5a40c
commit
f2e1462832
4 changed files with 8 additions and 8 deletions
|
@ -19,7 +19,7 @@ namespace LANCommander.PlaynitePlugin
|
||||||
public class LANCommanderLibraryPlugin : LibraryPlugin
|
public class LANCommanderLibraryPlugin : LibraryPlugin
|
||||||
{
|
{
|
||||||
public static readonly ILogger Logger = LogManager.GetLogger();
|
public static readonly ILogger Logger = LogManager.GetLogger();
|
||||||
internal PlayniteSettingsViewModel Settings { get; set; }
|
internal LANCommanderSettingsViewModel Settings { get; set; }
|
||||||
internal LANCommanderClient LANCommander { get; set; }
|
internal LANCommanderClient LANCommander { get; set; }
|
||||||
|
|
||||||
public override Guid Id { get; } = Guid.Parse("48e1bac7-e0a0-45d7-ba83-36f5e9e959fc");
|
public override Guid Id { get; } = Guid.Parse("48e1bac7-e0a0-45d7-ba83-36f5e9e959fc");
|
||||||
|
@ -33,7 +33,7 @@ namespace LANCommander.PlaynitePlugin
|
||||||
HasSettings = true,
|
HasSettings = true,
|
||||||
};
|
};
|
||||||
|
|
||||||
Settings = new PlayniteSettingsViewModel(this);
|
Settings = new LANCommanderSettingsViewModel(this);
|
||||||
LANCommander = new LANCommanderClient(Settings.ServerAddress);
|
LANCommander = new LANCommanderClient(Settings.ServerAddress);
|
||||||
LANCommander.Token = new SDK.Models.AuthToken()
|
LANCommander.Token = new SDK.Models.AuthToken()
|
||||||
{
|
{
|
||||||
|
|
|
@ -8,7 +8,7 @@ using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace LANCommander.PlaynitePlugin
|
namespace LANCommander.PlaynitePlugin
|
||||||
{
|
{
|
||||||
public class PlayniteSettingsViewModel : ObservableObject, ISettings
|
public class LANCommanderSettingsViewModel : ObservableObject, ISettings
|
||||||
{
|
{
|
||||||
private readonly LANCommanderLibraryPlugin Plugin;
|
private readonly LANCommanderLibraryPlugin Plugin;
|
||||||
|
|
||||||
|
@ -17,13 +17,13 @@ namespace LANCommander.PlaynitePlugin
|
||||||
public string RefreshToken { get; set; } = String.Empty;
|
public string RefreshToken { get; set; } = String.Empty;
|
||||||
public string InstallDirectory { get; set; } = String.Empty;
|
public string InstallDirectory { get; set; } = String.Empty;
|
||||||
|
|
||||||
public PlayniteSettingsViewModel() { }
|
public LANCommanderSettingsViewModel() { }
|
||||||
|
|
||||||
public PlayniteSettingsViewModel(LANCommanderLibraryPlugin plugin)
|
public LANCommanderSettingsViewModel(LANCommanderLibraryPlugin plugin)
|
||||||
{
|
{
|
||||||
Plugin = plugin;
|
Plugin = plugin;
|
||||||
|
|
||||||
var settings = Plugin.LoadPluginSettings<PlayniteSettingsViewModel>();
|
var settings = Plugin.LoadPluginSettings<LANCommanderSettingsViewModel>();
|
||||||
|
|
||||||
ServerAddress = settings.ServerAddress;
|
ServerAddress = settings.ServerAddress;
|
||||||
AccessToken = settings.AccessToken;
|
AccessToken = settings.AccessToken;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:playniteplugin="clr-namespace:LANCommander.PlaynitePlugin" d:DataContext="{d:DesignInstance Type=playniteplugin:PlayniteSettingsViewModel}"
|
xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:playniteplugin="clr-namespace:LANCommander.PlaynitePlugin" d:DataContext="{d:DesignInstance Type=playniteplugin:LANCommanderSettingsViewModel}"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="400" d:DesignWidth="600">
|
d:DesignHeight="400" d:DesignWidth="600">
|
||||||
<d:DesignerProperties.DesignStyle>
|
<d:DesignerProperties.DesignStyle>
|
||||||
|
|
|
@ -20,7 +20,7 @@ namespace LANCommander.PlaynitePlugin
|
||||||
public partial class PlayniteSettingsView : UserControl
|
public partial class PlayniteSettingsView : UserControl
|
||||||
{
|
{
|
||||||
private LANCommanderLibraryPlugin Plugin;
|
private LANCommanderLibraryPlugin Plugin;
|
||||||
private PlayniteSettingsViewModel Settings;
|
private LANCommanderSettingsViewModel Settings;
|
||||||
|
|
||||||
public PlayniteSettingsView(LANCommanderLibraryPlugin plugin)
|
public PlayniteSettingsView(LANCommanderLibraryPlugin plugin)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue