some more DiscoHawk reorg
This commit is contained in:
parent
426c628fdf
commit
049e45a7f4
|
@ -53,6 +53,7 @@
|
||||||
this.button1.TabIndex = 2;
|
this.button1.TabIndex = 2;
|
||||||
this.button1.Text = "OK";
|
this.button1.Text = "OK";
|
||||||
this.button1.UseVisualStyleBackColor = true;
|
this.button1.UseVisualStyleBackColor = true;
|
||||||
|
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||||
//
|
//
|
||||||
// lblVersion
|
// lblVersion
|
||||||
//
|
//
|
||||||
|
|
|
@ -21,5 +21,10 @@ namespace BizHawk.Client.DiscoHawk
|
||||||
{
|
{
|
||||||
System.Diagnostics.Process.Start(e.LinkText);
|
System.Diagnostics.Process.Start(e.LinkText);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void button1_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<Optimize>false</Optimize>
|
<Optimize>false</Optimize>
|
||||||
<OutputPath>..\BizHawk.MultiClient\output\</OutputPath>
|
<OutputPath>..\BizHawk.Client.EmuHawk\output\</OutputPath>
|
||||||
<DefineConstants>TRACE;DEBUG;WINDOWS</DefineConstants>
|
<DefineConstants>TRACE;DEBUG;WINDOWS</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<OutputPath>..\BizHawk.MultiClient\output\</OutputPath>
|
<OutputPath>..\BizHawk.Client.EmuHawk\output\</OutputPath>
|
||||||
<DefineConstants>TRACE;WINDOWS</DefineConstants>
|
<DefineConstants>TRACE;WINDOWS</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
|
|
|
@ -19,8 +19,8 @@ namespace BizHawk.Client.DiscoHawk
|
||||||
{
|
{
|
||||||
static Program()
|
static Program()
|
||||||
{
|
{
|
||||||
//http://www.codeproject.com/Articles/310675/AppDomain-AssemblyResolve-Event-Tips
|
|
||||||
#if WINDOWS
|
#if WINDOWS
|
||||||
|
//http://www.codeproject.com/Articles/310675/AppDomain-AssemblyResolve-Event-Tips
|
||||||
// this will look in subdirectory "dll" to load pinvoked stuff
|
// this will look in subdirectory "dll" to load pinvoked stuff
|
||||||
string dllDir = System.IO.Path.Combine(GetExeDirectoryAbsolute(), "dll");
|
string dllDir = System.IO.Path.Combine(GetExeDirectoryAbsolute(), "dll");
|
||||||
SetDllDirectory(dllDir);
|
SetDllDirectory(dllDir);
|
||||||
|
@ -46,11 +46,11 @@ namespace BizHawk.Client.DiscoHawk
|
||||||
public static extern bool ChangeWindowMessageFilterEx(IntPtr hWnd, uint msg, ChangeWindowMessageFilterExAction action, ref CHANGEFILTERSTRUCT changeInfo);
|
public static extern bool ChangeWindowMessageFilterEx(IntPtr hWnd, uint msg, ChangeWindowMessageFilterExAction action, ref CHANGEFILTERSTRUCT changeInfo);
|
||||||
static void SubMain(string[] args)
|
static void SubMain(string[] args)
|
||||||
{
|
{
|
||||||
#if WINDOWS
|
#if WINDOWS
|
||||||
ChangeWindowMessageFilter(WM_DROPFILES, ChangeWindowMessageFilterFlags.Add);
|
ChangeWindowMessageFilter(WM_DROPFILES, ChangeWindowMessageFilterFlags.Add);
|
||||||
ChangeWindowMessageFilter(WM_COPYDATA, ChangeWindowMessageFilterFlags.Add);
|
ChangeWindowMessageFilter(WM_COPYDATA, ChangeWindowMessageFilterFlags.Add);
|
||||||
ChangeWindowMessageFilter(0x0049, ChangeWindowMessageFilterFlags.Add);
|
ChangeWindowMessageFilter(0x0049, ChangeWindowMessageFilterFlags.Add);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
var ffmpegPath = Path.Combine(GetExeDirectoryAbsolute(), "ffmpeg.exe");
|
var ffmpegPath = Path.Combine(GetExeDirectoryAbsolute(), "ffmpeg.exe");
|
||||||
if (!File.Exists(ffmpegPath))
|
if (!File.Exists(ffmpegPath))
|
||||||
|
@ -61,7 +61,7 @@ namespace BizHawk.Client.DiscoHawk
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static string GetExeDirectoryAbsolute()
|
public static string GetExeDirectoryAbsolute()
|
||||||
{
|
{
|
||||||
var uri = new Uri(Assembly.GetEntryAssembly().GetName().CodeBase);
|
var uri = new Uri(Assembly.GetEntryAssembly().GetName().CodeBase);
|
||||||
string module = uri.LocalPath + System.Web.HttpUtility.UrlDecode(uri.Fragment);
|
string module = uri.LocalPath + System.Web.HttpUtility.UrlDecode(uri.Fragment);
|
||||||
|
@ -140,22 +140,22 @@ namespace BizHawk.Client.DiscoHawk
|
||||||
{
|
{
|
||||||
Add = 1, Remove = 2
|
Add = 1, Remove = 2
|
||||||
};
|
};
|
||||||
public enum MessageFilterInfo : uint
|
public enum MessageFilterInfo : uint
|
||||||
{
|
{
|
||||||
None=0, AlreadyAllowed=1, AlreadyDisAllowed=2, AllowedHigher=3
|
None = 0, AlreadyAllowed = 1, AlreadyDisAllowed = 2, AllowedHigher = 3
|
||||||
};
|
};
|
||||||
|
|
||||||
public enum ChangeWindowMessageFilterExAction : uint
|
public enum ChangeWindowMessageFilterExAction : uint
|
||||||
{
|
{
|
||||||
Reset = 0, Allow = 1, DisAllow = 2
|
Reset = 0, Allow = 1, DisAllow = 2
|
||||||
};
|
};
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
public struct CHANGEFILTERSTRUCT
|
public struct CHANGEFILTERSTRUCT
|
||||||
{
|
{
|
||||||
public uint size;
|
public uint size;
|
||||||
public MessageFilterInfo info;
|
public MessageFilterInfo info;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class DiscoHawk
|
class DiscoHawk
|
||||||
|
|
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
@ -37,7 +38,7 @@ namespace BizHawk.Client.DiscoHawk
|
||||||
nValue = 0;
|
nValue = 0;
|
||||||
progressBar1.Value = nValue;
|
progressBar1.Value = nValue;
|
||||||
}
|
}
|
||||||
lblMessage.Text = pr.Message + " - " + progressBar1.Value.ToString() + "%";
|
lblMessage.Text = pr.Message + " - " + progressBar1.Value.ToString(CultureInfo.CurrentCulture) + "%";
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ProgressDialog_Load(object sender, EventArgs e)
|
private void ProgressDialog_Load(object sender, EventArgs e)
|
||||||
|
|
Loading…
Reference in New Issue