示例#1
0
        public TestPlugin(IPlayniteAPI api) : base(api)
        {
            Properties = new GenericPluginProperties {
                HasSettings = true
            };
            Settings = new TestPluginSettingsViewModel(this, api);
            AddCustomElementSupport(new AddCustomElementSupportArgs
            {
                ElementList = new List <string> {
                    "TestUserControl"
                },
                SourceName = "TestPlugin",
            });

            AddSettingsSupport(new AddSettingsSupportArgs
            {
                SourceName   = "TestPlugin",
                SettingsRoot = $"{nameof(Settings)}.{nameof(Settings.Settings)}"
            });
        }
示例#2
0
 public TestPluginUserControl(TestPluginSettingsViewModel settings)
 {
     InitializeComponent();
     DataContext   = this;
     SettingsModel = settings;
 }