Merge branch 'ramwatch-inputroll'

This commit is contained in:
adelikat 2019-10-19 14:41:48 -05:00
commit ab5b2e44d8
84 changed files with 624 additions and 9011 deletions

View File

@ -123,6 +123,7 @@
<Compile Include="config\ConfigPersistAttribute.cs" />
<Compile Include="config\ConfigService.cs" />
<Compile Include="config\PathEntry.cs" />
<Compile Include="config\RestoreDefaultsAttribute.cs" />
<Compile Include="config\ToolDialogSettings.cs" />
<Compile Include="ControllerBinding.cs" />
<Compile Include="CoreFileProvider.cs" />

View File

@ -0,0 +1,12 @@
using System;
namespace BizHawk.Client.Common
{
/// <summary>
/// Defines a method to be called when a tool dialog's Restore Defaults method is called
/// </summary>
[AttributeUsage(AttributeTargets.Method)]
public class RestoreDefaultsAttribute : Attribute
{
}
}

View File

@ -48,6 +48,11 @@
public void Stop()
{
if (Thread == null)
{
return;
}
State = RunState.Disabled;
//if(NLua.Lua.WhichLua == "NLua")
Thread.GetTable("keepalives")[Thread] = null;

View File

@ -140,11 +140,19 @@ namespace BizHawk.Client.Common
var sb = new StringBuilder();
foreach (var file in this)
{
sb
.Append(file.Enabled ? "1" : "0")
.Append(' ')
.Append(PathManager.MakeRelativeTo(PathManager.MakeAbsolutePath(file.Path, ""), Path.GetDirectoryName(path)))
.AppendLine();
if (file.IsSeparator)
{
sb.AppendLine("---");
}
else
{
sb
.Append(file.Enabled ? "1" : "0")
.Append(' ')
.Append(PathManager.MakeRelativeTo(PathManager.MakeAbsolutePath(file.Path, "")
, Path.GetDirectoryName(path)))
.AppendLine();
}
}
sw.Write(sb.ToString());

View File

@ -628,9 +628,6 @@
<Compile Include="CustomControls\SmartTextBoxControl.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="CustomControls\TasListView.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="CustomControls\TextDebugView.cs">
<SubType>Component</SubType>
</Compile>
@ -1518,9 +1515,6 @@
<EmbeddedResource Include="CustomControls\QuickProgressPopup.resx">
<DependentUpon>QuickProgressPopup.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="CustomControls\TasListView.resx">
<DependentUpon>TasListView.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
<SubType>Designer</SubType>
@ -1892,6 +1886,7 @@
<None Include="config\ControllerImages\GENController.png" />
</ItemGroup>
<ItemGroup>
<None Include="images\StopButton.png" />
<None Include="Resources\MoveTop.png" />
<None Include="Resources\MoveBottom.png" />
<None Include="Resources\MoveTop.bmp" />

View File

@ -44,6 +44,25 @@ namespace BizHawk.Client.EmuHawk
}
}
private void DrawString(string text, int? width, Point point)
{
if (string.IsNullOrWhiteSpace(text))
{
return;
}
if (width.HasValue)
{
var max = (width.Value - CellWidthPadding) / _charSize.Width;
if (text.Length >= max)
{
text = text.Substring(0, max);
}
}
_gdi.DrawString(text, point);
}
protected override void OnPaintBackground(PaintEventArgs pevent)
{
// Do nothing, and this should never be called
@ -105,12 +124,12 @@ namespace BizHawk.Client.EmuHawk
if (IsHoveringOnColumnCell && column == CurrentCell.Column)
{
_gdi.PrepDrawString(_normalFont, SystemColors.HighlightText);
_gdi.DrawString(column.Text, point);
DrawString(column.Text, column.Width, point);
_gdi.PrepDrawString(_normalFont, _foreColor);
}
else
{
_gdi.DrawString(column.Text, point);
DrawString(column.Text, column.Width, point);
}
start += CellHeight;
@ -127,12 +146,12 @@ namespace BizHawk.Client.EmuHawk
if (IsHoveringOnColumnCell && column == CurrentCell.Column)
{
_gdi.PrepDrawString(_normalFont, SystemColors.HighlightText);
_gdi.DrawString(column.Text, point);
DrawString(column.Text, column.Width, point);
_gdi.PrepDrawString(_normalFont, _foreColor);
}
else
{
_gdi.DrawString(column.Text, point);
DrawString(column.Text, column.Width, point);
}
}
}
@ -198,10 +217,7 @@ namespace BizHawk.Client.EmuHawk
_gdi.PrepDrawString(_rotatedFont, _foreColor);
}
if (!string.IsNullOrWhiteSpace(text))
{
_gdi.DrawString(text, point);
}
DrawString(text, ColumnWidth, point);
if (rePrep)
{
@ -250,10 +266,7 @@ namespace BizHawk.Client.EmuHawk
rePrep = true;
}
if (!string.IsNullOrWhiteSpace(text))
{
_gdi.DrawString(text, new Point(point.X + strOffsetX, point.Y + strOffsetY));
}
DrawString(text, col.Width, new Point(point.X + strOffsetX, point.Y + strOffsetY));
if (rePrep)
{

View File

@ -38,6 +38,7 @@ namespace BizHawk.Client.EmuHawk
private Size _charSize;
private RollColumn _columnDown;
private RollColumn _columnResizing;
private int? _currentX;
private int? _currentY;
@ -134,6 +135,41 @@ namespace BizHawk.Client.EmuHawk
base.Dispose(disposing);
}
protected override void OnDoubleClick(EventArgs e)
{
if (IsHoveringOnColumnEdge)
{
if (HorizontalOrientation)
{
// TODO
}
else
{
var maxLength = CurrentCell.Column.Text?.Length ?? 0;
for (int i = 0; i < RowCount; i++)
{
string text = "";
int offSetX = 0, offSetY = 0;
QueryItemText?.Invoke(i, CurrentCell.Column, out text, ref offSetX, ref offSetY);
if (text.Length > maxLength)
{
maxLength = text.Length;
}
}
var newWidth = (maxLength * _charSize.Width) + (CellWidthPadding * 2);
CurrentCell.Column.Width = newWidth;
_columns.ColumnsChanged();
Refresh();
}
}
base.OnDoubleClick(e);
}
#region Properties
/// <summary>
@ -971,18 +1007,30 @@ namespace BizHawk.Client.EmuHawk
#region Mouse and Key Events
private bool _columnDownMoved;
private int _previousX = 0; // TODO: move me
protected override void OnMouseMove(MouseEventArgs e)
{
_previousX = _currentX ?? 0;
_currentX = e.X;
_currentY = e.Y;
if (_columnDown != null)
if (_columnResizing != null)
{
if (_currentX != _previousX)
{
_columnResizing.Width += _currentX - _previousX;
_columns.ColumnsChanged();
Refresh();
}
}
else if (_columnDown != null)
{
_columnDownMoved = true;
}
Cell newCell = CalculatePointedCell(_currentX.Value, _currentY.Value);
// SuuperW: Hide lag frames
if (QueryFrameLag != null && newCell.RowIndex.HasValue)
{
@ -1014,6 +1062,10 @@ namespace BizHawk.Client.EmuHawk
Refresh();
}
Cursor = IsHoveringOnColumnEdge || _columnResizing != null
? Cursors.VSplit
: Cursors.Default;
base.OnMouseMove(e);
}
@ -1034,6 +1086,7 @@ namespace BizHawk.Client.EmuHawk
_currentY = null;
CurrentCell = null;
IsPaintDown = false;
_columnResizing = null;
_hoverTimer.Stop();
Refresh();
base.OnMouseLeave(e);
@ -1079,6 +1132,10 @@ namespace BizHawk.Client.EmuHawk
if (e.Button == MouseButtons.Left)
{
if (IsHoveringOnColumnEdge)
{
_columnResizing = CurrentCell.Column;
}
if (IsHoveringOnColumnCell)
{
_columnDown = CurrentCell.Column;
@ -1209,7 +1266,7 @@ namespace BizHawk.Client.EmuHawk
protected override void OnMouseUp(MouseEventArgs e)
{
if (IsHoveringOnColumnCell)
if (_columnResizing == null && IsHoveringOnColumnCell)
{
if (_columnDown != null && _columnDownMoved)
{
@ -1227,6 +1284,7 @@ namespace BizHawk.Client.EmuHawk
}
}
_columnResizing = null;
_columnDown = null;
_columnDownMoved = false;
RightButtonHeld = false;
@ -1590,7 +1648,7 @@ namespace BizHawk.Client.EmuHawk
}
else
{
NeedsVScrollbar = RowCount > 1;
NeedsVScrollbar = ColumnHeight + (RowCount * RowHeight) > Height;
NeedsHScrollbar = TotalColWidth.HasValue && TotalColWidth.Value - DrawWidth + 1 > 0;
}
@ -1731,12 +1789,35 @@ namespace BizHawk.Client.EmuHawk
private bool IsHoveringOnColumnCell => CurrentCell?.Column != null && !CurrentCell.RowIndex.HasValue;
private bool IsHoveringOnColumnEdge => AllowColumnResize && IsHoveringOnColumnCell && IsPointingOnCellEdge(_currentX);
private bool IsHoveringOnDataCell => CurrentCell?.Column != null && CurrentCell.RowIndex.HasValue;
private bool WasHoveringOnColumnCell => LastCell?.Column != null && !LastCell.RowIndex.HasValue;
private bool WasHoveringOnDataCell => LastCell?.Column != null && LastCell.RowIndex.HasValue;
private bool IsPointingOnCellEdge(int? x)
{
if (x.HasValue)
{
if (HorizontalOrientation)
{
return false; // TODO: support column resize in horizontal orientation
}
foreach (RollColumn column in _columns.VisibleColumns)
{
if (column.Left - _hBar.Value + (column.Width - column.Width / 6) <= x.Value && column.Right - _hBar.Value >= x.Value)
{
return true;
}
}
}
return false;
}
/// <summary>
/// Finds the specific cell that contains the (x, y) coordinate.
/// </summary>
@ -1783,18 +1864,6 @@ namespace BizHawk.Client.EmuHawk
// A boolean that indicates if the InputRoll is too large horizontally and requires a horizontal scrollbar.
private bool NeedsHScrollbar { get; set; }
/// <summary>
/// Updates the width of the supplied column.
/// <remarks>Call when changing the ColumnCell text, CellPadding, or text font.</remarks>
/// </summary>
/// <param name="col">The RollColumn object to update.</param>
/// <returns>The new width of the RollColumn object.</returns>
private int UpdateWidth(RollColumn col)
{
col.Width = (col.Text.Length * _charSize.Width) + (CellWidthPadding * 4);
return col.Width.Value;
}
/// <summary>
/// Gets the total width of all the columns by using the last column's Right property.
/// </summary>

View File

@ -1,181 +0,0 @@
using System;
using System.Linq;
using System.Windows.Forms;
namespace BizHawk.Client.EmuHawk
{
public class TasListView : VirtualListView
{
public class Cell
{
public int? RowIndex;
public string Column;
// Convenience hack
public override string ToString()
{
return string.IsNullOrEmpty(Column) ? "?" : $"{Column} - {(RowIndex.HasValue ? RowIndex.ToString() : "?")}";
}
}
public bool RightButtonHeld { get; set; }
public int? LastSelectedIndex
{
get
{
if (SelectedIndices.Count > 0)
{
return SelectedIndices
.OfType<int>()
.OrderBy(x => x)
.Last();
}
return null;
}
}
private Cell _currentPointedCell = new Cell();
public Cell CurrentCell
{
get { return _currentPointedCell; }
}
private Cell _lastPointedCell = new Cell();
public Cell LastCell
{
get { return _lastPointedCell; }
}
public bool InputPaintingMode { get; set; }
public bool IsPaintDown { get; private set; }
/// <summary>
/// Calculates the column name and row number that the point (x, y) lies in.
/// </summary>
/// <param name="x">X coordinate</param>
/// <param name="y">Y coordinate</param>
private void CalculatePointedCell(int x, int y)
{
int? newRow;
string newColumn = "";
var accumulator = 0;
foreach (ColumnHeader column in Columns)
{
accumulator += column.Width;
if (accumulator < x)
{
continue;
}
newColumn = column.Name;
break;
}
var rowHeight = this.LineHeight;// 5 (in VirtualListView) and 6 work here for me, but are they always dependable, how can I get the padding?
var headerHeight = rowHeight + 6;
newRow = ((y - headerHeight) / rowHeight) + this.VScrollPos;
if (newRow >= ItemCount)
{
newRow = null;
}
if (newColumn != CurrentCell.Column || newRow != CurrentCell.RowIndex)
{
LastCell.Column = CurrentCell.Column;
LastCell.RowIndex = CurrentCell.RowIndex;
CurrentCell.Column = newColumn;
CurrentCell.RowIndex = newRow;
CellChanged(LastCell, CurrentCell);
}
}
public class CellEventArgs
{
public CellEventArgs(Cell oldCell, Cell newCell)
{
OldCell = oldCell;
NewCell = newCell;
}
public Cell OldCell { get; private set; }
public Cell NewCell { get; private set; }
}
public delegate void CellChangeEventHandler(object sender, CellEventArgs e);
public event CellChangeEventHandler PointedCellChanged;
private void CellChanged(Cell oldCell, Cell newCell)
{
if (PointedCellChanged != null)
{
PointedCellChanged(this, new CellEventArgs(oldCell, newCell));
}
}
protected override void OnMouseLeave(EventArgs e)
{
_currentPointedCell.Column = "";
_currentPointedCell.RowIndex = null;
IsPaintDown = false;
base.OnMouseLeave(e);
}
protected override void OnMouseMove(MouseEventArgs e)
{
CalculatePointedCell(e.X, e.Y);
base.OnMouseMove(e);
}
protected override void OnMouseDown(MouseEventArgs e)
{
if (e.Button == MouseButtons.Left && InputPaintingMode)
{
IsPaintDown = true;
}
if (e.Button == MouseButtons.Right)
{
RightButtonHeld = true;
}
base.OnMouseDown(e);
}
protected override void OnMouseUp(MouseEventArgs e)
{
IsPaintDown = false;
RightButtonHeld = false;
base.OnMouseUp(e);
}
protected override void OnMouseWheel(MouseEventArgs e)
{
if (RightButtonHeld)
{
DoRightMouseScroll(this, e);
}
else
{
base.OnMouseWheel(e);
}
}
public delegate void RightMouseScrollEventHandler(object sender, MouseEventArgs e);
public event RightMouseScrollEventHandler RightMouseScrolled;
private void DoRightMouseScroll(object sender, MouseEventArgs e)
{
if (RightMouseScrolled != null)
{
RightMouseScrolled(sender, e);
}
}
}
}

View File

@ -1,126 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="RightClickMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
</root>

View File

@ -80,6 +80,42 @@ namespace BizHawk.Client.EmuHawk.WinFormExtensions
}
}
public static ToolStripMenuItem ToColumnsMenu(this InputRoll inputRoll, Action changeCallback)
{
var menu = new ToolStripMenuItem
{
Name = "GeneratedColumnsSubMenu",
Text = "Columns"
};
var columns = inputRoll.AllColumns;
foreach (var column in columns)
{
var menuItem = new ToolStripMenuItem
{
Name = column.Name,
Text = $"{column.Text} ({column.Name})",
Checked = column.Visible,
CheckOnClick = true,
Tag = column.Name
};
menuItem.CheckedChanged += (o, ev) =>
{
var sender = (ToolStripMenuItem)o;
columns.Find(c => c.Name == (string)sender.Tag).Visible = sender.Checked;
columns.ColumnsChanged();
changeCallback();
inputRoll.Refresh();
};
menu.DropDownItems.Add(menuItem);
}
return menu;
}
public static ToolStripMenuItem GenerateColumnsMenu(this ToolDialogSettings.ColumnList list, Action changeCallback)
{
var menu = new ToolStripMenuItem

View File

@ -1,4 +1,6 @@
namespace BizHawk.Client.EmuHawk
using System.Windows.Forms;
namespace BizHawk.Client.EmuHawk
{
partial class LogWindow
{
@ -34,7 +36,7 @@
this.buttonCopy = new System.Windows.Forms.Button();
this.buttonCopyAll = new System.Windows.Forms.Button();
this.AddToGameDbBtn = new System.Windows.Forms.Button();
this.virtualListView1 = new BizHawk.Client.EmuHawk.VirtualListView();
this.virtualListView1 = new System.Windows.Forms.ListView();
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.tableLayoutPanel1.SuspendLayout();
this.SuspendLayout();
@ -118,23 +120,20 @@
//
// virtualListView1
//
this.virtualListView1.BlazingFast = false;
this.virtualListView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.columnHeader1});
this.virtualListView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.virtualListView1.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.virtualListView1.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
this.virtualListView1.ItemCount = 0;
this.virtualListView1.VirtualListSize = 0;
this.virtualListView1.Location = new System.Drawing.Point(0, 0);
this.virtualListView1.Name = "virtualListView1";
this.virtualListView1.SelectAllInProgress = false;
this.virtualListView1.selectedItem = -1;
this.virtualListView1.Size = new System.Drawing.Size(675, 367);
this.virtualListView1.TabIndex = 8;
this.virtualListView1.UseCompatibleStateImageBehavior = false;
this.virtualListView1.View = System.Windows.Forms.View.Details;
this.virtualListView1.VirtualMode = true;
this.virtualListView1.QueryItemText += new BizHawk.Client.EmuHawk.QueryItemTextHandler(this.virtualListView1_QueryItemText);
this.virtualListView1.RetrieveVirtualItem += new RetrieveVirtualItemEventHandler(this.virtualListView1_QueryItemText);
this.virtualListView1.ClientSizeChanged += new System.EventHandler(this.virtualListView1_ClientSizeChanged);
this.virtualListView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.virtualListView1_KeyDown);
//
@ -163,7 +162,7 @@
private System.Windows.Forms.Button btnClose;
private System.Windows.Forms.Button btnClear;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private VirtualListView virtualListView1;
private System.Windows.Forms.ListView virtualListView1;
private System.Windows.Forms.ColumnHeader columnHeader1;
private System.Windows.Forms.Button buttonCopy;
private System.Windows.Forms.Button buttonCopyAll;

View File

@ -5,7 +5,6 @@ using System.IO;
using System.Text;
using System.Windows.Forms;
using BizHawk.Common.ReflectionExtensions;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Common.IEmulatorExtensions;
using BizHawk.Client.Common;
@ -40,7 +39,7 @@ namespace BizHawk.Client.EmuHawk
var ss = report.Split('\n');
foreach (var s in ss)
dlg.Lines.Add(s.TrimEnd('\r'));
dlg.virtualListView1.ItemCount = ss.Length;
dlg.virtualListView1.VirtualListSize = ss.Length;
dlg.Text = title;
dlg.btnClear.Visible = false;
dlg.ShowDialog(parent);
@ -55,7 +54,7 @@ namespace BizHawk.Client.EmuHawk
if (!string.IsNullOrWhiteSpace(s))
{
Lines.Add(s.TrimEnd('\r'));
virtualListView1.ItemCount++;
virtualListView1.VirtualListSize++;
}
}
}
@ -63,7 +62,7 @@ namespace BizHawk.Client.EmuHawk
private void btnClear_Click(object sender, EventArgs e)
{
Lines.Clear();
virtualListView1.ItemCount = 0;
virtualListView1.VirtualListSize = 0;
virtualListView1.SelectedIndices.Clear();
}
@ -99,9 +98,9 @@ namespace BizHawk.Client.EmuHawk
}
}
private void virtualListView1_QueryItemText(int item, int subItem, out string text)
private void virtualListView1_QueryItemText(object sender, RetrieveVirtualItemEventArgs e)
{
text = Lines[item];
e.Item = new ListViewItem(Lines[e.ItemIndex]);
}
private void virtualListView1_ClientSizeChanged(object sender, EventArgs e)

View File

@ -19,7 +19,7 @@ namespace BizHawk.Client.EmuHawk.Properties {
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
@ -1479,6 +1479,16 @@ namespace BizHawk.Client.EmuHawk.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap StopButton {
get {
object obj = ResourceManager.GetObject("StopButton", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>

View File

@ -1563,4 +1563,7 @@
<data name="MoveTop" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\MoveTop.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="StopButton" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\StopButton.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View File

@ -49,7 +49,7 @@
this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.StopOnFrameCheckbox = new System.Windows.Forms.CheckBox();
this.StopOnFrameTextBox = new BizHawk.Client.EmuHawk.WatchValueBox();
this.MovieView = new BizHawk.Client.EmuHawk.VirtualListView();
this.MovieView = new System.Windows.Forms.ListView();
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
@ -269,7 +269,6 @@
this.MovieView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.MovieView.BlazingFast = false;
this.MovieView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.columnHeader1,
this.columnHeader2,
@ -279,16 +278,13 @@
this.MovieView.FullRowSelect = true;
this.MovieView.GridLines = true;
this.MovieView.HideSelection = false;
this.MovieView.ItemCount = 0;
this.MovieView.VirtualListSize = 0;
this.MovieView.Location = new System.Drawing.Point(12, 28);
this.MovieView.MultiSelect = false;
this.MovieView.Name = "MovieView";
this.MovieView.SelectAllInProgress = false;
this.MovieView.selectedItem = -1;
this.MovieView.Size = new System.Drawing.Size(480, 322);
this.MovieView.TabIndex = 5;
this.MovieView.UseCompatibleStateImageBehavior = false;
this.MovieView.UseCustomBackground = true;
this.MovieView.View = System.Windows.Forms.View.Details;
this.MovieView.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.MovieView_ColumnClick);
this.MovieView.SelectedIndexChanged += new System.EventHandler(this.MovieView_SelectedIndexChanged);
@ -381,7 +377,7 @@
private System.Windows.Forms.Button Cancel;
private System.Windows.Forms.Button OK;
private System.Windows.Forms.Button BrowseMovies;
private VirtualListView MovieView;
private System.Windows.Forms.ListView MovieView;
private System.Windows.Forms.ColumnHeader columnHeader1;
private System.Windows.Forms.ColumnHeader columnHeader2;
private System.Windows.Forms.ColumnHeader columnHeader3;

View File

@ -27,7 +27,7 @@ namespace BizHawk.Client.EmuHawk
public PlayMovie()
{
InitializeComponent();
MovieView.QueryItemText += MovieView_QueryItemText;
MovieView.RetrieveVirtualItem += MovieView_QueryItemText;
MovieView.VirtualMode = true;
_sortReverse = false;
_sortedCol = "";
@ -45,28 +45,13 @@ namespace BizHawk.Client.EmuHawk
TurboCheckbox.Checked = Global.Config.TurboSeek;
}
private void MovieView_QueryItemText(int index, int column, out string text)
private void MovieView_QueryItemText(object sender, RetrieveVirtualItemEventArgs e)
{
text = "";
if (column == 0) // File
{
text = Path.GetFileName(_movieList[index].Filename);
}
if (column == 1) // System
{
text = _movieList[index].SystemID;
}
if (column == 2) // Game
{
text = _movieList[index].GameName;
}
if (column == 3) // Time
{
text = PlatformFrameRates.MovieTime(_movieList[index]).ToString(@"hh\:mm\:ss\.fff");
}
var entry = _movieList[e.ItemIndex];
e.Item = new ListViewItem(entry.Filename);
e.Item.SubItems.Add(entry.SystemID);
e.Item.SubItems.Add(entry.GameName);
e.Item.SubItems.Add(PlatformFrameRates.MovieTime(entry).ToString(@"hh\:mm\:ss\.fff"));
}
private void Run()
@ -230,14 +215,13 @@ namespace BizHawk.Client.EmuHawk
private void HighlightMovie(int index)
{
MovieView.SelectedIndices.Clear();
MovieView.setSelection(index);
MovieView.SelectItem(index, true);
MovieView.Items[index].Selected = true;
}
private void ScanFiles()
{
_movieList.Clear();
MovieView.ItemCount = 0;
MovieView.VirtualListSize = 0;
MovieView.Update();
var directory = PathManager.MakeAbsolutePath(Global.Config.PathEntries.MoviesPathFragment, null);
@ -293,7 +277,7 @@ namespace BizHawk.Client.EmuHawk
void RefreshMovieList()
{
MovieView.ItemCount = _movieList.Count;
MovieView.VirtualListSize = _movieList.Count;
UpdateList();
}
@ -403,7 +387,7 @@ namespace BizHawk.Client.EmuHawk
OK.Enabled = true;
var firstIndex = MovieView.SelectedIndices[0];
MovieView.ensureVisible(firstIndex);
MovieView.EnsureVisible(firstIndex);
foreach (var kvp in _movieList[firstIndex].HeaderEntries)
{
@ -593,8 +577,7 @@ namespace BizHawk.Client.EmuHawk
if (index.HasValue)
{
MovieView.SelectedIndices.Clear();
MovieView.setSelection(index.Value);
MovieView.SelectItem(index.Value, true);
MovieView.Items[index.Value].Selected = true;
}
}
}

View File

@ -30,14 +30,7 @@
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Cheats));
this.CheatListView = new BizHawk.Client.EmuHawk.VirtualListView();
this.CheatName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.Address = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.Value = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.Compare = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.ComparisonType = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.On = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.Domain = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.CheatListView = new InputRoll();
this.CheatsContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this.ToggleContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.RemoveContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -102,35 +95,22 @@
// CheatListView
//
this.CheatListView.AllowColumnReorder = true;
this.CheatListView.AllowColumnResize = true;
this.CheatListView.MultiSelect = true;
this.CheatListView.AllowDrop = true;
this.CheatListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.CheatListView.AutoArrange = false;
this.CheatListView.BlazingFast = false;
this.CheatListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.CheatName,
this.Address,
this.Value,
this.Compare,
this.ComparisonType,
this.On,
this.Domain});
this.CheatListView.ContextMenuStrip = this.CheatsContextMenu;
this.CheatListView.FullRowSelect = true;
this.CheatListView.GridLines = true;
this.CheatListView.HideSelection = false;
this.CheatListView.ItemCount = 0;
this.CheatListView.RowCount = 0;
this.CheatListView.Location = new System.Drawing.Point(12, 72);
this.CheatListView.Name = "CheatListView";
this.CheatListView.SelectAllInProgress = false;
this.CheatListView.selectedItem = -1;
this.CheatListView.Size = new System.Drawing.Size(414, 321);
this.CheatListView.TabIndex = 1;
this.CheatListView.UseCompatibleStateImageBehavior = false;
this.CheatListView.UseCustomBackground = true;
this.CheatListView.View = System.Windows.Forms.View.Details;
this.CheatListView.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.CheatListView_ColumnClick);
this.CheatListView.ColumnClick += new BizHawk.Client.EmuHawk.InputRoll.ColumnClickEventHandler(this.CheatListView_ColumnClick);
this.CheatListView.SelectedIndexChanged += new System.EventHandler(this.CheatListView_SelectedIndexChanged);
this.CheatListView.Click += new System.EventHandler(this.CheatListView_Click);
this.CheatListView.DragDrop += new System.Windows.Forms.DragEventHandler(this.NewCheatForm_DragDrop);
@ -138,41 +118,6 @@
this.CheatListView.DoubleClick += new System.EventHandler(this.CheatListView_DoubleClick);
this.CheatListView.KeyDown += new System.Windows.Forms.KeyEventHandler(this.CheatListView_KeyDown);
//
// CheatName
//
this.CheatName.Text = "Name";
this.CheatName.Width = 104;
//
// Address
//
this.Address.Text = "Address";
this.Address.Width = 52;
//
// Value
//
this.Value.Text = "Value";
this.Value.Width = 40;
//
// Compare
//
this.Compare.Text = "Compare";
//
// ComparisonType
//
this.ComparisonType.Text = "Comparison Type";
this.ComparisonType.Width = 194;
//
// On
//
this.On.Text = "On";
this.On.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.On.Width = 40;
//
// Domain
//
this.Domain.Text = "Domain";
this.Domain.Width = 75;
//
// CheatsContextMenu
//
this.CheatsContextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -693,14 +638,7 @@
#endregion
private VirtualListView CheatListView;
private System.Windows.Forms.ColumnHeader CheatName;
private System.Windows.Forms.ColumnHeader Address;
private System.Windows.Forms.ColumnHeader Value;
private System.Windows.Forms.ColumnHeader ComparisonType;
private System.Windows.Forms.ColumnHeader Compare;
private System.Windows.Forms.ColumnHeader On;
private System.Windows.Forms.ColumnHeader Domain;
private InputRoll CheatListView;
private MenuStripEx CheatsMenu;
private System.Windows.Forms.ToolStripMenuItem FileSubMenu;
private System.Windows.Forms.ToolStripMenuItem NewMenuItem;

View File

@ -43,7 +43,6 @@ namespace BizHawk.Client.EmuHawk
CheatListView.QueryItemText += CheatListView_QueryItemText;
CheatListView.QueryItemBkColor += CheatListView_QueryItemBkColor;
CheatListView.VirtualMode = true;
_sortedColumn = "";
_sortReverse = false;
@ -80,7 +79,7 @@ namespace BizHawk.Client.EmuHawk
/// </summary>
public void UpdateDialog()
{
CheatListView.ItemCount = Global.CheatList.Count;
CheatListView.RowCount = Global.CheatList.Count;
TotalLabel.Text = $"{Global.CheatList.CheatCount} {(Global.CheatList.CheatCount == 1 ? "cheat" : "cheats")} {Global.CheatList.ActiveCount} active";
}
@ -150,21 +149,36 @@ namespace BizHawk.Client.EmuHawk
private void Cheats_Load(object sender, EventArgs e)
{
// Hack for previous config settings
if (Settings.Columns.Any(c => string.IsNullOrWhiteSpace(c.Text)))
{
Settings = new CheatsSettings();
}
TopMost = Settings.TopMost;
CheatEditor.MemoryDomains = Core;
LoadConfigSettings();
CheatsMenu.Items.Add(CheatListView.ToColumnsMenu(ColumnToggleCallback));
ToggleGameGenieButton();
CheatEditor.SetAddEvent(AddCheat);
CheatEditor.SetEditEvent(EditCheat);
UpdateDialog();
}
CheatsMenu.Items.Add(Settings.Columns.GenerateColumnsMenu(ColumnToggleCallback));
private void SetColumns()
{
foreach (var column in Settings.Columns)
{
if (CheatListView.AllColumns[column.Name] == null)
{
CheatListView.AllColumns.Add(column);
}
}
}
private void ColumnToggleCallback()
{
SaveColumnInfo(CheatListView, Settings.Columns);
LoadColumnInfo(CheatListView, Settings.Columns);
Settings.Columns = CheatListView.AllColumns;
}
private void ToggleGameGenieButton()
@ -195,7 +209,7 @@ namespace BizHawk.Client.EmuHawk
private void SaveConfigSettings()
{
SaveColumnInfo(CheatListView, Settings.Columns);
Settings.Columns =CheatListView.AllColumns;
if (WindowState == FormWindowState.Normal)
{
@ -221,10 +235,11 @@ namespace BizHawk.Client.EmuHawk
Size = Settings.WindowSize;
}
LoadColumnInfo(CheatListView, Settings.Columns);
CheatListView.AllColumns.Clear();
SetColumns();
}
private void CheatListView_QueryItemText(int index, int column, out string text)
private void CheatListView_QueryItemText(int index, InputRoll.RollColumn column, out string text, ref int offsetX, ref int offsetY)
{
text = "";
if (index >= Global.CheatList.Count || Global.CheatList[index].IsSeparator)
@ -232,7 +247,7 @@ namespace BizHawk.Client.EmuHawk
return;
}
var columnName = CheatListView.Columns[column].Name;
var columnName = column.Name;
switch (columnName)
{
@ -296,7 +311,7 @@ namespace BizHawk.Client.EmuHawk
}
}
private void CheatListView_QueryItemBkColor(int index, int column, ref Color color)
private void CheatListView_QueryItemBkColor(int index, InputRoll.RollColumn column, ref Color color)
{
if (index < Global.CheatList.Count)
{
@ -311,7 +326,7 @@ namespace BizHawk.Client.EmuHawk
}
}
private IEnumerable<int> SelectedIndices => CheatListView.SelectedIndices.Cast<int>();
private IEnumerable<int> SelectedIndices => CheatListView.SelectedRows;
private IEnumerable<Cheat> SelectedItems
{
@ -325,19 +340,16 @@ namespace BizHawk.Client.EmuHawk
private void DoSelectedIndexChange()
{
if (!CheatListView.SelectAllInProgress)
if (SelectedCheats.Any())
{
if (SelectedCheats.Any())
{
var cheat = SelectedCheats.First();
CheatEditor.SetCheat(cheat);
CheatGroupBox.Text = $"Editing Cheat {cheat.Name} - {cheat.AddressStr}";
}
else
{
CheatEditor.ClearForm();
CheatGroupBox.Text = "New Cheat";
}
var cheat = SelectedCheats.First();
CheatEditor.SetCheat(cheat);
CheatGroupBox.Text = $"Editing Cheat {cheat.Name} - {cheat.AddressStr}";
}
else
{
CheatEditor.ClearForm();
CheatGroupBox.Text = "New Cheat";
}
}
@ -451,7 +463,7 @@ namespace BizHawk.Client.EmuHawk
Global.CheatList.Remove(item);
}
CheatListView.SelectedIndices.Clear();
CheatListView.DeselectAll();
UpdateDialog();
}
}
@ -486,12 +498,12 @@ namespace BizHawk.Client.EmuHawk
Global.CheatList.Insert(index - 1, cheat);
}
var newindices = indices.Select(t => t - 1);
var newIndices = indices.Select(t => t - 1);
CheatListView.SelectedIndices.Clear();
foreach (var newi in newindices)
CheatListView.DeselectAll();
foreach (var index in newIndices)
{
CheatListView.SelectItem(newi, true);
CheatListView.SelectRow(index, true);
}
UpdateMessageLabel();
@ -515,12 +527,12 @@ namespace BizHawk.Client.EmuHawk
UpdateMessageLabel();
var newindices = indices.Select(t => t + 1);
var newIndices = indices.Select(t => t + 1);
CheatListView.SelectedIndices.Clear();
foreach (var newi in newindices)
CheatListView.DeselectAll();
foreach (var index in newIndices)
{
CheatListView.SelectItem(newi, true);
CheatListView.SelectRow(index, true);
}
UpdateDialog();
@ -611,14 +623,15 @@ namespace BizHawk.Client.EmuHawk
.OfType<ToolStripMenuItem>()
.First(x => x.Name == "GeneratedColumnsSubMenu"));
CheatsMenu.Items.Add(Settings.Columns.GenerateColumnsMenu(ColumnToggleCallback));
CheatsMenu.Items.Add(CheatListView.ToColumnsMenu(ColumnToggleCallback));
Global.Config.DisableCheatsOnLoad = false;
Global.Config.LoadCheatFileByGame = true;
Global.Config.CheatsAutoSaveOnClose = true;
RefreshFloatingWindowControl(Settings.FloatingWindow);
LoadColumnInfo(CheatListView, Settings.Columns);
CheatListView.AllColumns.Clear();
SetColumns();
}
#endregion
@ -651,9 +664,9 @@ namespace BizHawk.Client.EmuHawk
DoSelectedIndexChange();
}
private void CheatListView_ColumnClick(object sender, ColumnClickEventArgs e)
private void CheatListView_ColumnClick(object sender, InputRoll.ColumnClickEventArgs e)
{
var column = CheatListView.Columns[e.Column];
var column = e.Column;
if (column.Name != _sortedColumn)
{
_sortReverse = false;
@ -723,22 +736,21 @@ namespace BizHawk.Client.EmuHawk
{
public CheatsSettings()
{
Columns = new ColumnList
Columns = new List<InputRoll.RollColumn>
{
new Column { Name = NameColumn, Visible = true, Index = 0, Width = 128 },
new Column { Name = AddressColumn, Visible = true, Index = 1, Width = 60 },
new Column { Name = ValueColumn, Visible = true, Index = 2, Width = 59 },
new Column { Name = CompareColumn, Visible = true, Index = 3, Width = 59 },
new Column { Name = ComparisonTypeColumn, Visible = true, Index = 4, Width = 60 },
new Column { Name = OnColumn, Visible = false, Index = 5, Width = 28 },
new Column { Name = DomainColumn, Visible = true, Index = 6, Width = 55 },
new Column { Name = SizeColumn, Visible = true, Index = 7, Width = 55 },
new Column { Name = EndianColumn, Visible = false, Index = 8, Width = 55 },
new Column { Name = TypeColumn, Visible = false, Index = 9, Width = 55 }
new InputRoll.RollColumn { Text = "Names", Name = NameColumn, Visible = true, Width = 128, Type = InputRoll.RollColumn.InputType.Text },
new InputRoll.RollColumn { Text = "Address", Name = AddressColumn, Visible = true, Width = 60, Type = InputRoll.RollColumn.InputType.Text },
new InputRoll.RollColumn { Text = "Value", Name = ValueColumn, Visible = true, Width = 59, Type = InputRoll.RollColumn.InputType.Text },
new InputRoll.RollColumn { Text = "Compare", Name = CompareColumn, Visible = true, Width = 63, Type = InputRoll.RollColumn.InputType.Text },
new InputRoll.RollColumn { Text = "Compare Type", Name = ComparisonTypeColumn, Visible = true, Width = 98, Type = InputRoll.RollColumn.InputType.Text },
new InputRoll.RollColumn { Text = "On", Name = OnColumn, Visible = false, Width = 28, Type = InputRoll.RollColumn.InputType.Text },
new InputRoll.RollColumn { Text = "Size", Name = SizeColumn, Visible = true, Width = 55, Type = InputRoll.RollColumn.InputType.Text },
new InputRoll.RollColumn { Text = "Endian", Name = EndianColumn, Visible = false, Width = 55, Type = InputRoll.RollColumn.InputType.Text },
new InputRoll.RollColumn { Text = "Display Type", Name = TypeColumn, Visible = false, Width = 88, Type = InputRoll.RollColumn.InputType.Text }
};
}
public ColumnList Columns { get; set; }
public List<InputRoll.RollColumn> Columns { get; set; }
}
}
}

View File

@ -104,10 +104,7 @@
this.InsertSeparatorToolbarItem = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator();
this.EraseToolbarItem = new System.Windows.Forms.ToolStripButton();
this.LuaListView = new BizHawk.Client.EmuHawk.VirtualListView();
this.Script = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.PathName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
this.LuaListView = new InputRoll();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.CopyContextItem = new System.Windows.Forms.ToolStripMenuItem();
this.ScriptListContextMenu.SuspendLayout();
@ -805,46 +802,20 @@
this.LuaListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.LuaListView.BlazingFast = false;
this.LuaListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.Script,
this.PathName});
this.LuaListView.AllowColumnResize = true;
this.LuaListView.AllowColumnReorder = false;
this.LuaListView.ContextMenuStrip = this.ScriptListContextMenu;
this.LuaListView.FullRowSelect = true;
this.LuaListView.GridLines = true;
this.LuaListView.HideSelection = false;
this.LuaListView.ItemCount = 0;
this.LuaListView.RowCount = 0;
this.LuaListView.Location = new System.Drawing.Point(4, 21);
this.LuaListView.Name = "LuaListView";
this.LuaListView.SelectAllInProgress = false;
this.LuaListView.selectedItem = -1;
this.LuaListView.Size = new System.Drawing.Size(273, 271);
this.LuaListView.SmallImageList = this.imageList1;
this.LuaListView.TabIndex = 0;
this.LuaListView.UseCompatibleStateImageBehavior = false;
this.LuaListView.UseCustomBackground = true;
this.LuaListView.View = System.Windows.Forms.View.Details;
this.LuaListView.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.LuaListView_ColumnClick);
this.LuaListView.ItemActivate += new System.EventHandler(this.LuaListView_ItemActivate);
this.LuaListView.ColumnClick += new BizHawk.Client.EmuHawk.InputRoll.ColumnClickEventHandler(this.LuaListView_ColumnClick);
this.LuaListView.KeyDown += new System.Windows.Forms.KeyEventHandler(this.LuaListView_KeyDown);
//
// Script
//
this.Script.Text = "Script";
this.Script.Width = 92;
//
// PathName
//
this.PathName.Text = "Path";
this.PathName.Width = 195;
//
// imageList1
//
this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
this.imageList1.Images.SetKeyName(0, "StopButton.png");
this.imageList1.Images.SetKeyName(1, "PlayButton.png");
this.imageList1.Images.SetKeyName(2, "Pause.png");
this.LuaListView.DoubleClick += new System.EventHandler(this.LuaListView_DoubleClick);
//
// splitContainer1
//
@ -910,8 +881,7 @@
#endregion
private VirtualListView LuaListView;
private System.Windows.Forms.ColumnHeader PathName;
private InputRoll LuaListView;
private MenuStripEx menuStrip1;
private System.Windows.Forms.ToolStripMenuItem FileSubMenu;
private System.Windows.Forms.ToolStripMenuItem SaveSessionMenuItem;
@ -921,7 +891,6 @@
private System.Windows.Forms.ToolStripMenuItem ScriptSubMenu;
private System.Windows.Forms.ToolStripMenuItem EditScriptMenuItem;
private System.Windows.Forms.ToolStripMenuItem ToggleScriptMenuItem;
public System.Windows.Forms.ColumnHeader Script;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.ToolStripMenuItem NewSessionMenuItem;
private System.Windows.Forms.ToolStripMenuItem SettingsSubMenu;
@ -980,7 +949,6 @@
private System.Windows.Forms.ToolStripMenuItem DuplicateScriptMenuItem;
private System.Windows.Forms.TextBox InputBox;
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.ImageList imageList1;
private System.Windows.Forms.ToolStripMenuItem ReturnAllIfNoneSelectedMenuItem;
private System.Windows.Forms.ToolStripMenuItem RemoveRegisteredFunctionsOnToggleMenuItem;
private System.Windows.Forms.ToolStripMenuItem ReloadWhenScriptFileChangesMenuItem;

View File

@ -13,11 +13,16 @@ using BizHawk.Client.EmuHawk.ToolExtensions;
using BizHawk.Client.EmuHawk.WinFormExtensions;
using BizHawk.Common;
using BizHawk.Emulation.Common;
using NLua;
namespace BizHawk.Client.EmuHawk
{
public partial class LuaConsole : ToolFormBase, IToolFormAutoConfig
{
private const string IconColumnName = "Icon";
private const string ScriptColumnName = "Script";
private const string PathColumnName = "PathName";
[RequiredService]
private IEmulator Emulator { get; set; }
@ -33,14 +38,15 @@ namespace BizHawk.Client.EmuHawk
{
public LuaConsoleSettings()
{
Columns = new ToolDialogSettings.ColumnList
Columns = new List<InputRoll.RollColumn>
{
new ToolDialogSettings.Column { Name = "Script", Visible = true, Index = 0, Width = 92 },
new ToolDialogSettings.Column { Name = "PathName", Visible = true, Index = 0, Width = 195 }
new InputRoll.RollColumn { Name = IconColumnName, Text = " ", Visible = true, Width = 22, Type = InputRoll.RollColumn.InputType.Image },
new InputRoll.RollColumn { Name = ScriptColumnName, Text = "Script", Visible = true, Width = 92, Type = InputRoll.RollColumn.InputType.Text },
new InputRoll.RollColumn { Name = PathColumnName, Text = "Path", Visible = true, Width = 300, Type = InputRoll.RollColumn.InputType.Text }
};
}
public ToolDialogSettings.ColumnList Columns { get; set; }
public List<InputRoll.RollColumn> Columns { get; set; }
}
[ConfigPersist]
@ -58,7 +64,7 @@ namespace BizHawk.Client.EmuHawk
{
if (AskSaveChanges())
{
SaveColumnInfo(LuaListView, Settings.Columns);
Settings.Columns = LuaListView.AllColumns;
GlobalWin.DisplayManager.ClearLuaSurfaces();
@ -85,9 +91,7 @@ namespace BizHawk.Client.EmuHawk
LuaListView.QueryItemText += LuaListView_QueryItemText;
LuaListView.QueryItemBkColor += LuaListView_QueryItemBkColor;
LuaListView.QueryItemImage += LuaListView_QueryItemImage;
LuaListView.QueryItemIndent += LuaListView_QueryItemIndent;
LuaListView.VirtualMode = true;
LuaListView.QueryItemIcon += LuaListView_QueryItemImage;
// this is bad, in case we ever have more than one gui part running lua.. not sure how much other badness there is like that
LuaSandbox.DefaultLogger = ConsoleLog;
@ -99,7 +103,7 @@ namespace BizHawk.Client.EmuHawk
private IEnumerable<LuaFile> SelectedItems
{
get { return LuaListView.SelectedIndices().Select(index => LuaImp.ScriptList[index]); }
get { return LuaListView.SelectedRows.Select(index => LuaImp.ScriptList[index]); }
}
private IEnumerable<LuaFile> SelectedFiles
@ -129,6 +133,12 @@ namespace BizHawk.Client.EmuHawk
private void LuaConsole_Load(object sender, EventArgs e)
{
// Hack for previous config settings
if (Settings.Columns.Any(c => c.Text == null))
{
Settings = new LuaConsoleSettings();
}
LuaImp.ScriptList.ChangedCallback = SessionChangedCallback;
LuaImp.ScriptList.LoadCallback = ClearOutputWindow;
@ -144,7 +154,8 @@ namespace BizHawk.Client.EmuHawk
}
}
LoadColumnInfo(LuaListView, Settings.Columns);
LuaListView.AllColumns.Clear();
SetColumns();
}
public void Restart()
@ -217,10 +228,21 @@ namespace BizHawk.Client.EmuHawk
private readonly List<FileSystemWatcher> _watches = new List<FileSystemWatcher>();
private void SetColumns()
{
foreach (var column in Settings.Columns)
{
if (LuaListView.AllColumns[column.Name] == null)
{
LuaListView.AllColumns.Add(column);
}
}
}
private void AddFileWatches()
{
_watches.Clear();
foreach (var item in LuaImp.ScriptList)
foreach (var item in LuaImp.ScriptList.Where(s => !s.IsSeparator))
{
var processedPath = PathManager.TryMakeRelative(item.Path);
string pathToLoad = ProcessPath(processedPath);
@ -263,7 +285,7 @@ namespace BizHawk.Client.EmuHawk
var luaFile = new LuaFile("", processedPath);
LuaImp.ScriptList.Add(luaFile);
LuaListView.ItemCount = LuaImp.ScriptList.Count;
LuaListView.RowCount = LuaImp.ScriptList.Count;
Global.Config.RecentLua.Add(processedPath);
if (!Global.Config.DisableLuaScriptsOnLoad)
@ -297,7 +319,7 @@ namespace BizHawk.Client.EmuHawk
private void UpdateDialog()
{
LuaListView.ItemCount = LuaImp.ScriptList.Count;
LuaListView.RowCount = LuaImp.ScriptList.Count;
LuaListView.Refresh();
UpdateNumberOfScripts();
UpdateRegisteredFunctionsDialog();
@ -305,7 +327,7 @@ namespace BizHawk.Client.EmuHawk
private void RunLuaScripts()
{
foreach (var file in LuaImp.ScriptList)
foreach (var file in LuaImp.ScriptList.Where(s => !s.IsSeparator))
{
if (!file.Enabled && file.Thread == null)
{
@ -340,62 +362,62 @@ namespace BizHawk.Client.EmuHawk
Path.GetFileName(LuaImp.ScriptList.Filename);
}
private void LuaListView_QueryItemImage(int item, int subItem, out int imageIndex)
private void LuaListView_QueryItemImage(int index, InputRoll.RollColumn column, ref Bitmap bitmap, ref int offsetX, ref int offsetY)
{
imageIndex = -1;
if (subItem != 0)
if (column.Name != IconColumnName)
{
return;
}
if (LuaImp.ScriptList[item].Paused)
if (LuaImp.ScriptList[index].IsSeparator)
{
imageIndex = 2;
return;
}
else if (LuaImp.ScriptList[item].Enabled)
if (LuaImp.ScriptList[index].Paused)
{
imageIndex = 1;
bitmap = Properties.Resources.Pause;
}
else if (LuaImp.ScriptList[index].Enabled)
{
bitmap = Properties.Resources.ts_h_arrow_green;
}
else
{
imageIndex = 0;
bitmap = Properties.Resources.StopButton;
}
}
private void LuaListView_QueryItemIndent(int item, out int itemIndent)
private void LuaListView_QueryItemBkColor(int index, InputRoll.RollColumn column, ref Color color)
{
itemIndent = 0;
}
private void LuaListView_QueryItemBkColor(int index, int column, ref Color color)
{
if (column == 0)
if (LuaImp.ScriptList[index].IsSeparator)
{
if (LuaImp.ScriptList[index].IsSeparator)
{
color = BackColor;
}
else if (LuaImp.ScriptList[index].Enabled && !LuaImp.ScriptList[index].Paused)
{
color = Color.LightCyan;
}
else if (LuaImp.ScriptList[index].Enabled && LuaImp.ScriptList[index].Paused)
{
color = Color.LightPink;
}
color = BackColor;
}
else if (LuaImp.ScriptList[index].Enabled && !LuaImp.ScriptList[index].Paused)
{
color = Color.LightCyan;
}
else if (LuaImp.ScriptList[index].Enabled && LuaImp.ScriptList[index].Paused)
{
color = Color.LightPink;
}
UpdateNumberOfScripts();
}
private void LuaListView_QueryItemText(int index, int column, out string text)
private void LuaListView_QueryItemText(int index, InputRoll.RollColumn column, out string text, ref int offsetX, ref int offsetY)
{
text = "";
if (column == 0)
if (LuaImp.ScriptList[index].IsSeparator)
{
return;
}
if (column.Name == ScriptColumnName)
{
text = Path.GetFileNameWithoutExtension(LuaImp.ScriptList[index].Path); // TODO: how about allow the user to name scripts?
}
else if (column == 1)
else if (column.Name == PathColumnName)
{
text = DressUpRelative(LuaImp.ScriptList[index].Path);
}
@ -437,9 +459,9 @@ namespace BizHawk.Client.EmuHawk
private void UpdateNumberOfScripts()
{
var message = "";
var total = SelectedFiles.Count();
var active = LuaImp.ScriptList.Count(file => file.Enabled);
var paused = LuaImp.ScriptList.Count(file => file.Enabled && file.Paused);
var total = LuaImp.ScriptList.Count(file => !file.IsSeparator);
var active = LuaImp.ScriptList.Count(file => !file.IsSeparator && file.Enabled);
var paused = LuaImp.ScriptList.Count(file => !file.IsSeparator && file.Enabled && file.Paused);
if (total == 1)
{
@ -780,7 +802,7 @@ namespace BizHawk.Client.EmuHawk
DuplicateScriptMenuItem.Enabled =
MoveUpMenuItem.Enabled =
MoveDownMenuItem.Enabled =
LuaListView.SelectedIndices().Any();
LuaListView.SelectedRows.Any();
SelectAllMenuItem.Enabled = LuaImp.ScriptList.Any();
StopAllScriptsMenuItem.Enabled = LuaImp.ScriptList.Any(script => script.Enabled);
@ -946,7 +968,7 @@ namespace BizHawk.Client.EmuHawk
private void DuplicateScriptMenuItem_Click(object sender, EventArgs e)
{
if (LuaListView.SelectedIndices().Any())
if (LuaListView.SelectedRows.Any())
{
var script = SelectedFiles.First();
@ -976,7 +998,7 @@ namespace BizHawk.Client.EmuHawk
private void InsertSeparatorMenuItem_Click(object sender, EventArgs e)
{
var indices = LuaListView.SelectedIndices().ToList();
var indices = LuaListView.SelectedRows.ToList();
if (indices.Any() && indices.Last() < LuaImp.ScriptList.Count)
{
LuaImp.ScriptList.Insert(indices.Last(), LuaFile.SeparatorInstance);
@ -991,7 +1013,7 @@ namespace BizHawk.Client.EmuHawk
private void MoveUpMenuItem_Click(object sender, EventArgs e)
{
var indices = LuaListView.SelectedIndices().ToList();
var indices = LuaListView.SelectedRows.ToList();
if (indices.Count == 0 || indices[0] == 0)
{
return;
@ -1006,10 +1028,10 @@ namespace BizHawk.Client.EmuHawk
var newIndices = indices.Select(t => t - 1);
LuaListView.SelectedIndices.Clear();
LuaListView.DeselectAll();
foreach (var i in newIndices)
{
LuaListView.SelectItem(i, true);
LuaListView.SelectRow(i, true);
}
UpdateDialog();
@ -1017,7 +1039,7 @@ namespace BizHawk.Client.EmuHawk
private void MoveDownMenuItem_Click(object sender, EventArgs e)
{
var indices = LuaListView.SelectedIndices().ToList();
var indices = LuaListView.SelectedRows.ToList();
if (indices.Count == 0 || indices.Last() == LuaImp.ScriptList.Count - 1)
{
return;
@ -1032,10 +1054,10 @@ namespace BizHawk.Client.EmuHawk
var newIndices = indices.Select(t => t + 1);
LuaListView.SelectedIndices.Clear();
LuaListView.DeselectAll();
foreach (var i in newIndices)
{
LuaListView.SelectItem(i, true);
LuaListView.SelectRow(i, true);
}
UpdateDialog();
@ -1280,11 +1302,6 @@ namespace BizHawk.Client.EmuHawk
}
}
private void LuaListView_ItemActivate(object sender, EventArgs e)
{
ToggleScriptMenuItem_Click(sender, e);
}
private void OutputBox_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.F12 && !e.Control && !e.Alt && !e.Shift) // F12
@ -1296,9 +1313,9 @@ namespace BizHawk.Client.EmuHawk
/// <summary>
/// Sorts the column Ascending on the first click and Descending on the second click.
/// </summary>
private void LuaListView_ColumnClick(object sender, ColumnClickEventArgs e)
private void LuaListView_ColumnClick(object sender, InputRoll.ColumnClickEventArgs e)
{
var columnToSort = LuaListView.Columns[e.Column].Text;
var columnToSort = e.Column.Name;
var luaListTemp = new List<LuaFile>();
if (columnToSort != _lastColumnSorted)
{
@ -1438,5 +1455,28 @@ namespace BizHawk.Client.EmuHawk
}
#endregion
private void LuaListView_DoubleClick(object sender, EventArgs e)
{
var index = LuaListView.CurrentCell?.RowIndex;
if (index < LuaImp.ScriptList.Count)
{
var file = LuaImp.ScriptList[index.Value];
if (!file.IsSeparator)
{
file.Toggle();
UpdateDialog();
}
}
}
[RestoreDefaults]
private void RestoreDefaults()
{
Settings = new LuaConsoleSettings();
LuaListView.AllColumns.Clear();
SetColumns();
UpdateDialog();
}
}
}

View File

@ -144,78 +144,6 @@
S+GOLQu6U6BFjPvqKOP1AYw88WOoZif9DgmfLVtxaj1RSLdwNvrkPCA3M54KqxrnvRia9MKcGrUrqFOt
5H7qKsqT1mGO9+Lqhc2ELdw+U/r0i+gVZ8hMiCDx3DHORwZyKnQ/hw/uYt9uCTskPvh6e7Fp41rWr/Fg
g6eHO+A/lyD8ARfG3mk9fv1YAAAAAElFTkSuQmCC
</value>
</data>
<metadata name="imageList1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>489, 17</value>
</metadata>
<data name="imageList1.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABi
DgAAAk1TRnQBSQFMAgEBAwEAAVgBAAFYAQABEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA
AwABEAMAAQEBAAEgBgABECoAAWUBWwFdAeUBsgG0AdIB/wG7Ab4B1wH/AWYCXAHnMAABZQFdAVsB5QGy
AdIBtgH/AbsB1wG+Af8BZgJcAecwAAFnAlsB5QHSAb4BsgH/AdcBxQG7Af8BaQJcAedoAAFoAVkBbQH1
ATUBPAGXAf8BAQEMAYcB/wECAQwBhwH/AQABCwGHAf8BBwERAYgB/wEKARQBiQH/AWkBXgGEAfkgAAFo
AW0BWQH1ATUBlwFBAf8BAQGHARAB/wECAYcBEQH/AQABhwEOAf8BBwGIARUB/wEKAYkBGAH/AWkBhAFe
AfkgAAF+AWABWQH1AZcBVwE1Af8BhwEvAQEB/wGHATABAgH/AYcBLgEAAf8BiAEzAQcB/wGJATYBCgH/
AYsBaAFaAflcAAEwATgBmAH/AS0BNQGYAf8BsAGyAcsB/wHaAdsB2gH/AtEB1QH/AcsBzAHSAf8BxAHH
Ac4B/wFUAVoBpQH/AUcBRQFqAfkBJQEuAY8B/xgAASIBkgEuAf8BLQGYATkB/wGwAcsBswH/AdsC2gH/
AdEB1QHSAf8BywHSAcsB/wHFAc4BxAH/AVQBpQFdAf8BRwFqAUYB+QElAY8BMAH/GAABkgFIASIB/wGY
AVIBLQH/AcsBugGwAf8C2gHbAf8B1QHTAdEB/wHSAc0BywH/Ac4BxgHEAf8BpQFvAVQB/wGEAVwBQQH5
AY8BSAElAf9UAAJAAY0B/QFiAlgB4wL+Af0B/wH+Af0B9QH/AvcB8wH/Ae8C7gH/Au0B6wH/AdkC2wH/
AeMB5AHiAf8CwAHMAf8BZgFYAV0B7QFMAUkBeQH7EAABQAGNAUAB/QFiAlgB4wH/Af4C/wH+AfUB/QH/
AfcB8wH2Af8C7gHvAf8B7QHrAe0B/wLbAdkB/wHkAeIB4wH/AcABzAHCAf8BZgFdAVgB7QFMAXkBSwH7
EAABkwFGAUAB/QFkAlgB4wH+A/8B9QH7Af4B/wHzAfUB9wH/Ae4B7wHuAf8B6wHsAe0B/wHbAdkB2gH/
AuIB5AH/AcwBxQHAAf8BagFZAVcB7QGGAVkBQwH7TAABagFdAWwB8wFqAVkBYAHrBf8B/gH9F/8B/gH/
AfAB7wHwAf8BzwHQAdYB/wFjAVQBXQHtAWQBWAFiAe8IAAFqAWwBXQHzAWoBYAFZAesF/wH9Bv8B4wHw
AeMB/wGcAc0BnAr/Af4C/wHvAvAB/wHPAdYBzwH/AWMBXQFUAe0BZAFiAVgB7wgAAXsBXwFdAfMBbgFg
AVkB6wT/Af0X/wH+A/8C4wHgAf8BzwHJAccB/wFpAVgBUwHtAWwCWAHvSAABagFeAYkB+QP+Jf8B8AHy
AfAB/wLGAc0B/wFHAUEBagH5CAABagGJAV4B+RD/AdwB7QHcAf8BDQF1AQ0B/wGDAcEBgw3/AfIB8QHw
Af8BxwHOAcgB/wFHAWoBQQH5CAABjAFqAV4B+Qz/AeEBzQG+Af8BvgGSAY0B/wH3AfEB7wH/AfsB+AH3
Af8BwQGYAY8B/wHqAdoB0QX/AeUB4gHmAf8BzgHKAccB/wGAAVcBQQH5RAABbwFfAXAB8wFqAV0BYwHt
CP8C9QH7Af8BaQFlAdQB/wGhAZ8B5wH/AaMBoQHmAf8BogGhAeUB/wGUAZEB4QH/AZ4BnAHmBf8B+QH4
AfcB/wHnAeQB3gH/AVkBVwFqAfUBXQFZAYkB+wFvAXABXwHzAWoBYwFdAe0Q/wHkAfEB5AH/AQABcQEA
Af8BDQF3AQ0B/wGcAc4BnAn/AfkB9wH5Af8B5gHeAecB/wFZAWoBWQH1AV0BiQFZAfsBgAFoAV8B8wFx
Al0B7Qz/Aa4BcgFQAf8BVQIAAf8B+AH1AfIB/wH6AfcB9QH/AVUCAAH/AbMBdwFWBf8B8QH0AfUB/wHe
AeYB5wH/AXQBWQFUAfUBkQFfAVQB+0AAAYIBiAHKAf8B0AHSAe0J/wL1AfoB/wE3ATQBuwH/AWMBYAHe
Af8BYAFcAdgB/wFbAVcB0wH/AU8BSgHRAf8BogGhAekF/wL5AfgB/wH8AfsB6gH/AaMBpgG+Af8BPwFG
AaAB/wGCAcoBigH/AdAB7QHUEf8B4gHwAeIB/wEAAXIBAAH/AQABcgEAAf8BDQGEAQ0B/wGYAcwBmAX/
AfkB+AH5Af8B/AHqAfoB/wGjAb4BpQH/AT8BoAFKAf8BygGcAYIB/wHtAdsB0A3/AboBjAFmAf8BjQEe
AQAC/wL+Af8D/gH/AY0BHQEAAf8BuwGJAWQF/wHyAfQB9QH/AeoB9QH8Af8BvgGsAaMB/wGgAWABPwH/
QAABcAF2AcIB/wHlAeYB9An/AvcB+wH/AUYBQwHDAf8BcQFvAeMB/wFsAWkB3QH/AWcBZAHYAf8BWwFW
AdMB/wGrAakB6gX/A/kB/wH+AfsB7wH/AbQBtgHFAf8BPQFFAZ8B/wFwAcIBgQH/AeUB9AHnEf8B4gHw
AeIB/wEAAXQBAAH/AQABdgEAAf8BAAFuAQAB/wENAYQBDQH/AfoB/AH6Af8D+QH/Af4B7wH+Af8BtAHF
AbYB/wE9AZ8BSAH/AcIBkwFwAf8B9AHrAeUN/wG5AYwBZwH/AacBNAEHAf8B+wH5AfgB/wH7AfoB+QH/
AacBNAEHAf8BvQGMAWcF/wP0Af8B7wH6Af4B/wHFAboBtAH/AZ8BXgE9Af9AAAFsAXMBvQH/AtoB7wn/
AvcB+wH/AUoBRwHHAf8BdwF1AeoB/wFyAXEB4wH/AW8BbQHfAf8BYgFfAdoB/wGtAasB6wX/AvoB+AH/
Af0B/AHuAf8BnQGgAbsB/wFFAU0BowH/AWwBvQF0Af8B2gHvAd4R/wHiAfAB4gH/AQABdAEAAf8BAAFs
AQAB/wEoAY4BKAH/AeIB8AHiBf8B+gH4AfoB/wH9Ae4B+wH/AZ0BuwGhAf8BRQGjAU4B/wG9AY4BbAH/
Ae8B4wHaDf8BtwGIAWIB/wHEAUMBIAH/Av0B/AH/AfwB+gH5Af8BxgFGASIB/wHCAY8BbAX/AfIB9QH3
Af8B7gH3Af0B/wG7AagBnQH/AaMBZAFFAf9AAAFoAVgBYwHvAXMBZAFuAfEI/wL2AfsB/wFHAUMBxQH/
AXYBdQHrAf8BcgFxAeQB/wFwAW0B4QH/AWABXQHbAf8BqQGnAesF/wL7AfkB/wH7AfwB7gH/AU0BSgGB
AfsBZQFYAWIB7wFoAWMBWAHvAXMBbgFkAfEQ/wHiAfAB4gH/AQABagEAAf8BJAGHASQB/wHnAfMB5wn/
AfsB+QH7Af8B/AHuAfkB/wFNAYEBTAH7AWUBYgFYAe8BcgFiAVgB7wGAAWUBZAHxDP8BwQGXAXYB/wGk
AToBEgH/Af0B+wH6Af8B/AH6AfkB/wGTATUBCwH/AcwBqQGUBf8B9AH3AfkB/wHuAfUB/AH/AYoBWQFF
AfsBcAJYAe9EAAF3AYEBzwn/AvMB+QH/AUUBQgG5Af8BhwGGAdYB/wGHAYUB1QH/AYcBhQHVAf8BYQFe
AcgB/wFpAWgBzAb/Af4B/AH/As4B1wH/ATUBPQGYAf8IAAF3Ac8BjRH/AdMB6AHTAf8BIAGHASAB/wHi
AfAB4g3/Af4B/AL/Ac4B1wHQAf8BNQGYAT8B/wgAAc8BoQF3Kf8B+wP/AdcB0gHOAf8BmAFWATUB/0gA
AYIBagGQAfkBewFlAXQB8ST/AfwB+wH2Af8BMwE7AZYB/wFlAVgBWwHpCAABggGQAWoB+QF7AXQBbQHx
DP8B+gH8AfoB/wHvAfYB7xH/AfwB9gH8Af8BMwGWAT0B/wFlAVsBWAHpCAABngGBAWoB+QGCAW0BZQHx
JP8B9QH6AfwB/wGWAVQBMwH/AWoCWAHpTAACgwG4Af0BagFdAWIB6Rz/AfIB9QH4Af8CWQFqAfUBaQFZ
AW4B9RAAAYMBuAGIAf0BagFiAV0B6Rz/AfQB+AHyAf8BWQFqAVkB9QFpAW4BWQH1EAABugGdAXEB/QFs
AV8BXQHpHP8B+ALyAf8BdwFZAUsB9QGAAWABWQH1VAABdgFtAZsB+wGJAXcBmQH5AtMB9wH/AfEB8AH7
Af8B9gH3Av8B9wH4Af0B/wHkAecB8wH/AWUBWAFiAe8BbAFfAWwB8wFrAVkBYAHrGAABdgGbAXkB+wGJ
AZkBhAH5AdMB9wHaAf8B8AH7AfMB/wH2Af8B9wH/AfcB/QH4Af8B5AHzAeQB/wFlAWIBWAHvAmwBXwHz
AWsBYAFZAesYAAGjAYgBZgH7AaUBiwF0AfkB9wHjAdMB/wH7AfYB8AL/AfkB9gH/Af0B+QH3Af8B8wHo
AeQB/wFwAlgB7wF8Al8B8wFxAWABWQHrXAABbgFgAWIB6wGNAZMB1wH/AY4BlAHdAf8BjwGVAeAB/wGN
AZQB2wH/AZoBnwHaAf8BZgJcAeckAAFuAWIBYAHrAY0B1wGWAf8BjgHdAZgB/wGPAeABmQH/AY0B2wGW
Af8BmgHaAaIB/wFmAlwB5yQAAXMCYAHrAdcBqAGNAf8B3QGsAY4B/wHgAa0BjwH/AdsBqQGNAf8B2gGy
AZoB/wFpAlwB51QAAUIBTQE+BwABPgMAASgDAAFAAwABEAMAAQEBAAEBBQABgBcAA/8BAAH8AT8B/AE/
AfwBPwIAAfABDwHwAQ8B8AEPAgAB4AEHAeABBwHgAQcCAAHAAQMBwAEDAcABAwIAAYABAQGAAQEBgAEB
AgABgAEBAYABAQGAAQEqAAGAAQEBgAEBAYABAQIAAYABAQGAAQEBgAEBAgABwAEDAcABAwHAAQMCAAHg
AQcB4AEHAeABBwIAAfABHwHwAR8B8AEfAgAL
</value>
</data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">

View File

@ -34,7 +34,7 @@
this.FilterBox = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.ToWikiMarkupButton = new System.Windows.Forms.Button();
this.FunctionView = new BizHawk.Client.EmuHawk.VirtualListView();
this.FunctionView = new System.Windows.Forms.ListView();
this.LibraryReturn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.LibraryHead = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.LibraryName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
@ -96,7 +96,6 @@
this.FunctionView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.FunctionView.BlazingFast = false;
this.FunctionView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.LibraryReturn,
this.LibraryHead,
@ -105,11 +104,9 @@
this.LibraryDescription});
this.FunctionView.FullRowSelect = true;
this.FunctionView.GridLines = true;
this.FunctionView.ItemCount = 0;
this.FunctionView.VirtualListSize = 0;
this.FunctionView.Location = new System.Drawing.Point(12, 12);
this.FunctionView.Name = "FunctionView";
this.FunctionView.SelectAllInProgress = false;
this.FunctionView.selectedItem = -1;
this.FunctionView.Size = new System.Drawing.Size(710, 291);
this.FunctionView.TabIndex = 1;
this.FunctionView.UseCompatibleStateImageBehavior = false;
@ -170,7 +167,7 @@
private System.Windows.Forms.Button OK;
private System.DirectoryServices.DirectoryEntry directoryEntry1;
private VirtualListView FunctionView;
private System.Windows.Forms.ListView FunctionView;
private System.Windows.Forms.ColumnHeader LibraryHead;
private System.Windows.Forms.ColumnHeader LibraryReturn;
private System.Windows.Forms.ColumnHeader LibraryName;

View File

@ -1,12 +1,10 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BizHawk.Client.Common;
using BizHawk.Common;
namespace BizHawk.Client.EmuHawk
{
@ -35,8 +33,7 @@ namespace BizHawk.Client.EmuHawk
public LuaFunctionsForm()
{
InitializeComponent();
FunctionView.QueryItemText += FunctionView_QueryItemText;
FunctionView.QueryItemBkColor += FunctionView_QueryItemBkColor;
FunctionView.RetrieveVirtualItem += FunctionView_QueryItemText;
}
private void LuaFunctionList_Load(object sender, EventArgs e)
@ -51,42 +48,14 @@ namespace BizHawk.Client.EmuHawk
ToWikiMarkupButton.Visible = VersionInfo.DeveloperBuild;
}
private void FunctionView_QueryItemBkColor(int index, int column, ref Color color)
private void FunctionView_QueryItemText(object sender, RetrieveVirtualItemEventArgs e)
{
}
private void FunctionView_QueryItemText(int index, int column, out string text)
{
text = "";
try
{
if (_filteredList.Any() && index < _filteredList.Count)
{
switch (column)
{
case 0:
text = _filteredList[index].ReturnType;
break;
case 1:
text = _filteredList[index].Library;
break;
case 2:
text = _filteredList[index].Name;
break;
case 3:
text = _filteredList[index].ParameterList;
break;
case 4:
text = _filteredList[index].Description;
break;
}
}
}
catch
{
/* Eat it*/
}
var entry = _filteredList[e.ItemIndex];
e.Item = new ListViewItem(entry.ReturnType);
e.Item.SubItems.Add(entry.Library);
e.Item.SubItems.Add(entry.Name);
e.Item.SubItems.Add(entry.ParameterList);
e.Item.SubItems.Add(entry.Description);
}
private void OrderColumn(int column)
@ -206,7 +175,12 @@ namespace BizHawk.Client.EmuHawk
//FREVBHFYL?
private void FunctionView_Copy(object sender, EventArgs e)
{
var itm = _filteredList[FunctionView.selectedItem];
if (FunctionView.SelectedIndices.Count == 0)
{
return;
}
var itm = _filteredList[FunctionView.SelectedIndices[0]];
var sb = new StringBuilder($"//{itm.Library}.{itm.Name}{itm.ParameterList}"); //comment style not an accident: the 'declaration' is not legal lua, so use of -- to comment it shouldn't suggest it. right?
if (itm.Example != null)
{
@ -221,7 +195,7 @@ namespace BizHawk.Client.EmuHawk
private void UpdateList()
{
GenerateFilteredList();
FunctionView.ItemCount = _filteredList.Count;
FunctionView.VirtualListSize = _filteredList.Count;
}
private void FilterBox_KeyUp(object sender, KeyEventArgs e)

View File

@ -1,7 +1,5 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using BizHawk.Emulation.Common;
@ -105,29 +103,6 @@ namespace BizHawk.Client.EmuHawk
e.Effect = e.Data.GetDataPresent(DataFormats.FileDrop) ? DragDropEffects.Copy : DragDropEffects.None;
}
protected void LoadColumnInfo(VirtualListView listView, ToolDialogSettings.ColumnList columns)
{
listView.Columns.Clear();
var cl = columns
.Where(c => c.Visible)
.OrderBy(c => c.Index);
foreach (var column in cl)
{
listView.AddColumn(column);
}
}
protected void SaveColumnInfo(VirtualListView listview, ToolDialogSettings.ColumnList columns)
{
foreach (ColumnHeader column in listview.Columns)
{
columns[column.Name].Index = column.DisplayIndex;
columns[column.Name].Width = column.Width;
}
}
protected void RefreshFloatingWindowControl(bool floatingWindow)
{
Owner = floatingWindow ? null : GlobalWin.MainForm;

View File

@ -323,6 +323,11 @@ namespace BizHawk.Client.EmuHawk
settings.RestoreDefaults();
RefreshSettings(form, dest, settings, idx);
form.Size = oldsize;
form.GetType()
.GetMethodsWithAttrib(typeof(RestoreDefaultsAttribute))
.FirstOrDefault()
?.Invoke(form, new object[0]);
};
}

View File

@ -32,12 +32,7 @@
System.Windows.Forms.ToolStripMenuItem SearchMenuItem;
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RamSearch));
this.TotalSearchLabel = new System.Windows.Forms.Label();
this.WatchListView = new BizHawk.Client.EmuHawk.VirtualListView();
this.AddressColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.ValueColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.PreviousColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.ChangesColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.DiffColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.WatchListView = new InputRoll();
this.ListViewContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this.DoSearchContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.NewSearchContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -185,65 +180,29 @@
// WatchListView
//
this.WatchListView.AllowColumnReorder = true;
this.WatchListView.AllowColumnResize = true;
this.WatchListView.AllowDrop = true;
this.WatchListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.WatchListView.BlazingFast = false;
this.WatchListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.AddressColumn,
this.ValueColumn,
this.PreviousColumn,
this.ChangesColumn,
this.DiffColumn});
this.WatchListView.ContextMenuStrip = this.ListViewContextMenu;
this.WatchListView.FullRowSelect = true;
this.WatchListView.GridLines = true;
this.WatchListView.HideSelection = false;
this.WatchListView.ItemCount = 0;
this.WatchListView.RowCount = 0;
this.WatchListView.Location = new System.Drawing.Point(9, 65);
this.WatchListView.Name = "WatchListView";
this.WatchListView.SelectAllInProgress = false;
this.WatchListView.selectedItem = -1;
this.WatchListView.Size = new System.Drawing.Size(230, 366);
this.WatchListView.TabIndex = 1;
this.WatchListView.UseCompatibleStateImageBehavior = false;
this.WatchListView.UseCustomBackground = true;
this.WatchListView.View = System.Windows.Forms.View.Details;
this.WatchListView.VirtualMode = true;
this.WatchListView.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.WatchListView_ColumnClick);
this.WatchListView.MultiSelect = true;
this.WatchListView.ColumnClick += new BizHawk.Client.EmuHawk.InputRoll.ColumnClickEventHandler(this.WatchListView_ColumnClick);
this.WatchListView.SelectedIndexChanged += new System.EventHandler(this.WatchListView_SelectedIndexChanged);
this.WatchListView.VirtualItemsSelectionRangeChanged += new System.Windows.Forms.ListViewVirtualItemsSelectionRangeChangedEventHandler(this.WatchListView_VirtualItemsSelectionRangeChanged);
this.WatchListView.DragDrop += new System.Windows.Forms.DragEventHandler(this.NewRamSearch_DragDrop);
this.WatchListView.DragEnter += new System.Windows.Forms.DragEventHandler(this.DragEnterWrapper);
this.WatchListView.Enter += new System.EventHandler(this.WatchListView_Enter);
this.WatchListView.KeyDown += new System.Windows.Forms.KeyEventHandler(this.WatchListView_KeyDown);
this.WatchListView.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.WatchListView_MouseDoubleClick);
//
// AddressColumn
//
this.AddressColumn.Text = "Address";
this.AddressColumn.Width = 61;
//
// ValueColumn
//
this.ValueColumn.Text = "Value";
this.ValueColumn.Width = 48;
//
// PreviousColumn
//
this.PreviousColumn.Text = "Prev";
this.PreviousColumn.Width = 48;
//
// ChangesColumn
//
this.ChangesColumn.Text = "Changes";
this.ChangesColumn.Width = 55;
//
// DiffColumn
//
this.DiffColumn.Text = "Diff";
//
// ListViewContextMenu
//
this.ListViewContextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -1422,11 +1381,7 @@
#endregion
private System.Windows.Forms.Label TotalSearchLabel;
VirtualListView WatchListView;
private System.Windows.Forms.ColumnHeader AddressColumn;
private System.Windows.Forms.ColumnHeader ValueColumn;
private System.Windows.Forms.ColumnHeader PreviousColumn;
private System.Windows.Forms.ColumnHeader ChangesColumn;
InputRoll WatchListView;
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem OpenMenuItem;
private System.Windows.Forms.ToolStripMenuItem SaveAsMenuItem;
@ -1530,7 +1485,6 @@
private WatchValueBox DifferenceBox;
private System.Windows.Forms.ToolStripMenuItem AutoSearchMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator9;
private System.Windows.Forms.ColumnHeader DiffColumn;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator12;
private System.Windows.Forms.ToolStripButton UndoToolBarButton;
private System.Windows.Forms.ToolStripButton RedoToolBarItem;

View File

@ -53,13 +53,13 @@ namespace BizHawk.Client.EmuHawk
InitializeComponent();
WatchListView.QueryItemText += ListView_QueryItemText;
WatchListView.QueryItemBkColor += ListView_QueryItemBkColor;
WatchListView.VirtualMode = true;
Closing += (o, e) => SaveConfigSettings();
_sortedColumn = "";
_sortReverse = false;
Settings = new RamSearchSettings();
SetColumns();
}
[RequiredService]
@ -110,15 +110,20 @@ namespace BizHawk.Client.EmuHawk
private void ColumnToggleCallback()
{
SaveColumnInfo(WatchListView, Settings.Columns);
LoadColumnInfo(WatchListView, Settings.Columns);
Settings.Columns = WatchListView.AllColumns;
}
private void RamSearch_Load(object sender, EventArgs e)
{
// Hack for previous config settings
if (Settings.Columns.Any(c => string.IsNullOrWhiteSpace(c.Text)))
{
Settings = new RamSearchSettings();
}
TopMost = Settings.TopMost;
RamSearchMenu.Items.Add(Settings.Columns.GenerateColumnsMenu(ColumnToggleCallback));
RamSearchMenu.Items.Add(WatchListView.ToColumnsMenu(ColumnToggleCallback));
_settings = new RamSearchEngine.Settings(MemoryDomains);
_searches = new RamSearchEngine(_settings, MemoryDomains);
@ -161,39 +166,36 @@ namespace BizHawk.Client.EmuHawk
ErrorIconButton.Visible = _searches.OutOfRangeAddress.Any();
}
private void ListView_QueryItemBkColor(int index, int column, ref Color color)
private void ListView_QueryItemBkColor(int index, InputRoll.RollColumn column, ref Color color)
{
if (column == 0)
if (_searches.Count > 0)
{
if (_searches.Count > 0 && column == 0)
var nextColor = Color.White;
var isCheat = Global.CheatList.IsActive(_settings.Domain, _searches[index].Address);
var isWeeded = Settings.PreviewMode && !_forcePreviewClear && _searches.Preview(_searches[index].Address);
if (_searches[index].Address >= _searches[index].Domain.Size)
{
var nextColor = Color.White;
var isCheat = Global.CheatList.IsActive(_settings.Domain, _searches[index].Address);
var isWeeded = Settings.PreviewMode && !_forcePreviewClear && _searches.Preview(_searches[index].Address);
if (_searches[index].Address >= _searches[index].Domain.Size)
{
nextColor = Color.PeachPuff;
}
else if (isCheat)
{
nextColor = isWeeded ? Color.Lavender : Color.LightCyan;
}
else
{
if (isWeeded)
{
nextColor = Color.Pink;
}
}
color = nextColor;
nextColor = Color.PeachPuff;
}
else if (isCheat)
{
nextColor = isWeeded ? Color.Lavender : Color.LightCyan;
}
else
{
if (isWeeded)
{
nextColor = Color.Pink;
}
}
color = nextColor;
}
}
private void ListView_QueryItemText(int index, int column, out string text)
private void ListView_QueryItemText(int index, InputRoll.RollColumn column, out string text, ref int offsetX, ref int offsetY)
{
text = "";
@ -202,7 +204,7 @@ namespace BizHawk.Client.EmuHawk
return;
}
var columnName = WatchListView.Columns[column].Name;
var columnName = column.Name;
switch (columnName)
{
case WatchList.ADDRESS:
@ -240,7 +242,19 @@ namespace BizHawk.Client.EmuHawk
TopMost = Settings.TopMost;
LoadColumnInfo(WatchListView, Settings.Columns);
WatchListView.AllColumns.Clear();
SetColumns();
}
private void SetColumns()
{
foreach (var column in Settings.Columns)
{
if (WatchListView.AllColumns[column.Name] == null)
{
WatchListView.AllColumns.Add(column);
}
}
}
#endregion
@ -252,7 +266,7 @@ namespace BizHawk.Client.EmuHawk
/// </summary>
private void UpdateList()
{
WatchListView.ItemCount = _searches.Count;
WatchListView.RowCount = _searches.Count;
SetTotal();
}
@ -282,9 +296,7 @@ namespace BizHawk.Client.EmuHawk
}
_forcePreviewClear = false;
WatchListView.BlazingFast = true;
WatchListView.Invalidate();
WatchListView.BlazingFast = false;
}
}
@ -314,7 +326,7 @@ namespace BizHawk.Client.EmuHawk
private void SaveConfigSettings()
{
SaveColumnInfo(WatchListView, Settings.Columns);
Settings.Columns = WatchListView.AllColumns;
if (WindowState == FormWindowState.Normal)
{
@ -551,7 +563,7 @@ namespace BizHawk.Client.EmuHawk
_forcePreviewClear = true;
}
private IEnumerable<int> SelectedIndices => WatchListView.SelectedIndices.Cast<int>();
private IEnumerable<int> SelectedIndices => WatchListView.SelectedRows;
private IEnumerable<Watch> SelectedItems
{
@ -771,10 +783,27 @@ namespace BizHawk.Client.EmuHawk
DifferenceRadio.Enabled = true;
DifferentByBox.Enabled = true;
ClearChangeCountsToolBarItem.Enabled = true;
WatchListView.Columns[WatchList.CHANGES].Width = Settings.Columns[WatchList.CHANGES].Width;
WatchListView.AllColumns[WatchList.CHANGES].Visible = true;
ChangesMenuItem.Checked = true;
ColumnToggleCallback();
SetReboot(true);
}
private ToolStripMenuItem ChangesMenuItem
{
get
{
var subMenu = (ToolStripMenuItem)RamSearchMenu.Items
.Cast<ToolStripItem>()
.Single(t => t.Name == "GeneratedColumnsSubMenu"); // TODO - make name a constant
return subMenu.DropDownItems
.Cast<ToolStripMenuItem>()
.Single(t => t.Name == WatchList.CHANGES);
}
}
private void SetToFastMode()
{
_settings.Mode = RamSearchEngine.Settings.SearchMode.Fast;
@ -794,8 +823,10 @@ namespace BizHawk.Client.EmuHawk
PreviousValueRadio.Checked = true;
}
Settings.Columns[WatchList.CHANGES].Width = WatchListView.Columns[WatchList.CHANGES].Width;
WatchListView.Columns[WatchList.CHANGES].Width = 0;
WatchListView.AllColumns[WatchList.CHANGES].Visible = false;
ChangesMenuItem.Checked = false;
ColumnToggleCallback();
SetReboot(true);
}
@ -808,7 +839,7 @@ namespace BizHawk.Client.EmuHawk
_searches.RemoveRange(indices);
UpdateList();
WatchListView.SelectedIndices.Clear();
WatchListView.DeselectAll();
ToggleSearchDependentToolBarItems();
}
}
@ -899,7 +930,7 @@ namespace BizHawk.Client.EmuHawk
private void GoToSpecifiedAddress()
{
WatchListView.SelectedIndices.Clear();
WatchListView.DeselectAll();
var prompt = new InputPrompt
{
Text = "Go to Address",
@ -916,8 +947,8 @@ namespace BizHawk.Client.EmuHawk
{
if (_searches[index].Address == addr)
{
WatchListView.SelectItem(index, true);
WatchListView.ensureVisible();
WatchListView.SelectRow(index, true);
WatchListView.ScrollToIndex(index);
return; // Don't re-show dialog on success
}
}
@ -943,13 +974,13 @@ namespace BizHawk.Client.EmuHawk
{
public RamSearchSettings()
{
Columns = new ColumnList
Columns = new List<InputRoll.RollColumn>
{
new Column { Name = WatchList.ADDRESS, Visible = true, Index = 0, Width = 60 },
new Column { Name = WatchList.VALUE, Visible = true, Index = 1, Width = 59 },
new Column { Name = WatchList.PREV, Visible = true, Index = 2, Width = 59 },
new Column { Name = WatchList.CHANGES, Visible = true, Index = 3, Width = 55 },
new Column { Name = WatchList.DIFF, Visible = false, Index = 4, Width = 59 },
new InputRoll.RollColumn { Text = "Address", Name = WatchList.ADDRESS, Visible = true, Width = 60, Type = InputRoll.RollColumn.InputType.Text },
new InputRoll.RollColumn { Text = "Value", Name = WatchList.VALUE, Visible = true, Width = 59, Type = InputRoll.RollColumn.InputType.Text },
new InputRoll.RollColumn { Text = "Prev", Name = WatchList.PREV, Visible = true, Width = 59, Type = InputRoll.RollColumn.InputType.Text },
new InputRoll.RollColumn { Text = "Changes", Name = WatchList.CHANGES, Visible = true, Width = 60, Type = InputRoll.RollColumn.InputType.Text },
new InputRoll.RollColumn { Text = "Diff", Name = WatchList.DIFF, Visible = false, Width = 59, Type = InputRoll.RollColumn.InputType.Text },
};
PreviewMode = true;
@ -957,7 +988,7 @@ namespace BizHawk.Client.EmuHawk
AutoSearchTakeLagFramesIntoAccount = true;
}
public ColumnList Columns { get; }
public List<InputRoll.RollColumn> Columns { get; set; }
public bool PreviewMode { get; set; }
public bool AlwaysExcludeRamWatch { get; set; }
public bool AutoSearchTakeLagFramesIntoAccount { get; set; }
@ -1385,9 +1416,9 @@ namespace BizHawk.Client.EmuHawk
RamSearchMenu.Items.Remove(
RamSearchMenu.Items
.OfType<ToolStripMenuItem>()
.First(x => x.Name == "GeneratedColumnsSubMenu"));
.Single(x => x.Name == "GeneratedColumnsSubMenu"));
RamSearchMenu.Items.Add(Settings.Columns.GenerateColumnsMenu(ColumnToggleCallback));
RamSearchMenu.Items.Add(WatchListView.ToColumnsMenu(ColumnToggleCallback));
_settings = new RamSearchEngine.Settings(MemoryDomains);
if (_settings.Mode == RamSearchEngine.Settings.SearchMode.Fast)
@ -1396,7 +1427,9 @@ namespace BizHawk.Client.EmuHawk
}
RefreshFloatingWindowControl(Settings.FloatingWindow);
LoadColumnInfo(WatchListView, Settings.Columns);
WatchListView.AllColumns.Clear();
SetColumns();
}
#endregion
@ -1708,17 +1741,12 @@ namespace BizHawk.Client.EmuHawk
}
else if (e.KeyCode == Keys.Escape && !e.Control && !e.Alt && !e.Shift)
{
WatchListView.SelectedIndices.Clear();
WatchListView.DeselectAll();
}
}
private void WatchListView_SelectedIndexChanged(object sender, EventArgs e)
{
if (WatchListView.SelectAllInProgress)
{
return;
}
RemoveToolBarItem.Enabled =
AddToRamWatchToolBarItem.Enabled =
SelectedIndices.Any();
@ -1729,19 +1757,14 @@ namespace BizHawk.Client.EmuHawk
_searches.Domain.CanPoke();
}
private void WatchListView_VirtualItemsSelectionRangeChanged(object sender, ListViewVirtualItemsSelectionRangeChangedEventArgs e)
{
WatchListView_SelectedIndexChanged(sender, e);
}
private void WatchListView_Enter(object sender, EventArgs e)
{
WatchListView.Refresh();
}
private void WatchListView_ColumnClick(object sender, ColumnClickEventArgs e)
private void WatchListView_ColumnClick(object sender, InputRoll.ColumnClickEventArgs e)
{
var column = WatchListView.Columns[e.Column];
var column = e.Column;
if (column.Name != _sortedColumn)
{
_sortReverse = false;

View File

@ -112,15 +112,7 @@
this.FloatingWindowMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
this.RestoreWindowSizeMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.WatchListView = new BizHawk.Client.EmuHawk.VirtualListView();
this.AddressColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.ValueColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.PrevColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.ChangesColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.DiffColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.TypeColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.DomainColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.NotesColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.WatchListView = new InputRoll();
this.ListViewContextMenu.SuspendLayout();
this.statusStrip1.SuspendLayout();
this.toolStrip1.SuspendLayout();
@ -886,100 +878,35 @@
//
// WatchListView
//
this.WatchListView.AllowColumnResize = true;
this.WatchListView.AllowColumnReorder = true;
this.WatchListView.FullRowSelect = true;
this.WatchListView.MultiSelect = true;
this.WatchListView.AllowColumnReorder = true;
this.WatchListView.AllowDrop = true;
this.WatchListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.WatchListView.AutoArrange = false;
this.WatchListView.BlazingFast = false;
this.WatchListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.AddressColumn,
this.ValueColumn,
this.PrevColumn,
this.ChangesColumn,
this.DiffColumn,
this.TypeColumn,
this.DomainColumn,
this.NotesColumn});
this.WatchListView.ContextMenuStrip = this.ListViewContextMenu;
this.WatchListView.FullRowSelect = true;
this.WatchListView.GridLines = true;
this.WatchListView.HideSelection = false;
this.WatchListView.ItemCount = 0;
this.WatchListView.Location = new System.Drawing.Point(16, 76);
this.WatchListView.Name = "WatchListView";
this.WatchListView.SelectAllInProgress = false;
this.WatchListView.selectedItem = -1;
this.WatchListView.Size = new System.Drawing.Size(332, 281);
this.WatchListView.Size = new System.Drawing.Size(363, 281);
this.WatchListView.TabIndex = 2;
this.WatchListView.UseCompatibleStateImageBehavior = false;
this.WatchListView.UseCustomBackground = true;
this.WatchListView.View = System.Windows.Forms.View.Details;
this.WatchListView.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.WatchListView_ColumnClick);
this.WatchListView.ColumnClick += new BizHawk.Client.EmuHawk.InputRoll.ColumnClickEventHandler(this.WatchListView_ColumnClick);
this.WatchListView.SelectedIndexChanged += new System.EventHandler(this.WatchListView_SelectedIndexChanged);
this.WatchListView.VirtualItemsSelectionRangeChanged += new System.Windows.Forms.ListViewVirtualItemsSelectionRangeChangedEventHandler(this.WatchListView_VirtualItemsSelectionRangeChanged);
this.WatchListView.DragDrop += new System.Windows.Forms.DragEventHandler(this.NewRamWatch_DragDrop);
this.WatchListView.DragEnter += new System.Windows.Forms.DragEventHandler(this.DragEnterWrapper);
this.WatchListView.KeyDown += new System.Windows.Forms.KeyEventHandler(this.WatchListView_KeyDown);
this.WatchListView.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.WatchListView_MouseDoubleClick);
//
// AddressColumn
//
this.AddressColumn.Name = "AddressColumn";
this.AddressColumn.Text = "Address";
//
// ValueColumn
//
this.ValueColumn.Name = "ValueColumn";
this.ValueColumn.Text = "Value";
this.ValueColumn.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.ValueColumn.Width = 59;
//
// PrevColumn
//
this.PrevColumn.Name = "PrevColumn";
this.PrevColumn.Text = "Prev";
this.PrevColumn.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.PrevColumn.Width = 59;
//
// ChangesColumn
//
this.ChangesColumn.Name = "ChangesColumn";
this.ChangesColumn.Text = "Changes";
this.ChangesColumn.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.ChangesColumn.Width = 54;
//
// DiffColumn
//
this.DiffColumn.Name = "DiffColumn";
this.DiffColumn.Text = "Diff";
this.DiffColumn.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.DiffColumn.Width = 59;
//
// TypeColumn
//
this.TypeColumn.Name = "TypeColumn";
this.TypeColumn.Text = "Type";
this.TypeColumn.Width = 55;
//
// DomainColumn
//
this.DomainColumn.Name = "DomainColumn";
this.DomainColumn.Text = "Domain";
this.DomainColumn.Width = 55;
//
// NotesColumn
//
this.NotesColumn.Name = "NotesColumn";
this.NotesColumn.Text = "Notes";
this.NotesColumn.Width = 128;
//
// RamWatch
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(364, 378);
this.ClientSize = new System.Drawing.Size(395, 378);
this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.WatchCountLabel);
this.Controls.Add(this.toolStrip1);
@ -1009,15 +936,7 @@
#endregion
private VirtualListView WatchListView;
private System.Windows.Forms.ColumnHeader AddressColumn;
private System.Windows.Forms.ColumnHeader ValueColumn;
private System.Windows.Forms.ColumnHeader PrevColumn;
private System.Windows.Forms.ColumnHeader ChangesColumn;
private System.Windows.Forms.ColumnHeader DiffColumn;
private System.Windows.Forms.ColumnHeader TypeColumn;
private System.Windows.Forms.ColumnHeader DomainColumn;
private System.Windows.Forms.ColumnHeader NotesColumn;
private InputRoll WatchListView;
private MenuStripEx RamWatchMenu;
private System.Windows.Forms.ToolStripMenuItem FileSubMenu;
private System.Windows.Forms.ToolStripMenuItem NewListMenuItem;

View File

@ -42,7 +42,6 @@ namespace BizHawk.Client.EmuHawk
WatchListView.QueryItemText += WatchListView_QueryItemText;
WatchListView.QueryItemBkColor += WatchListView_QueryItemBkColor;
WatchListView.VirtualMode = true;
Closing += (o, e) =>
{
if (AskSaveChanges())
@ -57,6 +56,20 @@ namespace BizHawk.Client.EmuHawk
_sortedColumn = "";
_sortReverse = false;
SetColumns();
}
private void SetColumns()
{
foreach (var column in Settings.Columns)
{
if (WatchListView.AllColumns[column.Name] == null)
{
WatchListView.AllColumns.Add(column);
}
}
}
[ConfigPersist]
@ -66,23 +79,23 @@ namespace BizHawk.Client.EmuHawk
{
public RamWatchSettings()
{
Columns = new ColumnList
Columns = new List<InputRoll.RollColumn>
{
new Column { Name = WatchList.ADDRESS, Visible = true, Index = 0, Width = 60 },
new Column { Name = WatchList.VALUE, Visible = true, Index = 1, Width = 59 },
new Column { Name = WatchList.PREV, Visible = false, Index = 2, Width = 59 },
new Column { Name = WatchList.CHANGES, Visible = true, Index = 3, Width = 55 },
new Column { Name = WatchList.DIFF, Visible = false, Index = 4, Width = 59 },
new Column { Name = WatchList.TYPE, Visible = false, Index = 5, Width = 55 },
new Column { Name = WatchList.DOMAIN, Visible = true, Index = 6, Width = 55 },
new Column { Name = WatchList.NOTES, Visible = true, Index = 7, Width = 128 },
new InputRoll.RollColumn { Text = "Address", Name = WatchList.ADDRESS, Visible = true, Width = 60, Type = InputRoll.RollColumn.InputType.Text },
new InputRoll.RollColumn { Text = "Value", Name = WatchList.VALUE, Visible = true, Width = 59, Type = InputRoll.RollColumn.InputType.Text },
new InputRoll.RollColumn { Text = "Prev", Name = WatchList.PREV, Visible = false, Width = 59, Type = InputRoll.RollColumn.InputType.Text },
new InputRoll.RollColumn { Text = "Changes", Name = WatchList.CHANGES, Visible = true, Width = 60, Type = InputRoll.RollColumn.InputType.Text },
new InputRoll.RollColumn { Text = "Diff", Name = WatchList.DIFF, Visible = false, Width = 59, Type = InputRoll.RollColumn.InputType.Text },
new InputRoll.RollColumn { Text = "Type", Name = WatchList.TYPE, Visible = false, Width = 55, Type = InputRoll.RollColumn.InputType.Text },
new InputRoll.RollColumn { Text = "Domain", Name = WatchList.DOMAIN, Visible = true, Width = 55, Type = InputRoll.RollColumn.InputType.Text },
new InputRoll.RollColumn { Text = "Notes", Name = WatchList.NOTES, Visible = true, Width = 128, Type = InputRoll.RollColumn.InputType.Text }
};
}
public ColumnList Columns { get; set; }
public List<InputRoll.RollColumn> Columns { get; set; }
}
private IEnumerable<int> SelectedIndices => WatchListView.SelectedIndices.Cast<int>();
private IEnumerable<int> SelectedIndices => WatchListView.SelectedRows;
private IEnumerable<Watch> SelectedItems
{
@ -117,7 +130,7 @@ namespace BizHawk.Client.EmuHawk
public void AddWatch(Watch watch)
{
_watches.Add(watch);
WatchListView.ItemCount = _watches.Count;
WatchListView.RowCount = _watches.Count;
UpdateValues();
UpdateWatchCount();
Changes();
@ -174,7 +187,7 @@ namespace BizHawk.Client.EmuHawk
else
{
Global.Config.RecentWatches.Add(path);
WatchListView.ItemCount = _watches.Count;
WatchListView.RowCount = _watches.Count;
UpdateWatchCount();
UpdateStatusBar();
_watches.Changes = false;
@ -195,7 +208,7 @@ namespace BizHawk.Client.EmuHawk
if (result)
{
_watches.Load(file.FullName, append);
WatchListView.ItemCount = _watches.Count;
WatchListView.RowCount = _watches.Count;
UpdateWatchCount();
Global.Config.RecentWatches.Add(_watches.CurrentFileName);
UpdateStatusBar();
@ -271,10 +284,8 @@ namespace BizHawk.Client.EmuHawk
return;
}
WatchListView.BlazingFast = true;
WatchListView.UseCustomBackground = NeedsBackground;
WatchListView.Invalidate();
WatchListView.BlazingFast = false;
}
}
@ -387,7 +398,7 @@ namespace BizHawk.Client.EmuHawk
private void FullyUpdateWatchList()
{
WatchListView.ItemCount = _watches.Count;
WatchListView.RowCount = _watches.Count;
UpdateWatchCount();
UpdateStatusBar();
UpdateValues();
@ -422,7 +433,7 @@ namespace BizHawk.Client.EmuHawk
if (duplicate)
{
_watches.AddRange(we.Watches);
WatchListView.ItemCount = _watches.Count;
WatchListView.RowCount = _watches.Count;
UpdateWatchCount();
}
else
@ -514,7 +525,8 @@ namespace BizHawk.Client.EmuHawk
Size = Settings.WindowSize;
}
LoadColumnInfo(WatchListView, Settings.Columns);
WatchListView.AllColumns.Clear();
SetColumns();
}
private void NewWatchList(bool suppressAsk)
@ -528,7 +540,7 @@ namespace BizHawk.Client.EmuHawk
if (result || suppressAsk)
{
_watches.Clear();
WatchListView.ItemCount = _watches.Count;
WatchListView.RowCount = _watches.Count;
UpdateWatchCount();
UpdateStatusBar();
_sortReverse = false;
@ -541,9 +553,8 @@ namespace BizHawk.Client.EmuHawk
}
}
private void OrderColumn(int index)
private void OrderColumn(InputRoll.RollColumn column)
{
var column = WatchListView.Columns[index];
if (column.Name != _sortedColumn)
{
_sortReverse = false;
@ -568,7 +579,7 @@ namespace BizHawk.Client.EmuHawk
private void SaveConfigSettings()
{
SaveColumnInfo(WatchListView, Settings.Columns);
Settings.Columns = WatchListView.AllColumns;
if (WindowState == FormWindowState.Normal)
{
@ -610,42 +621,38 @@ namespace BizHawk.Client.EmuHawk
WatchCountLabel.Text = _watches.WatchCount + (_watches.WatchCount == 1 ? " watch" : " watches");
}
private void WatchListView_QueryItemBkColor(int index, int column, ref Color color)
private void WatchListView_QueryItemBkColor(int index, InputRoll.RollColumn column, ref Color color)
{
if (index >= _watches.Count)
{
return;
}
if (column == 0)
{
if (_watches[index].IsSeparator)
{
color = BackColor;
}
else if (_watches[index].Address >= _watches[index].Domain.Size)
{
color = Color.PeachPuff;
}
else if (Global.CheatList.IsActive(_watches[index].Domain, _watches[index].Address))
{
color = Color.LightCyan;
}
}
}
private void WatchListView_QueryItemText(int index, int column, out string text)
{
text = "";
if (index >= _watches.Count)
{
return;
}
if (_watches[index].IsSeparator)
{
if (WatchListView.Columns[column].Name == WatchList.ADDRESS)
color = BackColor;
}
else if (_watches[index].Address >= _watches[index].Domain.Size)
{
color = Color.PeachPuff;
}
else if (Global.CheatList.IsActive(_watches[index].Domain, _watches[index].Address))
{
color = Color.LightCyan;
}
}
private void WatchListView_QueryItemText(int index, InputRoll.RollColumn column, out string text, ref int offsetX, ref int offsetY)
{
text = "";
if (index >= _watches.Count)
{
return;
}
if (_watches[index].IsSeparator)
{
if (column.Name == WatchList.ADDRESS)
{
text = _watches[index].Notes;
}
@ -653,9 +660,7 @@ namespace BizHawk.Client.EmuHawk
return;
}
var columnName = WatchListView.Columns[column].Name;
switch (columnName)
switch (column.Name)
{
case WatchList.ADDRESS:
text = _watches[index].AddressString;
@ -796,7 +801,7 @@ namespace BizHawk.Client.EmuHawk
_watches.Add(we.Watches[0]);
Changes();
UpdateWatchCount();
WatchListView.ItemCount = _watches.Count;
WatchListView.RowCount = _watches.Count;
UpdateValues();
}
}
@ -816,7 +821,7 @@ namespace BizHawk.Client.EmuHawk
_watches.Remove(item);
}
WatchListView.ItemCount = _watches.Count;
WatchListView.RowCount = _watches.Count;
UpdateValues();
UpdateWatchCount();
}
@ -870,7 +875,7 @@ namespace BizHawk.Client.EmuHawk
_watches.Add(SeparatorWatch.Instance);
}
WatchListView.ItemCount = _watches.Count;
WatchListView.RowCount = _watches.Count;
Changes();
UpdateWatchCount();
}
@ -900,13 +905,13 @@ namespace BizHawk.Client.EmuHawk
var indices = indexes.Select(t => t - 1);
WatchListView.SelectedIndices.Clear();
WatchListView.DeselectAll();
foreach (var t in indices)
{
WatchListView.SelectItem(t, true);
WatchListView.SelectRow(t, true);
}
WatchListView.ItemCount = _watches.Count;
WatchListView.RowCount = _watches.Count;
}
private void MoveDownMenuItem_Click(object sender, EventArgs e)
@ -926,14 +931,14 @@ namespace BizHawk.Client.EmuHawk
var newIndices = indices.Select(t => t + 1);
WatchListView.SelectedIndices.Clear();
WatchListView.DeselectAll();
foreach (var t in newIndices)
{
WatchListView.SelectItem(t, true);
WatchListView.SelectRow(t, true);
}
Changes();
WatchListView.ItemCount = _watches.Count;
WatchListView.RowCount = _watches.Count;
}
private void MoveTopMenuItem_Click(object sender, EventArgs e)
@ -954,13 +959,13 @@ namespace BizHawk.Client.EmuHawk
Changes();
WatchListView.SelectedIndices.Clear();
WatchListView.DeselectAll();
foreach (var t in indexes)
{
WatchListView.SelectItem(t, true);
WatchListView.SelectRow(t, true);
}
WatchListView.ItemCount = _watches.Count;
WatchListView.RowCount = _watches.Count;
}
private void MoveBottomMenuItem_Click(object sender, EventArgs e)
@ -984,14 +989,14 @@ namespace BizHawk.Client.EmuHawk
newInd.Add(x);
}
WatchListView.SelectedIndices.Clear();
WatchListView.DeselectAll();
foreach (var t in newInd)
{
WatchListView.SelectItem(t, true);
WatchListView.SelectRow(t, true);
}
Changes();
WatchListView.ItemCount = _watches.Count;
WatchListView.RowCount = _watches.Count;
}
private void SelectAllMenuItem_Click(object sender, EventArgs e)
@ -1078,12 +1083,14 @@ namespace BizHawk.Client.EmuHawk
.OfType<ToolStripMenuItem>()
.First(x => x.Name == "GeneratedColumnsSubMenu"));
RamWatchMenu.Items.Add(Settings.Columns.GenerateColumnsMenu(ColumnToggleCallback));
RamWatchMenu.Items.Add(WatchListView.ToColumnsMenu(ColumnToggleCallback));
Global.Config.DisplayRamWatch = false;
RefreshFloatingWindowControl(Settings.FloatingWindow);
LoadColumnInfo(WatchListView, Settings.Columns);
WatchListView.AllColumns.Clear();
SetColumns();
}
#endregion
@ -1092,10 +1099,16 @@ namespace BizHawk.Client.EmuHawk
private void NewRamWatch_Load(object sender, EventArgs e)
{
// Hack for previous config settings
if (Settings.Columns.Any(c => string.IsNullOrWhiteSpace(c.Text)))
{
Settings = new RamWatchSettings();
}
TopMost = Settings.TopMost;
_watches = new WatchList(MemoryDomains, Emu.SystemId);
LoadConfigSettings();
RamWatchMenu.Items.Add(Settings.Columns.GenerateColumnsMenu(ColumnToggleCallback));
RamWatchMenu.Items.Add(WatchListView.ToColumnsMenu(ColumnToggleCallback));
UpdateStatusBar();
PokeAddressToolBarItem.Enabled =
@ -1106,8 +1119,7 @@ namespace BizHawk.Client.EmuHawk
private void ColumnToggleCallback()
{
SaveColumnInfo(WatchListView, Settings.Columns);
LoadColumnInfo(WatchListView, Settings.Columns);
Settings.Columns = WatchListView.AllColumns;
}
private void NewRamWatch_Activated(object sender, EventArgs e)
@ -1122,7 +1134,7 @@ namespace BizHawk.Client.EmuHawk
{
_watches.Load(filePaths[0], append: false);
Global.Config.RecentWatches.Add(_watches.CurrentFileName);
WatchListView.ItemCount = _watches.Count;
WatchListView.RowCount = _watches.Count;
}
}
@ -1133,7 +1145,7 @@ namespace BizHawk.Client.EmuHawk
private void ListViewContextMenu_Opening(object sender, CancelEventArgs e)
{
var indexes = WatchListView.SelectedIndices;
var indexes = WatchListView.SelectedRows.ToList();
EditContextMenuItem.Visible =
RemoveContextMenuItem.Visible =
@ -1259,11 +1271,6 @@ namespace BizHawk.Client.EmuHawk
private void WatchListView_SelectedIndexChanged(object sender, EventArgs e)
{
if (WatchListView.SelectAllInProgress)
{
return;
}
PokeAddressToolBarItem.Enabled =
FreezeAddressToolBarItem.Enabled =
SelectedIndices.Any() &&
@ -1275,7 +1282,8 @@ namespace BizHawk.Client.EmuHawk
EditWatch();
}
private void WatchListView_ColumnClick(object sender, ColumnClickEventArgs e)
// InputRoll TODO
private void WatchListView_ColumnClick(object sender, InputRoll.ColumnClickEventArgs e)
{
OrderColumn(e.Column);
}
@ -1291,7 +1299,7 @@ namespace BizHawk.Client.EmuHawk
_watches.Remove(item);
}
WatchListView.ItemCount = _watches.Count;
WatchListView.RowCount = _watches.Count;
UpdateValues();
UpdateWatchCount();
UpdateStatusBar();
@ -1300,14 +1308,6 @@ namespace BizHawk.Client.EmuHawk
#endregion
#endregion
private void WatchListView_VirtualItemsSelectionRangeChanged(object sender, ListViewVirtualItemsSelectionRangeChangedEventArgs e)
{
PokeAddressToolBarItem.Enabled =
FreezeAddressToolBarItem.Enabled =
SelectedIndices.Any() &&
SelectedWatches.All(w => w.Domain.CanPoke());
}
// Stupid designer
protected void DragEnterWrapper(object sender, DragEventArgs e)
{

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
</startup>
</configuration>

View File

@ -1,250 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\output\</OutputPath>
<DefineConstants>TRACE;DEBUG;WINDOWS</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<!--<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>-->
<CodeAnalysisRuleSet Condition=" '$(OS)' == 'Windows_NT' ">MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<OutputPath>..\output\</OutputPath>
<DefineConstants>TRACE;WINDOWS</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<!--<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>-->
<CodeAnalysisRuleSet Condition=" '$(OS)' == 'Windows_NT' ">MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProjectGuid>{B95649F5-A0AE-41EB-B62B-578A2AFF5E18}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BizHawk.Client.MultiHawk</RootNamespace>
<AssemblyName>MultiHawk</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualBasic" />
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\References\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="OpenTK">
<HintPath>..\References\OpenTK.dll</HintPath>
</Reference>
<Reference Include="SlimDX, Version=4.0.13.43, Culture=neutral, PublicKeyToken=b1b0c32fd1ffe4f9, processorArchitecture=AMD64">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\References\x64\SlimDX.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="movie\PlayMovie.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="movie\PlayMovie.Designer.cs">
<DependentUpon>PlayMovie.cs</DependentUpon>
</Compile>
<Compile Include="movie\RecordMovie.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="movie\RecordMovie.Designer.cs">
<DependentUpon>RecordMovie.cs</DependentUpon>
</Compile>
<Compile Include="DisplayManager\DisplayManager.cs" />
<Compile Include="EmulatorWindow.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="EmulatorWindow.Designer.cs">
<DependentUpon>EmulatorWindow.cs</DependentUpon>
</Compile>
<Compile Include="GlobalWin.cs" />
<Compile Include="InputManager.cs" />
<Compile Include="Input\GamePad.cs" />
<Compile Include="Input\Input.cs" />
<Compile Include="Input\Keyboard.cs" />
<Compile Include="Mainform.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Mainform.Designer.cs">
<DependentUpon>Mainform.cs</DependentUpon>
</Compile>
<Compile Include="PresentationPanel.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="EmulatorWindowList.cs" />
<Compile Include="Extensions\ToolExtensions.cs" />
<EmbeddedResource Include="movie\PlayMovie.resx">
<DependentUpon>PlayMovie.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="movie\RecordMovie.resx">
<DependentUpon>RecordMovie.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="EmulatorWindow.resx">
<DependentUpon>EmulatorWindow.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Mainform.resx">
<DependentUpon>Mainform.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<None Include="Resources\courier16px.bmfc" />
<None Include="Resources\courier16px.fnt" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BizHawk.Client.Common\BizHawk.Client.Common.csproj">
<Project>{24a0aa3c-b25f-4197-b23d-476d6462dba0}</Project>
<Name>BizHawk.Client.Common</Name>
</ProjectReference>
<ProjectReference Include="..\BizHawk.Client.EmuHawk\BizHawk.Client.EmuHawk.csproj">
<Project>{dd448b37-ba3f-4544-9754-5406e8094723}</Project>
<Name>BizHawk.Client.EmuHawk</Name>
</ProjectReference>
<ProjectReference Include="..\BizHawk.Common\BizHawk.Common.csproj">
<Project>{866f8d13-0678-4ff9-80a4-a3993fd4d8a3}</Project>
<Name>BizHawk.Common</Name>
</ProjectReference>
<ProjectReference Include="..\BizHawk.Emulation.Common\BizHawk.Emulation.Common.csproj">
<Project>{e1a23168-b571-411c-b360-2229e7225e0e}</Project>
<Name>BizHawk.Emulation.Common</Name>
</ProjectReference>
<ProjectReference Include="..\BizHawk.Emulation.Cores\BizHawk.Emulation.Cores.csproj">
<Project>{197d4314-8a9f-49ba-977d-54acefaeb6ba}</Project>
<Name>BizHawk.Emulation.Cores</Name>
</ProjectReference>
<ProjectReference Include="..\BizHawk.Emulation.DiscSystem\BizHawk.Emulation.DiscSystem.csproj">
<Project>{f51946ea-827f-4d82-b841-1f2f6d060312}</Project>
<Name>BizHawk.Emulation.DiscSystem</Name>
</ProjectReference>
<ProjectReference Include="..\Bizware\BizHawk.Bizware.BizwareGL.GdiPlus\BizHawk.Bizware.BizwareGL.GdiPlus.csproj">
<Project>{337ca23e-65e7-44e1-9411-97ee08bb8116}</Project>
<Name>BizHawk.Bizware.BizwareGL.GdiPlus</Name>
</ProjectReference>
<ProjectReference Include="..\Bizware\BizHawk.Bizware.BizwareGL.OpenTK\BizHawk.Bizware.BizwareGL.OpenTK.csproj">
<Project>{5160cfb1-5389-47c1-b7f6-8a0dc97641ee}</Project>
<Name>BizHawk.Bizware.BizwareGL.OpenTK</Name>
</ProjectReference>
<ProjectReference Include="..\Bizware\BizHawk.Bizware.BizwareGL.SlimDX\BizHawk.Bizware.BizwareGL.SlimDX.csproj">
<Project>{e6b436b1-a3cd-4c9a-8f76-5d7154726884}</Project>
<Name>BizHawk.Bizware.BizwareGL.SlimDX</Name>
</ProjectReference>
<ProjectReference Include="..\Bizware\BizHawk.Bizware.BizwareGL\BizHawk.Bizware.BizwareGL.csproj">
<Project>{9f84a0b2-861e-4ef4-b89b-5e2a3f38a465}</Project>
<Name>BizHawk.Bizware.BizwareGL</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="Resources\courier16px_0.png" />
</ItemGroup>
<ItemGroup>
<None Include="images\GreenCheck.png" />
</ItemGroup>
<ItemGroup>
<None Include="images\OpenFile.png" />
</ItemGroup>
<ItemGroup>
<None Include="images\Pause.png" />
</ItemGroup>
<ItemGroup>
<None Include="images\Play.png" />
</ItemGroup>
<ItemGroup>
<None Include="images\ReadOnly.png" />
</ItemGroup>
<ItemGroup>
<None Include="images\reboot.png" />
</ItemGroup>
<ItemGroup>
<None Include="images\Recent.png" />
</ItemGroup>
<ItemGroup>
<None Include="images\RecordHS.png" />
</ItemGroup>
<ItemGroup>
<None Include="images\SaveAllHS.png" />
</ItemGroup>
<ItemGroup>
<None Include="images\SaveAs.png" />
</ItemGroup>
<ItemGroup>
<None Include="images\Scan.png" />
</ItemGroup>
<ItemGroup>
<None Include="images\ExclamationRed.png" />
</ItemGroup>
<ItemGroup>
<None Include="images\Stop.png" />
</ItemGroup>
<ItemGroup>
<None Include="images\Blank.png" />
</ItemGroup>
<ItemGroup>
<None Include="images\CutHS.png" />
</ItemGroup>
<ItemGroup>
<None Include="images\GameController.png" />
</ItemGroup>
<ItemGroup>
<None Include="images\HotKeys.png" />
</ItemGroup>
<ItemGroup>
<None Include="images\Help.png" />
</ItemGroup>
<ItemGroup>
<None Include="images\Save.png" />
</ItemGroup>
<ItemGroup>
<None Include="images\restart.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -1,2 +0,0 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeInspection/CSharpLanguageProject/LanguageLevel/@EntryValue">CSharp60</s:String></wpf:ResourceDictionary>

View File

@ -1,724 +0,0 @@
//TODO
//we could flag textures as 'actually' render targets (keep a reference to the render target?) which could allow us to convert between them more quickly in some cases
using System;
using System.IO;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using BizHawk.Emulation.Common;
using BizHawk.Client.Common;
using BizHawk.Client.EmuHawk;
using BizHawk.Client.EmuHawk.FilterManager;
using BizHawk.Bizware.BizwareGL;
using OpenTK;
using BizHawk.Bizware.BizwareGL.Drivers.SlimDX;
using BizHawk.Bizware.BizwareGL.Drivers.GdiPlus;
namespace BizHawk.Client.MultiHawk
{
/// <summary>
/// A DisplayManager is destined forevermore to drive the PresentationPanel it gets initialized with.
/// Its job is to receive OSD and emulator outputs, and produce one single buffer (BitampBuffer? Texture2d?) for display by the PresentationPanel.
/// Details TBD
/// </summary>
public class DisplayManager : IDisposable
{
class DisplayManagerRenderTargetProvider : IRenderTargetProvider
{
public DisplayManagerRenderTargetProvider(Func<Size, RenderTarget> callback) { Callback = callback; }
Func<Size, RenderTarget> Callback;
RenderTarget IRenderTargetProvider.Get(Size size)
{
return Callback(size);
}
}
public DisplayManager(PresentationPanel presentationPanel, IGL gl, GLManager glManager)
{
GL = gl;
GLManager = glManager;
this.presentationPanel = presentationPanel;
GraphicsControl = this.presentationPanel.GraphicsControl;
CR_GraphicsControl = GLManager.GetContextForGraphicsControl(GraphicsControl);
//it's sort of important for these to be initialized to something nonzero
currEmuWidth = currEmuHeight = 1;
Renderer = GL.CreateRenderer();
VideoTextureFrugalizer = new TextureFrugalizer(GL);
ShaderChainFrugalizers = new RenderTargetFrugalizer[16]; //hacky hardcoded limit.. need some other way to manage these
for (int i = 0; i < 16; i++)
{
ShaderChainFrugalizers[i] = new RenderTargetFrugalizer(GL);
}
RefreshUserShader();
}
public bool Disposed { get; private set; }
public void Dispose()
{
if (Disposed) return;
Disposed = true;
VideoTextureFrugalizer.Dispose();
foreach (var f in LuaSurfaceFrugalizers.Values)
f.Dispose();
foreach (var f in ShaderChainFrugalizers)
if (f != null)
f.Dispose();
Renderer.Dispose();
}
//rendering resources:
IGL GL;
GLManager GLManager;
IGuiRenderer Renderer;
//layer resources
PresentationPanel presentationPanel; //well, its the final layer's target, at least
GraphicsControl GraphicsControl; //well, its the final layer's target, at least
GLManager.ContextRef CR_GraphicsControl;
FilterProgram CurrentFilterProgram;
/// <summary>
/// these variables will track the dimensions of the last frame's (or the next frame? this is confusing) emulator native output size
/// THIS IS OLD JUNK. I should get rid of it, I think. complex results from the last filter ingestion should be saved instead.
/// </summary>
int currEmuWidth, currEmuHeight;
/// <summary>
/// additional pixels added at the unscaled level for the use of lua drawing. essentially increases the input video provider dimensions
/// </summary>
public System.Windows.Forms.Padding GameExtraPadding;
/// <summary>
/// additional pixels added at the native level for the use of lua drawing. essentially just gets tacked onto the final calculated window sizes.
/// </summary>
public System.Windows.Forms.Padding ClientExtraPadding;
/// <summary>
/// custom fonts that don't need to be installed on the user side
/// </summary>
public System.Drawing.Text.PrivateFontCollection CustomFonts = new System.Drawing.Text.PrivateFontCollection();
TextureFrugalizer VideoTextureFrugalizer;
Dictionary<string, TextureFrugalizer> LuaSurfaceFrugalizers = new Dictionary<string, TextureFrugalizer>();
RenderTargetFrugalizer[] ShaderChainFrugalizers;
EmuHawk.Filters.RetroShaderChain ShaderChain_user;
public void RefreshUserShader()
{
if (ShaderChain_user != null)
ShaderChain_user.Dispose();
if (File.Exists(Global.Config.DispUserFilterPath))
{
var fi = new FileInfo(Global.Config.DispUserFilterPath);
using (var stream = fi.OpenRead())
ShaderChain_user = new EmuHawk.Filters.RetroShaderChain(GL, new EmuHawk.Filters.RetroShaderPreset(stream), Path.GetDirectoryName(Global.Config.DispUserFilterPath));
}
}
System.Windows.Forms.Padding CalculateCompleteContentPadding(bool user, bool source)
{
var padding = new System.Windows.Forms.Padding();
if(user)
padding += GameExtraPadding;
//an experimental feature
if(source)
if (Global.Emulator is BizHawk.Emulation.Cores.Sony.PSX.Octoshock)
{
var psx = Global.Emulator as BizHawk.Emulation.Cores.Sony.PSX.Octoshock;
var core_padding = psx.VideoProvider_Padding;
padding.Left += core_padding.Width / 2;
padding.Right += core_padding.Width - core_padding.Width / 2;
padding.Top += core_padding.Height / 2;
padding.Bottom += core_padding.Height - core_padding.Height / 2;
}
return padding;
}
FilterProgram BuildDefaultChain(Size chain_insize, Size chain_outsize, bool includeOSD)
{
//select user special FX shader chain
Dictionary<string, object> selectedChainProperties = new Dictionary<string, object>();
EmuHawk.Filters.RetroShaderChain selectedChain = null;
if (Global.Config.TargetDisplayFilter == 3 && ShaderChain_user != null && ShaderChain_user.Available)
selectedChain = ShaderChain_user;
EmuHawk.Filters.FinalPresentation fPresent = new EmuHawk.Filters.FinalPresentation(chain_outsize);
EmuHawk.Filters.SourceImage fInput = new EmuHawk.Filters.SourceImage(chain_insize);
EmuHawk.Filters.OSD fOSD = new EmuHawk.Filters.OSD();
fOSD.RenderCallback = () =>
{
if (!includeOSD)
return;
var size = fOSD.FindInput().SurfaceFormat.Size;
Renderer.Begin(size.Width, size.Height);
Renderer.SetBlendState(GL.BlendNormal);
Renderer.End();
};
var chain = new FilterProgram();
//add the first filter, encompassing output from the emulator core
chain.AddFilter(fInput, "input");
//if a non-zero padding is required, add a filter to allow for that
//note, we have two sources of padding right now.. one can come from the videoprovider and one from the user.
//we're combining these now and just using black, for sake of being lean, despite the discussion below:
//keep in mind, the videoprovider design in principle might call for another color.
//we havent really been using this very hard, but users will probably want black there (they could fill it to another color if needed tho)
var padding = CalculateCompleteContentPadding(true,true);
if (padding.Vertical != 0 || padding.Horizontal != 0)
{
//TODO - add another filter just for this, its cumbersome to use final presentation... I think. but maybe theres enough similarities to justify it.
Size size = chain_insize;
size.Width += padding.Horizontal;
size.Height += padding.Vertical;
EmuHawk.Filters.FinalPresentation fPadding = new EmuHawk.Filters.FinalPresentation(size);
chain.AddFilter(fPadding, "padding");
fPadding.GuiRenderer = Renderer;
fPadding.GL = GL;
fPadding.Config_PadOnly = true;
fPadding.Padding = padding;
}
if (Global.Config.DispPrescale != 1)
{
EmuHawk.Filters.PrescaleFilter fPrescale = new EmuHawk.Filters.PrescaleFilter() { Scale = Global.Config.DispPrescale };
chain.AddFilter(fPrescale, "user_prescale");
}
//AutoPrescale makes no sense for a None final filter
if (Global.Config.DispAutoPrescale && Global.Config.DispFinalFilter != (int)EmuHawk.Filters.FinalPresentation.eFilterOption.None)
{
var apf = new EmuHawk.Filters.AutoPrescaleFilter();
chain.AddFilter(apf, "auto_prescale");
}
//choose final filter
EmuHawk.Filters.FinalPresentation.eFilterOption finalFilter = EmuHawk.Filters.FinalPresentation.eFilterOption.None;
fPresent.FilterOption = finalFilter;
//add final presentation
chain.AddFilter(fPresent, "presentation");
return chain;
}
/// <summary>
/// This will receive an emulated output frame from an IVideoProvider and run it through the complete frame processing pipeline
/// Then it will stuff it into the bound PresentationPanel.
/// ---
/// If the int[] is size=1, then it contains an openGL texture ID (and the size should be as specified from videoProvider)
/// Don't worry about the case where the frontend isnt using opengl; DisplayManager deals with it
/// </summary>
public void UpdateSource(IVideoProvider videoProvider)
{
bool displayNothing = Global.Config.DispSpeedupFeatures == 0;
var job = new JobInfo
{
videoProvider = videoProvider,
simulate = displayNothing,
chain_outsize = GraphicsControl.Size,
includeOSD = true,
};
UpdateSourceInternal(job);
}
public BitmapBuffer RenderVideoProvider(IVideoProvider videoProvider)
{
//TODO - we might need to gather more Global.Config.DispXXX properties here, so they can be overridden
var targetSize = new Size(videoProvider.BufferWidth, videoProvider.BufferHeight);
var padding = CalculateCompleteContentPadding(true,true);
targetSize.Width += padding.Horizontal;
targetSize.Height += padding.Vertical;
var job = new JobInfo
{
videoProvider = videoProvider,
simulate = false,
chain_outsize = targetSize,
offscreen = true,
includeOSD = false
};
UpdateSourceInternal(job);
return job.offscreenBB;
}
/// <summary>
/// Does the entire display process to an offscreen buffer, suitable for a 'client' screenshot.
/// </summary>
public BitmapBuffer RenderOffscreen(IVideoProvider videoProvider, bool includeOSD)
{
var job = new JobInfo
{
videoProvider = videoProvider,
simulate = false,
chain_outsize = GraphicsControl.Size,
offscreen = true,
includeOSD = includeOSD
};
UpdateSourceInternal(job);
return job.offscreenBB;
}
class FakeVideoProvider : IVideoProvider
{
public int[] GetVideoBuffer() { return new int[] {}; }
public int VirtualWidth { get; set; }
public int VirtualHeight { get; set; }
public int BufferWidth { get; set; }
public int BufferHeight { get; set; }
public int BackgroundColor { get; set; }
public int VsyncNumerator
{
get { throw new InvalidOperationException(); }
}
public int VsyncDenominator
{
get { throw new InvalidOperationException(); }
}
}
void FixRatio(float x, float y, int inw, int inh, out int outw, out int outh)
{
float ratio = x / y;
if (ratio <= 1)
{
//taller. weird. expand height.
outw = inw;
outh = (int)((float)inw / ratio);
}
else
{
//wider. normal. expand width.
outw = (int)((float)inh * ratio);
outh = inh;
}
}
/// <summary>
/// Attempts to calculate a good client size with the given zoom factor, considering the user's DisplayManager preferences
/// TODO - this needs to be redone with a concept different from zoom factor.
/// basically, each increment of a 'zoomlike' factor should definitely increase the viewable area somehow, even if it isnt strictly by an entire zoom level.
/// </summary>
public Size CalculateClientSize(IVideoProvider videoProvider, int zoom)
{
bool ar_active = Global.Config.DispFixAspectRatio;
bool ar_system = Global.Config.DispManagerAR == Config.EDispManagerAR.System;
bool ar_custom = Global.Config.DispManagerAR == Config.EDispManagerAR.Custom;
bool ar_customRatio = Global.Config.DispManagerAR == Config.EDispManagerAR.CustomRatio;
bool ar_correct = ar_system || ar_custom || ar_customRatio;
bool ar_unity = !ar_correct;
bool ar_integer = Global.Config.DispFixScaleInteger;
int bufferWidth = videoProvider.BufferWidth;
int bufferHeight = videoProvider.BufferHeight;
int virtualWidth = videoProvider.VirtualWidth;
int virtualHeight = videoProvider.VirtualHeight;
if (ar_custom)
{
virtualWidth = Global.Config.DispCustomUserARWidth;
virtualHeight = Global.Config.DispCustomUserARHeight;
}
if (ar_customRatio)
{
FixRatio(Global.Config.DispCustomUserARX, Global.Config.DispCustomUserARY, videoProvider.BufferWidth, videoProvider.BufferHeight, out virtualWidth, out virtualHeight);
}
var padding = CalculateCompleteContentPadding(true, false);
virtualWidth += padding.Horizontal;
virtualHeight += padding.Vertical;
padding = CalculateCompleteContentPadding(true, true);
bufferWidth += padding.Horizontal;
bufferHeight += padding.Vertical;
//Console.WriteLine("DISPZOOM " + zoom); //test
//old stuff
var fvp = new FakeVideoProvider();
fvp.BufferWidth = bufferWidth;
fvp.BufferHeight = bufferHeight;
fvp.VirtualWidth = virtualWidth;
fvp.VirtualHeight = virtualHeight;
Size chain_outsize = new Size(fvp.BufferWidth * zoom, fvp.BufferHeight * zoom);
if (ar_active)
{
if (ar_correct)
{
if (ar_integer)
{
//ALERT COPYPASTE LAUNDROMAT
Vector2 VS = new Vector2(virtualWidth, virtualHeight);
Vector2 BS = new Vector2(bufferWidth, bufferHeight);
Vector2 AR = Vector2.Divide(VS, BS);
float target_par = (AR.X / AR.Y);
//this would malfunction for AR <= 0.5 or AR >= 2.0
//EDIT - in fact, we have AR like that coming from PSX, sometimes, so maybe we should solve this better
Vector2 PS = new Vector2(1, 1);
//here's how we define zooming, in this case:
//make sure each step is an increment of zoom for at least one of the dimensions (or maybe both of them)
//look for the increment which helps the AR the best
//TODO - this cant possibly support scale factors like 1.5x
//TODO - also, this might be messing up zooms and stuff, we might need to run this on the output size of the filter chain
for (int i = 1; i < zoom;i++)
{
//would not be good to run this per frame, but it seems to only run when the resolution changes, etc.
Vector2[] trials = new[] {
PS + new Vector2(1, 0),
PS + new Vector2(0, 1),
PS + new Vector2(1, 1)
};
int bestIndex = -1;
float bestValue = 1000.0f;
for (int t = 0; t < trials.Length; t++)
{
//I.
float test_ar = trials[t].X / trials[t].Y;
//II.
//Vector2 calc = Vector2.Multiply(trials[t], VS);
//float test_ar = calc.X / calc.Y;
//not clear which approach is superior
float deviation_linear = Math.Abs(test_ar - target_par);
float deviation_geom = test_ar / target_par;
if (deviation_geom < 1) deviation_geom = 1.0f / deviation_geom;
float value = deviation_linear;
if (value < bestValue)
{
bestIndex = t;
bestValue = value;
}
}
//is it possible to get here without selecting one? doubtful.
//EDIT: YES IT IS. it happened with an 0,0 buffer size. of course, that was a mistake, but we shouldnt crash
if(bestIndex != -1) //so, what now? well, this will result in 0,0 getting picked, so thats probably all we can do
PS = trials[bestIndex];
}
chain_outsize = new Size((int)(bufferWidth * PS.X), (int)(bufferHeight * PS.Y));
}
else
{
//obey the AR, but allow free scaling: just zoom the virtual size
chain_outsize = new Size(virtualWidth * zoom, virtualHeight * zoom);
}
}
else
{
//ar_unity:
//just choose to zoom the buffer (make no effort to incorporate AR)
chain_outsize = new Size(bufferWidth * zoom, bufferHeight * zoom);
}
}
else
{
//!ar_active:
//just choose to zoom the buffer (make no effort to incorporate AR)
chain_outsize = new Size(bufferWidth * zoom, bufferHeight * zoom);
}
chain_outsize.Width += ClientExtraPadding.Horizontal;
chain_outsize.Height += ClientExtraPadding.Vertical;
var job = new JobInfo
{
videoProvider = fvp,
simulate = true,
chain_outsize = chain_outsize,
};
var filterProgram = UpdateSourceInternal(job);
var size = filterProgram.Filters[filterProgram.Filters.Count - 1].FindOutput().SurfaceFormat.Size;
return size;
}
class JobInfo
{
public IVideoProvider videoProvider;
public bool simulate;
public Size chain_outsize;
public bool offscreen;
public BitmapBuffer offscreenBB;
public bool includeOSD;
}
FilterProgram UpdateSourceInternal(JobInfo job)
{
if (job.chain_outsize.Width == 0 || job.chain_outsize.Height == 0)
{
//this has to be a NOP, because lots of stuff will malfunction on a 0-sized viewport
return null;
}
//no drawing actually happens. it's important not to begin drawing on a control
if (!job.simulate && !job.offscreen)
{
GLManager.Activate(CR_GraphicsControl);
}
IVideoProvider videoProvider = job.videoProvider;
bool simulate = job.simulate;
Size chain_outsize = job.chain_outsize;
//simulate = true;
int vw = videoProvider.BufferWidth;
int vh = videoProvider.BufferHeight;
if (Global.Config.DispFixAspectRatio)
{
if (Global.Config.DispManagerAR == Config.EDispManagerAR.System)
{
vw = videoProvider.VirtualWidth;
vh = videoProvider.VirtualHeight;
}
if (Global.Config.DispManagerAR == Config.EDispManagerAR.Custom)
{
vw = Global.Config.DispCustomUserARWidth;
vh = Global.Config.DispCustomUserARHeight;
}
if (Global.Config.DispManagerAR == Config.EDispManagerAR.CustomRatio)
{
FixRatio(Global.Config.DispCustomUserARX, Global.Config.DispCustomUserARY, videoProvider.BufferWidth, videoProvider.BufferHeight, out vw, out vh);
}
}
var padding = CalculateCompleteContentPadding(true,false);
vw += padding.Horizontal;
vh += padding.Vertical;
int[] videoBuffer = videoProvider.GetVideoBuffer();
int bufferWidth = videoProvider.BufferWidth;
int bufferHeight = videoProvider.BufferHeight;
bool isGlTextureId = videoBuffer.Length == 1;
BitmapBuffer bb = null;
Texture2d videoTexture = null;
if (!simulate)
{
if (isGlTextureId)
{
//FYI: this is a million years from happening on n64, since it's all geriatric non-FBO code
//is it workable for saturn?
videoTexture = GL.WrapGLTexture2d(new IntPtr(videoBuffer[0]), bufferWidth, bufferHeight);
}
else
{
//wrap the videoprovider data in a BitmapBuffer (no point to refactoring that many IVideoProviders)
bb = new BitmapBuffer(bufferWidth, bufferHeight, videoBuffer);
bb.DiscardAlpha();
//now, acquire the data sent from the videoProvider into a texture
videoTexture = VideoTextureFrugalizer.Get(bb);
//lets not use this. lets define BizwareGL to make clamp by default (TBD: check opengl)
//GL.SetTextureWrapMode(videoTexture, true);
}
}
//record the size of what we received, since lua and stuff is gonna want to draw onto it
currEmuWidth = bufferWidth;
currEmuHeight = bufferHeight;
//build the default filter chain and set it up with services filters will need
Size chain_insize = new Size(bufferWidth, bufferHeight);
var filterProgram = BuildDefaultChain(chain_insize, chain_outsize, job.includeOSD);
filterProgram.GuiRenderer = Renderer;
filterProgram.GL = GL;
//setup the source image filter
EmuHawk.Filters.SourceImage fInput = filterProgram["input"] as EmuHawk.Filters.SourceImage;
fInput.Texture = videoTexture;
//setup the final presentation filter
EmuHawk.Filters.FinalPresentation fPresent = filterProgram["presentation"] as EmuHawk.Filters.FinalPresentation;
fPresent.VirtualTextureSize = new Size(vw, vh);
fPresent.TextureSize = new Size(bufferWidth, bufferHeight);
fPresent.BackgroundColor = videoProvider.BackgroundColor;
fPresent.GuiRenderer = Renderer;
fPresent.Flip = isGlTextureId;
fPresent.Config_FixAspectRatio = Global.Config.DispFixAspectRatio;
fPresent.Config_FixScaleInteger = Global.Config.DispFixScaleInteger;
fPresent.Padding = ClientExtraPadding;
fPresent.AutoPrescale = Global.Config.DispAutoPrescale;
fPresent.GL = GL;
filterProgram.Compile("default", chain_insize, chain_outsize, !job.offscreen);
if (simulate)
{
}
else
{
CurrentFilterProgram = filterProgram;
UpdateSourceDrawingWork(job);
}
//cleanup:
if (bb != null) bb.Dispose();
return filterProgram;
}
void UpdateSourceDrawingWork(JobInfo job)
{
bool vsync = false;
bool alternateVsync = false;
//only used by alternate vsync
IGL_SlimDX9 dx9 = null;
if (!job.offscreen)
{
//apply the vsync setting (should probably try to avoid repeating this)
vsync = Global.Config.VSyncThrottle || Global.Config.VSync;
//ok, now this is a bit undesireable.
//maybe the user wants vsync, but not vsync throttle.
//this makes sense... but we dont have the infrastructure to support it now (we'd have to enable triple buffering or something like that)
//so what we're gonna do is disable vsync no matter what if throttling is off, and maybe nobody will notice.
//update 26-mar-2016: this upsets me. When fastforwarding and skipping frames, vsync should still work. But I'm not changing it yet
if (Global.DisableSecondaryThrottling)
vsync = false;
//for now, it's assumed that the presentation panel is the main window, but that may not always be true
if (vsync && Global.Config.DispAlternateVsync && Global.Config.VSyncThrottle)
{
dx9 = GL as IGL_SlimDX9;
if (dx9 != null)
{
alternateVsync = true;
//unset normal vsync if we've chosen the alternate vsync
vsync = false;
}
}
//TODO - whats so hard about triple buffering anyway? just enable it always, and change api to SetVsync(enable,throttle)
//maybe even SetVsync(enable,throttlemethod) or just SetVsync(enable,throttle,advanced)
if (LastVsyncSetting != vsync || LastVsyncSettingGraphicsControl != presentationPanel.GraphicsControl)
{
if (LastVsyncSetting == null && vsync)
{
// Workaround for vsync not taking effect at startup (Intel graphics related?)
presentationPanel.GraphicsControl.SetVsync(false);
}
presentationPanel.GraphicsControl.SetVsync(vsync);
LastVsyncSettingGraphicsControl = presentationPanel.GraphicsControl;
LastVsyncSetting = vsync;
}
}
//begin rendering on this context
//should this have been done earlier?
//do i need to check this on an intel video card to see if running excessively is a problem? (it used to be in the FinalTarget command below, shouldnt be a problem)
//GraphicsControl.Begin(); //CRITICAL POINT for yabause+GL
//TODO - auto-create and age these (and dispose when old)
int rtCounter = 0;
CurrentFilterProgram.RenderTargetProvider = new DisplayManagerRenderTargetProvider((size) => ShaderChainFrugalizers[rtCounter++].Get(size));
GL.BeginScene();
//run filter chain
Texture2d texCurr = null;
RenderTarget rtCurr = null;
bool inFinalTarget = false;
foreach (var step in CurrentFilterProgram.Program)
{
switch (step.Type)
{
case FilterProgram.ProgramStepType.Run:
{
int fi = (int)step.Args;
var f = CurrentFilterProgram.Filters[fi];
f.SetInput(texCurr);
f.Run();
var orec = f.FindOutput();
if (orec != null)
{
if (orec.SurfaceDisposition == SurfaceDisposition.Texture)
{
texCurr = f.GetOutput();
rtCurr = null;
}
}
break;
}
case FilterProgram.ProgramStepType.NewTarget:
{
var size = (Size)step.Args;
rtCurr = ShaderChainFrugalizers[rtCounter++].Get(size);
rtCurr.Bind();
CurrentFilterProgram.CurrRenderTarget = rtCurr;
break;
}
case FilterProgram.ProgramStepType.FinalTarget:
{
var size = (Size)step.Args;
inFinalTarget = true;
rtCurr = null;
CurrentFilterProgram.CurrRenderTarget = null;
GL.BindRenderTarget(null);
break;
}
}
}
GL.EndScene();
if (job.offscreen)
{
job.offscreenBB = rtCurr.Texture2d.Resolve();
job.offscreenBB.DiscardAlpha();
}
else
{
Debug.Assert(inFinalTarget);
//wait for vsync to begin
if (alternateVsync) dx9.AlternateVsyncPass(0);
//present and conclude drawing
presentationPanel.GraphicsControl.SwapBuffers();
//wait for vsync to end
if (alternateVsync) dx9.AlternateVsyncPass(1);
//nope. dont do this. workaround for slow context switching on intel GPUs. just switch to another context when necessary before doing anything
//presentationPanel.GraphicsControl.End();
}
}
bool? LastVsyncSetting;
GraphicsControl LastVsyncSettingGraphicsControl;
}
}

View File

@ -1,48 +0,0 @@
namespace BizHawk.Client.MultiHawk
{
partial class EmulatorWindow
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.SuspendLayout();
//
// EmulatorWindow
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(284, 262);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.Name = "EmulatorWindow";
this.ShowIcon = false;
this.Load += new System.EventHandler(this.EmulatorWindow_Load);
this.ResumeLayout(false);
}
#endregion
}
}

View File

@ -1,411 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BizHawk.Common;
using BizHawk.Common.BufferExtensions;
using BizHawk.Client.EmuHawk;
using BizHawk.Bizware.BizwareGL;
using BizHawk.Client.Common;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Common.IEmulatorExtensions;
using System.IO;
namespace BizHawk.Client.MultiHawk
{
// TODO: we can safely assume videoprovider cores are a requirement of multihawk,
// but fail sooner and with a clear message instead of making misc calls to AsVideoProvider that will fail
public partial class EmulatorWindow : Form
{
public EmulatorWindow(Mainform parent)
{
InitializeComponent();
Closing += (o, e) =>
{
ShutDown();
};
MainForm = parent;
}
private void EmulatorWindow_Load(object sender, EventArgs e)
{
if (Game != null)
{
Text = Game.Name;
}
}
public Mainform MainForm { get; private set; }
public IEmulator Emulator { get; set; }
public CoreComm CoreComm { get; set; }
public GameInfo Game { get; set; }
public string CurrentRomPath { get; set; }
public IGL GL { get; set; }
public GLManager.ContextRef CR_GL { get; set; }
public GLManager GLManager { get; set; }
public PresentationPanel PresentationPanel { get; set; }
//public Sound Sound; // TODO
public DisplayManager DisplayManager;
public void Init()
{
PresentationPanel = new PresentationPanel(this, GL);
CR_GL = GLManager.GetContextForIGL(GL);
DisplayManager = new DisplayManager(PresentationPanel, GL ,GLManager);
Controls.Add(PresentationPanel);
Controls.SetChildIndex(PresentationPanel, 0);
}
public void ShutDown()
{
SaveRam();
MainForm.EmulatorWindowClosed(this);
Emulator.Dispose();
GL.Dispose();
}
public void LoadQuickSave(string quickSlotName)
{
if (!Emulator.HasSavestates())
{
return;
}
var path = PathManager.SaveStatePrefix(Game) + "." + quickSlotName + ".State";
if (LoadStateFile(path, quickSlotName))
{
// SetMainformMovieInfo(); // TODO
MainForm.AddMessage("Loaded state: " + quickSlotName);
}
else
{
MainForm.AddMessage("Loadstate error!");
}
}
public bool LoadStateFile(string path, string name)
{
var core = Emulator.AsStatable();
// try to detect binary first
var bl = BinaryStateLoader.LoadAndDetect(path);
if (bl != null)
{
try
{
var succeed = false;
// TODO
if (IAmMaster)
{
if (Global.MovieSession.Movie.IsActive)
{
bl.GetLump(BinaryStateLump.Input, true, tr => succeed = Global.MovieSession.HandleMovieLoadState_HackyStep1(tr));
if (!succeed)
{
return false;
}
bl.GetLump(BinaryStateLump.Input, true, tr => succeed = Global.MovieSession.HandleMovieLoadState_HackyStep2(tr));
if (!succeed)
{
return false;
}
}
}
using (new SimpleTime("Load Core"))
bl.GetCoreState(br => core.LoadStateBinary(br), tr => core.LoadStateText(tr));
bl.GetLump(BinaryStateLump.Framebuffer, false, PopulateFramebuffer);
}
catch
{
return false;
}
finally
{
bl.Dispose();
}
return true;
}
else // text mode
{
if (Global.MovieSession.HandleMovieLoadState(path))
{
using (var reader = new StreamReader(path))
{
core.LoadStateText(reader);
while (true)
{
var str = reader.ReadLine();
if (str == null)
{
break;
}
if (str.Trim() == "")
{
continue;
}
var args = str.Split(' ');
if (args[0] == "Framebuffer")
{
Emulator.AsVideoProvider().GetVideoBuffer().ReadFromHex(args[1]);
}
}
}
return true;
}
else
{
return false;
}
}
}
public void PopulateFramebuffer(BinaryReader br)
{
try
{
using (new SimpleTime("Load Framebuffer"))
QuickBmpFile.Load(Emulator.AsVideoProvider(), br.BaseStream);
}
catch
{
var buff = Emulator.AsVideoProvider().GetVideoBuffer();
try
{
for (int i = 0; i < buff.Length; i++)
{
int j = br.ReadInt32();
buff[i] = j;
}
}
catch (EndOfStreamException) { }
}
}
public void SaveQuickSave(string quickSlotName)
{
if (!Emulator.HasSavestates())
{
return;
}
var path = PathManager.SaveStatePrefix(Game) + "." + quickSlotName + ".State";
var file = new FileInfo(path);
if (file.Directory != null && file.Directory.Exists == false)
{
file.Directory.Create();
}
// TODO
// Make backup first
//if (Global.Config.BackupSavestates && file.Exists)
//{
// var backup = path + ".bak";
// var backupFile = new FileInfo(backup);
// if (backupFile.Exists)
// {
// backupFile.Delete();
// }
// File.Move(path, backup);
//}
try
{
SaveStateFile(path, quickSlotName);
MainForm.AddMessage("Saved state: " + quickSlotName);
}
catch (IOException)
{
MainForm.AddMessage("Unable to save state " + path);
}
// TODO
}
private void SaveStateFile(string filename, string name)
{
var core = Emulator.AsStatable();
using (var bs = new BinaryStateSaver(filename))
{
if (Global.Config.SaveStateType == Config.SaveStateTypeE.Text ||
(Global.Config.SaveStateType == Config.SaveStateTypeE.Default && !core.BinarySaveStatesPreferred))
{
// text savestate format
using (new SimpleTime("Save Core"))
bs.PutLump(BinaryStateLump.CorestateText, (tw) => core.SaveStateText(tw));
}
else
{
// binary core lump format
using (new SimpleTime("Save Core"))
bs.PutLump(BinaryStateLump.Corestate, bw => core.SaveStateBinary(bw));
}
if (true) //TODO: Global.Config.SaveScreenshotWithStates)
{
var vp = Emulator.AsVideoProvider();
var buff = vp.GetVideoBuffer();
int out_w = vp.BufferWidth;
int out_h = vp.BufferHeight;
// if buffer is too big, scale down screenshot
if (true /* !Global.Config.NoLowResLargeScreenshotWithStates*/ && buff.Length >= Global.Config.BigScreenshotSize)
{
out_w /= 2;
out_h /= 2;
}
using (new SimpleTime("Save Framebuffer"))
bs.PutLump(BinaryStateLump.Framebuffer, (s) => QuickBmpFile.Save(Emulator.AsVideoProvider(), s, out_w, out_h));
}
if (IAmMaster)
{
if (Global.MovieSession.Movie.IsActive)
{
bs.PutLump(BinaryStateLump.Input,
delegate(TextWriter tw)
{
// this never should have been a core's responsibility
tw.WriteLine("Frame {0}", Emulator.Frame);
Global.MovieSession.HandleMovieSaveState(tw);
});
}
}
}
}
public bool IAmMaster
{
get
{
return MainForm.EmulatorWindows.First() == this;
}
}
public void FrameBufferResized()
{
// run this entire thing exactly twice, since the first resize may adjust the menu stacking
for (int i = 0; i < 2; i++)
{
var video = Emulator.AsVideoProvider();
int zoom = Global.Config.TargetZoomFactors[Global.Emulator.SystemId];
var area = Screen.FromControl(this).WorkingArea;
int borderWidth = Size.Width - PresentationPanel.Control.Size.Width;
int borderHeight = Size.Height - PresentationPanel.Control.Size.Height;
// start at target zoom and work way down until we find acceptable zoom
Size lastComputedSize = new Size(1, 1);
for (; zoom >= 1; zoom--)
{
lastComputedSize = DisplayManager.CalculateClientSize(video, zoom);
if ((((lastComputedSize.Width) + borderWidth) < area.Width)
&& (((lastComputedSize.Height) + borderHeight) < area.Height))
{
break;
}
}
Console.WriteLine("Selecting display size " + lastComputedSize.ToString());
// Change size
Size = new Size((lastComputedSize.Width) + borderWidth, ((lastComputedSize.Height) + borderHeight));
PerformLayout();
PresentationPanel.Resized = true;
// Is window off the screen at this size?
if (area.Contains(Bounds) == false)
{
if (Bounds.Right > area.Right) // Window is off the right edge
{
Location = new Point(area.Right - Size.Width, Location.Y);
}
if (Bounds.Bottom > area.Bottom) // Window is off the bottom edge
{
Location = new Point(Location.X, area.Bottom - Size.Height);
}
}
}
}
private Size _lastVideoSize = new Size(-1, -1), _lastVirtualSize = new Size(-1, -1);
public void Render()
{
var video = Emulator.AsVideoProvider();
Size currVideoSize = new Size(video.BufferWidth, video.BufferHeight);
Size currVirtualSize = new Size(video.VirtualWidth, video.VirtualWidth);
if (currVideoSize != _lastVideoSize || currVirtualSize != _lastVirtualSize)
{
_lastVideoSize = currVideoSize;
_lastVirtualSize = currVirtualSize;
FrameBufferResized();
}
DisplayManager.UpdateSource(video);
}
public void FrameAdvance()
{
Emulator.FrameAdvance(Global.ControllerOutput, true);
}
public void SaveRam()
{
if (Emulator.HasSaveRam() && Emulator.AsSaveRam().SaveRamModified)
{
var path = PathManager.SaveRamPath(Global.Game);
var f = new FileInfo(path);
if (f.Directory != null && f.Directory.Exists == false)
{
f.Directory.Create();
}
// Make backup first
if (Global.Config.BackupSaveram && f.Exists)
{
var backup = path + ".bak";
var backupFile = new FileInfo(backup);
if (backupFile.Exists)
{
backupFile.Delete();
}
f.CopyTo(backup);
}
var writer = new BinaryWriter(new FileStream(path, FileMode.Create, FileAccess.Write));
var saveram = Emulator.AsSaveRam().CloneSaveRam();
writer.Write(saveram, 0, saveram.Length);
writer.Close();
}
}
}
}

View File

@ -1,120 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -1,66 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using Newtonsoft.Json;
namespace BizHawk.Client.MultiHawk
{
public class EmulatorWindowList : List<EmulatorWindow>
{
public string SessionName { get; set; }
public EmulatorWindow Master
{
get
{
if (this.Any())
{
return this.First();
}
return null;
}
}
public IEnumerable<RomSessionEntry> Session
{
get
{
return this.Select(ew => new RomSessionEntry
{
RomName = ew.CurrentRomPath,
Wndx = ew.Location.X,
Wndy = ew.Location.Y
});
}
}
public string SessionJson
{
get
{
return JsonConvert.SerializeObject(Session);
}
}
public static IEnumerable<RomSessionEntry> FromJson(string json)
{
return JsonConvert.DeserializeObject<List<RomSessionEntry>>(json);
}
public new void Clear()
{
SessionName = "";
base.Clear();
}
public class RomSessionEntry
{
public string RomName { get; set; }
public int Wndx { get; set; }
public int Wndy { get; set; }
}
}
}

View File

@ -1,228 +0,0 @@
using System;
using System.IO;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Linq;
using BizHawk.Common;
using BizHawk.Emulation.Common;
using BizHawk.Client.Common;
namespace BizHawk.Client.MultiHawk.ToolExtensions
{
public static class ToolExtensions
{
public static ToolStripItem[] RecentMenu(this RecentFiles recent, Action<string> loadFileCallback, bool autoload = false)
{
var items = new List<ToolStripItem>();
if (recent.Empty)
{
var none = new ToolStripMenuItem { Enabled = false, Text = "None" };
items.Add(none);
}
else
{
foreach (var filename in recent)
{
//TODO - do TSMI and TSDD need disposing? yuck
var temp = filename;
var item = new ToolStripMenuItem { Text = temp };
items.Add(item);
item.Click += (o, ev) =>
{
loadFileCallback(temp);
};
//TODO - use standard methods to split filename (hawkfile acquire?)
var hf = new HawkFile();
hf.Parse(temp);
bool canExplore = true;
if (!File.Exists(hf.FullPathWithoutMember))
canExplore = false;
var tsdd = new ToolStripDropDownMenu();
// TODO
if (canExplore)
{
//make a menuitem to show the last modified timestamp
// var timestamp = File.GetLastWriteTime(hf.FullPathWithoutMember);
// var tsmiTimestamp = new ToolStripLabel { Text = timestamp.ToString() };
// tsdd.Items.Add(tsmiTimestamp);
// tsdd.Items.Add(new ToolStripSeparator());
// if (hf.IsArchive)
// {
// //make a menuitem to let you copy the path
// var tsmiCopyCanonicalPath = new ToolStripMenuItem { Text = "&Copy Canonical Path" };
// tsmiCopyCanonicalPath.Click += (o, ev) => { System.Windows.Forms.Clipboard.SetText(temp); };
// tsdd.Items.Add(tsmiCopyCanonicalPath);
// var tsmiCopyArchivePath = new ToolStripMenuItem { Text = "Copy Archive Path" };
// tsmiCopyArchivePath.Click += (o, ev) => { System.Windows.Forms.Clipboard.SetText(hf.FullPathWithoutMember); };
// tsdd.Items.Add(tsmiCopyArchivePath);
// var tsmiOpenArchive = new ToolStripMenuItem { Text = "Open &Archive" };
// tsmiOpenArchive.Click += (o, ev) => { System.Diagnostics.Process.Start(hf.FullPathWithoutMember); };
// tsdd.Items.Add(tsmiOpenArchive);
// }
// else
// {
// //make a menuitem to let you copy the path
// var tsmiCopyPath = new ToolStripMenuItem { Text = "&Copy Path" };
// tsmiCopyPath.Click += (o, ev) => { System.Windows.Forms.Clipboard.SetText(temp); };
// tsdd.Items.Add(tsmiCopyPath);
// }
// tsdd.Items.Add(new ToolStripSeparator());
// //make a menuitem to let you explore to it
// var tsmiExplore = new ToolStripMenuItem { Text = "&Explore" };
// string explorePath = "\"" + hf.FullPathWithoutMember + "\"";
// tsmiExplore.Click += (o, ev) => { System.Diagnostics.Process.Start("explorer.exe", "/select, " + explorePath); };
// tsdd.Items.Add(tsmiExplore);
// var tsmiCopyFile = new ToolStripMenuItem { Text = "Copy &File" };
// var lame = new System.Collections.Specialized.StringCollection();
// lame.Add(hf.FullPathWithoutMember);
// tsmiCopyFile.Click += (o, ev) => { System.Windows.Forms.Clipboard.SetFileDropList(lame); };
// tsdd.Items.Add(tsmiCopyFile);
// var tsmiTest = new ToolStripMenuItem { Text = "&Shell Context Menu" };
// tsmiTest.Click += (o, ev) => {
// var si = new GongSolutions.Shell.ShellItem(hf.FullPathWithoutMember);
// var scm = new GongSolutions.Shell.ShellContextMenu(si);
// var tsddi = o as ToolStripDropDownItem;
// tsddi.Owner.Update();
// scm.ShowContextMenu(tsddi.Owner, new System.Drawing.Point(0, 0));
// };
// tsdd.Items.Add(tsmiTest);
// tsdd.Items.Add(new ToolStripSeparator());
//}
//else
//{
// //make a menuitem to show the last modified timestamp
// var tsmiMissingFile = new ToolStripLabel { Text = "-Missing-" };
// tsdd.Items.Add(tsmiMissingFile);
// tsdd.Items.Add(new ToolStripSeparator());
//}
////in either case, make a menuitem to let you remove the path
//var tsmiRemovePath = new ToolStripMenuItem { Text = "&Remove" };
//tsmiRemovePath.Click += (o, ev) => { recent.Remove(temp); };
//tsdd.Items.Add(tsmiRemovePath);
//////experiment of popping open a submenu. doesnt work well.
////item.MouseDown += (o, mev) =>
////{
//// if (mev.Button != MouseButtons.Right) return;
//// //location of the menu containing this item that was just rightclicked
//// var pos = item.Owner.Bounds.Location;
//// //the offset within that menu of this item
//// var tsddi = item as ToolStripDropDownItem;
//// pos.Offset(tsddi.Bounds.Location);
//// //the offset of the click
//// pos.Offset(mev.Location);
//// //tsdd.OwnerItem = item; //has interesting promise, but breaks things otherwise
//// tsdd.Show(pos);
////};
////just add it to the submenu for now
//item.MouseDown += (o, mev) =>
//{
// if (mev.Button != MouseButtons.Right) return;
// if (item.DropDown != null)
// item.DropDown = tsdd;
// item.ShowDropDown();
};
}
}
items.Add(new ToolStripSeparator());
var clearitem = new ToolStripMenuItem { Text = "&Clear", Enabled = !recent.Frozen };
clearitem.Click += (o, ev) => recent.Clear();
items.Add(clearitem);
var freezeitem = new ToolStripMenuItem { Text = recent.Frozen ? "&Unfreeze" : "&Freeze" };
freezeitem.Click += (o, ev) => recent.Frozen ^= true;
items.Add(freezeitem);
if (autoload)
{
var auto = new ToolStripMenuItem { Text = "&Autoload", Checked = recent.AutoLoad };
auto.Click += (o, ev) => recent.ToggleAutoLoad();
items.Add(auto);
}
// TODO
//var settingsitem = new ToolStripMenuItem { Text = "&Recent Settings..." };
//settingsitem.Click += (o, ev) =>
//{
// using (var prompt = new InputPrompt
// {
// TextInputType = InputPrompt.InputType.Unsigned,
// Message = "Number of recent files to track",
// InitialValue = recent.MAX_RECENT_FILES.ToString()
// })
// {
// var result = prompt.ShowDialog();
// if (result == DialogResult.OK)
// {
// int val = int.Parse(prompt.PromptText);
// if (val > 0)
// recent.MAX_RECENT_FILES = val;
// }
// }
//};
//items.Add(settingsitem);
return items.ToArray();
}
public static void HandleLoadError(this RecentFiles recent, string path)
{
// TODO
//GlobalWin.Sound.StopSound();
if (recent.Frozen)
{
var result = MessageBox.Show("Could not open " + path, "File not found", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
else
{
var result = MessageBox.Show("Could not open " + path + "\nRemove from list?", "File not found", MessageBoxButtons.YesNo, MessageBoxIcon.Error);
if (result == DialogResult.Yes)
{
recent.Remove(path);
}
}
//GlobalWin.Sound.StartSound();
}
public static IEnumerable<ToolStripItem> MenuItems(this IMemoryDomains domains, Action<string> setCallback, string selected = "", int? maxSize = null)
{
foreach (var domain in domains)
{
var name = domain.Name;
var item = new ToolStripMenuItem
{
Text = name,
Enabled = !(maxSize.HasValue && domain.Size > maxSize.Value),
Checked = name == selected
};
item.Click += (o, ev) => setCallback(name);
yield return item;
}
}
}
}

View File

@ -1,25 +0,0 @@
using BizHawk.Client.Common;
using BizHawk.Bizware.BizwareGL;
using SlimDX.DirectSound;
namespace BizHawk.Client.MultiHawk
{
public static class GlobalWin
{
public static Mainform MainForm;
//public static ToolManager Tools;
public static IGL GL;
public static Bizware.BizwareGL.Drivers.OpenTK.IGL_TK IGL_GL;
public static BizHawk.Client.EmuHawk.GLManager.ContextRef CR_GL;
//public static Sound Sound;
//public static PresentationPanel PresentationPanel;
//public static OSDManager OSD = new OSDManager();
//public static DisplayManager DisplayManager;
public static BizHawk.Client.EmuHawk.GLManager GLManager;
//input state which has been destined for game controller inputs are coalesced here
//public static ControllerInputCoalescer ControllerInputCoalescer = new ControllerInputCoalescer();
//input state which has been destined for client hotkey consumption are colesced here
public static InputCoalescer HotkeyCoalescer = new InputCoalescer();
}
}

View File

@ -1,235 +0,0 @@
using System;
using System.Collections.Generic;
using SlimDX;
using SlimDX.DirectInput;
namespace BizHawk.Client.MultiHawk
{
public class GamePad
{
// ********************************** Static interface **********************************
static DirectInput dinput;
public static List<GamePad> Devices;
public static void Initialize(IntPtr parent)
{
if (dinput == null)
dinput = new DirectInput();
Devices = new List<GamePad>();
foreach (DeviceInstance device in dinput.GetDevices(DeviceClass.GameController, DeviceEnumerationFlags.AttachedOnly))
{
Console.WriteLine("joydevice: {0} `{1}`", device.InstanceGuid, device.ProductName);
if (device.ProductName.Contains("XBOX 360"))
continue; // Don't input XBOX 360 controllers into here; we'll process them via XInput (there are limitations in some trigger axes when xbox pads go over xinput)
var joystick = new Joystick(dinput, device.InstanceGuid);
joystick.SetCooperativeLevel(parent, CooperativeLevel.Background | CooperativeLevel.Nonexclusive);
foreach (DeviceObjectInstance deviceObject in joystick.GetObjects())
{
if ((deviceObject.ObjectType & ObjectDeviceType.Axis) != 0)
joystick.GetObjectPropertiesById((int)deviceObject.ObjectType).SetRange(-1000, 1000);
}
joystick.Acquire();
GamePad p = new GamePad(device.InstanceName, device.InstanceGuid, joystick);
Devices.Add(p);
}
}
public static void UpdateAll()
{
foreach (var device in Devices)
device.Update();
}
public static void CloseAll()
{
if (Devices != null)
{
foreach (var device in Devices)
device.joystick.Dispose();
Devices.Clear();
}
}
// ********************************** Instance Members **********************************
readonly string name;
readonly Guid guid;
readonly Joystick joystick;
JoystickState state = new JoystickState();
GamePad(string name, Guid guid, Joystick joystick)
{
this.name = name;
this.guid = guid;
this.joystick = joystick;
Update();
InitializeCallbacks();
}
public void Update()
{
try
{
if (joystick.Acquire().IsFailure)
return;
}
catch
{
return;
}
if (joystick.Poll().IsFailure)
return;
state = joystick.GetCurrentState();
if (Result.Last.IsFailure)
// do something?
return;
}
public IEnumerable<Tuple<string, float>> GetFloats()
{
var pis = typeof(JoystickState).GetProperties();
foreach (var pi in pis)
yield return new Tuple<string, float>(pi.Name, 10.0f * (float)(int)pi.GetValue(state, null));
}
/// <summary>FOR DEBUGGING ONLY</summary>
public JoystickState GetInternalState()
{
return state;
}
public string Name { get { return name; } }
public Guid Guid { get { return guid; } }
public string ButtonName(int index)
{
return names[index];
}
public bool Pressed(int index)
{
return actions[index]();
}
public int NumButtons { get; private set; }
private readonly List<string> names = new List<string>();
private readonly List<Func<bool>> actions = new List<Func<bool>>();
void AddItem(string _name, Func<bool> callback)
{
names.Add(_name);
actions.Add(callback);
NumButtons++;
}
void InitializeCallbacks()
{
const int dzp = 400;
const int dzn = -400;
names.Clear();
actions.Clear();
NumButtons = 0;
AddItem("AccelerationX+", () => state.AccelerationX >= dzp);
AddItem("AccelerationX-", () => state.AccelerationX <= dzn);
AddItem("AccelerationY+", () => state.AccelerationY >= dzp);
AddItem("AccelerationY-", () => state.AccelerationY <= dzn);
AddItem("AccelerationZ+", () => state.AccelerationZ >= dzp);
AddItem("AccelerationZ-", () => state.AccelerationZ <= dzn);
AddItem("AngularAccelerationX+", () => state.AngularAccelerationX >= dzp);
AddItem("AngularAccelerationX-", () => state.AngularAccelerationX <= dzn);
AddItem("AngularAccelerationY+", () => state.AngularAccelerationY >= dzp);
AddItem("AngularAccelerationY-", () => state.AngularAccelerationY <= dzn);
AddItem("AngularAccelerationZ+", () => state.AngularAccelerationZ >= dzp);
AddItem("AngularAccelerationZ-", () => state.AngularAccelerationZ <= dzn);
AddItem("AngularVelocityX+", () => state.AngularVelocityX >= dzp);
AddItem("AngularVelocityX-", () => state.AngularVelocityX <= dzn);
AddItem("AngularVelocityY+", () => state.AngularVelocityY >= dzp);
AddItem("AngularVelocityY-", () => state.AngularVelocityY <= dzn);
AddItem("AngularVelocityZ+", () => state.AngularVelocityZ >= dzp);
AddItem("AngularVelocityZ-", () => state.AngularVelocityZ <= dzn);
AddItem("ForceX+", () => state.ForceX >= dzp);
AddItem("ForceX-", () => state.ForceX <= dzn);
AddItem("ForceY+", () => state.ForceY >= dzp);
AddItem("ForceY-", () => state.ForceY <= dzn);
AddItem("ForceZ+", () => state.ForceZ >= dzp);
AddItem("ForceZ-", () => state.ForceZ <= dzn);
AddItem("RotationX+", () => state.RotationX >= dzp);
AddItem("RotationX-", () => state.RotationX <= dzn);
AddItem("RotationY+", () => state.RotationY >= dzp);
AddItem("RotationY-", () => state.RotationY <= dzn);
AddItem("RotationZ+", () => state.RotationZ >= dzp);
AddItem("RotationZ-", () => state.RotationZ <= dzn);
AddItem("TorqueX+", () => state.TorqueX >= dzp);
AddItem("TorqueX-", () => state.TorqueX <= dzn);
AddItem("TorqueY+", () => state.TorqueY >= dzp);
AddItem("TorqueY-", () => state.TorqueY <= dzn);
AddItem("TorqueZ+", () => state.TorqueZ >= dzp);
AddItem("TorqueZ-", () => state.TorqueZ <= dzn);
AddItem("VelocityX+", () => state.VelocityX >= dzp);
AddItem("VelocityX-", () => state.VelocityX <= dzn);
AddItem("VelocityY+", () => state.VelocityY >= dzp);
AddItem("VelocityY-", () => state.VelocityY <= dzn);
AddItem("VelocityZ+", () => state.VelocityZ >= dzp);
AddItem("VelocityZ-", () => state.VelocityZ <= dzn);
AddItem("X+", () => state.X >= dzp);
AddItem("X-", () => state.X <= dzn);
AddItem("Y+", () => state.Y >= dzp);
AddItem("Y-", () => state.Y <= dzn);
AddItem("Z+", () => state.Z >= dzp);
AddItem("Z-", () => state.Z <= dzn);
// i don't know what the "Slider"s do, so they're omitted for the moment
for (int i = 0; i < state.GetButtons().Length; i++)
{
int j = i;
AddItem($"B{i + 1}", () => state.IsPressed(j));
}
for (int i = 0; i < state.GetPointOfViewControllers().Length; i++)
{
int j = i;
AddItem($"POV{i + 1}U",
() => { int t = state.GetPointOfViewControllers()[j]; return (t >= 0 && t <= 4500) || (t >= 31500 && t < 36000); });
AddItem($"POV{i + 1}D",
() => { int t = state.GetPointOfViewControllers()[j]; return t >= 13500 && t <= 22500; });
AddItem($"POV{i + 1}L",
() => { int t = state.GetPointOfViewControllers()[j]; return t >= 22500 && t <= 31500; });
AddItem($"POV{i + 1}R",
() => { int t = state.GetPointOfViewControllers()[j]; return t >= 4500 && t <= 13500; });
}
}
// Note that this does not appear to work at this time. I probably need to have more infos.
public void SetVibration(int left, int right)
{
int[] temp1, temp2;
// my first clue that it doesnt work is that LEFT and RIGHT _ARENT USED_
// I should just look for C++ examples instead of trying to look for SlimDX examples
var parameters = new EffectParameters
{
Duration = 0x2710,
Gain = 0x2710,
SamplePeriod = 0,
TriggerButton = 0,
TriggerRepeatInterval = 0x2710,
Flags = EffectFlags.None
};
parameters.GetAxes(out temp1, out temp2);
parameters.SetAxes(temp1, temp2);
var effect = new Effect(joystick, EffectGuid.ConstantForce);
effect.SetParameters(parameters);
effect.Start(1);
}
}
}

View File

@ -1,511 +0,0 @@
using System;
using System.Linq;
using System.Collections.Generic;
using System.Threading;
#if WINDOWS
using SlimDX.DirectInput;
#endif
using BizHawk.Common;
using BizHawk.Client.Common;
namespace BizHawk.Client.MultiHawk
{
//coalesces events back into instantaneous states
public class InputCoalescer : SimpleController
{
public void Receive(Input.InputEvent ie)
{
bool state = ie.EventType == Input.InputEventType.Press;
string button = ie.LogicalButton.ToString();
Buttons[button] = state;
//when a button is released, all modified variants of it are released as well
if (!state)
{
var releases = Buttons.Where(kvp => kvp.Key.Contains("+") && kvp.Key.EndsWith(ie.LogicalButton.Button)).ToArray();
foreach (var kvp in releases)
Buttons[kvp.Key] = false;
}
}
}
public class ControllerInputCoalescer : SimpleController
{
public void Receive(Input.InputEvent ie)
{
bool state = ie.EventType == Input.InputEventType.Press;
string button = ie.LogicalButton.ToString();
Buttons[button] = state;
//For controller input, we want Shift+X to register as both Shift and X (for Keyboard controllers)
string[] subgroups = button.Split('+');
if (subgroups.Length > 0)
{
foreach (string s in subgroups)
{
Buttons[s] = state;
}
}
//when a button is released, all modified variants of it are released as well
if (!state)
{
var releases = Buttons.Where((kvp) => kvp.Key.Contains("+") && kvp.Key.EndsWith(ie.LogicalButton.Button)).ToArray();
foreach (var kvp in releases)
Buttons[kvp.Key] = false;
}
}
}
public class Input
{
[Flags]
public enum InputFocus
{
None = 0,
Mouse = 1,
Keyboard = 2,
Pad = 4
}
/// <summary>
/// If your form needs this kind of input focus, be sure to say so.
/// Really, this only makes sense for mouse, but I've started building it out for other things
/// Why is this receiving a control, but actually using it as a Form (where the WantingMouseFocus is checked?)
/// Because later we might change it to work off the control, specifically, if a control is supplied (normally actually a Form will be supplied)
/// </summary>
public void ControlInputFocus(System.Windows.Forms.Control c, InputFocus types, bool wants)
{
if (types.HasFlag(InputFocus.Mouse) && wants) WantingMouseFocus.Add(c);
if (types.HasFlag(InputFocus.Mouse) && !wants) WantingMouseFocus.Remove(c);
}
HashSet<System.Windows.Forms.Control> WantingMouseFocus = new HashSet<System.Windows.Forms.Control>();
[Flags]
public enum ModifierKey
{
// Summary:
// The bitmask to extract modifiers from a key value.
Modifiers = -65536,
//
// Summary:
// No key pressed.
None = 0,
//
// Summary:
// The SHIFT modifier key.
Shift = 65536,
//
// Summary:
// The CTRL modifier key.
Control = 131072,
//
// Summary:
// The ALT modifier key.
Alt = 262144,
}
public static Input Instance { get; private set; }
readonly Thread UpdateThread;
private Input()
{
#if WINDOWS
UpdateThread = new Thread(UpdateThreadProc)
{
IsBackground = true,
Priority = ThreadPriority.AboveNormal //why not? this thread shouldn't be very heavy duty, and we want it to be responsive
};
UpdateThread.Start();
#endif
}
public static void Initialize(IntPtr parent)
{
#if WINDOWS
KeyInput.Initialize(parent);
GamePad.Initialize(parent);
BizHawk.Client.EmuHawk.GamePad360.Initialize();
#endif
Instance = new Input();
}
public enum InputEventType
{
Press, Release
}
public struct LogicalButton
{
public LogicalButton(string button, ModifierKey modifiers)
{
Button = button;
Modifiers = modifiers;
}
public readonly string Button;
public readonly ModifierKey Modifiers;
public bool Alt { get { return ((Modifiers & ModifierKey.Alt) != 0); } }
public bool Control { get { return ((Modifiers & ModifierKey.Control) != 0); } }
public bool Shift { get { return ((Modifiers & ModifierKey.Shift) != 0); } }
public override string ToString()
{
string ret = "";
if (Control) ret += "Ctrl+";
if (Alt) ret += "Alt+";
if (Shift) ret += "Shift+";
ret += Button;
return ret;
}
public override bool Equals(object obj)
{
var other = (LogicalButton)obj;
return other == this;
}
public override int GetHashCode()
{
return Button.GetHashCode() ^ Modifiers.GetHashCode();
}
public static bool operator ==(LogicalButton lhs, LogicalButton rhs)
{
return lhs.Button == rhs.Button && lhs.Modifiers == rhs.Modifiers;
}
public static bool operator !=(LogicalButton lhs, LogicalButton rhs)
{
return !(lhs == rhs);
}
}
public class InputEvent
{
public LogicalButton LogicalButton;
public InputEventType EventType;
public override string ToString() => $"{EventType.ToString()}:{LogicalButton.ToString()}";
}
private readonly WorkingDictionary<string, object> ModifierState = new WorkingDictionary<string, object>();
private readonly WorkingDictionary<string, bool> LastState = new WorkingDictionary<string, bool>();
private readonly WorkingDictionary<string, bool> UnpressState = new WorkingDictionary<string, bool>();
private readonly HashSet<string> IgnoreKeys = new HashSet<string>(new[] { "LeftShift", "RightShift", "LeftControl", "RightControl", "LeftAlt", "RightAlt" });
private readonly WorkingDictionary<string, float> FloatValues = new WorkingDictionary<string, float>();
private readonly WorkingDictionary<string, float> FloatDeltas = new WorkingDictionary<string, float>();
private bool trackdeltas = false;
void HandleButton(string button, bool newState)
{
bool isModifier = IgnoreKeys.Contains(button);
if (EnableIgnoreModifiers && isModifier) return;
if (LastState[button] && newState) return;
if (!LastState[button] && !newState) return;
//apply
//NOTE: this is not quite right. if someone held leftshift+rightshift it would be broken. seems unlikely, though.
if (button == "LeftShift")
{
_Modifiers &= ~ModifierKey.Shift;
if (newState)
_Modifiers |= ModifierKey.Shift;
}
if (button == "RightShift") { _Modifiers &= ~ModifierKey.Shift; if (newState) _Modifiers |= ModifierKey.Shift; }
if (button == "LeftControl") { _Modifiers &= ~ModifierKey.Control; if (newState) _Modifiers |= ModifierKey.Control; }
if (button == "RightControl") { _Modifiers &= ~ModifierKey.Control; if (newState) _Modifiers |= ModifierKey.Control; }
if (button == "LeftAlt") { _Modifiers &= ~ModifierKey.Alt; if (newState) _Modifiers |= ModifierKey.Alt; }
if (button == "RightAlt") { _Modifiers &= ~ModifierKey.Alt; if (newState) _Modifiers |= ModifierKey.Alt; }
if (UnpressState.ContainsKey(button))
{
if (newState) return;
Console.WriteLine($"Removing Unpress {button} with {nameof(newState)} {newState}");
UnpressState.Remove(button);
LastState[button] = false;
return;
}
//dont generate events for things like Ctrl+LeftControl
ModifierKey mods = _Modifiers;
if (button == "LeftShift") mods &= ~ModifierKey.Shift;
if (button == "RightShift") mods &= ~ModifierKey.Shift;
if (button == "LeftControl") mods &= ~ModifierKey.Control;
if (button == "RightControl") mods &= ~ModifierKey.Control;
if (button == "LeftAlt") mods &= ~ModifierKey.Alt;
if (button == "RightAlt") mods &= ~ModifierKey.Alt;
var ie = new InputEvent
{
EventType = newState ? InputEventType.Press : InputEventType.Release,
LogicalButton = new LogicalButton(button, mods)
};
LastState[button] = newState;
//track the pressed events with modifiers that we send so that we can send corresponding unpresses with modifiers
//this is an interesting idea, which we may need later, but not yet.
//for example, you may see this series of events: press:ctrl+c, release:ctrl, release:c
//but you might would rather have press:ctr+c, release:ctrl+c
//this code relates the releases to the original presses.
//UPDATE - this is necessary for the frame advance key, which has a special meaning when it gets stuck down
//so, i am adding it as of 11-sep-2011
if (newState)
{
ModifierState[button] = ie.LogicalButton;
}
else
{
if (ModifierState[button] != null)
{
LogicalButton alreadyReleased = ie.LogicalButton;
var ieModified = new InputEvent
{
LogicalButton = (LogicalButton)ModifierState[button],
EventType = InputEventType.Release
};
if (ieModified.LogicalButton != alreadyReleased)
_NewEvents.Add(ieModified);
}
ModifierState[button] = null;
}
_NewEvents.Add(ie);
}
ModifierKey _Modifiers;
private readonly List<InputEvent> _NewEvents = new List<InputEvent>();
//do we need this?
public void ClearEvents()
{
lock (this)
{
InputEvents.Clear();
}
}
private readonly Queue<InputEvent> InputEvents = new Queue<InputEvent>();
public InputEvent DequeueEvent()
{
lock (this)
{
if (InputEvents.Count == 0) return null;
else return InputEvents.Dequeue();
}
}
void EnqueueEvent(InputEvent ie)
{
lock (this)
{
InputEvents.Enqueue(ie);
}
}
public List<Tuple<string, float>> GetFloats()
{
List<Tuple<string, float>> FloatValuesCopy = new List<Tuple<string,float>>();
lock (FloatValues)
{
foreach (var kvp in FloatValues)
FloatValuesCopy.Add(new Tuple<string, float>(kvp.Key, kvp.Value));
}
return FloatValuesCopy;
}
#if WINDOWS
void UpdateThreadProc()
{
for (; ; )
{
var keyEvents = KeyInput.Update();
GamePad.UpdateAll();
BizHawk.Client.EmuHawk.GamePad360.UpdateAll();
//this block is going to massively modify data structures that the binding method uses, so we have to lock it all
lock (this)
{
_NewEvents.Clear();
//analyze keys
foreach (var ke in keyEvents)
HandleButton(ke.Key.ToString(), ke.Pressed);
lock (FloatValues)
{
//FloatValues.Clear();
//analyze xinput
foreach (var pad in BizHawk.Client.EmuHawk.GamePad360.EnumerateDevices())
{
string xname = "X" + pad.PlayerNumber + " ";
for (int b = 0; b < pad.NumButtons; b++)
HandleButton(xname + pad.ButtonName(b), pad.Pressed(b));
foreach (var sv in pad.GetFloats())
{
string n = xname + sv.Item1;
float f = sv.Item2;
if (trackdeltas)
FloatDeltas[n] += Math.Abs(f - FloatValues[n]);
FloatValues[n] = f;
}
}
//analyze joysticks
for (int i = 0; i < GamePad.Devices.Count; i++)
{
var pad = GamePad.Devices[i];
string jname = "J" + (i + 1) + " ";
for (int b = 0; b < pad.NumButtons; b++)
HandleButton(jname + pad.ButtonName(b), pad.Pressed(b));
foreach (var sv in pad.GetFloats())
{
string n = jname + sv.Item1;
float f = sv.Item2;
//if (n == "J5 RotationZ")
// System.Diagnostics.Debugger.Break();
if (trackdeltas)
FloatDeltas[n] += Math.Abs(f - FloatValues[n]);
FloatValues[n] = f;
}
}
// analyse moose
// other sorts of mouse api (raw input) could easily be added as a separate listing under a different class
if (WantingMouseFocus.Contains(System.Windows.Forms.Form.ActiveForm))
{
var P = System.Windows.Forms.Control.MousePosition;
if (trackdeltas)
{
// these are relative to screen coordinates, but that's not terribly important
FloatDeltas["WMouse X"] += Math.Abs(P.X - FloatValues["WMouse X"]) * 50;
FloatDeltas["WMouse Y"] += Math.Abs(P.Y - FloatValues["WMouse Y"]) * 50;
}
// coordinate translation happens later
FloatValues["WMouse X"] = P.X;
FloatValues["WMouse Y"] = P.Y;
var B = System.Windows.Forms.Control.MouseButtons;
HandleButton("WMouse L", (B & System.Windows.Forms.MouseButtons.Left) != 0);
HandleButton("WMouse C", (B & System.Windows.Forms.MouseButtons.Middle) != 0);
HandleButton("WMouse R", (B & System.Windows.Forms.MouseButtons.Right) != 0);
HandleButton("WMouse 1", (B & System.Windows.Forms.MouseButtons.XButton1) != 0);
HandleButton("WMouse 2", (B & System.Windows.Forms.MouseButtons.XButton2) != 0);
}
else
{
//dont do this: for now, it will interfere with the virtualpad. dont do something similar for the mouse position either
//unpress all buttons
//HandleButton("WMouse L", false);
//HandleButton("WMouse C", false);
//HandleButton("WMouse R", false);
//HandleButton("WMouse 1", false);
//HandleButton("WMouse 2", false);
}
}
bool swallow = !GlobalWin.MainForm.AllowInput;
foreach (var ie in _NewEvents)
{
//events are swallowed in some cases:
if (ie.EventType == InputEventType.Press && swallow)
{ }
else
EnqueueEvent(ie);
}
} //lock(this)
//arbitrary selection of polling frequency:
Thread.Sleep(10);
}
}
#endif
public void StartListeningForFloatEvents()
{
lock (FloatValues)
{
FloatDeltas.Clear();
trackdeltas = true;
}
}
public string GetNextFloatEvent()
{
lock (FloatValues)
{
foreach (var kvp in FloatDeltas)
{
// need to wiggle the stick a bit
if (kvp.Value >= 20000.0f)
return kvp.Key;
}
}
return null;
}
public void StopListeningForFloatEvents()
{
lock (FloatValues)
{
trackdeltas = false;
}
}
public void Update()
{
//TODO - for some reason, we may want to control when the next event processing step happens
//so i will leave this method here for now..
}
//returns the next Press event, if available. should be useful
public string GetNextBindEvent()
{
//this whole process is intimately involved with the data structures, which can conflict with the input thread.
lock (this)
{
if (InputEvents.Count == 0) return null;
if (!GlobalWin.MainForm.AllowInput) return null;
//we only listen to releases for input binding, because we need to distinguish releases of pure modifierkeys from modified keys
//if you just pressed ctrl, wanting to bind ctrl, we'd see: pressed:ctrl, unpressed:ctrl
//if you just pressed ctrl+c, wanting to bind ctrl+c, we'd see: pressed:ctrl, pressed:ctrl+c, unpressed:ctrl+c, unpressed:ctrl
//so its the first unpress we need to listen for
while (InputEvents.Count != 0)
{
var ie = DequeueEvent();
//as a special perk, we'll accept escape immediately
if (ie.EventType == InputEventType.Press && ie.LogicalButton.Button == "Escape")
goto ACCEPT;
if (ie.EventType == InputEventType.Press) continue;
ACCEPT:
Console.WriteLine("Bind Event: {0} ", ie);
foreach (var kvp in LastState)
if (kvp.Value)
{
Console.WriteLine("Unpressing " + kvp.Key);
UnpressState[kvp.Key] = true;
}
InputEvents.Clear();
return ie.LogicalButton.ToString();
}
return null;
}
}
//controls whether modifier keys will be ignored as key press events
//this should be used by hotkey binders, but we may want modifier key events
//to get triggered in the main form
public bool EnableIgnoreModifiers = false;
}
}

View File

@ -1,132 +0,0 @@
using System.Collections.Generic;
using SlimDX;
using SlimDX.DirectInput;
using System;
namespace BizHawk.Client.MultiHawk
{
public static class KeyInput
{
private static DirectInput dinput;
private static Keyboard keyboard;
private static KeyboardState state = new KeyboardState();
public static void Initialize(IntPtr parent)
{
if (dinput == null)
dinput = new DirectInput();
if (keyboard == null || keyboard.Disposed)
keyboard = new Keyboard(dinput);
keyboard.SetCooperativeLevel(parent, CooperativeLevel.Background | CooperativeLevel.Nonexclusive);
keyboard.Properties.BufferSize = 8;
}
static List<KeyEvent> EmptyList = new List<KeyEvent>();
static List<KeyEvent> EventList = new List<KeyEvent>();
public static IEnumerable<KeyEvent> Update()
{
EventList.Clear();
if (keyboard.Acquire().IsFailure)
return EmptyList;
if (keyboard.Poll().IsFailure)
return EmptyList;
for (; ; )
{
var events = keyboard.GetBufferedData();
if (Result.Last.IsFailure)
return EventList;
if (events.Count == 0)
break;
foreach (var e in events)
{
foreach (var k in e.PressedKeys)
EventList.Add(new KeyEvent { Key = k, Pressed = true });
foreach (var k in e.ReleasedKeys)
EventList.Add(new KeyEvent { Key = k, Pressed = false });
}
}
return EventList;
}
public struct KeyEvent
{
public Key Key;
public bool Pressed;
}
public static bool IsPressed(Key key)
{
if (state.IsPressed(key))
return true;
if (key == Key.LeftShift && state.IsPressed(Key.RightShift))
return true;
if (key == Key.LeftControl && state.IsPressed(Key.RightControl))
return true;
if (key == Key.LeftAlt && state.IsPressed(Key.RightAlt))
return true;
return false;
}
public static bool ShiftModifier
{
get
{
if (state.IsPressed(Key.LeftShift)) return true;
if (state.IsPressed(Key.RightShift)) return true;
return false;
}
}
public static bool CtrlModifier
{
get
{
if (state.IsPressed(Key.LeftControl)) return true;
if (state.IsPressed(Key.RightControl)) return true;
return false;
}
}
public static bool AltModifier
{
get
{
if (state.IsPressed(Key.LeftAlt)) return true;
if (state.IsPressed(Key.RightAlt)) return true;
return false;
}
}
public static Input.ModifierKey GetModifierKeysAsKeys()
{
Input.ModifierKey ret = Input.ModifierKey.None;
if (ShiftModifier) ret |= Input.ModifierKey.Shift;
if (CtrlModifier) ret |= Input.ModifierKey.Control;
if (AltModifier) ret |= Input.ModifierKey.Alt;
return ret;
}
}
internal static class KeyExtensions
{
public static bool IsModifier(this Key key)
{
if (key == Key.LeftShift) return true;
if (key == Key.RightShift) return true;
if (key == Key.LeftControl) return true;
if (key == Key.RightControl) return true;
if (key == Key.LeftAlt) return true;
if (key == Key.RightAlt) return true;
return false;
}
}
}

View File

@ -1,121 +0,0 @@
using System.Collections.Generic;
using System.Linq;
using BizHawk.Emulation.Common;
using BizHawk.Client.Common.InputAdapterExtensions;
using BizHawk.Client.Common;
namespace BizHawk.Client.MultiHawk
{
public class InputManager
{
Mainform _mainForm;
public InputManager(Mainform mainForm)
{
_mainForm = mainForm;
}
public void RewireInputChain()
{
Global.ControllerInputCoalescer.Clear();
Global.ControllerInputCoalescer.Definition = Global.ActiveController.Definition;
// TODO?
//Global.UD_LR_ControllerAdapter.Source = Global.ActiveController.Or(Global.AutoFireController);
Global.UD_LR_ControllerAdapter.Source = Global.ActiveController;
Global.StickyXORAdapter.Source = Global.UD_LR_ControllerAdapter;
// TODO?
//Global.AutofireStickyXORAdapter.Source = Global.StickyXORAdapter;
//Global.MultitrackRewiringAdapter.Source = Global.AutofireStickyXORAdapter;
Global.MultitrackRewiringAdapter.Source = Global.StickyXORAdapter;
Global.MovieInputSourceAdapter.Source = Global.MultitrackRewiringAdapter;
Global.ControllerOutput.Source = Global.MovieOutputHardpoint;
Global.MovieSession.MovieControllerAdapter.Definition = Global.MovieInputSourceAdapter.Definition;
// connect the movie session before MovieOutputHardpoint if it is doing anything
// otherwise connect the MovieInputSourceAdapter to it, effectively bypassing the movie session
if (Global.MovieSession != null)
{
Global.MovieOutputHardpoint.Source = Global.MovieSession.MovieControllerAdapter;
}
else
{
Global.MovieOutputHardpoint.Source = Global.MovieInputSourceAdapter;
}
}
public void SyncControls()
{
var def = _mainForm.EmulatorWindows.First().Emulator.ControllerDefinition;
Global.ActiveController = BindToDefinition(def, Global.Config.AllTrollers, Global.Config.AllTrollersAnalog);
// TODO?
//Global.AutoFireController = BindToDefinitionAF(def, Global.Config.AllTrollersAutoFire);
// allow propogating controls that are in the current controller definition but not in the prebaked one
// these two lines shouldn't be required anymore under the new system?
Global.ActiveController.ForceType(new ControllerDefinition(def));
Global.ClickyVirtualPadController.Definition = new ControllerDefinition(def);
RewireInputChain();
}
private Controller BindToDefinition(ControllerDefinition def, IDictionary<string, Dictionary<string, string>> allbinds, IDictionary<string, Dictionary<string, Config.AnalogBind>> analogbinds)
{
var ret = new Controller(def);
Dictionary<string, string> binds;
if (allbinds.TryGetValue(def.Name, out binds))
{
foreach (var cbutton in def.BoolButtons)
{
string bind;
if (binds.TryGetValue(cbutton, out bind))
{
ret.BindMulti(cbutton, bind);
}
}
}
Dictionary<string, Config.AnalogBind> abinds;
if (analogbinds.TryGetValue(def.Name, out abinds))
{
foreach (var cbutton in def.FloatControls)
{
Config.AnalogBind bind;
if (abinds.TryGetValue(cbutton, out bind))
{
ret.BindFloat(cbutton, bind);
}
}
}
return ret;
}
// TODO?
//private AutofireController BindToDefinitionAF(ControllerDefinition def, IDictionary<string, Dictionary<string, string>> allbinds)
//{
// var ret = new AutofireController(def);
// Dictionary<string, string> binds;
// if (allbinds.TryGetValue(def.Name, out binds))
// {
// foreach (var cbutton in def.BoolButtons)
// {
// string bind;
// if (binds.TryGetValue(cbutton, out bind))
// {
// ret.BindMulti(cbutton, bind);
// }
// }
// }
// return ret;
//}
}
}

View File

@ -1,548 +0,0 @@
namespace BizHawk.Client.MultiHawk
{
partial class Mainform
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.MainformMenu = new MenuStripEx();
this.FileSubMenu = new System.Windows.Forms.ToolStripMenuItem();
this.NewSessionMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.OpenSessionMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.SaveSessionMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.SaveSessionAsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.RecentSessionSubMenu = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
this.OpenRomMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.RecentRomSubMenu = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
this.RebootCoresMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
this.ExitMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ViewSubMenu = new System.Windows.Forms.ToolStripMenuItem();
this._1xMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this._2xMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this._3xMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this._4xMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.MovieSubMenu = new System.Windows.Forms.ToolStripMenuItem();
this.RecordMovieMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.PlayMovieMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.StopMovieMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.RestartMovieMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.RecentMovieSubMenu = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.ToggleReadonlyMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.configToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.controllerConfigToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.hotkeyConfigToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
this.saveConfigToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.WorkspacePanel = new System.Windows.Forms.Panel();
this.MainStatusBar = new System.Windows.Forms.StatusStrip();
this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
this.FameStatusBarLabel = new System.Windows.Forms.ToolStripStatusLabel();
this.PlayRecordStatusButton = new System.Windows.Forms.ToolStripDropDownButton();
this.StatusBarMessageLabel = new System.Windows.Forms.ToolStripStatusLabel();
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.RecordMovieContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.PlayMovieContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.LoadLastMovieContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.StopMovieContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.RestartMovieContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.MainformMenu.SuspendLayout();
this.WorkspacePanel.SuspendLayout();
this.MainStatusBar.SuspendLayout();
this.contextMenuStrip1.SuspendLayout();
this.SuspendLayout();
//
// MainformMenu
//
this.MainformMenu.ClickThrough = true;
this.MainformMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.FileSubMenu,
this.ViewSubMenu,
this.MovieSubMenu,
this.configToolStripMenuItem});
this.MainformMenu.Location = new System.Drawing.Point(0, 0);
this.MainformMenu.Name = "MainformMenu";
this.MainformMenu.Size = new System.Drawing.Size(655, 24);
this.MainformMenu.TabIndex = 0;
this.MainformMenu.Text = "menuStrip1";
//
// FileSubMenu
//
this.FileSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.NewSessionMenuItem,
this.OpenSessionMenuItem,
this.SaveSessionMenuItem,
this.SaveSessionAsMenuItem,
this.RecentSessionSubMenu,
this.toolStripSeparator7,
this.OpenRomMenuItem,
this.RecentRomSubMenu,
this.toolStripSeparator5,
this.RebootCoresMenuItem,
this.toolStripSeparator3,
this.ExitMenuItem});
this.FileSubMenu.Name = "FileSubMenu";
this.FileSubMenu.Size = new System.Drawing.Size(37, 20);
this.FileSubMenu.Text = "&File";
this.FileSubMenu.DropDownOpened += new System.EventHandler(this.FileSubMenu_DropDownOpened);
//
// NewSessionMenuItem
//
this.NewSessionMenuItem.Name = "NewSessionMenuItem";
this.NewSessionMenuItem.Size = new System.Drawing.Size(165, 22);
this.NewSessionMenuItem.Text = "&New Session";
this.NewSessionMenuItem.Click += new System.EventHandler(this.NewSessionMenuItem_Click);
//
// OpenSessionMenuItem
//
this.OpenSessionMenuItem.Name = "OpenSessionMenuItem";
this.OpenSessionMenuItem.Size = new System.Drawing.Size(165, 22);
this.OpenSessionMenuItem.Text = "&Open Session";
this.OpenSessionMenuItem.Click += new System.EventHandler(this.OpenSessionMenuItem_Click);
//
// SaveSessionMenuItem
//
this.SaveSessionMenuItem.Name = "SaveSessionMenuItem";
this.SaveSessionMenuItem.Size = new System.Drawing.Size(165, 22);
this.SaveSessionMenuItem.Text = "&Save Session";
this.SaveSessionMenuItem.Click += new System.EventHandler(this.SaveSessionMenuItem_Click);
//
// SaveSessionAsMenuItem
//
this.SaveSessionAsMenuItem.Name = "SaveSessionAsMenuItem";
this.SaveSessionAsMenuItem.Size = new System.Drawing.Size(165, 22);
this.SaveSessionAsMenuItem.Text = "Save Session &As...";
this.SaveSessionAsMenuItem.Click += new System.EventHandler(this.SaveSessionAsMenuItem_Click);
//
// RecentSessionSubMenu
//
this.RecentSessionSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripSeparator6});
this.RecentSessionSubMenu.Name = "RecentSessionSubMenu";
this.RecentSessionSubMenu.Size = new System.Drawing.Size(165, 22);
this.RecentSessionSubMenu.Text = "Recent Session";
this.RecentSessionSubMenu.DropDownOpened += new System.EventHandler(this.RecentSessionSubMenu_DropDownOpened);
//
// toolStripSeparator6
//
this.toolStripSeparator6.Name = "toolStripSeparator6";
this.toolStripSeparator6.Size = new System.Drawing.Size(57, 6);
//
// toolStripSeparator7
//
this.toolStripSeparator7.Name = "toolStripSeparator7";
this.toolStripSeparator7.Size = new System.Drawing.Size(162, 6);
//
// OpenRomMenuItem
//
this.OpenRomMenuItem.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.OpenFile;
this.OpenRomMenuItem.Name = "OpenRomMenuItem";
this.OpenRomMenuItem.Size = new System.Drawing.Size(165, 22);
this.OpenRomMenuItem.Text = "Open ROM";
this.OpenRomMenuItem.Click += new System.EventHandler(this.OpenRomMenuItem_Click);
//
// RecentRomSubMenu
//
this.RecentRomSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripSeparator1});
this.RecentRomSubMenu.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.Recent;
this.RecentRomSubMenu.Name = "RecentRomSubMenu";
this.RecentRomSubMenu.Size = new System.Drawing.Size(165, 22);
this.RecentRomSubMenu.Text = "Recent";
this.RecentRomSubMenu.DropDownOpened += new System.EventHandler(this.RecentRomSubMenu_DropDownOpened);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(57, 6);
//
// toolStripSeparator5
//
this.toolStripSeparator5.Name = "toolStripSeparator5";
this.toolStripSeparator5.Size = new System.Drawing.Size(162, 6);
//
// RebootCoresMenuItem
//
this.RebootCoresMenuItem.Name = "RebootCoresMenuItem";
this.RebootCoresMenuItem.Size = new System.Drawing.Size(165, 22);
this.RebootCoresMenuItem.Text = "Reboot Cores";
this.RebootCoresMenuItem.Click += new System.EventHandler(this.RebootCoresMenuItem_Click);
//
// toolStripSeparator3
//
this.toolStripSeparator3.Name = "toolStripSeparator3";
this.toolStripSeparator3.Size = new System.Drawing.Size(162, 6);
//
// ExitMenuItem
//
this.ExitMenuItem.Name = "ExitMenuItem";
this.ExitMenuItem.ShortcutKeyDisplayString = "Alt+F4";
this.ExitMenuItem.Size = new System.Drawing.Size(165, 22);
this.ExitMenuItem.Text = "E&xit";
this.ExitMenuItem.Click += new System.EventHandler(this.ExitMenuItem_Click);
//
// ViewSubMenu
//
this.ViewSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this._1xMenuItem,
this._2xMenuItem,
this._3xMenuItem,
this._4xMenuItem});
this.ViewSubMenu.Enabled = false;
this.ViewSubMenu.Name = "ViewSubMenu";
this.ViewSubMenu.Size = new System.Drawing.Size(44, 20);
this.ViewSubMenu.Text = "&View";
this.ViewSubMenu.DropDownOpened += new System.EventHandler(this.ViewSubMenu_DropDownOpened);
//
// _1xMenuItem
//
this._1xMenuItem.Name = "_1xMenuItem";
this._1xMenuItem.Size = new System.Drawing.Size(85, 22);
this._1xMenuItem.Text = "&1x";
this._1xMenuItem.Click += new System.EventHandler(this._1xMenuItem_Click);
//
// _2xMenuItem
//
this._2xMenuItem.Name = "_2xMenuItem";
this._2xMenuItem.Size = new System.Drawing.Size(85, 22);
this._2xMenuItem.Text = "&2x";
this._2xMenuItem.Click += new System.EventHandler(this._2xMenuItem_Click);
//
// _3xMenuItem
//
this._3xMenuItem.Name = "_3xMenuItem";
this._3xMenuItem.Size = new System.Drawing.Size(85, 22);
this._3xMenuItem.Text = "&3x";
this._3xMenuItem.Click += new System.EventHandler(this._3xMenuItem_Click);
//
// _4xMenuItem
//
this._4xMenuItem.Name = "_4xMenuItem";
this._4xMenuItem.Size = new System.Drawing.Size(85, 22);
this._4xMenuItem.Text = "&4x";
this._4xMenuItem.Click += new System.EventHandler(this._4xMenuItem_Click);
//
// MovieSubMenu
//
this.MovieSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.RecordMovieMenuItem,
this.PlayMovieMenuItem,
this.StopMovieMenuItem,
this.RestartMovieMenuItem,
this.RecentMovieSubMenu,
this.toolStripSeparator2,
this.ToggleReadonlyMenuItem});
this.MovieSubMenu.Name = "MovieSubMenu";
this.MovieSubMenu.Size = new System.Drawing.Size(52, 20);
this.MovieSubMenu.Text = "&Movie";
this.MovieSubMenu.DropDownOpened += new System.EventHandler(this.MovieSubMenu_DropDownOpened);
//
// RecordMovieMenuItem
//
this.RecordMovieMenuItem.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.RecordHS;
this.RecordMovieMenuItem.Name = "RecordMovieMenuItem";
this.RecordMovieMenuItem.Size = new System.Drawing.Size(168, 22);
this.RecordMovieMenuItem.Text = "Record Movie";
this.RecordMovieMenuItem.Click += new System.EventHandler(this.RecordMovieMenuItem_Click);
//
// PlayMovieMenuItem
//
this.PlayMovieMenuItem.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.Play;
this.PlayMovieMenuItem.Name = "PlayMovieMenuItem";
this.PlayMovieMenuItem.Size = new System.Drawing.Size(168, 22);
this.PlayMovieMenuItem.Text = "Play Movie";
this.PlayMovieMenuItem.Click += new System.EventHandler(this.PlayMovieMenuItem_Click);
//
// StopMovieMenuItem
//
this.StopMovieMenuItem.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.Stop;
this.StopMovieMenuItem.Name = "StopMovieMenuItem";
this.StopMovieMenuItem.Size = new System.Drawing.Size(168, 22);
this.StopMovieMenuItem.Text = "&Stop Movie";
this.StopMovieMenuItem.Click += new System.EventHandler(this.StopMovieMenuItem_Click);
//
// RestartMovieMenuItem
//
this.RestartMovieMenuItem.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.restart;
this.RestartMovieMenuItem.Name = "RestartMovieMenuItem";
this.RestartMovieMenuItem.Size = new System.Drawing.Size(168, 22);
this.RestartMovieMenuItem.Text = "Restart Movie";
this.RestartMovieMenuItem.Click += new System.EventHandler(this.RestartMovieMenuItem_Click);
//
// RecentMovieSubMenu
//
this.RecentMovieSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripSeparator8});
this.RecentMovieSubMenu.Name = "RecentMovieSubMenu";
this.RecentMovieSubMenu.Size = new System.Drawing.Size(168, 22);
this.RecentMovieSubMenu.Text = "Recent";
this.RecentMovieSubMenu.DropDownOpened += new System.EventHandler(this.RecentMovieSubMenu_DropDownOpened);
//
// toolStripSeparator8
//
this.toolStripSeparator8.Name = "toolStripSeparator8";
this.toolStripSeparator8.Size = new System.Drawing.Size(57, 6);
//
// toolStripSeparator2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(165, 6);
//
// ToggleReadonlyMenuItem
//
this.ToggleReadonlyMenuItem.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.ReadOnly;
this.ToggleReadonlyMenuItem.Name = "ToggleReadonlyMenuItem";
this.ToggleReadonlyMenuItem.Size = new System.Drawing.Size(168, 22);
this.ToggleReadonlyMenuItem.Text = "Toggle Read-only";
this.ToggleReadonlyMenuItem.Click += new System.EventHandler(this.ToggleReadonlyMenuItem_Click);
//
// configToolStripMenuItem
//
this.configToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.controllerConfigToolStripMenuItem,
this.hotkeyConfigToolStripMenuItem,
this.toolStripSeparator4,
this.saveConfigToolStripMenuItem});
this.configToolStripMenuItem.Name = "configToolStripMenuItem";
this.configToolStripMenuItem.Size = new System.Drawing.Size(55, 20);
this.configToolStripMenuItem.Text = "&Config";
//
// controllerConfigToolStripMenuItem
//
this.controllerConfigToolStripMenuItem.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.GameController;
this.controllerConfigToolStripMenuItem.Name = "controllerConfigToolStripMenuItem";
this.controllerConfigToolStripMenuItem.Size = new System.Drawing.Size(166, 22);
this.controllerConfigToolStripMenuItem.Text = "Controller Config";
this.controllerConfigToolStripMenuItem.Click += new System.EventHandler(this.controllerConfigToolStripMenuItem_Click);
//
// hotkeyConfigToolStripMenuItem
//
this.hotkeyConfigToolStripMenuItem.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.HotKeys;
this.hotkeyConfigToolStripMenuItem.Name = "hotkeyConfigToolStripMenuItem";
this.hotkeyConfigToolStripMenuItem.Size = new System.Drawing.Size(166, 22);
this.hotkeyConfigToolStripMenuItem.Text = "Hotkey Config";
this.hotkeyConfigToolStripMenuItem.Click += new System.EventHandler(this.hotkeyConfigToolStripMenuItem_Click);
//
// toolStripSeparator4
//
this.toolStripSeparator4.Name = "toolStripSeparator4";
this.toolStripSeparator4.Size = new System.Drawing.Size(163, 6);
//
// saveConfigToolStripMenuItem
//
this.saveConfigToolStripMenuItem.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.Save;
this.saveConfigToolStripMenuItem.Name = "saveConfigToolStripMenuItem";
this.saveConfigToolStripMenuItem.Size = new System.Drawing.Size(166, 22);
this.saveConfigToolStripMenuItem.Text = "Save Config";
this.saveConfigToolStripMenuItem.Click += new System.EventHandler(this.saveConfigToolStripMenuItem_Click);
//
// WorkspacePanel
//
this.WorkspacePanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.WorkspacePanel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.WorkspacePanel.Controls.Add(this.MainStatusBar);
this.WorkspacePanel.Location = new System.Drawing.Point(0, 25);
this.WorkspacePanel.Name = "WorkspacePanel";
this.WorkspacePanel.Size = new System.Drawing.Size(655, 405);
this.WorkspacePanel.TabIndex = 1;
//
// MainStatusBar
//
this.MainStatusBar.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripStatusLabel1,
this.FameStatusBarLabel,
this.PlayRecordStatusButton,
this.StatusBarMessageLabel});
this.MainStatusBar.Location = new System.Drawing.Point(0, 379);
this.MainStatusBar.Name = "MainStatusBar";
this.MainStatusBar.Size = new System.Drawing.Size(651, 22);
this.MainStatusBar.TabIndex = 0;
this.MainStatusBar.Text = "statusStrip1";
//
// toolStripStatusLabel1
//
this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
this.toolStripStatusLabel1.Size = new System.Drawing.Size(46, 17);
this.toolStripStatusLabel1.Text = "Frame: ";
//
// FameStatusBarLabel
//
this.FameStatusBarLabel.Name = "FameStatusBarLabel";
this.FameStatusBarLabel.Size = new System.Drawing.Size(13, 17);
this.FameStatusBarLabel.Text = "0";
//
// PlayRecordStatusButton
//
this.PlayRecordStatusButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.PlayRecordStatusButton.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.Blank;
this.PlayRecordStatusButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.PlayRecordStatusButton.Name = "PlayRecordStatusButton";
this.PlayRecordStatusButton.Size = new System.Drawing.Size(29, 20);
this.PlayRecordStatusButton.Text = "No movie is active";
//
// StatusBarMessageLabel
//
this.StatusBarMessageLabel.Name = "StatusBarMessageLabel";
this.StatusBarMessageLabel.Size = new System.Drawing.Size(35, 17);
this.StatusBarMessageLabel.Text = "Hello";
//
// contextMenuStrip1
//
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.RecordMovieContextMenuItem,
this.PlayMovieContextMenuItem,
this.RestartMovieContextMenuItem,
this.StopMovieContextMenuItem,
this.LoadLastMovieContextMenuItem});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(161, 114);
this.contextMenuStrip1.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStrip1_Opening);
//
// RecordMovieContextMenuItem
//
this.RecordMovieContextMenuItem.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.RecordHS;
this.RecordMovieContextMenuItem.Name = "RecordMovieContextMenuItem";
this.RecordMovieContextMenuItem.Size = new System.Drawing.Size(160, 22);
this.RecordMovieContextMenuItem.Text = "Record Movie";
this.RecordMovieContextMenuItem.Click += new System.EventHandler(this.RecordMovieMenuItem_Click);
//
// PlayMovieContextMenuItem
//
this.PlayMovieContextMenuItem.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.Play;
this.PlayMovieContextMenuItem.Name = "PlayMovieContextMenuItem";
this.PlayMovieContextMenuItem.Size = new System.Drawing.Size(160, 22);
this.PlayMovieContextMenuItem.Text = "Play Movie";
this.PlayMovieContextMenuItem.Click += new System.EventHandler(this.PlayMovieMenuItem_Click);
//
// LoadLastMovieContextMenuItem
//
this.LoadLastMovieContextMenuItem.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.Recent;
this.LoadLastMovieContextMenuItem.Name = "LoadLastMovieContextMenuItem";
this.LoadLastMovieContextMenuItem.Size = new System.Drawing.Size(160, 22);
this.LoadLastMovieContextMenuItem.Text = "Load Last Movie";
this.LoadLastMovieContextMenuItem.Click += new System.EventHandler(this.LoadLastMovieMenuItem_Click);
//
// StopMovieContextMenuItem
//
this.StopMovieContextMenuItem.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.Stop;
this.StopMovieContextMenuItem.Name = "StopMovieContextMenuItem";
this.StopMovieContextMenuItem.Size = new System.Drawing.Size(160, 22);
this.StopMovieContextMenuItem.Text = "Stop Movie";
this.StopMovieContextMenuItem.Click += new System.EventHandler(this.StopMovieMenuItem_Click);
//
// RestartMovieContextMenuItem
//
this.RestartMovieContextMenuItem.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.restart;
this.RestartMovieContextMenuItem.Name = "RestartMovieContextMenuItem";
this.RestartMovieContextMenuItem.Size = new System.Drawing.Size(160, 22);
this.RestartMovieContextMenuItem.Text = "Restart Movie";
this.RestartMovieContextMenuItem.Click += new System.EventHandler(this.RestartMovieMenuItem_Click);
//
// Mainform
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(655, 431);
this.ContextMenuStrip = this.contextMenuStrip1;
this.Controls.Add(this.WorkspacePanel);
this.Controls.Add(this.MainformMenu);
this.MainMenuStrip = this.MainformMenu;
this.Name = "Mainform";
this.Text = "MultiHawk";
this.Load += new System.EventHandler(this.Mainform_Load);
this.MainformMenu.ResumeLayout(false);
this.MainformMenu.PerformLayout();
this.WorkspacePanel.ResumeLayout(false);
this.WorkspacePanel.PerformLayout();
this.MainStatusBar.ResumeLayout(false);
this.MainStatusBar.PerformLayout();
this.contextMenuStrip1.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private MenuStripEx MainformMenu;
private System.Windows.Forms.ToolStripMenuItem FileSubMenu;
private System.Windows.Forms.ToolStripMenuItem OpenRomMenuItem;
private System.Windows.Forms.Panel WorkspacePanel;
private System.Windows.Forms.StatusStrip MainStatusBar;
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;
private System.Windows.Forms.ToolStripStatusLabel FameStatusBarLabel;
private System.Windows.Forms.ToolStripStatusLabel StatusBarMessageLabel;
private System.Windows.Forms.ToolStripMenuItem RecentRomSubMenu;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripMenuItem MovieSubMenu;
private System.Windows.Forms.ToolStripMenuItem RecordMovieMenuItem;
private System.Windows.Forms.ToolStripMenuItem PlayMovieMenuItem;
private System.Windows.Forms.ToolStripMenuItem StopMovieMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
private System.Windows.Forms.ToolStripMenuItem ToggleReadonlyMenuItem;
private System.Windows.Forms.ToolStripDropDownButton PlayRecordStatusButton;
private System.Windows.Forms.ToolStripMenuItem configToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem controllerConfigToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem hotkeyConfigToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
private System.Windows.Forms.ToolStripMenuItem ExitMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
private System.Windows.Forms.ToolStripMenuItem saveConfigToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator5;
private System.Windows.Forms.ToolStripMenuItem RebootCoresMenuItem;
private System.Windows.Forms.ToolStripMenuItem OpenSessionMenuItem;
private System.Windows.Forms.ToolStripMenuItem SaveSessionMenuItem;
private System.Windows.Forms.ToolStripMenuItem RecentSessionSubMenu;
private System.Windows.Forms.ToolStripMenuItem NewSessionMenuItem;
private System.Windows.Forms.ToolStripMenuItem SaveSessionAsMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator6;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator7;
private System.Windows.Forms.ToolStripMenuItem ViewSubMenu;
private System.Windows.Forms.ToolStripMenuItem _1xMenuItem;
private System.Windows.Forms.ToolStripMenuItem _2xMenuItem;
private System.Windows.Forms.ToolStripMenuItem _3xMenuItem;
private System.Windows.Forms.ToolStripMenuItem _4xMenuItem;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.ToolStripMenuItem LoadLastMovieContextMenuItem;
private System.Windows.Forms.ToolStripMenuItem RecentMovieSubMenu;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator8;
private System.Windows.Forms.ToolStripMenuItem RecordMovieContextMenuItem;
private System.Windows.Forms.ToolStripMenuItem StopMovieContextMenuItem;
private System.Windows.Forms.ToolStripMenuItem PlayMovieContextMenuItem;
private System.Windows.Forms.ToolStripMenuItem RestartMovieMenuItem;
private System.Windows.Forms.ToolStripMenuItem RestartMovieContextMenuItem;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,132 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="MainformMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="MainStatusBar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>153, 17</value>
</metadata>
<metadata name="MainStatusBar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>153, 17</value>
</metadata>
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>283, 17</value>
</metadata>
</root>

View File

@ -1,64 +0,0 @@
using System;
using System.Drawing;
using sd=System.Drawing;
using sysdrawingfont=System.Drawing.Font;
using sysdrawing2d=System.Drawing.Drawing2D;
using System.IO;
using System.Threading;
using System.Windows.Forms;
#if WINDOWS
using SlimDX;
#endif
using BizHawk.Client.Common;
using BizHawk.Bizware.BizwareGL;
using OpenTK.Graphics.OpenGL;
namespace BizHawk.Client.MultiHawk
{
/// <summary>
/// Thinly wraps a BizwareGL.GraphicsControl for EmuHawk's needs
/// </summary>
public class PresentationPanel
{
public PresentationPanel(Form parent, IGL gl)
{
GL = gl;
GraphicsControl = new GraphicsControl(GL);
GraphicsControl.Dock = DockStyle.Fill;
GraphicsControl.BackColor = Color.Black;
//pass through these events to the form. we might need a more scalable solution for mousedown etc. for zapper and whatnot.
//http://stackoverflow.com/questions/547172/pass-through-mouse-events-to-parent-control (HTTRANSPARENT)
// TODO
//GraphicsControl.MouseClick += (o, e) => GlobalWin.MainForm.MainForm_MouseClick(o, e);
}
bool IsDisposed = false;
public void Dispose()
{
if (IsDisposed) return;
IsDisposed = true;
GraphicsControl.Dispose();
}
//graphics resources
public IGL GL { get; set; }
public GraphicsControl GraphicsControl;
public Control Control { get { return GraphicsControl; } }
public static implicit operator Control(PresentationPanel self) { return self.GraphicsControl; }
public bool Resized { get; set; }
public Size NativeSize { get { return GraphicsControl.ClientSize; } }
}
public interface IBlitterFont { }
}

View File

@ -1,171 +0,0 @@
using System;
using System.IO;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Windows.Forms;
#if WINDOWS
using SlimDX.DirectSound;
using Microsoft.VisualBasic.ApplicationServices;
#endif
using BizHawk.Common;
using BizHawk.Client.Common;
namespace BizHawk.Client.MultiHawk
{
static class Program
{
static Program()
{
//http://www.codeproject.com/Articles/310675/AppDomain-AssemblyResolve-Event-Tips
#if WINDOWS
// this will look in subdirectory "dll" to load pinvoked stuff
string dllDir = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "dll");
SetDllDirectory(dllDir);
//in case assembly resolution fails, such as if we moved them into the dll subdiretory, this event handler can reroute to them
AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve);
//but before we even try doing that, whack the MOTW from everything in that directory (thats a dll)
//otherwise, some people will have crashes at boot-up due to .net security disliking MOTW.
//some people are getting MOTW through a combination of browser used to download bizhawk, and program used to dearchive it
WhackAllMOTW(dllDir);
#endif
}
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
SubMain(args);
}
//NoInlining should keep this code from getting jammed into Main() which would create dependencies on types which havent been setup by the resolver yet... or something like that
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
static void SubMain(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
string iniPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "config.ini");
Global.Config = ConfigService.Load<Config>(iniPath);
Global.Config.ResolveDefaults();
HawkFile.ArchiveHandlerFactory = new SevenZipSharpArchiveHandler();
//super hacky! this needs to be done first. still not worth the trouble to make this system fully proper
for (int i = 0; i < args.Length; i++)
{
var arg = args[i].ToLower();
if (arg.StartsWith("--gdi"))
{
Global.Config.DispMethod = Config.EDispMethod.GdiPlus;
}
}
//WHY do we have to do this? some intel graphics drivers (ig7icd64.dll 10.18.10.3304 on an unknown chip on win8.1) are calling SetDllDirectory() for the process, which ruins stuff.
//The relevant initialization happened just before in "create IGL context".
//It isn't clear whether we need the earlier SetDllDirectory(), but I think we do.
//note: this is pasted instead of being put in a static method due to this initialization code being sensitive to things like that, and not wanting to cause it to break
//pasting should be safe (not affecting the jit order of things)
string dllDir = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "dll");
SetDllDirectory(dllDir);
try
{
using (var mf = new Mainform(args))
{
var title = mf.Text;
mf.Show();
mf.Text = title;
try
{
mf.ProgramRunLoop();
}
catch (Exception e) when (Global.MovieSession.Movie.IsActive)
{
var result = MessageBox.Show(
"EmuHawk has thrown a fatal exception and is about to close.\nA movie has been detected. Would you like to try to save?\n(Note: Depending on what caused this error, this may or may not succeed)",
"Fatal error: " + e.GetType().Name,
MessageBoxButtons.YesNo,
MessageBoxIcon.Exclamation
);
if (result == DialogResult.Yes)
{
Global.MovieSession.Movie.Save();
}
}
}
}
catch (Exception e)
{
string message = e.ToString();
if (e.InnerException != null)
{
message += "\n\nInner Exception:\n\n" + e.InnerException;
}
message += "\n\nStackTrace:\n" + e.StackTrace;
MessageBox.Show(message);
}
#if WINDOWS
finally
{
GamePad.CloseAll();
}
#endif
}
static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
{
lock (AppDomain.CurrentDomain)
{
var asms = AppDomain.CurrentDomain.GetAssemblies();
foreach (var asm in asms)
if (asm.FullName == args.Name)
return asm;
//load missing assemblies by trying to find them in the dll directory
string dllname = new AssemblyName(args.Name).Name + ".dll";
string directory = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "dll");
string fname = Path.Combine(directory, dllname);
if (!File.Exists(fname)) return null;
//it is important that we use LoadFile here and not load from a byte array; otherwise mixed (managed/unamanged) assemblies can't load
return Assembly.LoadFile(fname);
}
}
//declared here instead of a more usual place to avoid dependencies on the more usual place
#if WINDOWS
[DllImport("kernel32.dll", SetLastError = true)]
static extern uint SetDllDirectory(string lpPathName);
[DllImport("kernel32.dll", EntryPoint = "DeleteFileW", SetLastError = true, CharSet = CharSet.Unicode, ExactSpelling = true)]
static extern bool DeleteFileW([MarshalAs(UnmanagedType.LPWStr)]string lpFileName);
static void RemoveMOTW(string path)
{
DeleteFileW(path + ":Zone.Identifier");
}
static void WhackAllMOTW(string dllDir)
{
var todo = new Queue<DirectoryInfo>(new[] { new DirectoryInfo(dllDir) });
while (todo.Count > 0)
{
var di = todo.Dequeue();
foreach (var disub in di.GetDirectories()) todo.Enqueue(disub);
foreach (var fi in di.GetFiles("*.dll"))
RemoveMOTW(fi.FullName);
foreach (var fi in di.GetFiles("*.exe"))
RemoveMOTW(fi.FullName);
}
}
#endif
}
}

View File

@ -1,36 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("BizHawk.Client.MultiHawk")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("BizHawk.Client.MultiHawk")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("fcf20c42-6452-46c7-bb88-bc9f5bd0ce71")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -1,293 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.34209
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace BizHawk.Client.MultiHawk.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("BizHawk.Client.MultiHawk.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Blank {
get {
object obj = ResourceManager.GetObject("Blank", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
internal static byte[] courier16px {
get {
object obj = ResourceManager.GetObject("courier16px", resourceCulture);
return ((byte[])(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap courier16px_0 {
get {
object obj = ResourceManager.GetObject("courier16px_0", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
internal static byte[] courier16px1 {
get {
object obj = ResourceManager.GetObject("courier16px1", resourceCulture);
return ((byte[])(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap CutHS {
get {
object obj = ResourceManager.GetObject("CutHS", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap ExclamationRed {
get {
object obj = ResourceManager.GetObject("ExclamationRed", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap GameController {
get {
object obj = ResourceManager.GetObject("GameController", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap GreenCheck {
get {
object obj = ResourceManager.GetObject("GreenCheck", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Help {
get {
object obj = ResourceManager.GetObject("Help", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap HotKeys {
get {
object obj = ResourceManager.GetObject("HotKeys", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap OpenFile {
get {
object obj = ResourceManager.GetObject("OpenFile", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Pause {
get {
object obj = ResourceManager.GetObject("Pause", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Play {
get {
object obj = ResourceManager.GetObject("Play", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap ReadOnly {
get {
object obj = ResourceManager.GetObject("ReadOnly", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap reboot {
get {
object obj = ResourceManager.GetObject("reboot", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Recent {
get {
object obj = ResourceManager.GetObject("Recent", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap RecordHS {
get {
object obj = ResourceManager.GetObject("RecordHS", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap restart {
get {
object obj = ResourceManager.GetObject("restart", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Save {
get {
object obj = ResourceManager.GetObject("Save", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap SaveAllHS {
get {
object obj = ResourceManager.GetObject("SaveAllHS", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap SaveAs {
get {
object obj = ResourceManager.GetObject("SaveAs", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Scan {
get {
object obj = ResourceManager.GetObject("Scan", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap Stop {
get {
object obj = ResourceManager.GetObject("Stop", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

View File

@ -1,190 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="Blank" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\Blank.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="courier16px" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\courier16px.bmfc;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="courier16px1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\courier16px.fnt;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="courier16px_0" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\courier16px_0.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="CutHS" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\CutHS.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ExclamationRed" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\ExclamationRed.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="GreenCheck" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\GreenCheck.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="OpenFile" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\OpenFile.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Pause" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\Pause.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Play" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\Play.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ReadOnly" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\ReadOnly.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="reboot" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\reboot.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Recent" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\Recent.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="RecordHS" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\RecordHS.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="SaveAllHS" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\SaveAllHS.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="SaveAs" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\SaveAs.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Scan" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\Scan.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Stop" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\Stop.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="GameController" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\GameController.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Help" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\Help.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="HotKeys" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\HotKeys.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Save" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\Save.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="restart" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\images\restart.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View File

@ -1,26 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace BizHawk.Client.MultiHawk.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}

View File

@ -1,7 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

View File

@ -1,55 +0,0 @@
# AngelCode Bitmap Font Generator configuration file
fileVersion=1
# font settings
fontName=Courier
fontFile=
charSet=0
fontSize=16
aa=1
scaleH=100
useSmoothing=0
isBold=1
isItalic=0
useUnicode=1
disableBoxChars=1
outputInvalidCharGlyph=1
dontIncludeKerningPairs=0
useHinting=1
renderFromOutline=0
useClearType=1
# character alignment
paddingDown=0
paddingUp=0
paddingRight=0
paddingLeft=0
spacingHoriz=1
spacingVert=1
useFixedHeight=0
forceZero=0
# output file
outWidth=128
outHeight=256
outBitDepth=32
fontDescFormat=1
fourChnlPacked=0
textureFormat=png
textureCompression=0
alphaChnl=0
redChnl=4
greenChnl=4
blueChnl=4
invA=0
invR=0
invG=0
invB=0
# outline
outlineThickness=0
# selected chars
chars=32-127,129,141,143-144,157,160-255
# imported icon images

View File

@ -1,208 +0,0 @@
<?xml version="1.0"?>
<font>
<info face="Courier" size="16" bold="1" italic="0" charset="" unicode="1" stretchH="100" smooth="0" aa="1" padding="0,0,0,0" spacing="1,1" outline="0"/>
<common lineHeight="16" base="13" scaleW="128" scaleH="256" pages="1" packed="0" alphaChnl="0" redChnl="4" greenChnl="4" blueChnl="4"/>
<pages>
<page id="0" file="courier16px_0.png" />
</pages>
<chars count="198">
<char id="-1" x="126" y="73" width="1" height="1" xoffset="0" yoffset="0" xadvance="0" page="0" chnl="15" />
<char id="32" x="83" y="137" width="30" height="1" xoffset="-10" yoffset="15" xadvance="10" page="0" chnl="15" />
<char id="33" x="124" y="95" width="2" height="10" xoffset="4" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="34" x="15" y="137" width="5" height="4" xoffset="3" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="35" x="93" y="52" width="9" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="36" x="72" y="28" width="8" height="12" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="37" x="83" y="52" width="9" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="38" x="73" y="53" width="9" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="39" x="125" y="115" width="2" height="4" xoffset="4" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="40" x="61" y="28" width="4" height="13" xoffset="4" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="41" x="56" y="28" width="4" height="13" xoffset="3" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="42" x="106" y="124" width="8" height="5" xoffset="1" yoffset="5" xadvance="10" page="0" chnl="15" />
<char id="43" x="72" y="127" width="8" height="7" xoffset="1" yoffset="5" xadvance="10" page="0" chnl="15" />
<char id="44" x="38" y="135" width="5" height="3" xoffset="3" yoffset="11" xadvance="10" page="0" chnl="15" />
<char id="45" x="106" y="130" width="7" height="1" xoffset="2" yoffset="8" xadvance="10" page="0" chnl="15" />
<char id="46" x="49" y="135" width="3" height="2" xoffset="4" yoffset="11" xadvance="10" page="0" chnl="15" />
<char id="47" x="100" y="107" width="9" height="8" xoffset="1" yoffset="4" xadvance="10" page="0" chnl="15" />
<char id="48" x="52" y="97" width="7" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="49" x="58" y="108" width="6" height="10" xoffset="3" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="50" x="0" y="109" width="7" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="51" x="8" y="109" width="7" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="52" x="60" y="97" width="7" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="53" x="76" y="97" width="7" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="54" x="92" y="96" width="7" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="55" x="100" y="96" width="7" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="56" x="44" y="97" width="7" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="57" x="116" y="95" width="7" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="58" x="121" y="115" width="3" height="7" xoffset="4" yoffset="6" xadvance="10" page="0" chnl="15" />
<char id="59" x="7" y="120" width="5" height="8" xoffset="3" yoffset="6" xadvance="10" page="0" chnl="15" />
<char id="60" x="93" y="107" width="6" height="9" xoffset="2" yoffset="4" xadvance="10" page="0" chnl="15" />
<char id="61" x="30" y="136" width="7" height="3" xoffset="2" yoffset="7" xadvance="10" page="0" chnl="15" />
<char id="62" x="86" y="108" width="6" height="9" xoffset="2" yoffset="4" xadvance="10" page="0" chnl="15" />
<char id="63" x="84" y="97" width="7" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="64" x="90" y="28" width="9" height="11" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="65" x="11" y="53" width="10" height="10" xoffset="0" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="66" x="27" y="75" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="67" x="36" y="75" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="68" x="45" y="75" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="69" x="54" y="75" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="70" x="63" y="75" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="71" x="0" y="65" width="9" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="72" x="0" y="54" width="10" height="10" xoffset="0" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="73" x="51" y="108" width="6" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="74" x="20" y="64" width="9" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="75" x="30" y="64" width="9" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="76" x="72" y="75" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="77" x="107" y="40" width="10" height="10" xoffset="0" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="78" x="19" y="42" width="10" height="10" xoffset="0" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="79" x="81" y="75" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="80" x="40" y="64" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="81" x="81" y="28" width="8" height="12" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="82" x="53" y="53" width="9" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="83" x="90" y="74" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="84" x="41" y="42" width="10" height="10" xoffset="0" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="85" x="22" y="53" width="10" height="10" xoffset="0" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="86" x="63" y="42" width="10" height="10" xoffset="0" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="87" x="74" y="41" width="10" height="10" xoffset="0" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="88" x="85" y="41" width="10" height="10" xoffset="0" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="89" x="96" y="40" width="10" height="10" xoffset="0" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="90" x="99" y="74" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="91" x="51" y="28" width="4" height="13" xoffset="4" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="92" x="110" y="106" width="9" height="8" xoffset="1" yoffset="4" xadvance="10" page="0" chnl="15" />
<char id="93" x="123" y="14" width="4" height="13" xoffset="3" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="94" x="115" y="123" width="8" height="4" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="95" x="114" y="135" width="10" height="1" xoffset="0" yoffset="14" xadvance="10" page="0" chnl="15" />
<char id="96" x="53" y="135" width="3" height="2" xoffset="3" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="97" x="18" y="128" width="8" height="7" xoffset="1" yoffset="6" xadvance="10" page="0" chnl="15" />
<char id="98" x="108" y="73" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="99" x="0" y="129" width="8" height="7" xoffset="1" yoffset="6" xadvance="10" page="0" chnl="15" />
<char id="100" x="117" y="73" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="101" x="103" y="116" width="8" height="7" xoffset="1" yoffset="6" xadvance="10" page="0" chnl="15" />
<char id="102" x="36" y="97" width="7" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="103" x="0" y="87" width="8" height="10" xoffset="1" yoffset="6" xadvance="10" page="0" chnl="15" />
<char id="104" x="9" y="87" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="105" x="30" y="108" width="6" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="106" x="121" y="0" width="6" height="13" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="107" x="18" y="76" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="108" x="23" y="109" width="6" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="109" x="46" y="119" width="10" height="7" xoffset="0" yoffset="6" xadvance="10" page="0" chnl="15" />
<char id="110" x="76" y="118" width="8" height="7" xoffset="1" yoffset="6" xadvance="10" page="0" chnl="15" />
<char id="111" x="63" y="127" width="8" height="7" xoffset="1" yoffset="6" xadvance="10" page="0" chnl="15" />
<char id="112" x="18" y="87" width="8" height="10" xoffset="1" yoffset="6" xadvance="10" page="0" chnl="15" />
<char id="113" x="27" y="86" width="8" height="10" xoffset="1" yoffset="6" xadvance="10" page="0" chnl="15" />
<char id="114" x="57" y="119" width="9" height="7" xoffset="1" yoffset="6" xadvance="10" page="0" chnl="15" />
<char id="115" x="9" y="129" width="8" height="7" xoffset="1" yoffset="6" xadvance="10" page="0" chnl="15" />
<char id="116" x="68" y="108" width="8" height="9" xoffset="1" yoffset="4" xadvance="10" page="0" chnl="15" />
<char id="117" x="94" y="117" width="8" height="7" xoffset="1" yoffset="6" xadvance="10" page="0" chnl="15" />
<char id="118" x="24" y="120" width="10" height="7" xoffset="0" yoffset="6" xadvance="10" page="0" chnl="15" />
<char id="119" x="35" y="119" width="10" height="7" xoffset="0" yoffset="6" xadvance="10" page="0" chnl="15" />
<char id="120" x="54" y="127" width="8" height="7" xoffset="1" yoffset="6" xadvance="10" page="0" chnl="15" />
<char id="121" x="8" y="42" width="10" height="10" xoffset="0" yoffset="6" xadvance="10" page="0" chnl="15" />
<char id="122" x="27" y="128" width="8" height="7" xoffset="1" yoffset="6" xadvance="10" page="0" chnl="15" />
<char id="123" x="9" y="28" width="6" height="13" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="124" x="66" y="28" width="2" height="13" xoffset="4" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="125" x="37" y="28" width="6" height="13" xoffset="3" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="126" x="21" y="136" width="8" height="3" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="127" x="123" y="51" width="4" height="10" xoffset="3" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="129" x="92" y="133" width="30" height="1" xoffset="-10" yoffset="15" xadvance="10" page="0" chnl="15" />
<char id="141" x="52" y="140" width="30" height="1" xoffset="-10" yoffset="15" xadvance="10" page="0" chnl="15" />
<char id="143" x="21" y="140" width="30" height="1" xoffset="-10" yoffset="15" xadvance="10" page="0" chnl="15" />
<char id="144" x="61" y="135" width="30" height="1" xoffset="-10" yoffset="15" xadvance="10" page="0" chnl="15" />
<char id="157" x="83" y="139" width="30" height="1" xoffset="-10" yoffset="15" xadvance="10" page="0" chnl="15" />
<char id="160" x="52" y="138" width="30" height="1" xoffset="-10" yoffset="15" xadvance="10" page="0" chnl="15" />
<char id="161" x="65" y="108" width="2" height="10" xoffset="4" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="162" x="0" y="42" width="7" height="11" xoffset="2" yoffset="4" xadvance="10" page="0" chnl="15" />
<char id="163" x="68" y="97" width="7" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="164" x="81" y="126" width="7" height="6" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="165" x="30" y="42" width="10" height="10" xoffset="0" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="166" x="69" y="28" width="2" height="13" xoffset="4" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="167" x="110" y="28" width="8" height="11" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="168" x="100" y="135" width="5" height="1" xoffset="3" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="169" x="10" y="65" width="9" height="10" xoffset="1" yoffset="2" xadvance="10" page="0" chnl="15" />
<char id="170" x="120" y="106" width="7" height="8" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="171" x="67" y="119" width="8" height="7" xoffset="1" yoffset="5" xadvance="10" page="0" chnl="15" />
<char id="172" x="0" y="137" width="8" height="4" xoffset="1" yoffset="7" xadvance="10" page="0" chnl="15" />
<char id="173" x="92" y="135" width="7" height="1" xoffset="2" yoffset="8" xadvance="10" page="0" chnl="15" />
<char id="174" x="33" y="53" width="9" height="10" xoffset="1" yoffset="2" xadvance="10" page="0" chnl="15" />
<char id="175" x="81" y="133" width="10" height="1" xoffset="0" yoffset="1" xadvance="10" page="0" chnl="15" />
<char id="176" x="9" y="137" width="5" height="4" xoffset="3" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="177" x="77" y="108" width="8" height="9" xoffset="1" yoffset="4" xadvance="10" page="0" chnl="15" />
<char id="178" x="95" y="125" width="5" height="6" xoffset="3" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="179" x="89" y="126" width="5" height="6" xoffset="3" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="180" x="57" y="135" width="3" height="2" xoffset="4" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="181" x="100" y="28" width="9" height="11" xoffset="1" yoffset="5" xadvance="10" page="0" chnl="15" />
<char id="182" x="63" y="53" width="9" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="183" x="124" y="123" width="3" height="2" xoffset="4" yoffset="7" xadvance="10" page="0" chnl="15" />
<char id="184" x="44" y="135" width="4" height="3" xoffset="3" yoffset="13" xadvance="10" page="0" chnl="15" />
<char id="185" x="101" y="125" width="4" height="6" xoffset="3" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="186" x="0" y="120" width="6" height="8" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="187" x="85" y="118" width="8" height="7" xoffset="1" yoffset="5" xadvance="10" page="0" chnl="15" />
<char id="188" x="103" y="51" width="9" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="189" x="118" y="40" width="9" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="190" x="113" y="51" width="9" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="191" x="108" y="95" width="7" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="192" x="88" y="0" width="10" height="13" xoffset="0" yoffset="0" xadvance="10" page="0" chnl="15" />
<char id="193" x="11" y="0" width="10" height="13" xoffset="0" yoffset="0" xadvance="10" page="0" chnl="15" />
<char id="194" x="22" y="0" width="10" height="13" xoffset="0" yoffset="0" xadvance="10" page="0" chnl="15" />
<char id="195" x="22" y="14" width="10" height="13" xoffset="0" yoffset="0" xadvance="10" page="0" chnl="15" />
<char id="196" x="11" y="14" width="10" height="13" xoffset="0" yoffset="0" xadvance="10" page="0" chnl="15" />
<char id="197" x="0" y="14" width="10" height="13" xoffset="0" yoffset="0" xadvance="10" page="0" chnl="15" />
<char id="198" x="52" y="42" width="10" height="10" xoffset="0" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="199" x="42" y="14" width="8" height="13" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="200" x="96" y="14" width="8" height="13" xoffset="1" yoffset="0" xadvance="10" page="0" chnl="15" />
<char id="201" x="87" y="14" width="8" height="13" xoffset="1" yoffset="0" xadvance="10" page="0" chnl="15" />
<char id="202" x="78" y="14" width="8" height="13" xoffset="1" yoffset="0" xadvance="10" page="0" chnl="15" />
<char id="203" x="69" y="14" width="8" height="13" xoffset="1" yoffset="0" xadvance="10" page="0" chnl="15" />
<char id="204" x="44" y="28" width="6" height="13" xoffset="2" yoffset="0" xadvance="10" page="0" chnl="15" />
<char id="205" x="23" y="28" width="6" height="13" xoffset="2" yoffset="0" xadvance="10" page="0" chnl="15" />
<char id="206" x="16" y="28" width="6" height="13" xoffset="2" yoffset="0" xadvance="10" page="0" chnl="15" />
<char id="207" x="30" y="28" width="6" height="13" xoffset="2" yoffset="0" xadvance="10" page="0" chnl="15" />
<char id="208" x="43" y="53" width="9" height="10" xoffset="0" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="209" x="99" y="0" width="10" height="13" xoffset="0" yoffset="0" xadvance="10" page="0" chnl="15" />
<char id="210" x="60" y="14" width="8" height="13" xoffset="1" yoffset="0" xadvance="10" page="0" chnl="15" />
<char id="211" x="51" y="14" width="8" height="13" xoffset="1" yoffset="0" xadvance="10" page="0" chnl="15" />
<char id="212" x="0" y="28" width="8" height="13" xoffset="1" yoffset="0" xadvance="10" page="0" chnl="15" />
<char id="213" x="114" y="14" width="8" height="13" xoffset="1" yoffset="0" xadvance="10" page="0" chnl="15" />
<char id="214" x="105" y="14" width="8" height="13" xoffset="1" yoffset="0" xadvance="10" page="0" chnl="15" />
<char id="215" x="112" y="115" width="8" height="7" xoffset="1" yoffset="5" xadvance="10" page="0" chnl="15" />
<char id="216" x="45" y="86" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="217" x="110" y="0" width="10" height="13" xoffset="0" yoffset="0" xadvance="10" page="0" chnl="15" />
<char id="218" x="0" y="0" width="10" height="13" xoffset="0" yoffset="0" xadvance="10" page="0" chnl="15" />
<char id="219" x="44" y="0" width="10" height="13" xoffset="0" yoffset="0" xadvance="10" page="0" chnl="15" />
<char id="220" x="77" y="0" width="10" height="13" xoffset="0" yoffset="0" xadvance="10" page="0" chnl="15" />
<char id="221" x="55" y="0" width="10" height="13" xoffset="0" yoffset="0" xadvance="10" page="0" chnl="15" />
<char id="222" x="54" y="86" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="223" x="63" y="86" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="224" x="72" y="86" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="225" x="81" y="86" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="226" x="90" y="85" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="227" x="99" y="85" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="228" x="108" y="84" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="229" x="119" y="28" width="8" height="11" xoffset="1" yoffset="2" xadvance="10" page="0" chnl="15" />
<char id="230" x="13" y="120" width="10" height="7" xoffset="0" yoffset="6" xadvance="10" page="0" chnl="15" />
<char id="231" x="117" y="84" width="8" height="10" xoffset="1" yoffset="6" xadvance="10" page="0" chnl="15" />
<char id="232" x="36" y="86" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="233" x="0" y="98" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="234" x="9" y="98" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="235" x="18" y="98" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="236" x="44" y="108" width="6" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="237" x="37" y="108" width="6" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="238" x="16" y="109" width="6" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="239" x="121" y="62" width="6" height="10" xoffset="2" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="240" x="27" y="97" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="241" x="49" y="64" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="242" x="58" y="64" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="243" x="67" y="64" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="244" x="76" y="64" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="245" x="85" y="63" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="246" x="94" y="63" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="247" x="36" y="127" width="8" height="7" xoffset="1" yoffset="5" xadvance="10" page="0" chnl="15" />
<char id="248" x="45" y="127" width="8" height="7" xoffset="1" yoffset="6" xadvance="10" page="0" chnl="15" />
<char id="249" x="103" y="62" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="250" x="112" y="62" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="251" x="0" y="76" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="252" x="9" y="76" width="8" height="10" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="253" x="66" y="0" width="10" height="13" xoffset="0" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="254" x="33" y="14" width="8" height="13" xoffset="1" yoffset="3" xadvance="10" page="0" chnl="15" />
<char id="255" x="33" y="0" width="10" height="13" xoffset="0" yoffset="3" xadvance="10" page="0" chnl="15" />
</chars>
</font>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 578 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 676 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 806 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 576 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 646 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 751 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 743 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 886 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 382 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 698 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 907 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 358 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 857 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 623 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 595 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 544 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 441 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1013 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 473 B

View File

@ -1,406 +0,0 @@
namespace BizHawk.Client.MultiHawk
{
partial class PlayMovie
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PlayMovie));
this.Cancel = new System.Windows.Forms.Button();
this.OK = new System.Windows.Forms.Button();
this.BrowseMovies = new System.Windows.Forms.Button();
this.DetailsView = new System.Windows.Forms.ListView();
this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeader6 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.SubtitlesBtn = new System.Windows.Forms.Button();
this.CommentsBtn = new System.Windows.Forms.Button();
this.MovieCount = new System.Windows.Forms.Label();
this.ReadOnlyCheckBox = new System.Windows.Forms.CheckBox();
this.IncludeSubDirectories = new System.Windows.Forms.CheckBox();
this.Scan = new System.Windows.Forms.Button();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.MatchHashCheckBox = new System.Windows.Forms.CheckBox();
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.StopOnFrameCheckbox = new System.Windows.Forms.CheckBox();
this.StopOnFrameTextBox = new BizHawk.Client.EmuHawk.WatchValueBox();
this.MovieView = new BizHawk.Client.EmuHawk.VirtualListView();
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.LastFrameCheckbox = new System.Windows.Forms.CheckBox();
this.TurboCheckbox = new System.Windows.Forms.CheckBox();
this.groupBox1.SuspendLayout();
this.contextMenuStrip1.SuspendLayout();
this.SuspendLayout();
//
// Cancel
//
this.Cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.Cancel.Location = new System.Drawing.Point(687, 363);
this.Cancel.Name = "Cancel";
this.Cancel.Size = new System.Drawing.Size(75, 23);
this.Cancel.TabIndex = 55;
this.Cancel.Text = "&Cancel";
this.Cancel.UseVisualStyleBackColor = true;
this.Cancel.Click += new System.EventHandler(this.Cancel_Click);
//
// OK
//
this.OK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.OK.Location = new System.Drawing.Point(606, 363);
this.OK.Name = "OK";
this.OK.Size = new System.Drawing.Size(75, 23);
this.OK.TabIndex = 50;
this.OK.Text = "&OK";
this.toolTip1.SetToolTip(this.OK, "Load selected movie");
this.OK.UseVisualStyleBackColor = true;
this.OK.Click += new System.EventHandler(this.Ok_Click);
//
// BrowseMovies
//
this.BrowseMovies.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.BrowseMovies.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.OpenFile;
this.BrowseMovies.Location = new System.Drawing.Point(12, 364);
this.BrowseMovies.Name = "BrowseMovies";
this.BrowseMovies.Size = new System.Drawing.Size(31, 23);
this.BrowseMovies.TabIndex = 25;
this.toolTip1.SetToolTip(this.BrowseMovies, "Browse for additional movie files");
this.BrowseMovies.UseVisualStyleBackColor = true;
this.BrowseMovies.Click += new System.EventHandler(this.BrowseMovies_Click);
//
// DetailsView
//
this.DetailsView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.DetailsView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.columnHeader5,
this.columnHeader6});
this.DetailsView.FullRowSelect = true;
this.DetailsView.GridLines = true;
this.DetailsView.HideSelection = false;
this.DetailsView.Location = new System.Drawing.Point(15, 19);
this.DetailsView.Name = "DetailsView";
this.DetailsView.Size = new System.Drawing.Size(228, 261);
this.DetailsView.TabIndex = 10;
this.toolTip1.SetToolTip(this.DetailsView, "Contains the header information for the selected movie");
this.DetailsView.UseCompatibleStateImageBehavior = false;
this.DetailsView.View = System.Windows.Forms.View.Details;
this.DetailsView.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.DetailsView_ColumnClick);
//
// columnHeader5
//
this.columnHeader5.Text = "Header";
this.columnHeader5.Width = 102;
//
// columnHeader6
//
this.columnHeader6.Text = "Value";
this.columnHeader6.Width = 121;
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Controls.Add(this.SubtitlesBtn);
this.groupBox1.Controls.Add(this.CommentsBtn);
this.groupBox1.Controls.Add(this.DetailsView);
this.groupBox1.Location = new System.Drawing.Point(503, 28);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(259, 322);
this.groupBox1.TabIndex = 6;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Details";
//
// SubtitlesBtn
//
this.SubtitlesBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.SubtitlesBtn.Enabled = false;
this.SubtitlesBtn.Location = new System.Drawing.Point(125, 286);
this.SubtitlesBtn.Name = "SubtitlesBtn";
this.SubtitlesBtn.Size = new System.Drawing.Size(75, 23);
this.SubtitlesBtn.TabIndex = 20;
this.SubtitlesBtn.Text = "Subtitles";
this.SubtitlesBtn.UseVisualStyleBackColor = true;
this.SubtitlesBtn.Click += new System.EventHandler(this.SubtitlesBtn_Click);
//
// CommentsBtn
//
this.CommentsBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.CommentsBtn.Enabled = false;
this.CommentsBtn.Location = new System.Drawing.Point(15, 286);
this.CommentsBtn.Name = "CommentsBtn";
this.CommentsBtn.Size = new System.Drawing.Size(75, 23);
this.CommentsBtn.TabIndex = 15;
this.CommentsBtn.Text = "Comments";
this.CommentsBtn.UseVisualStyleBackColor = true;
this.CommentsBtn.Click += new System.EventHandler(this.CommentsBtn_Click);
//
// MovieCount
//
this.MovieCount.AutoSize = true;
this.MovieCount.Location = new System.Drawing.Point(12, 9);
this.MovieCount.Name = "MovieCount";
this.MovieCount.Size = new System.Drawing.Size(31, 13);
this.MovieCount.TabIndex = 7;
this.MovieCount.Text = " ";
//
// ReadOnlyCheckBox
//
this.ReadOnlyCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.ReadOnlyCheckBox.AutoSize = true;
this.ReadOnlyCheckBox.Checked = true;
this.ReadOnlyCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.ReadOnlyCheckBox.Location = new System.Drawing.Point(503, 367);
this.ReadOnlyCheckBox.Name = "ReadOnlyCheckBox";
this.ReadOnlyCheckBox.Size = new System.Drawing.Size(74, 17);
this.ReadOnlyCheckBox.TabIndex = 45;
this.ReadOnlyCheckBox.Text = "Read only";
this.ReadOnlyCheckBox.UseVisualStyleBackColor = true;
//
// IncludeSubDirectories
//
this.IncludeSubDirectories.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.IncludeSubDirectories.AutoSize = true;
this.IncludeSubDirectories.Location = new System.Drawing.Point(94, 375);
this.IncludeSubDirectories.Name = "IncludeSubDirectories";
this.IncludeSubDirectories.Size = new System.Drawing.Size(131, 17);
this.IncludeSubDirectories.TabIndex = 35;
this.IncludeSubDirectories.Text = "Include Subdirectories";
this.IncludeSubDirectories.UseVisualStyleBackColor = true;
this.IncludeSubDirectories.CheckedChanged += new System.EventHandler(this.IncludeSubDirectories_CheckedChanged);
//
// Scan
//
this.Scan.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.Scan.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.Scan;
this.Scan.Location = new System.Drawing.Point(49, 364);
this.Scan.Name = "Scan";
this.Scan.Size = new System.Drawing.Size(27, 23);
this.Scan.TabIndex = 30;
this.toolTip1.SetToolTip(this.Scan, "Rescan Movie folder for movie files");
this.Scan.UseVisualStyleBackColor = true;
this.Scan.Click += new System.EventHandler(this.Scan_Click);
//
// MatchHashCheckBox
//
this.MatchHashCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.MatchHashCheckBox.AutoSize = true;
this.MatchHashCheckBox.Location = new System.Drawing.Point(94, 357);
this.MatchHashCheckBox.Name = "MatchHashCheckBox";
this.MatchHashCheckBox.Size = new System.Drawing.Size(147, 17);
this.MatchHashCheckBox.TabIndex = 56;
this.MatchHashCheckBox.Text = "Match current game hash";
this.MatchHashCheckBox.UseVisualStyleBackColor = true;
this.MatchHashCheckBox.CheckedChanged += new System.EventHandler(this.MatchHashCheckBox_CheckedChanged);
//
// contextMenuStrip1
//
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.editToolStripMenuItem});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(93, 26);
//
// editToolStripMenuItem
//
this.editToolStripMenuItem.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.CutHS;
this.editToolStripMenuItem.Name = "editToolStripMenuItem";
this.editToolStripMenuItem.Size = new System.Drawing.Size(92, 22);
this.editToolStripMenuItem.Text = "&Edit";
this.editToolStripMenuItem.Click += new System.EventHandler(this.EditMenuItem_Click);
//
// StopOnFrameCheckbox
//
this.StopOnFrameCheckbox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.StopOnFrameCheckbox.AutoSize = true;
this.StopOnFrameCheckbox.Location = new System.Drawing.Point(342, 357);
this.StopOnFrameCheckbox.Name = "StopOnFrameCheckbox";
this.StopOnFrameCheckbox.Size = new System.Drawing.Size(95, 17);
this.StopOnFrameCheckbox.TabIndex = 57;
this.StopOnFrameCheckbox.Text = "Stop on frame:";
this.StopOnFrameCheckbox.UseVisualStyleBackColor = true;
this.StopOnFrameCheckbox.CheckedChanged += new System.EventHandler(this.StopOnFrameCheckbox_CheckedChanged);
//
// StopOnFrameTextBox
//
this.StopOnFrameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.StopOnFrameTextBox.ByteSize = BizHawk.Client.Common.WatchSize.DWord;
this.StopOnFrameTextBox.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
this.StopOnFrameTextBox.Location = new System.Drawing.Point(438, 355);
this.StopOnFrameTextBox.MaxLength = 10;
this.StopOnFrameTextBox.Name = "StopOnFrameTextBox";
this.StopOnFrameTextBox.Nullable = true;
this.StopOnFrameTextBox.Size = new System.Drawing.Size(54, 20);
this.StopOnFrameTextBox.TabIndex = 58;
this.StopOnFrameTextBox.Type = BizHawk.Client.Common.DisplayType.Unsigned;
this.StopOnFrameTextBox.TextChanged += new System.EventHandler(this.StopOnFrameTextBox_TextChanged_1);
//
// MovieView
//
this.MovieView.AllowDrop = true;
this.MovieView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.MovieView.BlazingFast = false;
this.MovieView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.columnHeader1,
this.columnHeader2,
this.columnHeader3,
this.columnHeader4});
this.MovieView.ContextMenuStrip = this.contextMenuStrip1;
this.MovieView.FullRowSelect = true;
this.MovieView.GridLines = true;
this.MovieView.HideSelection = false;
this.MovieView.ItemCount = 0;
this.MovieView.Location = new System.Drawing.Point(12, 28);
this.MovieView.MultiSelect = false;
this.MovieView.Name = "MovieView";
this.MovieView.SelectAllInProgress = false;
this.MovieView.selectedItem = -1;
this.MovieView.Size = new System.Drawing.Size(480, 322);
this.MovieView.TabIndex = 5;
this.MovieView.UseCompatibleStateImageBehavior = false;
this.MovieView.UseCustomBackground = true;
this.MovieView.View = System.Windows.Forms.View.Details;
this.MovieView.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.MovieView_ColumnClick);
this.MovieView.SelectedIndexChanged += new System.EventHandler(this.MovieView_SelectedIndexChanged);
this.MovieView.DragDrop += new System.Windows.Forms.DragEventHandler(this.MovieView_DragDrop);
this.MovieView.DragEnter += new System.Windows.Forms.DragEventHandler(this.MovieView_DragEnter);
this.MovieView.DoubleClick += new System.EventHandler(this.MovieView_DoubleClick);
this.MovieView.KeyDown += new System.Windows.Forms.KeyEventHandler(this.MovieView_KeyDown);
//
// columnHeader1
//
this.columnHeader1.Text = "File";
this.columnHeader1.Width = 221;
//
// columnHeader2
//
this.columnHeader2.Text = "SysID";
this.columnHeader2.Width = 43;
//
// columnHeader3
//
this.columnHeader3.Text = "Game";
this.columnHeader3.Width = 129;
//
// columnHeader4
//
this.columnHeader4.Text = "Length (est.)";
this.columnHeader4.Width = 82;
//
// LastFrameCheckbox
//
this.LastFrameCheckbox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.LastFrameCheckbox.AutoSize = true;
this.LastFrameCheckbox.Location = new System.Drawing.Point(342, 376);
this.LastFrameCheckbox.Name = "LastFrameCheckbox";
this.LastFrameCheckbox.Size = new System.Drawing.Size(75, 17);
this.LastFrameCheckbox.TabIndex = 59;
this.LastFrameCheckbox.Text = "Last frame";
this.LastFrameCheckbox.UseVisualStyleBackColor = true;
this.LastFrameCheckbox.CheckedChanged += new System.EventHandler(this.LastFrameCheckbox_CheckedChanged);
//
// TurboCheckbox
//
this.TurboCheckbox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.TurboCheckbox.AutoSize = true;
this.TurboCheckbox.Location = new System.Drawing.Point(438, 376);
this.TurboCheckbox.Name = "TurboCheckbox";
this.TurboCheckbox.Size = new System.Drawing.Size(54, 17);
this.TurboCheckbox.TabIndex = 60;
this.TurboCheckbox.Text = "Turbo";
this.TurboCheckbox.UseVisualStyleBackColor = true;
//
// PlayMovie
//
this.AcceptButton = this.OK;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.Cancel;
this.ClientSize = new System.Drawing.Size(774, 398);
this.Controls.Add(this.TurboCheckbox);
this.Controls.Add(this.LastFrameCheckbox);
this.Controls.Add(this.StopOnFrameTextBox);
this.Controls.Add(this.StopOnFrameCheckbox);
this.Controls.Add(this.MatchHashCheckBox);
this.Controls.Add(this.Scan);
this.Controls.Add(this.IncludeSubDirectories);
this.Controls.Add(this.ReadOnlyCheckBox);
this.Controls.Add(this.MovieCount);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.MovieView);
this.Controls.Add(this.BrowseMovies);
this.Controls.Add(this.OK);
this.Controls.Add(this.Cancel);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.MinimumSize = new System.Drawing.Size(547, 228);
this.Name = "PlayMovie";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Play Movie";
this.Load += new System.EventHandler(this.PlayMovie_Load);
this.groupBox1.ResumeLayout(false);
this.contextMenuStrip1.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button Cancel;
private System.Windows.Forms.Button OK;
private System.Windows.Forms.Button BrowseMovies;
private BizHawk.Client.EmuHawk.VirtualListView MovieView;
private System.Windows.Forms.ColumnHeader columnHeader1;
private System.Windows.Forms.ColumnHeader columnHeader2;
private System.Windows.Forms.ColumnHeader columnHeader3;
private System.Windows.Forms.ColumnHeader columnHeader4;
private System.Windows.Forms.ListView DetailsView;
private System.Windows.Forms.ColumnHeader columnHeader5;
private System.Windows.Forms.ColumnHeader columnHeader6;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Button SubtitlesBtn;
private System.Windows.Forms.Button CommentsBtn;
private System.Windows.Forms.Label MovieCount;
private System.Windows.Forms.CheckBox ReadOnlyCheckBox;
private System.Windows.Forms.CheckBox IncludeSubDirectories;
private System.Windows.Forms.Button Scan;
private System.Windows.Forms.ToolTip toolTip1;
private System.Windows.Forms.CheckBox MatchHashCheckBox;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem;
private System.Windows.Forms.CheckBox StopOnFrameCheckbox;
private BizHawk.Client.EmuHawk.WatchValueBox StopOnFrameTextBox;
private System.Windows.Forms.CheckBox LastFrameCheckbox;
private System.Windows.Forms.CheckBox TurboCheckbox;
}
}

View File

@ -1,673 +0,0 @@
using System;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BizHawk.Client.Common;
using BizHawk.Common;
using BizHawk.Client.EmuHawk;
namespace BizHawk.Client.MultiHawk
{
public partial class PlayMovie : Form
{
private readonly PlatformFrameRates PlatformFrameRates = new PlatformFrameRates();
private List<IMovie> _movieList = new List<IMovie>();
private bool _sortReverse;
private string _sortedCol;
private bool _sortDetailsReverse;
private string _sortedDetailsCol;
public PlayMovie()
{
InitializeComponent();
MovieView.QueryItemText += MovieView_QueryItemText;
MovieView.VirtualMode = true;
_sortReverse = false;
_sortedCol = "";
_sortDetailsReverse = false;
_sortedDetailsCol = "";
}
private void PlayMovie_Load(object sender, EventArgs e)
{
IncludeSubDirectories.Checked = Global.Config.PlayMovie_IncludeSubdir;
MatchHashCheckBox.Checked = Global.Config.PlayMovie_MatchHash;
ScanFiles();
PreHighlightMovie();
TurboCheckbox.Checked = Global.Config.TurboSeek;
}
private void MovieView_QueryItemText(int index, int column, out string text)
{
text = "";
if (column == 0) // File
{
text = Path.GetFileName(_movieList[index].Filename);
}
if (column == 1) // System
{
text = _movieList[index].SystemID;
}
if (column == 2) // Game
{
text = _movieList[index].GameName;
}
if (column == 3) // Time
{
text = PlatformFrameRates.MovieTime(_movieList[index]).ToString(@"hh\:mm\:ss\.fff");
}
}
private void Run()
{
var indices = MovieView.SelectedIndices;
if (indices.Count > 0) // Import file if necessary
{
GlobalWin.MainForm.StartNewMovie(_movieList[MovieView.SelectedIndices[0]], false);
}
}
private int? AddMovieToList(string filename, bool force)
{
using (var file = new HawkFile(filename))
{
if (!file.Exists)
{
return null;
}
var index = IsDuplicateOf(filename);
if (!index.HasValue)
{
//System.Diagnostics.Stopwatch watch = new System.Diagnostics.Stopwatch(); watch.Start();
var movie = PreLoadMovieFile(file, force);
if (movie == null)
{
return null;
}
//watch.Stop(); Console.WriteLine("[{0}] {1}",watch.ElapsedMilliseconds,Path.GetFileName(filename));
lock (_movieList)
{
_movieList.Add(movie);
index = _movieList.Count - 1;
}
_sortReverse = false;
_sortedCol = "";
}
return index;
}
}
private int? IsDuplicateOf(string filename)
{
for (var i = 0; i < _movieList.Count; i++)
{
if (_movieList[i].Filename == filename)
{
return i;
}
}
return null;
}
private IMovie PreLoadMovieFile(HawkFile hf, bool force)
{
var movie = MovieService.Get(hf.CanonicalFullPath);
try
{
movie.PreLoadHeaderAndLength(hf);
// Don't do this from browse
if (movie.Hash == Global.Game.Hash ||
Global.Config.PlayMovie_MatchHash == false || force)
{
return movie;
}
}
catch (Exception ex)
{
// TODO: inform the user that a movie failed to parse in some way
Console.WriteLine(ex.Message);
}
return null;
}
private void UpdateList()
{
MovieView.Refresh();
MovieCount.Text = _movieList.Count + " movie"
+ (_movieList.Count != 1 ? "s" : "");
}
private void PreHighlightMovie()
{
if (Global.Game == null)
{
return;
}
var indices = new List<int>();
// Pull out matching names
for (var i = 0; i < _movieList.Count; i++)
{
if (PathManager.FilesystemSafeName(Global.Game) == _movieList[i].GameName)
{
indices.Add(i);
}
}
if (indices.Count == 0)
{
return;
}
if (indices.Count == 1)
{
HighlightMovie(indices[0]);
return;
}
// Prefer tas files
var tas = new List<int>();
for (var i = 0; i < indices.Count; i++)
{
foreach (var ext in MovieService.MovieExtensions)
{
if (Path.GetExtension(_movieList[indices[i]].Filename).ToUpper() == "." + ext)
{
tas.Add(i);
}
}
}
if (tas.Count == 1)
{
HighlightMovie(tas[0]);
return;
}
if (tas.Count > 1)
{
indices = new List<int>(tas);
}
// Final tie breaker - Last used file
var file = new FileInfo(_movieList[indices[0]].Filename);
var time = file.LastAccessTime;
var mostRecent = indices.First();
for (var i = 1; i < indices.Count; i++)
{
file = new FileInfo(_movieList[indices[0]].Filename);
if (file.LastAccessTime > time)
{
time = file.LastAccessTime;
mostRecent = indices[i];
}
}
HighlightMovie(mostRecent);
return;
}
private void HighlightMovie(int index)
{
MovieView.SelectedIndices.Clear();
MovieView.setSelection(index);
MovieView.SelectItem(index, true);
}
private void ScanFiles()
{
_movieList.Clear();
MovieView.ItemCount = 0;
MovieView.Update();
var directory = PathManager.MakeAbsolutePath(Global.Config.PathEntries.MoviesPathFragment, null);
if (!Directory.Exists(directory))
{
Directory.CreateDirectory(directory);
}
var dpTodo = new Queue<string>();
var fpTodo = new List<string>();
dpTodo.Enqueue(directory);
Dictionary<string, int> ordinals = new Dictionary<string, int>();
while (dpTodo.Count > 0)
{
string dp = dpTodo.Dequeue();
//enqueue subdirectories if appropriate
if (Global.Config.PlayMovie_IncludeSubdir)
foreach(var subdir in Directory.GetDirectories(dp))
dpTodo.Enqueue(subdir);
//add movies
fpTodo.AddRange(Directory.GetFiles(dp, "*." + MovieService.DefaultExtension));
fpTodo.AddRange(Directory.GetFiles(dp, "*." + TasMovie.Extension));
}
//in parallel, scan each movie
Parallel.For(0, fpTodo.Count, (i) =>
//for(int i=0;i<fpTodo.Count;i++)
{
var file = fpTodo[i];
lock(ordinals) ordinals[file] = i;
AddMovieToList(file, force: false);
}
);
//sort by the ordinal key to maintain relatively stable results when rescanning
_movieList.Sort((a, b) => ordinals[a.Filename].CompareTo(ordinals[b.Filename]));
RefreshMovieList();
}
#region Events
#region Movie List
void RefreshMovieList()
{
MovieView.ItemCount = _movieList.Count;
UpdateList();
}
private void MovieView_DragEnter(object sender, DragEventArgs e)
{
e.Effect = e.Data.GetDataPresent(DataFormats.FileDrop) ? DragDropEffects.Copy : DragDropEffects.None;
}
private void MovieView_DragDrop(object sender, DragEventArgs e)
{
var filePaths = (string[])e.Data.GetData(DataFormats.FileDrop);
foreach (var path in filePaths.Where(path => MovieService.MovieExtensions.Contains(Path.GetExtension(path).Replace(".", ""))))
{
AddMovieToList(path, force: true);
}
RefreshMovieList();
}
private void MovieView_KeyDown(object sender, KeyEventArgs e)
{
if (e.Control && e.KeyCode == Keys.C)
{
var indexes = MovieView.SelectedIndices;
if (indexes.Count > 0)
{
var copyStr = new StringBuilder();
foreach (int index in indexes)
{
copyStr
.Append(_movieList[index].Filename).Append('\t')
.Append(_movieList[index].SystemID).Append('\t')
.Append(_movieList[index].GameName).Append('\t')
.Append(PlatformFrameRates.MovieTime(_movieList[index]).ToString(@"hh\:mm\:ss\.fff"))
.AppendLine();
}
Clipboard.SetDataObject(copyStr.ToString());
}
}
}
private void MovieView_DoubleClick(object sender, EventArgs e)
{
Run();
Close();
}
private void MovieView_ColumnClick(object sender, ColumnClickEventArgs e)
{
var columnName = MovieView.Columns[e.Column].Text;
switch (columnName)
{
case "File":
default:
_movieList = _movieList.OrderBy(x => Path.GetFileName(x.Filename))
.ThenBy(x => x.SystemID)
.ThenBy(x => x.GameName)
.ThenBy(x => x.FrameCount)
.ToList();
break;
case "SysID":
_movieList = _movieList.OrderBy(x => x.SystemID)
.ThenBy(x => Path.GetFileName(x.Filename))
.ThenBy(x => x.GameName)
.ThenBy(x => x.FrameCount)
.ToList();
break;
case "Game":
_movieList = _movieList.OrderBy(x => x.GameName)
.ThenBy(x => Path.GetFileName(x.Filename))
.ThenBy(x => x.SystemID)
.ThenBy(x => x.FrameCount)
.ToList();
break;
case "Length (est.)":
_movieList = _movieList.OrderBy(x => x.FrameCount)
.ThenBy(x => Path.GetFileName(x.Filename))
.ThenBy(x => x.SystemID)
.ThenBy(x => x.GameName)
.ToList();
break;
}
if (_sortedCol == columnName && _sortReverse)
{
_movieList.Reverse();
_sortReverse = false;
}
else
{
_sortReverse = true;
_sortedCol = columnName;
}
MovieView.Refresh();
}
private void MovieView_SelectedIndexChanged(object sender, EventArgs e)
{
toolTip1.SetToolTip(DetailsView, "");
DetailsView.Items.Clear();
if (MovieView.SelectedIndices.Count < 1)
{
OK.Enabled = false;
return;
}
OK.Enabled = true;
var firstIndex = MovieView.SelectedIndices[0];
MovieView.ensureVisible(firstIndex);
foreach (var kvp in _movieList[firstIndex].HeaderEntries)
{
var item = new ListViewItem(kvp.Key);
item.SubItems.Add(kvp.Value);
bool add = true;
switch (kvp.Key)
{
case HeaderKeys.SHA1:
if (kvp.Value != Global.Game.Hash)
{
item.BackColor = Color.Pink;
toolTip1.SetToolTip(DetailsView, "Current SHA1: " + Global.Game.Hash);
}
break;
// TODO
//case HeaderKeys.EMULATIONVERSION:
// if (kvp.Value != VersionInfo.GetEmuVersion())
// {
// item.BackColor = Color.Yellow;
// }
// break;
case HeaderKeys.PLATFORM:
if (kvp.Value != Global.Game.System)
{
item.BackColor = Color.Pink;
}
break;
}
if(add)
DetailsView.Items.Add(item);
}
var FpsItem = new ListViewItem("Fps");
FpsItem.SubItems.Add($"{Fps(_movieList[firstIndex]):0.#######}");
DetailsView.Items.Add(FpsItem);
var FramesItem = new ListViewItem("Frames");
FramesItem.SubItems.Add(_movieList[firstIndex].FrameCount.ToString());
DetailsView.Items.Add(FramesItem);
CommentsBtn.Enabled = _movieList[firstIndex].Comments.Any();
SubtitlesBtn.Enabled = _movieList[firstIndex].Subtitles.Any();
}
public double Fps(IMovie movie)
{
var system = movie.HeaderEntries[HeaderKeys.PLATFORM];
var pal = movie.HeaderEntries.ContainsKey(HeaderKeys.PAL) &&
movie.HeaderEntries[HeaderKeys.PAL] == "1";
return new PlatformFrameRates()[system, pal];
}
private void EditMenuItem_Click(object sender, EventArgs e)
{
foreach (var movie in MovieView.SelectedIndices.Cast<int>()
.Select(index => _movieList[index]))
{
System.Diagnostics.Process.Start(movie.Filename);
}
}
#endregion
#region Details
private void DetailsView_ColumnClick(object sender, ColumnClickEventArgs e)
{
var detailsList = new List<MovieDetails>();
for (var i = 0; i < DetailsView.Items.Count; i++)
{
detailsList.Add(new MovieDetails
{
Keys = DetailsView.Items[i].Text,
Values = DetailsView.Items[i].SubItems[1].Text,
BackgroundColor = DetailsView.Items[i].BackColor
});
}
var columnName = DetailsView.Columns[e.Column].Text;
if (_sortedDetailsCol != columnName)
{
_sortDetailsReverse = false;
}
switch (columnName)
{
// Header, Value
case "Header":
if (_sortDetailsReverse)
{
detailsList = detailsList
.OrderByDescending(x => x.Keys)
.ThenBy(x => x.Values).ToList();
}
else
{
detailsList = detailsList
.OrderBy(x => x.Keys)
.ThenBy(x => x.Values).ToList();
}
break;
case "Value":
if (_sortDetailsReverse)
{
detailsList = detailsList
.OrderByDescending(x => x.Values)
.ThenBy(x => x.Keys).ToList();
}
else
{
detailsList = detailsList
.OrderBy(x => x.Values)
.ThenBy(x => x.Keys).ToList();
}
break;
}
DetailsView.Items.Clear();
foreach (var detail in detailsList)
{
var item = new ListViewItem { Text = detail.Keys, BackColor = detail.BackgroundColor };
item.SubItems.Add(detail.Values);
DetailsView.Items.Add(item);
}
_sortedDetailsCol = columnName;
_sortDetailsReverse = !_sortDetailsReverse;
}
private void CommentsBtn_Click(object sender, EventArgs e)
{
var indices = MovieView.SelectedIndices;
if (indices.Count > 0)
{
var form = new EditCommentsForm();
form.GetMovie(_movieList[MovieView.SelectedIndices[0]]);
form.Show();
}
}
private void SubtitlesBtn_Click(object sender, EventArgs e)
{
var indices = MovieView.SelectedIndices;
if (indices.Count > 0)
{
var s = new EditSubtitlesForm { ReadOnly = true };
s.GetMovie(_movieList[MovieView.SelectedIndices[0]]);
s.Show();
}
}
#endregion
#region Misc Widgets
private void BrowseMovies_Click(object sender, EventArgs e)
{
var ofd = new OpenFileDialog
{
Filter = "Movie Files (*." + MovieService.DefaultExtension + ")|*." + MovieService.DefaultExtension +
"|TAS project Files (*." + TasMovie.Extension + ")|*." + TasMovie.Extension +
"|All Files|*.*",
InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.PathEntries.MoviesPathFragment, null)
};
var result = ofd.ShowDialog();
if (result == DialogResult.OK)
{
var file = new FileInfo(ofd.FileName);
if (!file.Exists)
{
return;
}
int? index = AddMovieToList(ofd.FileName, true);
RefreshMovieList();
if (index.HasValue)
{
MovieView.SelectedIndices.Clear();
MovieView.setSelection(index.Value);
MovieView.SelectItem(index.Value, true);
}
}
}
private void Scan_Click(object sender, EventArgs e)
{
ScanFiles();
PreHighlightMovie();
}
private void IncludeSubDirectories_CheckedChanged(object sender, EventArgs e)
{
Global.Config.PlayMovie_IncludeSubdir = IncludeSubDirectories.Checked;
ScanFiles();
PreHighlightMovie();
}
private void MatchHashCheckBox_CheckedChanged(object sender, EventArgs e)
{
Global.Config.PlayMovie_MatchHash = MatchHashCheckBox.Checked;
ScanFiles();
PreHighlightMovie();
}
private void Ok_Click(object sender, EventArgs e)
{
Global.Config.TurboSeek = TurboCheckbox.Checked;
Run();
Global.MovieSession.ReadOnly = ReadOnlyCheckBox.Checked;
if (StopOnFrameCheckbox.Checked &&
(StopOnFrameTextBox.ToRawInt().HasValue || LastFrameCheckbox.Checked))
{
if (LastFrameCheckbox.Checked)
{
// TODO
//GlobalWin.MainForm.PauseOnFrame = Global.MovieSession.Movie.InputLogLength;
}
else
{
//GlobalWin.MainForm.PauseOnFrame = StopOnFrameTextBox.ToRawInt();
}
}
Close();
}
private void Cancel_Click(object sender, EventArgs e)
{
Close();
}
#endregion
private bool _programmaticallyChangingStopFrameCheckbox = false;
private void StopOnFrameCheckbox_CheckedChanged(object sender, EventArgs e)
{
if (!_programmaticallyChangingStopFrameCheckbox)
{
StopOnFrameTextBox.Focus();
}
}
private void StopOnFrameTextBox_TextChanged_1(object sender, EventArgs e)
{
_programmaticallyChangingStopFrameCheckbox = true;
StopOnFrameCheckbox.Checked = !string.IsNullOrWhiteSpace(StopOnFrameTextBox.Text);
_programmaticallyChangingStopFrameCheckbox = false;
}
private void LastFrameCheckbox_CheckedChanged(object sender, EventArgs e)
{
if (LastFrameCheckbox.Checked == true)
{
_programmaticallyChangingStopFrameCheckbox = true;
StopOnFrameCheckbox.Checked = true;
_programmaticallyChangingStopFrameCheckbox = false;
}
StopOnFrameTextBox.Enabled = !LastFrameCheckbox.Checked;
}
#endregion
}
}

View File

@ -1,155 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>114, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAEBAAAAAAAABoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAQAEAAAAAAAAAAAAAAAAAAAAA
AAAAAAAA////AP64aABQUFAAwNjwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAMDAAMDAwAAAAAAAAAAAAMCAgMDAwMDAwAAAAMDAAADAgICAwMDAwMDAwMCAgMAAAMCAwMD
AwMDAwMDAgIDAAMEBAQDAgMDAwMDAwICAgMDBAQEAwICAwQDAwQDAgIDAAMDAwICAgMCAgIDAwMDAAAA
AwICAgMCAgIDAgMAAAAAAAAAAwMEBAQEBAQCAwAAAAAAAwMEBAQDAwMDAwMAAAAAAwQEAwMEBAMEBAQC
AwAAAAMEBAMDBAMEBAQEAgMAAAAAAwMDBAQDBAMDAwIDAAAAAAMCAgICAgICAgMEBAMAAAAAAwICAgIC
AwMEBAQDAAAAAAADAwMDAwAAAwMDAJH/AAAAcwAAAAEAAIABAAAAAAAAAAAAAIABAADABwAA8AMAAOAD
AADAAQAAwAEAAOABAADgAAAA8AAAAPgxAAA=
</value>
</data>
</root>

View File

@ -1,210 +0,0 @@
namespace BizHawk.Client.MultiHawk
{
partial class RecordMovie
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RecordMovie));
this.Cancel = new System.Windows.Forms.Button();
this.OK = new System.Windows.Forms.Button();
this.BrowseBtn = new System.Windows.Forms.Button();
this.RecordBox = new System.Windows.Forms.TextBox();
this.StartFromCombo = new System.Windows.Forms.ComboBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.DefaultAuthorCheckBox = new System.Windows.Forms.CheckBox();
this.AuthorBox = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// Cancel
//
this.Cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.Cancel.Location = new System.Drawing.Point(391, 139);
this.Cancel.Name = "Cancel";
this.Cancel.Size = new System.Drawing.Size(75, 23);
this.Cancel.TabIndex = 1;
this.Cancel.Text = "&Cancel";
this.Cancel.UseVisualStyleBackColor = true;
this.Cancel.Click += new System.EventHandler(this.Cancel_Click);
//
// OK
//
this.OK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.OK.Location = new System.Drawing.Point(310, 139);
this.OK.Name = "OK";
this.OK.Size = new System.Drawing.Size(75, 23);
this.OK.TabIndex = 0;
this.OK.Text = "&OK";
this.OK.UseVisualStyleBackColor = true;
this.OK.Click += new System.EventHandler(this.Ok_Click);
//
// BrowseBtn
//
this.BrowseBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.BrowseBtn.Image = global::BizHawk.Client.MultiHawk.Properties.Resources.OpenFile;
this.BrowseBtn.Location = new System.Drawing.Point(423, 13);
this.BrowseBtn.Name = "BrowseBtn";
this.BrowseBtn.Size = new System.Drawing.Size(25, 23);
this.BrowseBtn.TabIndex = 1;
this.BrowseBtn.UseVisualStyleBackColor = true;
this.BrowseBtn.Click += new System.EventHandler(this.BrowseBtn_Click);
//
// RecordBox
//
this.RecordBox.AllowDrop = true;
this.RecordBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.RecordBox.Location = new System.Drawing.Point(83, 13);
this.RecordBox.Name = "RecordBox";
this.RecordBox.Size = new System.Drawing.Size(334, 20);
this.RecordBox.TabIndex = 0;
this.RecordBox.DragDrop += new System.Windows.Forms.DragEventHandler(this.RecordBox_DragDrop);
this.RecordBox.DragEnter += new System.Windows.Forms.DragEventHandler(this.RecordBox_DragEnter);
//
// StartFromCombo
//
this.StartFromCombo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.StartFromCombo.Enabled = false;
this.StartFromCombo.FormattingEnabled = true;
this.StartFromCombo.Items.AddRange(new object[] {
"Power-On"});
this.StartFromCombo.Location = new System.Drawing.Point(83, 65);
this.StartFromCombo.MaxDropDownItems = 32;
this.StartFromCombo.Name = "StartFromCombo";
this.StartFromCombo.Size = new System.Drawing.Size(152, 21);
this.StartFromCombo.TabIndex = 3;
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Controls.Add(this.DefaultAuthorCheckBox);
this.groupBox1.Controls.Add(this.AuthorBox);
this.groupBox1.Controls.Add(this.StartFromCombo);
this.groupBox1.Controls.Add(this.BrowseBtn);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.RecordBox);
this.groupBox1.Location = new System.Drawing.Point(12, 12);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(454, 112);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
//
// DefaultAuthorCheckBox
//
this.DefaultAuthorCheckBox.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.DefaultAuthorCheckBox.AutoSize = true;
this.DefaultAuthorCheckBox.Location = new System.Drawing.Point(327, 64);
this.DefaultAuthorCheckBox.Name = "DefaultAuthorCheckBox";
this.DefaultAuthorCheckBox.Size = new System.Drawing.Size(121, 17);
this.DefaultAuthorCheckBox.TabIndex = 6;
this.DefaultAuthorCheckBox.Text = "Make default author";
this.DefaultAuthorCheckBox.UseVisualStyleBackColor = true;
//
// AuthorBox
//
this.AuthorBox.AllowDrop = true;
this.AuthorBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.AuthorBox.Location = new System.Drawing.Point(83, 39);
this.AuthorBox.Name = "AuthorBox";
this.AuthorBox.Size = new System.Drawing.Size(365, 20);
this.AuthorBox.TabIndex = 2;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(36, 41);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(41, 13);
this.label3.TabIndex = 2;
this.label3.Text = "Author:";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(6, 68);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(71, 13);
this.label2.TabIndex = 5;
this.label2.Text = "Record From:";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(51, 16);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(26, 13);
this.label1.TabIndex = 4;
this.label1.Text = "File:";
//
// RecordMovie
//
this.AcceptButton = this.OK;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.Cancel;
this.ClientSize = new System.Drawing.Size(478, 163);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.OK);
this.Controls.Add(this.Cancel);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MaximumSize = new System.Drawing.Size(1440, 201);
this.MinimizeBox = false;
this.MinimumSize = new System.Drawing.Size(425, 201);
this.Name = "RecordMovie";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Record Movie";
this.Load += new System.EventHandler(this.RecordMovie_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button Cancel;
private System.Windows.Forms.Button OK;
private System.Windows.Forms.Button BrowseBtn;
private System.Windows.Forms.TextBox RecordBox;
private System.Windows.Forms.ComboBox StartFromCombo;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox AuthorBox;
private System.Windows.Forms.CheckBox DefaultAuthorCheckBox;
}
}

View File

@ -1,179 +0,0 @@
using System;
using System.IO;
using System.Windows.Forms;
using System.Linq;
using BizHawk.Common.ReflectionExtensions;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Common.IEmulatorExtensions;
using BizHawk.Client.Common;
using BizHawk.Client.Common.MovieConversionExtensions;
namespace BizHawk.Client.MultiHawk
{
public partial class RecordMovie : Form
{
private IEmulator Emulator;
// TODO - Allow relative paths in record textbox
public RecordMovie(IEmulator core)
{
InitializeComponent();
Emulator = core;
if (!Emulator.HasSavestates())
{
StartFromCombo.Items.Remove(
StartFromCombo.Items
.OfType<object>()
.First(i => i.ToString()
.ToLower() == "now"));
}
}
private string MakePath()
{
var path = RecordBox.Text;
if (!string.IsNullOrWhiteSpace(path))
{
if (path.LastIndexOf(Path.DirectorySeparatorChar) == -1)
{
if (path[0] != Path.DirectorySeparatorChar)
{
path = path.Insert(0, Path.DirectorySeparatorChar.ToString());
}
path = PathManager.MakeAbsolutePath(Global.Config.PathEntries.MoviesPathFragment, null) + path;
if (!MovieService.MovieExtensions.Contains(Path.GetExtension(path)))
{
// If no valid movie extension, add movie extension
path += "." + MovieService.DefaultExtension;
}
}
}
return path;
}
private void Ok_Click(object sender, EventArgs e)
{
var path = MakePath();
if (!string.IsNullOrWhiteSpace(path))
{
var test = new FileInfo(path);
if (test.Exists)
{
var result = MessageBox.Show(path + " already exists, overwrite?", "Confirm overwrite", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning);
if (result == DialogResult.Cancel)
{
return;
}
}
var movieToRecord = MovieService.Get(path);
var fileInfo = new FileInfo(path);
if (!fileInfo.Exists)
{
Directory.CreateDirectory(fileInfo.DirectoryName);
}
//if (StartFromCombo.SelectedItem.ToString() == "Now" && Emulator.HasSavestates())
//{
// var core = Emulator.AsStatable();
// movieToRecord.StartsFromSavestate = true;
// if (core.BinarySaveStatesPreferred)
// {
// movieToRecord.BinarySavestate = (byte[])core.SaveStateBinary().Clone();
// }
// else
// {
// using (var sw = new StringWriter())
// {
// core.SaveStateText(sw);
// movieToRecord.TextSavestate = sw.ToString();
// }
// }
// // TODO: do we want to support optionally not saving this?
// if (true)
// {
// // hack: some IMovies eat the framebuffer, so don't bother with them
// movieToRecord.SavestateFramebuffer = new int[0];
// if (movieToRecord.SavestateFramebuffer != null)
// {
// movieToRecord.SavestateFramebuffer = (int[])Emulator.VideoProvider().GetVideoBuffer().Clone();
// }
// }
//}
movieToRecord.PopulateWithDefaultHeaderValues(AuthorBox.Text);
movieToRecord.Save();
GlobalWin.MainForm.StartNewMovie(movieToRecord, true);
Global.Config.UseDefaultAuthor = DefaultAuthorCheckBox.Checked;
if (DefaultAuthorCheckBox.Checked)
{
Global.Config.DefaultAuthor = AuthorBox.Text;
}
Close();
}
else
{
MessageBox.Show("Please select a movie to record", "File selection error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private void Cancel_Click(object sender, EventArgs e)
{
Close();
}
private void BrowseBtn_Click(object sender, EventArgs e)
{
var sfd = new SaveFileDialog
{
InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.PathEntries.MoviesPathFragment, null),
DefaultExt = "." + Global.MovieSession.Movie.PreferredExtension,
FileName = RecordBox.Text,
OverwritePrompt = false,
Filter = "Movie Files (*." + Global.MovieSession.Movie.PreferredExtension + ")|*." + Global.MovieSession.Movie.PreferredExtension + "|All Files|*.*"
};
var result = sfd.ShowDialog();
if (result == DialogResult.OK
&& !string.IsNullOrWhiteSpace(sfd.FileName))
{
RecordBox.Text = sfd.FileName;
}
}
private void RecordMovie_Load(object sender, EventArgs e)
{
RecordBox.Text = PathManager.FilesystemSafeName(GlobalWin.MainForm.EmulatorWindows.First().Game);
StartFromCombo.SelectedIndex = 0;
DefaultAuthorCheckBox.Checked = Global.Config.UseDefaultAuthor;
if (Global.Config.UseDefaultAuthor)
{
AuthorBox.Text = Global.Config.DefaultAuthor;
}
}
private void RecordBox_DragEnter(object sender, DragEventArgs e)
{
e.Effect = e.Data.GetDataPresent(DataFormats.FileDrop) ? DragDropEffects.Copy : DragDropEffects.None;
}
private void RecordBox_DragDrop(object sender, DragEventArgs e)
{
var filePaths = (string[])e.Data.GetData(DataFormats.FileDrop);
RecordBox.Text = filePaths[0];
}
}
}

View File

@ -1,149 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAEBAAAAAAAABoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAQAEAAAAAAAAAAAAAAAAAAAAA
AAAAAAAA////AP64aABQUFAAwNjwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAMDAAMDAwAAAAAAAAAAAAMCAgMDAwMDAwAAAAMDAAADAgICAwMDAwMDAwMCAgMAAAMCAwMD
AwMDAwMDAgIDAAMEBAQDAgMDAwMDAwICAgMDBAQEAwICAwQDAwQDAgIDAAMDAwICAgMCAgIDAwMDAAAA
AwICAgMCAgIDAgMAAAAAAAAAAwMEBAQEBAQCAwAAAAAAAwMEBAQDAwMDAwMAAAAAAwQEAwMEBAMEBAQC
AwAAAAMEBAMDBAMEBAQEAgMAAAAAAwMDBAQDBAMDAwIDAAAAAAMCAgICAgICAgMEBAMAAAAAAwICAgIC
AwMEBAQDAAAAAAADAwMDAwAAAwMDAJH/AAAAcwAAAAEAAIABAAAAAAAAAAAAAIABAADABwAA8AMAAOAD
AADAAQAAwAEAAOABAADgAAAA8AAAAPgxAAA=
</value>
</data>
</root>

View File

@ -19,6 +19,12 @@ namespace BizHawk.Common.ReflectionExtensions
.Where(p => p.GetCustomAttributes(attributeType, false).Length > 0);
}
public static IEnumerable<MethodInfo> GetMethodsWithAttrib(this Type type, Type attributeType)
{
return type.GetMethods(BindingFlags.Public | BindingFlags.Instance | BindingFlags.NonPublic)
.Where(p => p.GetCustomAttributes(attributeType, false).Length > 0);
}
/// <summary>
/// Gets the description attribute from an object
/// </summary>

View File

@ -55,8 +55,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BizHawk.Bizware.BizwareGL.G
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BizHawk.Bizware.BizwareGL.SlimDX", "Bizware\BizHawk.Bizware.BizwareGL.SlimDX\BizHawk.Bizware.BizwareGL.SlimDX.csproj", "{E6B436B1-A3CD-4C9A-8F76-5D7154726884}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BizHawk.Client.MultiHawk", "BizHawk.Client.MultiHawk\BizHawk.Client.MultiHawk.csproj", "{B95649F5-A0AE-41EB-B62B-578A2AFF5E18}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BizHawk.Client.ApiHawk", "BizHawk.Client.ApiHawk\BizHawk.Client.ApiHawk.csproj", "{8E2F11F2-3955-4382-8C3A-CEBA1276CAEA}"
EndProject
Global
@ -117,10 +115,6 @@ Global
{E6B436B1-A3CD-4C9A-8F76-5D7154726884}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E6B436B1-A3CD-4C9A-8F76-5D7154726884}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E6B436B1-A3CD-4C9A-8F76-5D7154726884}.Release|Any CPU.Build.0 = Release|Any CPU
{B95649F5-A0AE-41EB-B62B-578A2AFF5E18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B95649F5-A0AE-41EB-B62B-578A2AFF5E18}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B95649F5-A0AE-41EB-B62B-578A2AFF5E18}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B95649F5-A0AE-41EB-B62B-578A2AFF5E18}.Release|Any CPU.Build.0 = Release|Any CPU
{8E2F11F2-3955-4382-8C3A-CEBA1276CAEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8E2F11F2-3955-4382-8C3A-CEBA1276CAEA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8E2F11F2-3955-4382-8C3A-CEBA1276CAEA}.Release|Any CPU.ActiveCfg = Release|Any CPU
@ -141,7 +135,6 @@ Global
{2D2890A8-C338-4439-AD8B-CB9EE85A94F9} = {B51F1139-3D2C-41BE-A762-EF1F9B41EACA}
{337CA23E-65E7-44E1-9411-97EE08BB8116} = {0540A9A6-977E-466D-8BD3-1D8590BD5282}
{E6B436B1-A3CD-4C9A-8F76-5D7154726884} = {0540A9A6-977E-466D-8BD3-1D8590BD5282}
{B95649F5-A0AE-41EB-B62B-578A2AFF5E18} = {B51F1139-3D2C-41BE-A762-EF1F9B41EACA}
{8E2F11F2-3955-4382-8C3A-CEBA1276CAEA} = {B51F1139-3D2C-41BE-A762-EF1F9B41EACA}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution