Reworked UI.
Improved USB support. Improved rumble. (all in all, the program is becoming actually nice to use)
This commit is contained in:
parent
64946ed444
commit
be3c73bc96
14 changed files with 418 additions and 46 deletions
|
@ -14,13 +14,13 @@
|
|||
<add key="Port" value="26760" />
|
||||
|
||||
<!--Rumble motor period in millisec. Lower means more granular vibration, higher is more stable.-->
|
||||
<!--The response of rumble does not only depend on this setting and it's always high. Default: 200 -->
|
||||
<add key="RumblePeriod" value="200" />
|
||||
<!--The response of rumble does not only depend on this setting and it's always high. Default: 300 -->
|
||||
<add key="RumblePeriod" value="300" />
|
||||
|
||||
<!--The controller's HD rumble settings for the low/high frequency rumble. Change to change the pitch of the rumble.-->
|
||||
<!--Don't set above ~1200. Default: 160 and 320 -->
|
||||
<add key="LowFreqRumble" value="160" />
|
||||
<add key="HighFreqRumble" value="160" />
|
||||
<!--Don't set above ~1200. Default: 20 and 400 -->
|
||||
<add key="LowFreqRumble" value="20" />
|
||||
<add key="HighFreqRumble" value="400" />
|
||||
|
||||
<!--Rumble Setting. Turns rumble on or off.-->
|
||||
<!--On is "true"; off is "false". Default: true -->
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
</StartupObject>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>betterjoyforcemu_icon.ico</ApplicationIcon>
|
||||
<ApplicationIcon>Icons\betterjoyforcemu_icon.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Crc32.NET, Version=1.0.0.0, Culture=neutral, PublicKeyToken=dc0b95cf99bf4e99, processorArchitecture=MSIL">
|
||||
|
@ -108,6 +108,11 @@
|
|||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UpdServer.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
@ -115,10 +120,14 @@
|
|||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="betterjoyforcemu_icon.ico" />
|
||||
<Content Include="Icons\betterjoyforcemu_icon.ico" />
|
||||
<Content Include="hidapi.dll">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Icons\cross.png" />
|
||||
<Resource Include="Icons\jc_left.png" />
|
||||
<Resource Include="Icons\jc_right.png" />
|
||||
<Resource Include="Icons\pro.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\Downloads\ViGEm-master\ViGEm-master\NET\ViGEmClient\ViGEmClient.csproj">
|
||||
|
@ -130,6 +139,10 @@
|
|||
<EmbeddedResource Include="MainForm.resx">
|
||||
<DependentUpon>MainForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
BIN
BetterJoyForCemu/Icons/cross.png
Normal file
BIN
BetterJoyForCemu/Icons/cross.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
BIN
BetterJoyForCemu/Icons/jc_left.png
Normal file
BIN
BetterJoyForCemu/Icons/jc_left.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
BIN
BetterJoyForCemu/Icons/jc_right.png
Normal file
BIN
BetterJoyForCemu/Icons/jc_right.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
BIN
BetterJoyForCemu/Icons/pro.png
Normal file
BIN
BetterJoyForCemu/Icons/pro.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
|
@ -325,16 +325,13 @@ namespace BetterJoyForCemu {
|
|||
dump_calibration_data();
|
||||
}
|
||||
|
||||
a = Enumerable.Repeat((byte)0xFF, 25).ToArray(); // LED ring
|
||||
a[0] = 0x18;
|
||||
a[1] = 0x01;
|
||||
Subcommand(0x38, a, 25, false);
|
||||
BlinkLED();
|
||||
|
||||
a[0] = leds_;
|
||||
Subcommand(0x30, a, 1);
|
||||
Subcommand(0x40, new byte[] { (imu_enabled ? (byte)0x1 : (byte)0x0) }, 1, true);
|
||||
Subcommand(0x3, new byte[] { 0x30 }, 1, true);
|
||||
Subcommand(0x48, new byte[] { 0x1 }, 1, true);
|
||||
Subcommand(0x48, new byte[] { 0x01 }, 1, true);
|
||||
|
||||
Subcommand(0x41, new byte[] { 0x03, 0x00, 0x00, 0x01 }, 4, false); // higher gyro performance rate
|
||||
|
||||
|
@ -349,6 +346,13 @@ namespace BetterJoyForCemu {
|
|||
Subcommand(0x30, new byte[] { leds_ }, 1);
|
||||
}
|
||||
|
||||
public void BlinkLED() { // do not call after initial setup
|
||||
byte[] a = Enumerable.Repeat((byte)0xFF, 25).ToArray(); // LED ring
|
||||
a[0] = 0x18;
|
||||
a[1] = 0x01;
|
||||
Subcommand(0x38, a, 25, false);
|
||||
}
|
||||
|
||||
public void SetFilterCoeff(float a) {
|
||||
filterweight = a;
|
||||
}
|
||||
|
@ -361,14 +365,18 @@ namespace BetterJoyForCemu {
|
|||
}
|
||||
|
||||
if (state > state_.NO_JOYCONS) {
|
||||
Subcommand(0x40, new byte[] { 0x0 }, 1);
|
||||
HIDapi.hid_set_nonblocking(handle, 0);
|
||||
|
||||
Subcommand(0x40, new byte[] { 0x0 }, 1);
|
||||
//Subcommand(0x48, new byte[] { 0x0 }, 1); // Would turn off rumble?
|
||||
|
||||
if (isUSB) {
|
||||
byte[] a = Enumerable.Repeat((byte)0, 64).ToArray();
|
||||
a[0] = 0x80; a[1] = 0x05; // Allow device to talk to BT again
|
||||
HIDapi.hid_write(handle, a, new UIntPtr(2));
|
||||
}
|
||||
a[0] = 0x80; a[1] = 0x06; // Allow device to talk to BT again
|
||||
HIDapi.hid_write(handle, a, new UIntPtr(2));
|
||||
}
|
||||
}
|
||||
if (state > state_.DROPPED) {
|
||||
HIDapi.hid_close(handle);
|
||||
|
@ -378,11 +386,11 @@ namespace BetterJoyForCemu {
|
|||
|
||||
private byte ts_en;
|
||||
private int ReceiveRaw() {
|
||||
if (handle == IntPtr.Zero) return -2;
|
||||
HIDapi.hid_set_nonblocking(handle, 0);
|
||||
if (handle == IntPtr.Zero) return -2;
|
||||
HIDapi.hid_set_nonblocking(handle, 0);
|
||||
byte[] raw_buf = new byte[report_len];
|
||||
int ret = 0;
|
||||
while ((ret = HIDapi.hid_read(handle, raw_buf, new UIntPtr(report_len))) > 0) {
|
||||
int ret = HIDapi.hid_read(handle, raw_buf, new UIntPtr(report_len));
|
||||
if (ret > 0) {
|
||||
// Process packets as soon as they come
|
||||
for (int n = 0; n < 3; n++) {
|
||||
ExtractIMUValues(raw_buf, n);
|
||||
|
@ -419,7 +427,7 @@ namespace BetterJoyForCemu {
|
|||
SendRumble(rumble_obj.GetData()); // Needed for EVERYTHING to not time out. Never remove pls
|
||||
int a = ReceiveRaw();
|
||||
|
||||
if (a > 0) {
|
||||
if (a > 0) {
|
||||
state = state_.IMU_DATA_OK;
|
||||
attempts = 0;
|
||||
} else if (attempts > 240) {
|
||||
|
@ -429,11 +437,11 @@ namespace BetterJoyForCemu {
|
|||
DebugPrint("Connection lost. Is the Joy-Con connected?", DebugType.ALL);
|
||||
break;
|
||||
} else {
|
||||
DebugPrint("Pause 5ms", DebugType.THREADING);
|
||||
//form.AppendTextBox("Pause 5ms");
|
||||
Thread.Sleep((Int32)5);
|
||||
}
|
||||
++attempts;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Update() {
|
||||
|
|
106
BetterJoyForCemu/MainForm.Designer.cs
generated
106
BetterJoyForCemu/MainForm.Designer.cs
generated
|
@ -31,29 +31,35 @@
|
|||
this.contextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.btn_conf = new System.Windows.Forms.Button();
|
||||
this.passiveScanBox = new System.Windows.Forms.CheckBox();
|
||||
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
|
||||
this.conCntrls = new System.Windows.Forms.GroupBox();
|
||||
this.con4 = new System.Windows.Forms.Button();
|
||||
this.con3 = new System.Windows.Forms.Button();
|
||||
this.con2 = new System.Windows.Forms.Button();
|
||||
this.con1 = new System.Windows.Forms.Button();
|
||||
this.contextMenu.SuspendLayout();
|
||||
this.conCntrls.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// console
|
||||
//
|
||||
this.console.Location = new System.Drawing.Point(12, 25);
|
||||
this.console.Location = new System.Drawing.Point(12, 114);
|
||||
this.console.Multiline = true;
|
||||
this.console.Name = "console";
|
||||
this.console.ReadOnly = true;
|
||||
this.console.Size = new System.Drawing.Size(260, 169);
|
||||
this.console.TabIndex = 0;
|
||||
this.console.Size = new System.Drawing.Size(262, 118);
|
||||
this.console.TabIndex = 2;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(12, 9);
|
||||
this.label1.Location = new System.Drawing.Point(12, 98);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(83, 13);
|
||||
this.label1.Size = new System.Drawing.Size(80, 13);
|
||||
this.label1.TabIndex = 1;
|
||||
this.label1.Text = "Console Output:";
|
||||
this.label1.Text = "Console Output";
|
||||
this.label1.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
//
|
||||
// notifyIcon
|
||||
//
|
||||
|
@ -82,28 +88,18 @@
|
|||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(244, 9);
|
||||
this.label2.Location = new System.Drawing.Point(246, 239);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(28, 13);
|
||||
this.label2.TabIndex = 2;
|
||||
this.label2.Text = "v5.0";
|
||||
//
|
||||
// btn_conf
|
||||
//
|
||||
this.btn_conf.Enabled = false;
|
||||
this.btn_conf.Location = new System.Drawing.Point(12, 200);
|
||||
this.btn_conf.Name = "btn_conf";
|
||||
this.btn_conf.Size = new System.Drawing.Size(260, 26);
|
||||
this.btn_conf.TabIndex = 3;
|
||||
this.btn_conf.Text = "Open Controller Configuration";
|
||||
this.btn_conf.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// passiveScanBox
|
||||
//
|
||||
this.passiveScanBox.AutoSize = true;
|
||||
this.passiveScanBox.Checked = true;
|
||||
this.passiveScanBox.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.passiveScanBox.Location = new System.Drawing.Point(12, 232);
|
||||
this.passiveScanBox.Location = new System.Drawing.Point(12, 238);
|
||||
this.passiveScanBox.Name = "passiveScanBox";
|
||||
this.passiveScanBox.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
|
||||
this.passiveScanBox.Size = new System.Drawing.Size(91, 17);
|
||||
|
@ -115,7 +111,7 @@
|
|||
// linkLabel1
|
||||
//
|
||||
this.linkLabel1.AutoSize = true;
|
||||
this.linkLabel1.Location = new System.Drawing.Point(230, 233);
|
||||
this.linkLabel1.Location = new System.Drawing.Point(196, 239);
|
||||
this.linkLabel1.Name = "linkLabel1";
|
||||
this.linkLabel1.Size = new System.Drawing.Size(42, 13);
|
||||
this.linkLabel1.TabIndex = 5;
|
||||
|
@ -123,14 +119,75 @@
|
|||
this.linkLabel1.Text = "Donate";
|
||||
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
|
||||
//
|
||||
// conCntrls
|
||||
//
|
||||
this.conCntrls.Controls.Add(this.con4);
|
||||
this.conCntrls.Controls.Add(this.con3);
|
||||
this.conCntrls.Controls.Add(this.con2);
|
||||
this.conCntrls.Controls.Add(this.con1);
|
||||
this.conCntrls.Location = new System.Drawing.Point(12, 12);
|
||||
this.conCntrls.Name = "conCntrls";
|
||||
this.conCntrls.Size = new System.Drawing.Size(262, 83);
|
||||
this.conCntrls.TabIndex = 0;
|
||||
this.conCntrls.TabStop = false;
|
||||
this.conCntrls.Text = "Connected Controllers";
|
||||
//
|
||||
// con4
|
||||
//
|
||||
this.con4.BackgroundImage = global::BetterJoyForCemu.Properties.Resources.cross;
|
||||
this.con4.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.con4.Enabled = false;
|
||||
this.con4.Location = new System.Drawing.Point(198, 19);
|
||||
this.con4.Name = "con4";
|
||||
this.con4.Size = new System.Drawing.Size(58, 58);
|
||||
this.con4.TabIndex = 3;
|
||||
this.con4.TabStop = false;
|
||||
this.con4.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// con3
|
||||
//
|
||||
this.con3.BackgroundImage = global::BetterJoyForCemu.Properties.Resources.cross;
|
||||
this.con3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.con3.Enabled = false;
|
||||
this.con3.Location = new System.Drawing.Point(134, 19);
|
||||
this.con3.Name = "con3";
|
||||
this.con3.Size = new System.Drawing.Size(58, 58);
|
||||
this.con3.TabIndex = 2;
|
||||
this.con3.TabStop = false;
|
||||
this.con3.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// con2
|
||||
//
|
||||
this.con2.BackgroundImage = global::BetterJoyForCemu.Properties.Resources.cross;
|
||||
this.con2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.con2.Enabled = false;
|
||||
this.con2.Location = new System.Drawing.Point(70, 19);
|
||||
this.con2.Name = "con2";
|
||||
this.con2.Size = new System.Drawing.Size(58, 58);
|
||||
this.con2.TabIndex = 1;
|
||||
this.con2.TabStop = false;
|
||||
this.con2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// con1
|
||||
//
|
||||
this.con1.BackgroundImage = global::BetterJoyForCemu.Properties.Resources.cross;
|
||||
this.con1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
|
||||
this.con1.Enabled = false;
|
||||
this.con1.Location = new System.Drawing.Point(6, 19);
|
||||
this.con1.Name = "con1";
|
||||
this.con1.Size = new System.Drawing.Size(58, 58);
|
||||
this.con1.TabIndex = 0;
|
||||
this.con1.TabStop = false;
|
||||
this.con1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(284, 261);
|
||||
this.Controls.Add(this.conCntrls);
|
||||
this.Controls.Add(this.linkLabel1);
|
||||
this.Controls.Add(this.passiveScanBox);
|
||||
this.Controls.Add(this.btn_conf);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.console);
|
||||
|
@ -142,6 +199,7 @@
|
|||
this.Load += new System.EventHandler(this.MainForm_Load);
|
||||
this.Resize += new System.EventHandler(this.MainForm_Resize);
|
||||
this.contextMenu.ResumeLayout(false);
|
||||
this.conCntrls.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
|
@ -155,8 +213,12 @@
|
|||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.ContextMenuStrip contextMenu;
|
||||
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
|
||||
private System.Windows.Forms.Button btn_conf;
|
||||
private System.Windows.Forms.CheckBox passiveScanBox;
|
||||
private System.Windows.Forms.LinkLabel linkLabel1;
|
||||
private System.Windows.Forms.GroupBox conCntrls;
|
||||
private System.Windows.Forms.Button con1;
|
||||
private System.Windows.Forms.Button con4;
|
||||
private System.Windows.Forms.Button con3;
|
||||
private System.Windows.Forms.Button con2;
|
||||
}
|
||||
}
|
|
@ -12,8 +12,12 @@ using System.Xml.Linq;
|
|||
|
||||
namespace BetterJoyForCemu {
|
||||
public partial class MainForm : Form {
|
||||
public List<Button> con;
|
||||
|
||||
public MainForm() {
|
||||
InitializeComponent();
|
||||
|
||||
con = new List<Button> { con1, con2, con3, con4 };
|
||||
}
|
||||
|
||||
private void MainForm_Resize(object sender, EventArgs e) {
|
||||
|
@ -51,6 +55,7 @@ namespace BetterJoyForCemu {
|
|||
private void exitToolStripMenuItem_Click(object sender, EventArgs e) {
|
||||
try {
|
||||
Program.Stop();
|
||||
Close();
|
||||
Environment.Exit(0);
|
||||
} catch { }
|
||||
}
|
||||
|
@ -71,5 +76,17 @@ namespace BetterJoyForCemu {
|
|||
}
|
||||
console.AppendText(value);
|
||||
}
|
||||
|
||||
public void conBtnClick(object sender, EventArgs e) {
|
||||
Button button = sender as Button;
|
||||
|
||||
if (button.ClientRectangle.Contains(PointToClient(Control.MousePosition))) { // hacky but allows both l&r clicks
|
||||
if (button.Tag.GetType() == typeof(Joycon)) {
|
||||
Joycon v = (Joycon)button.Tag;
|
||||
|
||||
v.SetRumble(20.0f, 400.0f, 1.0f, 300);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -762,6 +762,9 @@
|
|||
CICCwhBGEQAFhSHM/wf9FHIvlrkdFwAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAUAEBAAAAEAIABoBAAAVgAAABgYAAABACAAiAkAAL4EAAAgIAAAAQAgAKgQAABGDgAAMDAAAAEA
|
||||
|
|
|
@ -72,6 +72,16 @@ namespace BetterJoyForCemu {
|
|||
Joycon v = j[i];
|
||||
if (v.state == Joycon.state_.DROPPED) {
|
||||
v.Detach(); rem.Add(v);
|
||||
|
||||
foreach (Button b in form.con) {
|
||||
if (b.Enabled & b.Tag == v) {
|
||||
b.Invoke(new MethodInvoker(delegate {
|
||||
b.Enabled = false;
|
||||
}));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
form.AppendTextBox("Removed dropped controller to list. Can be reconnected.\r\n");
|
||||
}
|
||||
}
|
||||
|
@ -94,8 +104,6 @@ namespace BetterJoyForCemu {
|
|||
IntPtr ptr = HIDapi.hid_enumerate(vendor_id, 0x0);
|
||||
IntPtr top_ptr = ptr;
|
||||
|
||||
bool foundNew = false;
|
||||
|
||||
hid_device_info enumerate; // Add device to list
|
||||
while (ptr != IntPtr.Zero) {
|
||||
enumerate = (hid_device_info)Marshal.PtrToStructure(ptr, typeof(hid_device_info));
|
||||
|
@ -150,10 +158,35 @@ namespace BetterJoyForCemu {
|
|||
}
|
||||
|
||||
j.Add(new Joycon(handle, EnableIMU, EnableLocalize & EnableIMU, 0.05f, isLeft, enumerate.path, j.Count, enumerate.product_id == product_pro, enumerate.serial_number == "000000000001"));
|
||||
foundNew = true;
|
||||
|
||||
j.Last().form = form;
|
||||
|
||||
if (j.Count < 5) {
|
||||
foreach (Button v in form.con) {
|
||||
if (!v.Enabled) {
|
||||
System.Drawing.Bitmap temp;
|
||||
switch (enumerate.product_id) {
|
||||
case (product_l):
|
||||
temp = Properties.Resources.jc_left; break;
|
||||
case (product_r):
|
||||
temp = Properties.Resources.jc_right; break;
|
||||
case (product_pro):
|
||||
temp = Properties.Resources.pro; break;
|
||||
default:
|
||||
temp = Properties.Resources.cross; break;
|
||||
}
|
||||
|
||||
v.Invoke(new MethodInvoker(delegate {
|
||||
v.Tag = j.Last(); // assign controller to button
|
||||
v.Enabled = true;
|
||||
v.Click += new EventHandler(form.conBtnClick);
|
||||
v.BackgroundImage = temp;
|
||||
}));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
byte[] mac = new byte[6];
|
||||
for (int n = 0; n < 6; n++)
|
||||
mac[n] = byte.Parse(enumerate.serial_number.Substring(n * 2, 2), System.Globalization.NumberStyles.HexNumber);
|
||||
|
|
103
BetterJoyForCemu/Properties/Resources.Designer.cs
generated
Normal file
103
BetterJoyForCemu/Properties/Resources.Designer.cs
generated
Normal file
|
@ -0,0 +1,103 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <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 BetterJoyForCemu.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", "15.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("BetterJoyForCemu.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 cross {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("cross", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap jc_left {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("jc_left", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap jc_right {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("jc_right", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap pro {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("pro", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
133
BetterJoyForCemu/Properties/Resources.resx
Normal file
133
BetterJoyForCemu/Properties/Resources.resx
Normal file
|
@ -0,0 +1,133 @@
|
|||
<?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="pro" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Icons\pro.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="jc_left" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Icons\jc_left.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="jc_right" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Icons\jc_right.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="cross" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Icons\cross.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
Loading…
Add table
Reference in a new issue