some more DiscoHawk reorg

This commit is contained in:
adelikat 2013-11-03 13:19:36 +00:00
parent 426c628fdf
commit 049e45a7f4
5 changed files with 31 additions and 24 deletions

View File

@ -53,6 +53,7 @@
this.button1.TabIndex = 2;
this.button1.Text = "OK";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// lblVersion
//

View File

@ -21,5 +21,10 @@ namespace BizHawk.Client.DiscoHawk
{
System.Diagnostics.Process.Start(e.LinkText);
}
private void button1_Click(object sender, EventArgs e)
{
Close();
}
}
}

View File

@ -37,7 +37,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\BizHawk.MultiClient\output\</OutputPath>
<OutputPath>..\BizHawk.Client.EmuHawk\output\</OutputPath>
<DefineConstants>TRACE;DEBUG;WINDOWS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@ -48,7 +48,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\BizHawk.MultiClient\output\</OutputPath>
<OutputPath>..\BizHawk.Client.EmuHawk\output\</OutputPath>
<DefineConstants>TRACE;WINDOWS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>

View File

@ -19,8 +19,8 @@ namespace BizHawk.Client.DiscoHawk
{
static Program()
{
//http://www.codeproject.com/Articles/310675/AppDomain-AssemblyResolve-Event-Tips
#if WINDOWS
//http://www.codeproject.com/Articles/310675/AppDomain-AssemblyResolve-Event-Tips
// this will look in subdirectory "dll" to load pinvoked stuff
string dllDir = System.IO.Path.Combine(GetExeDirectoryAbsolute(), "dll");
SetDllDirectory(dllDir);
@ -46,11 +46,11 @@ namespace BizHawk.Client.DiscoHawk
public static extern bool ChangeWindowMessageFilterEx(IntPtr hWnd, uint msg, ChangeWindowMessageFilterExAction action, ref CHANGEFILTERSTRUCT changeInfo);
static void SubMain(string[] args)
{
#if WINDOWS
ChangeWindowMessageFilter(WM_DROPFILES, ChangeWindowMessageFilterFlags.Add);
ChangeWindowMessageFilter(WM_COPYDATA, ChangeWindowMessageFilterFlags.Add);
ChangeWindowMessageFilter(0x0049, ChangeWindowMessageFilterFlags.Add);
#endif
#if WINDOWS
ChangeWindowMessageFilter(WM_DROPFILES, ChangeWindowMessageFilterFlags.Add);
ChangeWindowMessageFilter(WM_COPYDATA, ChangeWindowMessageFilterFlags.Add);
ChangeWindowMessageFilter(0x0049, ChangeWindowMessageFilterFlags.Add);
#endif
var ffmpegPath = Path.Combine(GetExeDirectoryAbsolute(), "ffmpeg.exe");
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);
string module = uri.LocalPath + System.Web.HttpUtility.UrlDecode(uri.Fragment);
@ -140,22 +140,22 @@ namespace BizHawk.Client.DiscoHawk
{
Add = 1, Remove = 2
};
public enum MessageFilterInfo : uint
{
None=0, AlreadyAllowed=1, AlreadyDisAllowed=2, AllowedHigher=3
};
public enum MessageFilterInfo : uint
{
None = 0, AlreadyAllowed = 1, AlreadyDisAllowed = 2, AllowedHigher = 3
};
public enum ChangeWindowMessageFilterExAction : uint
{
Reset = 0, Allow = 1, DisAllow = 2
};
public enum ChangeWindowMessageFilterExAction : uint
{
Reset = 0, Allow = 1, DisAllow = 2
};
[StructLayout(LayoutKind.Sequential)]
public struct CHANGEFILTERSTRUCT
{
public uint size;
public MessageFilterInfo info;
}
[StructLayout(LayoutKind.Sequential)]
public struct CHANGEFILTERSTRUCT
{
public uint size;
public MessageFilterInfo info;
}
}
class DiscoHawk

View File

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Windows.Forms;
@ -37,7 +38,7 @@ namespace BizHawk.Client.DiscoHawk
nValue = 0;
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)