Renamed settings view model to LANCommanderSettingsViewModel

This commit is contained in:
Pat Hartl 2023-01-14 15:16:13 -06:00
parent b28ef5a40c
commit f2e1462832
4 changed files with 8 additions and 8 deletions

View file

@ -19,7 +19,7 @@ namespace LANCommander.PlaynitePlugin
public class LANCommanderLibraryPlugin : LibraryPlugin
{
public static readonly ILogger Logger = LogManager.GetLogger();
internal PlayniteSettingsViewModel Settings { get; set; }
internal LANCommanderSettingsViewModel Settings { get; set; }
internal LANCommanderClient LANCommander { get; set; }
public override Guid Id { get; } = Guid.Parse("48e1bac7-e0a0-45d7-ba83-36f5e9e959fc");
@ -33,7 +33,7 @@ namespace LANCommander.PlaynitePlugin
HasSettings = true,
};
Settings = new PlayniteSettingsViewModel(this);
Settings = new LANCommanderSettingsViewModel(this);
LANCommander = new LANCommanderClient(Settings.ServerAddress);
LANCommander.Token = new SDK.Models.AuthToken()
{

View file

@ -8,7 +8,7 @@ using System.Threading.Tasks;
namespace LANCommander.PlaynitePlugin
{
public class PlayniteSettingsViewModel : ObservableObject, ISettings
public class LANCommanderSettingsViewModel : ObservableObject, ISettings
{
private readonly LANCommanderLibraryPlugin Plugin;
@ -17,13 +17,13 @@ namespace LANCommander.PlaynitePlugin
public string RefreshToken { 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;
var settings = Plugin.LoadPluginSettings<PlayniteSettingsViewModel>();
var settings = Plugin.LoadPluginSettings<LANCommanderSettingsViewModel>();
ServerAddress = settings.ServerAddress;
AccessToken = settings.AccessToken;

View file

@ -3,7 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
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"
d:DesignHeight="400" d:DesignWidth="600">
<d:DesignerProperties.DesignStyle>

View file

@ -20,7 +20,7 @@ namespace LANCommander.PlaynitePlugin
public partial class PlayniteSettingsView : UserControl
{
private LANCommanderLibraryPlugin Plugin;
private PlayniteSettingsViewModel Settings;
private LANCommanderSettingsViewModel Settings;
public PlayniteSettingsView(LANCommanderLibraryPlugin plugin)
{