Concat event arg and delegate types into one file
This commit is contained in:
parent
df5a382b76
commit
5a48612346
|
@ -9,7 +9,6 @@ using BizHawk.Emulation.Common;
|
|||
using BizHawk.Emulation.Cores.Nintendo.Gameboy;
|
||||
using BizHawk.Emulation.Cores.PCEngine;
|
||||
using BizHawk.Emulation.Cores.Sega.MasterSystem;
|
||||
using BizHawk.Client.ApiHawk.Classes.Events;
|
||||
using System.IO;
|
||||
using BizHawk.Emulation.Common.IEmulatorExtensions;
|
||||
using BizHawk.Common;
|
||||
|
|
|
@ -0,0 +1,127 @@
|
|||
using System;
|
||||
|
||||
namespace BizHawk.Client.ApiHawk
|
||||
{
|
||||
/// <summary>
|
||||
/// This class holds event data for BeforeQuickLoad event
|
||||
/// </summary>
|
||||
public sealed class BeforeQuickLoadEventArgs : EventArgs
|
||||
{
|
||||
internal BeforeQuickLoadEventArgs(string name)
|
||||
{
|
||||
Name = name;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets value that defined if saved has been handled or not
|
||||
/// </summary>
|
||||
public bool Handled { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets quicksave name
|
||||
/// </summary>
|
||||
public string Name { get; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets slot used for quicksave
|
||||
/// </summary>
|
||||
public int Slot => int.Parse(Name.Substring(Name.Length - 1));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This class holds event data for BeforeQuickSave event
|
||||
/// </summary>
|
||||
public sealed class BeforeQuickSaveEventArgs : EventArgs
|
||||
{
|
||||
internal BeforeQuickSaveEventArgs(string name)
|
||||
{
|
||||
Name = name;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets value that defined if saved has been handled or not
|
||||
/// </summary>
|
||||
public bool Handled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets quicksave name
|
||||
/// </summary>
|
||||
public string Name { get; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets slot used for quicksave
|
||||
/// </summary>
|
||||
public int Slot => int.Parse(Name.Substring(Name.Length - 1));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This class holds event data for StateLoaded event
|
||||
/// </summary>
|
||||
public sealed class StateLoadedEventArgs: EventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Initialize a new instance of <see cref="StateLoadedEventArgs"/>
|
||||
/// </summary>
|
||||
/// <param name="stateName">User friendly name of loaded state</param>
|
||||
internal StateLoadedEventArgs(string stateName)
|
||||
{
|
||||
Name = stateName;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets user friendly name of the loaded savestate
|
||||
/// </summary>
|
||||
public string Name { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This class holds event data for StateSaved event
|
||||
/// </summary>
|
||||
public sealed class StateSavedEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Initialize a new instance of <see cref="StateSavedEventArgs"/>
|
||||
/// </summary>
|
||||
/// <param name="stateName">User friendly name of loaded state</param>
|
||||
internal StateSavedEventArgs(string stateName)
|
||||
{
|
||||
Name = stateName;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets user friendly name of the loaded savestate
|
||||
/// </summary>
|
||||
public string Name { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represent a method that will handle the event raised before a quickload is done
|
||||
/// </summary>
|
||||
/// <param name="sender">Object that raised the event</param>
|
||||
/// <param name="e">Event arguments</param>
|
||||
public delegate void BeforeQuickLoadEventHandler(object sender, BeforeQuickLoadEventArgs e);
|
||||
|
||||
/// <summary>
|
||||
/// Represent a method that will handle the event raised before a quicksave is done
|
||||
/// </summary>
|
||||
/// <param name="sender">Object that raised the event</param>
|
||||
/// <param name="e">Event arguments</param>
|
||||
public delegate void BeforeQuickSaveEventHandler(object sender, BeforeQuickSaveEventArgs e);
|
||||
|
||||
/// <summary>
|
||||
/// Represent a method that will handle the event raised when a savestate is loaded
|
||||
/// </summary>
|
||||
/// <param name="sender">Object that raised the event</param>
|
||||
/// <param name="e">Event arguments</param>
|
||||
public delegate void StateLoadedEventHandler(object sender, StateLoadedEventArgs e);
|
||||
|
||||
/// <summary>
|
||||
/// Represent a method that will handle the event raised when a savestate is saved
|
||||
/// </summary>
|
||||
/// <param name="sender">Object that raised the event</param>
|
||||
/// <param name="e">Event arguments</param>
|
||||
public delegate void StateSavedEventHandler(object sender, StateSavedEventArgs e);
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
using System;
|
||||
|
||||
namespace BizHawk.Client.ApiHawk.Classes.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// This class holds event data for BeforeQuickLoad event
|
||||
/// </summary>
|
||||
public sealed class BeforeQuickLoadEventArgs : EventArgs
|
||||
{
|
||||
internal BeforeQuickLoadEventArgs(string name)
|
||||
{
|
||||
Name = name;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets value that defined if saved has been handled or not
|
||||
/// </summary>
|
||||
public bool Handled { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets quicksave name
|
||||
/// </summary>
|
||||
public string Name { get; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets slot used for quicksave
|
||||
/// </summary>
|
||||
public int Slot => int.Parse(Name.Substring(Name.Length - 1));
|
||||
}
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
using System;
|
||||
|
||||
namespace BizHawk.Client.ApiHawk.Classes.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// This class holds event data for BeforeQuickSave event
|
||||
/// </summary>
|
||||
public sealed class BeforeQuickSaveEventArgs : EventArgs
|
||||
{
|
||||
internal BeforeQuickSaveEventArgs(string name)
|
||||
{
|
||||
Name = name;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets value that defined if saved has been handled or not
|
||||
/// </summary>
|
||||
public bool Handled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets quicksave name
|
||||
/// </summary>
|
||||
public string Name { get; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets slot used for quicksave
|
||||
/// </summary>
|
||||
public int Slot => int.Parse(Name.Substring(Name.Length - 1));
|
||||
}
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
using System;
|
||||
|
||||
namespace BizHawk.Client.ApiHawk.Classes.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// This class holds event data for StateLoaded event
|
||||
/// </summary>
|
||||
public sealed class StateLoadedEventArgs: EventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Initialize a new instance of <see cref="StateLoadedEventArgs"/>
|
||||
/// </summary>
|
||||
/// <param name="stateName">User friendly name of loaded state</param>
|
||||
internal StateLoadedEventArgs(string stateName)
|
||||
{
|
||||
Name = stateName;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets user friendly name of the loaded savestate
|
||||
/// </summary>
|
||||
public string Name { get; }
|
||||
}
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
using System;
|
||||
|
||||
namespace BizHawk.Client.ApiHawk.Classes.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// This class holds event data for StateSaved event
|
||||
/// </summary>
|
||||
public sealed class StateSavedEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Initialize a new instance of <see cref="StateSavedEventArgs"/>
|
||||
/// </summary>
|
||||
/// <param name="stateName">User friendly name of loaded state</param>
|
||||
internal StateSavedEventArgs(string stateName)
|
||||
{
|
||||
Name = stateName;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets user friendly name of the loaded savestate
|
||||
/// </summary>
|
||||
public string Name { get; }
|
||||
}
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
namespace BizHawk.Client.ApiHawk.Classes.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// Represent a method that will handle the event raised before a quickload is done
|
||||
/// </summary>
|
||||
/// <param name="sender">Object that raised the event</param>
|
||||
/// <param name="e">Event arguments</param>
|
||||
public delegate void BeforeQuickLoadEventHandler(object sender, BeforeQuickLoadEventArgs e);
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
namespace BizHawk.Client.ApiHawk.Classes.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// Represent a method that will handle the event raised before a quicksave is done
|
||||
/// </summary>
|
||||
/// <param name="sender">Object that raised the event</param>
|
||||
/// <param name="e">Event arguments</param>
|
||||
public delegate void BeforeQuickSaveEventHandler(object sender, BeforeQuickSaveEventArgs e);
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
namespace BizHawk.Client.ApiHawk.Classes.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// Represent a method that will handle the event raised when a savestate is loaded
|
||||
/// </summary>
|
||||
/// <param name="sender">Object that raised the event</param>
|
||||
/// <param name="e">Event arguments</param>
|
||||
public delegate void StateLoadedEventHandler(object sender, StateLoadedEventArgs e);
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
namespace BizHawk.Client.ApiHawk.Classes.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// Represent a method that will handle the event raised when a savestate is saved
|
||||
/// </summary>
|
||||
/// <param name="sender">Object that raised the event</param>
|
||||
/// <param name="e">Event arguments</param>
|
||||
public delegate void StateSavedEventHandler(object sender, StateSavedEventArgs e);
|
||||
}
|
Loading…
Reference in New Issue