Hi there,
i want to reload the (playlist).xmls by a plugin
i found the "ReloadIfNeeded()" Method, but how do i use it?
can anyone give me an example?
here's my code so far. the message box is shown, but the xml isn't reloaded (i changed the xml-file manually before)
using System;
using System.Collections.Generic;
using Unbroken.LaunchBox.Plugins;
using Unbroken.LaunchBox.Plugins.Data;
using System.Windows.Forms;
namespace ReloadXML
{
public class Relxml : IGameLaunchingPlugin, IDataManager
{
public void OnGameExited()
{
// here the reloading should happen...
ReloadIfNeeded()
MessageBox.Show("Reloaded!");
}
public void ReloadIfNeeded()
{
}
public void ForceReload()
{
throw new NotImplementedException();
}
public IEmulator AddNewEmulator()
{
throw new NotImplementedException();
}
public IGame AddNewGame(string title)
{
throw new NotImplementedException();
}
public IPlatform AddNewPlatform(string name)
{
throw new NotImplementedException();
}
public IPlatformCategory AddNewPlatformCategory(string name)
{
throw new NotImplementedException();
}
public IPlaylist AddNewPlaylist(string name)
{
throw new NotImplementedException();
}
public void BackgroundReloadSave(Action changes)
{
throw new NotImplementedException();
}
public IEmulator[] GetAllEmulators()
{
throw new NotImplementedException();
}
public IGame[] GetAllGames()
{
throw new NotImplementedException();
}
public IParent[] GetAllParents()
{
throw new NotImplementedException();
}
public IPlatformCategory[] GetAllPlatformCategories()
{
throw new NotImplementedException();
}
public IPlatform[] GetAllPlatforms()
{
throw new NotImplementedException();
}
public IPlaylist[] GetAllPlaylists()
{
throw new NotImplementedException();
}
public IEmulator GetEmulatorById(string id)
{
throw new NotImplementedException();
}
public IGame GetGameById(string id)
{
throw new NotImplementedException();
}
public IPlatform GetPlatformByName(string name)
{
throw new NotImplementedException();
}
public IPlatformCategory GetPlatformCategoryByName(string name)
{
throw new NotImplementedException();
}
public IPlaylist GetPlaylistById(string id)
{
throw new NotImplementedException();
}
public IList<IPlatform> GetRootPlatformsCategoriesPlaylists()
{
throw new NotImplementedException();
}
public void OnAfterGameLaunched(IGame game, IAdditionalApplication app, IEmulator emulator)
{
return;
}
public void OnBeforeGameLaunching(IGame game, IAdditionalApplication app, IEmulator emulator)
{
return;
}
public void Save(bool wait = false)
{
throw new NotImplementedException();
}
public bool TryRemoveEmulator(IEmulator emulator)
{
throw new NotImplementedException();
}
public bool TryRemoveGame(IGame game)
{
throw new NotImplementedException();
}
public bool TryRemovePlatform(IPlatform platform)
{
throw new NotImplementedException();
}
public bool TryRemovePlatformCategory(IPlatformCategory platformCategory)
{
throw new NotImplementedException();
}
public bool TryRemovePlaylist(IPlaylist playlist)
{
throw new NotImplementedException();
}
}
}
thx in advance
Timber