finish .net upgrade
This commit is contained in:
6
NuGet.Config
Normal file
6
NuGet.Config
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<add key="Telerik UI for WinForms 2022.1.222.0" value="C:\Program Files (x86)\Progress\Telerik UI for WinForms R1 2022\Bin60\NuGet" />
|
||||
</packageSources>
|
||||
</configuration>
|
||||
@@ -1,9 +1,9 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.28307.1259
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.2.32526.322
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Project64Savestater", "Project64Savestater\Project64Savestater.csproj", "{7554A73A-DC05-4742-A060-42A78A6C4381}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PJ64Savestater", "Project64Savestater\PJ64Savestater.csproj", "{7554A73A-DC05-4742-A060-42A78A6C4381}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
||||
2
Project64Savestater/ActionCodes.Designer.cs
generated
2
Project64Savestater/ActionCodes.Designer.cs
generated
@@ -19,7 +19,7 @@ namespace PJ64Savestater {
|
||||
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
|
||||
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
|
||||
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class ActionCodes {
|
||||
|
||||
@@ -3,4 +3,7 @@
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
|
||||
</startup>
|
||||
<appSettings>
|
||||
<add key="toleranceOffset" value="1000"/>
|
||||
</appSettings>
|
||||
</configuration>
|
||||
|
||||
269
Project64Savestater/Form1.Designer.cs
generated
269
Project64Savestater/Form1.Designer.cs
generated
@@ -1,269 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace PJ64Savestater
|
||||
{
|
||||
partial class Form1
|
||||
{
|
||||
/// <summary>
|
||||
/// Erforderliche Designervariable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Verwendete Ressourcen bereinigen.
|
||||
/// </summary>
|
||||
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Vom Windows Form-Designer generierter Code
|
||||
|
||||
/// <summary>
|
||||
/// Erforderliche Methode für die Designerunterstützung.
|
||||
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
|
||||
this.styleManager1 = new DevComponents.DotNetBar.StyleManager(this.components);
|
||||
this.ComboBoxEx_Pads = new DevComponents.DotNetBar.Controls.ComboBoxEx();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.line3 = new DevComponents.DotNetBar.Controls.Line();
|
||||
this.line2 = new DevComponents.DotNetBar.Controls.Line();
|
||||
this.ButtonX_LoadProfile = new DevComponents.DotNetBar.ButtonX();
|
||||
this.ButtonX_SaveProfile = new DevComponents.DotNetBar.ButtonX();
|
||||
this.ButtonX_StartStopListening = new DevComponents.DotNetBar.ButtonX();
|
||||
this.line1 = new DevComponents.DotNetBar.Controls.Line();
|
||||
this.TextBoxX_LoadSavestate = new DevComponents.DotNetBar.Controls.TextBoxX();
|
||||
this.TextBoxX_CreateSavestate = new DevComponents.DotNetBar.Controls.TextBoxX();
|
||||
this.labelX3 = new DevComponents.DotNetBar.LabelX();
|
||||
this.labelX2 = new DevComponents.DotNetBar.LabelX();
|
||||
this.labelX1 = new DevComponents.DotNetBar.LabelX();
|
||||
this.ButtonX_LoadPads = new DevComponents.DotNetBar.ButtonX();
|
||||
this.panel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// styleManager1
|
||||
//
|
||||
this.styleManager1.ManagerStyle = DevComponents.DotNetBar.eStyle.Office2016;
|
||||
this.styleManager1.MetroColorParameters = new DevComponents.DotNetBar.Metro.ColorTables.MetroColorGeneratorParameters(System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))), System.Drawing.Color.FromArgb(((int)(((byte)(164)))), ((int)(((byte)(55)))), ((int)(((byte)(58))))));
|
||||
//
|
||||
// ComboBoxEx_Pads
|
||||
//
|
||||
resources.ApplyResources(this.ComboBoxEx_Pads, "ComboBoxEx_Pads");
|
||||
this.ComboBoxEx_Pads.DisplayMember = "Text";
|
||||
this.ComboBoxEx_Pads.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
|
||||
this.ComboBoxEx_Pads.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.ComboBoxEx_Pads.ForeColor = System.Drawing.Color.Black;
|
||||
this.ComboBoxEx_Pads.FormattingEnabled = true;
|
||||
this.ComboBoxEx_Pads.Name = "ComboBoxEx_Pads";
|
||||
this.ComboBoxEx_Pads.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.ComboBoxEx_Pads.SelectedIndexChanged += new System.EventHandler(this.ComboBoxEx_Pads_SelectedIndexChanged);
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
resources.ApplyResources(this.panel1, "panel1");
|
||||
this.panel1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.panel1.Controls.Add(this.line3);
|
||||
this.panel1.Controls.Add(this.line2);
|
||||
this.panel1.Controls.Add(this.ButtonX_LoadProfile);
|
||||
this.panel1.Controls.Add(this.ButtonX_SaveProfile);
|
||||
this.panel1.Controls.Add(this.ButtonX_StartStopListening);
|
||||
this.panel1.Controls.Add(this.line1);
|
||||
this.panel1.Controls.Add(this.TextBoxX_LoadSavestate);
|
||||
this.panel1.Controls.Add(this.TextBoxX_CreateSavestate);
|
||||
this.panel1.Controls.Add(this.labelX3);
|
||||
this.panel1.Controls.Add(this.labelX2);
|
||||
this.panel1.Controls.Add(this.labelX1);
|
||||
this.panel1.Controls.Add(this.ButtonX_LoadPads);
|
||||
this.panel1.Controls.Add(this.ComboBoxEx_Pads);
|
||||
this.panel1.ForeColor = System.Drawing.Color.Black;
|
||||
this.panel1.Name = "panel1";
|
||||
//
|
||||
// line3
|
||||
//
|
||||
resources.ApplyResources(this.line3, "line3");
|
||||
this.line3.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
|
||||
this.line3.ForeColor = System.Drawing.Color.Black;
|
||||
this.line3.Name = "line3";
|
||||
this.line3.VerticalLine = true;
|
||||
//
|
||||
// line2
|
||||
//
|
||||
resources.ApplyResources(this.line2, "line2");
|
||||
this.line2.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
|
||||
this.line2.ForeColor = System.Drawing.Color.Black;
|
||||
this.line2.Name = "line2";
|
||||
this.line2.VerticalLine = true;
|
||||
//
|
||||
// ButtonX_LoadProfile
|
||||
//
|
||||
resources.ApplyResources(this.ButtonX_LoadProfile, "ButtonX_LoadProfile");
|
||||
this.ButtonX_LoadProfile.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.ButtonX_LoadProfile.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
||||
this.ButtonX_LoadProfile.Image = global::PJ64Savestater.Properties.Resources.icons8_opened_folder_16px;
|
||||
this.ButtonX_LoadProfile.Name = "ButtonX_LoadProfile";
|
||||
this.ButtonX_LoadProfile.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.ButtonX_LoadProfile.Click += new System.EventHandler(this.ButtonX_LoadProfile_Click);
|
||||
//
|
||||
// ButtonX_SaveProfile
|
||||
//
|
||||
resources.ApplyResources(this.ButtonX_SaveProfile, "ButtonX_SaveProfile");
|
||||
this.ButtonX_SaveProfile.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.ButtonX_SaveProfile.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
||||
this.ButtonX_SaveProfile.Image = global::PJ64Savestater.Properties.Resources.icons8_save_16px;
|
||||
this.ButtonX_SaveProfile.Name = "ButtonX_SaveProfile";
|
||||
this.ButtonX_SaveProfile.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.ButtonX_SaveProfile.Click += new System.EventHandler(this.ButtonX_SaveProfile_Click);
|
||||
//
|
||||
// ButtonX_StartStopListening
|
||||
//
|
||||
resources.ApplyResources(this.ButtonX_StartStopListening, "ButtonX_StartStopListening");
|
||||
this.ButtonX_StartStopListening.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.ButtonX_StartStopListening.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
||||
this.ButtonX_StartStopListening.Image = global::PJ64Savestater.Properties.Resources.icons8_play_button_circled_16px;
|
||||
this.ButtonX_StartStopListening.Name = "ButtonX_StartStopListening";
|
||||
this.ButtonX_StartStopListening.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.ButtonX_StartStopListening.Click += new System.EventHandler(this.ButtonX_StartStopListening_Click);
|
||||
//
|
||||
// line1
|
||||
//
|
||||
resources.ApplyResources(this.line1, "line1");
|
||||
this.line1.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
|
||||
this.line1.ForeColor = System.Drawing.Color.Black;
|
||||
this.line1.Name = "line1";
|
||||
//
|
||||
// TextBoxX_LoadSavestate
|
||||
//
|
||||
resources.ApplyResources(this.TextBoxX_LoadSavestate, "TextBoxX_LoadSavestate");
|
||||
this.TextBoxX_LoadSavestate.BackColor = System.Drawing.Color.White;
|
||||
//
|
||||
//
|
||||
//
|
||||
this.TextBoxX_LoadSavestate.Border.Class = "TextBoxBorder";
|
||||
this.TextBoxX_LoadSavestate.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.TextBoxX_LoadSavestate.ButtonCustom.DisplayPosition = ((int)(resources.GetObject("TextBoxX_LoadSavestate.ButtonCustom.DisplayPosition")));
|
||||
this.TextBoxX_LoadSavestate.ButtonCustom.Image = ((System.Drawing.Image)(resources.GetObject("TextBoxX_LoadSavestate.ButtonCustom.Image")));
|
||||
this.TextBoxX_LoadSavestate.ButtonCustom.Text = resources.GetString("TextBoxX_LoadSavestate.ButtonCustom.Text");
|
||||
this.TextBoxX_LoadSavestate.ButtonCustom.Tooltip = resources.GetString("TextBoxX_LoadSavestate.ButtonCustom.Tooltip");
|
||||
this.TextBoxX_LoadSavestate.ButtonCustom2.DisplayPosition = ((int)(resources.GetObject("TextBoxX_LoadSavestate.ButtonCustom2.DisplayPosition")));
|
||||
this.TextBoxX_LoadSavestate.ButtonCustom2.Image = ((System.Drawing.Image)(resources.GetObject("TextBoxX_LoadSavestate.ButtonCustom2.Image")));
|
||||
this.TextBoxX_LoadSavestate.ButtonCustom2.Text = resources.GetString("TextBoxX_LoadSavestate.ButtonCustom2.Text");
|
||||
this.TextBoxX_LoadSavestate.ButtonCustom2.Tooltip = resources.GetString("TextBoxX_LoadSavestate.ButtonCustom2.Tooltip");
|
||||
this.TextBoxX_LoadSavestate.DisabledBackColor = System.Drawing.Color.White;
|
||||
this.TextBoxX_LoadSavestate.ForeColor = System.Drawing.Color.Black;
|
||||
this.TextBoxX_LoadSavestate.Name = "TextBoxX_LoadSavestate";
|
||||
this.TextBoxX_LoadSavestate.PreventEnterBeep = true;
|
||||
this.TextBoxX_LoadSavestate.ReadOnly = true;
|
||||
this.TextBoxX_LoadSavestate.Click += new System.EventHandler(this.TextBoxX_Click);
|
||||
this.TextBoxX_LoadSavestate.TextChanged += new System.EventHandler(this.TextBoxX_LoadSavestate_TextChanged);
|
||||
this.TextBoxX_LoadSavestate.LostFocus += new System.EventHandler(this.TextBoxX_LostFocus_TextChanged);
|
||||
//
|
||||
// TextBoxX_CreateSavestate
|
||||
//
|
||||
resources.ApplyResources(this.TextBoxX_CreateSavestate, "TextBoxX_CreateSavestate");
|
||||
this.TextBoxX_CreateSavestate.BackColor = System.Drawing.Color.White;
|
||||
//
|
||||
//
|
||||
//
|
||||
this.TextBoxX_CreateSavestate.Border.Class = "TextBoxBorder";
|
||||
this.TextBoxX_CreateSavestate.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.TextBoxX_CreateSavestate.ButtonCustom.DisplayPosition = ((int)(resources.GetObject("TextBoxX_CreateSavestate.ButtonCustom.DisplayPosition")));
|
||||
this.TextBoxX_CreateSavestate.ButtonCustom.Image = ((System.Drawing.Image)(resources.GetObject("TextBoxX_CreateSavestate.ButtonCustom.Image")));
|
||||
this.TextBoxX_CreateSavestate.ButtonCustom.Text = resources.GetString("TextBoxX_CreateSavestate.ButtonCustom.Text");
|
||||
this.TextBoxX_CreateSavestate.ButtonCustom.Tooltip = resources.GetString("TextBoxX_CreateSavestate.ButtonCustom.Tooltip");
|
||||
this.TextBoxX_CreateSavestate.ButtonCustom2.DisplayPosition = ((int)(resources.GetObject("TextBoxX_CreateSavestate.ButtonCustom2.DisplayPosition")));
|
||||
this.TextBoxX_CreateSavestate.ButtonCustom2.Image = ((System.Drawing.Image)(resources.GetObject("TextBoxX_CreateSavestate.ButtonCustom2.Image")));
|
||||
this.TextBoxX_CreateSavestate.ButtonCustom2.Text = resources.GetString("TextBoxX_CreateSavestate.ButtonCustom2.Text");
|
||||
this.TextBoxX_CreateSavestate.ButtonCustom2.Tooltip = resources.GetString("TextBoxX_CreateSavestate.ButtonCustom2.Tooltip");
|
||||
this.TextBoxX_CreateSavestate.DisabledBackColor = System.Drawing.Color.White;
|
||||
this.TextBoxX_CreateSavestate.ForeColor = System.Drawing.Color.Black;
|
||||
this.TextBoxX_CreateSavestate.Name = "TextBoxX_CreateSavestate";
|
||||
this.TextBoxX_CreateSavestate.PreventEnterBeep = true;
|
||||
this.TextBoxX_CreateSavestate.ReadOnly = true;
|
||||
this.TextBoxX_CreateSavestate.Click += new System.EventHandler(this.TextBoxX_Click);
|
||||
this.TextBoxX_CreateSavestate.TextChanged += new System.EventHandler(this.TextBoxX_CreateSavestate_TextChanged);
|
||||
this.TextBoxX_CreateSavestate.LostFocus += new System.EventHandler(this.TextBoxX_LostFocus_TextChanged);
|
||||
//
|
||||
// labelX3
|
||||
//
|
||||
resources.ApplyResources(this.labelX3, "labelX3");
|
||||
//
|
||||
//
|
||||
//
|
||||
this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.labelX3.ForeColor = System.Drawing.Color.Black;
|
||||
this.labelX3.Name = "labelX3";
|
||||
//
|
||||
// labelX2
|
||||
//
|
||||
resources.ApplyResources(this.labelX2, "labelX2");
|
||||
//
|
||||
//
|
||||
//
|
||||
this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.labelX2.ForeColor = System.Drawing.Color.Black;
|
||||
this.labelX2.Name = "labelX2";
|
||||
//
|
||||
// labelX1
|
||||
//
|
||||
resources.ApplyResources(this.labelX1, "labelX1");
|
||||
//
|
||||
//
|
||||
//
|
||||
this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.labelX1.ForeColor = System.Drawing.Color.Black;
|
||||
this.labelX1.Image = global::PJ64Savestater.Properties.Resources.icons8_game_controller_16px;
|
||||
this.labelX1.Name = "labelX1";
|
||||
//
|
||||
// ButtonX_LoadPads
|
||||
//
|
||||
resources.ApplyResources(this.ButtonX_LoadPads, "ButtonX_LoadPads");
|
||||
this.ButtonX_LoadPads.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.ButtonX_LoadPads.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
||||
this.ButtonX_LoadPads.Image = global::PJ64Savestater.Properties.Resources.icons8_refresh_16px;
|
||||
this.ButtonX_LoadPads.Name = "ButtonX_LoadPads";
|
||||
this.ButtonX_LoadPads.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.ButtonX_LoadPads.Click += new System.EventHandler(this.ButtonX_LoadPads_Click);
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.panel1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Name = "Form1";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);
|
||||
this.Shown += new System.EventHandler(this.Form1_Shown);
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private DevComponents.DotNetBar.StyleManager styleManager1;
|
||||
private DevComponents.DotNetBar.LabelX labelX1;
|
||||
private DevComponents.DotNetBar.Controls.ComboBoxEx ComboBoxEx_Pads;
|
||||
private DevComponents.DotNetBar.ButtonX ButtonX_LoadPads;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private DevComponents.DotNetBar.LabelX labelX2;
|
||||
private DevComponents.DotNetBar.LabelX labelX3;
|
||||
private DevComponents.DotNetBar.Controls.TextBoxX TextBoxX_LoadSavestate;
|
||||
private DevComponents.DotNetBar.Controls.TextBoxX TextBoxX_CreateSavestate;
|
||||
private DevComponents.DotNetBar.Controls.Line line1;
|
||||
private DevComponents.DotNetBar.ButtonX ButtonX_StartStopListening;
|
||||
private DevComponents.DotNetBar.Controls.Line line2;
|
||||
private DevComponents.DotNetBar.ButtonX ButtonX_LoadProfile;
|
||||
private DevComponents.DotNetBar.ButtonX ButtonX_SaveProfile;
|
||||
private DevComponents.DotNetBar.Controls.Line line3;
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
2
Project64Savestater/LangRes.Designer.cs
generated
2
Project64Savestater/LangRes.Designer.cs
generated
@@ -19,7 +19,7 @@ namespace PJ64Savestater {
|
||||
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
|
||||
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
|
||||
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class LangRes {
|
||||
|
||||
0
Project64Savestater/LangRes.de.Designer.cs
generated
0
Project64Savestater/LangRes.de.Designer.cs
generated
226
Project64Savestater/MainForm.Designer.cs
generated
Normal file
226
Project64Savestater/MainForm.Designer.cs
generated
Normal file
@@ -0,0 +1,226 @@
|
||||
namespace PJ64Savestater
|
||||
{
|
||||
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()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
|
||||
this.radLabel1 = new Telerik.WinControls.UI.RadLabel();
|
||||
this.radDropDownList_Pads = new Telerik.WinControls.UI.RadDropDownList();
|
||||
this.radButton_LoadPads = new Telerik.WinControls.UI.RadButton();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.radTextBox_LoadSavestate = new Telerik.WinControls.UI.RadTextBox();
|
||||
this.radTextBox_CreateSavestate = new Telerik.WinControls.UI.RadTextBox();
|
||||
this.radButton_LoadProfile = new Telerik.WinControls.UI.RadButton();
|
||||
this.radButton_SaveProfile = new Telerik.WinControls.UI.RadButton();
|
||||
this.radButton_StartStopListening = new Telerik.WinControls.UI.RadButton();
|
||||
this.radLabel3 = new Telerik.WinControls.UI.RadLabel();
|
||||
this.radLabel2 = new Telerik.WinControls.UI.RadLabel();
|
||||
((System.ComponentModel.ISupportInitialize)(this.radLabel1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.radDropDownList_Pads)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.radButton_LoadPads)).BeginInit();
|
||||
this.panel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.radTextBox_LoadSavestate)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.radTextBox_CreateSavestate)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.radButton_LoadProfile)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.radButton_SaveProfile)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.radButton_StartStopListening)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.radLabel3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.radLabel2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// radLabel1
|
||||
//
|
||||
this.radLabel1.Image = global::PJ64Savestater.Properties.Resources.icons8_game_controller_16px;
|
||||
this.radLabel1.Location = new System.Drawing.Point(3, 4);
|
||||
this.radLabel1.Name = "radLabel1";
|
||||
this.radLabel1.Size = new System.Drawing.Size(74, 18);
|
||||
this.radLabel1.TabIndex = 0;
|
||||
this.radLabel1.Text = "Controller:";
|
||||
this.radLabel1.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||
//
|
||||
// radDropDownList_Pads
|
||||
//
|
||||
this.radDropDownList_Pads.DropDownAnimationEnabled = true;
|
||||
this.radDropDownList_Pads.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList;
|
||||
this.radDropDownList_Pads.Location = new System.Drawing.Point(83, 3);
|
||||
this.radDropDownList_Pads.Name = "radDropDownList_Pads";
|
||||
this.radDropDownList_Pads.Size = new System.Drawing.Size(290, 20);
|
||||
this.radDropDownList_Pads.TabIndex = 1;
|
||||
this.radDropDownList_Pads.SelectedIndexChanged += new Telerik.WinControls.UI.Data.PositionChangedEventHandler(this.radDropDownList1_SelectedIndexChanged);
|
||||
//
|
||||
// radButton_LoadPads
|
||||
//
|
||||
this.radButton_LoadPads.Image = global::PJ64Savestater.Properties.Resources.icons8_refresh_16px;
|
||||
this.radButton_LoadPads.ImageAlignment = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.radButton_LoadPads.Location = new System.Drawing.Point(379, 3);
|
||||
this.radButton_LoadPads.Name = "radButton_LoadPads";
|
||||
this.radButton_LoadPads.Size = new System.Drawing.Size(24, 24);
|
||||
this.radButton_LoadPads.TabIndex = 2;
|
||||
this.radButton_LoadPads.Click += new System.EventHandler(this.radButton1_Click);
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.panel1.Controls.Add(this.radTextBox_LoadSavestate);
|
||||
this.panel1.Controls.Add(this.radTextBox_CreateSavestate);
|
||||
this.panel1.Controls.Add(this.radButton_LoadProfile);
|
||||
this.panel1.Controls.Add(this.radButton_SaveProfile);
|
||||
this.panel1.Controls.Add(this.radButton_StartStopListening);
|
||||
this.panel1.Controls.Add(this.radLabel3);
|
||||
this.panel1.Controls.Add(this.radLabel2);
|
||||
this.panel1.Controls.Add(this.radLabel1);
|
||||
this.panel1.Controls.Add(this.radButton_LoadPads);
|
||||
this.panel1.Controls.Add(this.radDropDownList_Pads);
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(549, 91);
|
||||
this.panel1.TabIndex = 3;
|
||||
//
|
||||
// radTextBox_LoadSavestate
|
||||
//
|
||||
this.radTextBox_LoadSavestate.Location = new System.Drawing.Point(120, 63);
|
||||
this.radTextBox_LoadSavestate.Name = "radTextBox_LoadSavestate";
|
||||
this.radTextBox_LoadSavestate.Size = new System.Drawing.Size(85, 20);
|
||||
this.radTextBox_LoadSavestate.TabIndex = 10;
|
||||
this.radTextBox_LoadSavestate.TextChanged += new System.EventHandler(this.radTextBox2_TextChanged);
|
||||
this.radTextBox_LoadSavestate.Click += new System.EventHandler(this.RadTextBox_Savestate_Clicked);
|
||||
this.radTextBox_LoadSavestate.LostFocus += new System.EventHandler(this.RadTextBox_Savestate_LostFocus);
|
||||
//
|
||||
// radTextBox_CreateSavestate
|
||||
//
|
||||
this.radTextBox_CreateSavestate.Location = new System.Drawing.Point(120, 33);
|
||||
this.radTextBox_CreateSavestate.Name = "radTextBox_CreateSavestate";
|
||||
this.radTextBox_CreateSavestate.Size = new System.Drawing.Size(85, 20);
|
||||
this.radTextBox_CreateSavestate.TabIndex = 9;
|
||||
this.radTextBox_CreateSavestate.TextChanged += new System.EventHandler(this.radTextBox1_TextChanged);
|
||||
this.radTextBox_CreateSavestate.Click += new System.EventHandler(this.RadTextBox_Savestate_Clicked);
|
||||
this.radTextBox_CreateSavestate.LostFocus += new System.EventHandler(this.RadTextBox_Savestate_LostFocus);
|
||||
//
|
||||
// radButton_LoadProfile
|
||||
//
|
||||
this.radButton_LoadProfile.Image = global::PJ64Savestater.Properties.Resources.icons8_opened_folder_16px;
|
||||
this.radButton_LoadProfile.ImageAlignment = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.radButton_LoadProfile.Location = new System.Drawing.Point(409, 63);
|
||||
this.radButton_LoadProfile.Name = "radButton_LoadProfile";
|
||||
this.radButton_LoadProfile.Size = new System.Drawing.Size(137, 24);
|
||||
this.radButton_LoadProfile.TabIndex = 8;
|
||||
this.radButton_LoadProfile.Text = "Load Profile";
|
||||
this.radButton_LoadProfile.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||
this.radButton_LoadProfile.Click += new System.EventHandler(this.radButton4_Click);
|
||||
//
|
||||
// radButton_SaveProfile
|
||||
//
|
||||
this.radButton_SaveProfile.Image = global::PJ64Savestater.Properties.Resources.icons8_save_16px;
|
||||
this.radButton_SaveProfile.ImageAlignment = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.radButton_SaveProfile.Location = new System.Drawing.Point(409, 33);
|
||||
this.radButton_SaveProfile.Name = "radButton_SaveProfile";
|
||||
this.radButton_SaveProfile.Size = new System.Drawing.Size(137, 24);
|
||||
this.radButton_SaveProfile.TabIndex = 8;
|
||||
this.radButton_SaveProfile.Text = "Save Profile";
|
||||
this.radButton_SaveProfile.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||
this.radButton_SaveProfile.Click += new System.EventHandler(this.radButton3_Click);
|
||||
//
|
||||
// radButton_StartStopListening
|
||||
//
|
||||
this.radButton_StartStopListening.Image = global::PJ64Savestater.Properties.Resources.icons8_play_button_circled_16px;
|
||||
this.radButton_StartStopListening.ImageAlignment = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.radButton_StartStopListening.Location = new System.Drawing.Point(409, 3);
|
||||
this.radButton_StartStopListening.Name = "radButton_StartStopListening";
|
||||
this.radButton_StartStopListening.Size = new System.Drawing.Size(137, 24);
|
||||
this.radButton_StartStopListening.TabIndex = 7;
|
||||
this.radButton_StartStopListening.Text = "Start listening";
|
||||
this.radButton_StartStopListening.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
|
||||
this.radButton_StartStopListening.Click += new System.EventHandler(this.radButton_StartStopListening_Click);
|
||||
//
|
||||
// radLabel3
|
||||
//
|
||||
this.radLabel3.Location = new System.Drawing.Point(3, 64);
|
||||
this.radLabel3.Name = "radLabel3";
|
||||
this.radLabel3.Size = new System.Drawing.Size(83, 18);
|
||||
this.radLabel3.TabIndex = 6;
|
||||
this.radLabel3.Text = "Load Savestate:";
|
||||
//
|
||||
// radLabel2
|
||||
//
|
||||
this.radLabel2.Location = new System.Drawing.Point(3, 34);
|
||||
this.radLabel2.Name = "radLabel2";
|
||||
this.radLabel2.Size = new System.Drawing.Size(91, 18);
|
||||
this.radLabel2.TabIndex = 4;
|
||||
this.radLabel2.Text = "Create Savestate:";
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
this.AutoScaleBaseSize = new System.Drawing.Size(7, 15);
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(549, 91);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "MainForm";
|
||||
//
|
||||
//
|
||||
//
|
||||
this.RootElement.ApplyShapeToControl = true;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Project64 Savestater";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);
|
||||
this.Shown += new System.EventHandler(this.MainForm_Shown);
|
||||
((System.ComponentModel.ISupportInitialize)(this.radLabel1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.radDropDownList_Pads)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.radButton_LoadPads)).EndInit();
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.radTextBox_LoadSavestate)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.radTextBox_CreateSavestate)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.radButton_LoadProfile)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.radButton_SaveProfile)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.radButton_StartStopListening)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.radLabel3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.radLabel2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private Telerik.WinControls.UI.RadLabel radLabel1;
|
||||
private Telerik.WinControls.UI.RadDropDownList radDropDownList_Pads;
|
||||
private Telerik.WinControls.UI.RadButton radButton_LoadPads;
|
||||
private Panel panel1;
|
||||
private Telerik.WinControls.UI.RadButton radButton_StartStopListening;
|
||||
private Telerik.WinControls.UI.RadLabel radLabel3;
|
||||
private Telerik.WinControls.UI.RadLabel radLabel2;
|
||||
private Telerik.WinControls.UI.RadButton radButton_LoadProfile;
|
||||
private Telerik.WinControls.UI.RadButton radButton_SaveProfile;
|
||||
private Telerik.WinControls.UI.RadTextBox radTextBox_LoadSavestate;
|
||||
private Telerik.WinControls.UI.RadTextBox radTextBox_CreateSavestate;
|
||||
}
|
||||
}
|
||||
@@ -1,21 +1,19 @@
|
||||
using DevComponents.DotNetBar;
|
||||
using DevComponents.DotNetBar.Controls;
|
||||
using SharpDX.DirectInput;
|
||||
using SharpDX.DirectInput;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Telerik.WinControls;
|
||||
using Telerik.WinControls.UI;
|
||||
using Timer = System.Timers.Timer;
|
||||
|
||||
namespace PJ64Savestater
|
||||
{
|
||||
public partial class Form1 : OfficeForm
|
||||
public partial class MainForm : Telerik.WinControls.UI.RadForm
|
||||
{
|
||||
private const string FILTER_INPUTPROFILE = "Json files (*.json)|*.json";
|
||||
private const string PROFILE_CODE = "Project64 Savestater";
|
||||
@@ -25,15 +23,21 @@ namespace PJ64Savestater
|
||||
private DirectInput DInput = new DirectInput();
|
||||
private DeviceInstance[] allDevices = Array.Empty<DeviceInstance>();
|
||||
private Joystick curPad = null;
|
||||
private TextBoxX focuesTextBox = null;
|
||||
private InputProfile curProfile;
|
||||
private RadTextBox focuesTextBox = null;
|
||||
private InputProfile curProfile = null;
|
||||
private bool enableActionExecution = false;
|
||||
private int toleranceOffset;
|
||||
|
||||
public Form1()
|
||||
public MainForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
UpdateAmbientColors();
|
||||
// Read configs
|
||||
var reader = new AppSettingsReader();
|
||||
toleranceOffset = (int)reader.GetValue("toleranceOffset", typeof(int));
|
||||
|
||||
// Init components
|
||||
InitializeComponent();
|
||||
|
||||
// Init Timer
|
||||
myTimer = new Timer(1)
|
||||
{
|
||||
SynchronizingObject = this,
|
||||
@@ -46,9 +50,9 @@ namespace PJ64Savestater
|
||||
private void LoadPads()
|
||||
{
|
||||
allDevices = DInput.GetDevices(DeviceClass.GameControl, DeviceEnumerationFlags.AttachedOnly).ToArray();
|
||||
ComboBoxEx_Pads.Items.Clear();
|
||||
radDropDownList_Pads.Items.Clear();
|
||||
foreach (DeviceInstance d in allDevices)
|
||||
ComboBoxEx_Pads.Items.Add(d.InstanceName);
|
||||
radDropDownList_Pads.Items.Add(d.InstanceName);
|
||||
}
|
||||
|
||||
private void SetCurrentPad(Guid guid)
|
||||
@@ -95,142 +99,142 @@ namespace PJ64Savestater
|
||||
for (int i = 0, loopTo2 = state.Sliders.Length - 1; i <= loopTo2; i++)
|
||||
{
|
||||
int val = state.Sliders[i];
|
||||
if (val > 0)
|
||||
if (val > toleranceOffset)
|
||||
inputCodes.Add("Slider " + i + " +");
|
||||
if (val < 0)
|
||||
if (val < -toleranceOffset)
|
||||
inputCodes.Add("Slider " + i + " -");
|
||||
}
|
||||
|
||||
for (int i = 0, loopTo3 = state.AccelerationSliders.Length - 1; i <= loopTo3; i++)
|
||||
{
|
||||
int val = state.AccelerationSliders[i];
|
||||
if (val > 0)
|
||||
if (val > toleranceOffset)
|
||||
inputCodes.Add("ASlider " + i + " +");
|
||||
if (val < 0)
|
||||
if (val < -toleranceOffset)
|
||||
inputCodes.Add("ASlider " + i + " -");
|
||||
}
|
||||
|
||||
for (int i = 0, loopTo4 = state.ForceSliders.Length - 1; i <= loopTo4; i++)
|
||||
{
|
||||
int val = state.ForceSliders[i];
|
||||
if (val > 0)
|
||||
if (val > toleranceOffset)
|
||||
inputCodes.Add("FSlider " + i + " +");
|
||||
if (val < 0)
|
||||
if (val < -toleranceOffset)
|
||||
inputCodes.Add("FSlider " + i + " -");
|
||||
}
|
||||
|
||||
for (int i = 0, loopTo5 = state.VelocitySliders.Length - 1; i <= loopTo5; i++)
|
||||
{
|
||||
int val = state.VelocitySliders[i];
|
||||
if (val > 0)
|
||||
if (val > toleranceOffset)
|
||||
inputCodes.Add("VSlider " + i + " +");
|
||||
if (val < 0)
|
||||
if (val < -toleranceOffset)
|
||||
inputCodes.Add("VSlider " + i + " -");
|
||||
}
|
||||
|
||||
if (state.X > 0)
|
||||
if (state.X > toleranceOffset)
|
||||
inputCodes.Add("X +");
|
||||
if (state.X < 0)
|
||||
if (state.X < -toleranceOffset)
|
||||
inputCodes.Add("X -");
|
||||
|
||||
if (state.Y > 0)
|
||||
if (state.Y > toleranceOffset)
|
||||
inputCodes.Add("Y +");
|
||||
if (state.Y < 0)
|
||||
if (state.Y < -toleranceOffset)
|
||||
inputCodes.Add("Y -");
|
||||
|
||||
if (state.Z > 0)
|
||||
if (state.Z > toleranceOffset)
|
||||
inputCodes.Add("Z +");
|
||||
if (state.Z < 0)
|
||||
if (state.Z < -toleranceOffset)
|
||||
inputCodes.Add("Z -");
|
||||
|
||||
if (state.AccelerationX > 0)
|
||||
if (state.AccelerationX > toleranceOffset)
|
||||
inputCodes.Add("AX +");
|
||||
if (state.AccelerationX < 0)
|
||||
if (state.AccelerationX < -toleranceOffset)
|
||||
inputCodes.Add("AX -");
|
||||
|
||||
if (state.AccelerationY > 0)
|
||||
if (state.AccelerationY > toleranceOffset)
|
||||
inputCodes.Add("AY +");
|
||||
if (state.AccelerationY < 0)
|
||||
if (state.AccelerationY < -toleranceOffset)
|
||||
inputCodes.Add("AY -");
|
||||
|
||||
if (state.AccelerationZ > 0)
|
||||
if (state.AccelerationZ > toleranceOffset)
|
||||
inputCodes.Add("AZ +");
|
||||
if (state.AccelerationZ < 0)
|
||||
if (state.AccelerationZ < -toleranceOffset)
|
||||
inputCodes.Add("AZ -");
|
||||
|
||||
if (state.AngularAccelerationX > 0)
|
||||
if (state.AngularAccelerationX > toleranceOffset)
|
||||
inputCodes.Add("AAX +");
|
||||
if (state.AngularAccelerationX < 0)
|
||||
if (state.AngularAccelerationX < -toleranceOffset)
|
||||
inputCodes.Add("AAX -");
|
||||
|
||||
if (state.AngularAccelerationY > 0)
|
||||
if (state.AngularAccelerationY > toleranceOffset)
|
||||
inputCodes.Add("AAY +");
|
||||
if (state.AngularAccelerationY < 0)
|
||||
if (state.AngularAccelerationY < -toleranceOffset)
|
||||
inputCodes.Add("AAY -");
|
||||
|
||||
if (state.AngularAccelerationZ > 0)
|
||||
if (state.AngularAccelerationZ > toleranceOffset)
|
||||
inputCodes.Add("AAZ +");
|
||||
if (state.AngularAccelerationZ < 0)
|
||||
if (state.AngularAccelerationZ < -toleranceOffset)
|
||||
inputCodes.Add("AAZ -");
|
||||
|
||||
if (state.ForceX > 0)
|
||||
if (state.ForceX > toleranceOffset)
|
||||
inputCodes.Add("FX +");
|
||||
if (state.ForceX < 0)
|
||||
if (state.ForceX < -toleranceOffset)
|
||||
inputCodes.Add("FX -");
|
||||
|
||||
if (state.ForceY > 0)
|
||||
if (state.ForceY > toleranceOffset)
|
||||
inputCodes.Add("FY +");
|
||||
if (state.ForceY < 0)
|
||||
if (state.ForceY < -toleranceOffset)
|
||||
inputCodes.Add("FY -");
|
||||
|
||||
if (state.ForceZ > 0)
|
||||
if (state.ForceZ > toleranceOffset)
|
||||
inputCodes.Add("FZ +");
|
||||
if (state.ForceZ < 0)
|
||||
if (state.ForceZ < -toleranceOffset)
|
||||
inputCodes.Add("FZ -");
|
||||
|
||||
if (state.RotationX > 0)
|
||||
if (state.RotationX > toleranceOffset)
|
||||
inputCodes.Add("RX +");
|
||||
if (state.RotationX < 0)
|
||||
if (state.RotationX < -toleranceOffset)
|
||||
inputCodes.Add("RX -");
|
||||
|
||||
if (state.RotationY > 0)
|
||||
if (state.RotationY > toleranceOffset)
|
||||
inputCodes.Add("RY +");
|
||||
if (state.RotationY < 0)
|
||||
if (state.RotationY < -toleranceOffset)
|
||||
inputCodes.Add("RY -");
|
||||
|
||||
if (state.RotationZ > 0)
|
||||
if (state.RotationZ > toleranceOffset)
|
||||
inputCodes.Add("RZ +");
|
||||
if (state.RotationZ < 0)
|
||||
if (state.RotationZ < -toleranceOffset)
|
||||
inputCodes.Add("RZ -");
|
||||
|
||||
if (state.TorqueX > 0)
|
||||
if (state.TorqueX > toleranceOffset)
|
||||
inputCodes.Add("TX +");
|
||||
if (state.TorqueX < 0)
|
||||
if (state.TorqueX < -toleranceOffset)
|
||||
inputCodes.Add("TX -");
|
||||
|
||||
if (state.TorqueY > 0)
|
||||
if (state.TorqueY > toleranceOffset)
|
||||
inputCodes.Add("TY +");
|
||||
if (state.TorqueY < 0)
|
||||
if (state.TorqueY < -toleranceOffset)
|
||||
inputCodes.Add("TY -");
|
||||
|
||||
if (state.TorqueZ > 0)
|
||||
if (state.TorqueZ > toleranceOffset)
|
||||
inputCodes.Add("TZ +");
|
||||
if (state.TorqueZ < 0)
|
||||
if (state.TorqueZ < -toleranceOffset)
|
||||
inputCodes.Add("TZ -");
|
||||
|
||||
if (state.VelocityX > 0)
|
||||
if (state.VelocityX > toleranceOffset)
|
||||
inputCodes.Add("VX +");
|
||||
if (state.VelocityX < 0)
|
||||
if (state.VelocityX < -toleranceOffset)
|
||||
inputCodes.Add("VX -");
|
||||
|
||||
if (state.VelocityY > 0)
|
||||
if (state.VelocityY > toleranceOffset)
|
||||
inputCodes.Add("VY +");
|
||||
if (state.VelocityY < 0)
|
||||
if (state.VelocityY < -toleranceOffset)
|
||||
inputCodes.Add("VY -");
|
||||
|
||||
if (state.VelocityZ > 0)
|
||||
if (state.VelocityZ > toleranceOffset)
|
||||
inputCodes.Add("VZ +");
|
||||
if (state.VelocityZ < 0)
|
||||
if (state.VelocityZ < -toleranceOffset)
|
||||
inputCodes.Add("VZ -");
|
||||
|
||||
if (inputCodes.Any())
|
||||
@@ -543,14 +547,14 @@ namespace PJ64Savestater
|
||||
|
||||
if (p.ProfileCode == PROFILE_CODE)
|
||||
{
|
||||
TextBoxX_CreateSavestate.Text = GetStringFromInputControl(p[ActionCodes.CreateSavestate]);
|
||||
TextBoxX_LoadSavestate.Text = GetStringFromInputControl(p[ActionCodes.LoadSavestate]);
|
||||
radTextBox_CreateSavestate.Text = GetStringFromInputControl(p[ActionCodes.CreateSavestate]);
|
||||
radTextBox_LoadSavestate.Text = GetStringFromInputControl(p[ActionCodes.LoadSavestate]);
|
||||
|
||||
try
|
||||
{
|
||||
var tguid = allDevices.FirstOrDefault(n => Globals.CompareTwoByteArrays(n.InstanceGuid.ToByteArray(), p.ControllerInstanceGuid.ToByteArray()));
|
||||
if (tguid is object)
|
||||
ComboBoxEx_Pads.SelectedIndex = Array.IndexOf(allDevices, tguid);
|
||||
radDropDownList_Pads.SelectedIndex = Array.IndexOf(allDevices, tguid);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
@@ -559,70 +563,37 @@ namespace PJ64Savestater
|
||||
curProfile = p;
|
||||
}
|
||||
else
|
||||
MessageBoxEx.Show(this, LangRes.MsgBox_WrongProfileCode, LangRes.MsgBox_WrongProfileCode_Title, MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
RadMessageBox.Show(this, LangRes.MsgBox_WrongProfileCode, LangRes.MsgBox_WrongProfileCode_Title, MessageBoxButtons.OK, RadMessageIcon.Exclamation);
|
||||
}
|
||||
|
||||
private void MyTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
|
||||
private void MyTimer_Elapsed(object? sender, System.Timers.ElapsedEventArgs e)
|
||||
{
|
||||
CheckForInput();
|
||||
}
|
||||
|
||||
private void TextBoxX_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (curPad is object && curProfile is object)
|
||||
focuesTextBox = (TextBoxX)sender;
|
||||
}
|
||||
|
||||
private void TextBoxX_LostFocus_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
focuesTextBox = null;
|
||||
}
|
||||
|
||||
private void TextBoxX_LoadSavestate_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
SetAction(ActionCodes.LoadSavestate, ((TextBoxX)sender).Text);
|
||||
}
|
||||
|
||||
private void TextBoxX_CreateSavestate_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
SetAction(ActionCodes.CreateSavestate, ((TextBoxX)sender).Text);
|
||||
}
|
||||
|
||||
private void Form1_Shown(object sender, EventArgs e)
|
||||
private void MainForm_Shown(object sender, EventArgs e)
|
||||
{
|
||||
LoadPads();
|
||||
LoadProfile(GetDefaultProfileFilePath());
|
||||
}
|
||||
|
||||
private void ButtonX_LoadPads_Click(object sender, EventArgs e)
|
||||
{
|
||||
LoadPads();
|
||||
}
|
||||
|
||||
private void ComboBoxEx_Pads_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
int index = ComboBoxEx_Pads.SelectedIndex;
|
||||
if (index >= 0)
|
||||
SetCurrentPad(allDevices[index].InstanceGuid);
|
||||
}
|
||||
|
||||
private void ButtonX_StartStopListening_Click(object sender, EventArgs e)
|
||||
private void radButton_StartStopListening_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (enableActionExecution)
|
||||
{
|
||||
ButtonX_StartStopListening.Image = Properties.Resources.icons8_play_button_circled_16px;
|
||||
ButtonX_StartStopListening.Text = LangRes.Button_StartListening;
|
||||
radButton_StartStopListening.Image = Properties.Resources.icons8_play_button_circled_16px;
|
||||
radButton_StartStopListening.Text = LangRes.Button_StartListening;
|
||||
enableActionExecution = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
ButtonX_StartStopListening.Image = Properties.Resources.icons8_stop_squared_16px;
|
||||
ButtonX_StartStopListening.Text = LangRes.Button_StopListening;
|
||||
radButton_StartStopListening.Image = Properties.Resources.icons8_stop_squared_16px;
|
||||
radButton_StartStopListening.Text = LangRes.Button_StopListening;
|
||||
enableActionExecution = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void ButtonX_SaveProfile_Click(object sender, EventArgs e)
|
||||
private void radButton3_Click(object sender, EventArgs e)
|
||||
{
|
||||
var sfd_SaveInputProfile = new SaveFileDialog
|
||||
{
|
||||
@@ -632,7 +603,7 @@ namespace PJ64Savestater
|
||||
curProfile.Save(sfd_SaveInputProfile.FileName);
|
||||
}
|
||||
|
||||
private void ButtonX_LoadProfile_Click(object sender, EventArgs e)
|
||||
private void radButton4_Click(object sender, EventArgs e)
|
||||
{
|
||||
var ofd_SaveInputProfile = new OpenFileDialog
|
||||
{
|
||||
@@ -642,9 +613,42 @@ namespace PJ64Savestater
|
||||
LoadProfile(ofd_SaveInputProfile.FileName);
|
||||
}
|
||||
|
||||
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
|
||||
private void radTextBox1_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
SetAction(ActionCodes.LoadSavestate, ((RadTextBox)sender).Text);
|
||||
}
|
||||
|
||||
private void radTextBox2_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
SetAction(ActionCodes.CreateSavestate, ((RadTextBox)sender).Text);
|
||||
}
|
||||
|
||||
private void radButton1_Click(object sender, EventArgs e)
|
||||
{
|
||||
LoadPads();
|
||||
}
|
||||
|
||||
private void radDropDownList1_SelectedIndexChanged(object sender, Telerik.WinControls.UI.Data.PositionChangedEventArgs e)
|
||||
{
|
||||
int index = radDropDownList_Pads.SelectedIndex;
|
||||
if (index >= 0)
|
||||
SetCurrentPad(allDevices[index].InstanceGuid);
|
||||
}
|
||||
|
||||
private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
curProfile.Save(GetDefaultProfileFilePath());
|
||||
}
|
||||
|
||||
private void RadTextBox_Savestate_Clicked(object sender, EventArgs e)
|
||||
{
|
||||
if (curPad is object && curProfile is object)
|
||||
focuesTextBox = (RadTextBox)sender;
|
||||
}
|
||||
|
||||
private void RadTextBox_Savestate_LostFocus(object sender, EventArgs e)
|
||||
{
|
||||
focuesTextBox = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,64 +1,4 @@
|
||||
<?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">
|
||||
@@ -112,29 +52,11 @@
|
||||
<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>
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.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>
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ButtonX_LoadProfile.Text" xml:space="preserve">
|
||||
<value>Profil laden</value>
|
||||
</data>
|
||||
<data name="ButtonX_SaveProfile.Text" xml:space="preserve">
|
||||
<value>Profil speichern</value>
|
||||
</data>
|
||||
<data name="ButtonX_StartStopListening.Text" xml:space="preserve">
|
||||
<value>Zuhören beginnen</value>
|
||||
</data>
|
||||
<data name="labelX3.Text" xml:space="preserve">
|
||||
<value>Speicherpunkt laden:</value>
|
||||
</data>
|
||||
<data name="labelX2.Text" xml:space="preserve">
|
||||
<value>Speicherpunkt erstellen:</value>
|
||||
</data>
|
||||
<data name="labelX1.Text" xml:space="preserve">
|
||||
<value>Kontroller:</value>
|
||||
</data>
|
||||
<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>
|
||||
@@ -1902,8 +1824,4 @@
|
||||
KW2SKIMAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="$this.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
</root>
|
||||
47
Project64Savestater/PJ64Savestater.csproj
Normal file
47
Project64Savestater/PJ64Savestater.csproj
Normal file
@@ -0,0 +1,47 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net6.0-windows</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<StartupObject>PJ64Savestater.Program</StartupObject>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageReference Include="SharpDX.DirectInput" Version="4.2.0" />
|
||||
<PackageReference Include="UI.for.WinForms.AllControls.Net60">
|
||||
<Version>2022.1.222.0</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="DevComponents.DotNetBar.Design">
|
||||
<HintPath>C:\DotNetBar\DevComponents.DotNetBar.Design.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevComponents.DotNetBar2">
|
||||
<HintPath>C:\DotNetBar\DevComponents.DotNetBar2.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Update="ActionCodes.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>ActionCodes.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="LangRes.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>LangRes.resx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="ActionCodes.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>ActionCodes.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="LangRes.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>LangRes.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -16,7 +16,9 @@ namespace PJ64Savestater
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new Form1());
|
||||
VisualThemeHelper.SetVisualTheme();
|
||||
Application.SetDefaultFont(new Font(Control.DefaultFont.FontFamily, 8.25f));
|
||||
Application.Run(new MainForm());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,176 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{7554A73A-DC05-4742-A060-42A78A6C4381}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>PJ64Savestater</RootNamespace>
|
||||
<AssemblyName>Project64 Savestater</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<LangVersion>latest</LangVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>icons8_data_backup.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="DevComponents.DotNetBar.Design">
|
||||
<HintPath>C:\DotNetBarNew\DevComponents.DotNetBar.Design.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="DevComponents.DotNetBar2">
|
||||
<HintPath>C:\DotNetBarNew\DevComponents.DotNetBar2.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.Net.Http" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ActionCodes.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>ActionCodes.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ControllerTypes.cs" />
|
||||
<Compile Include="Form1.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Form1.Designer.cs">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Globals.cs" />
|
||||
<Compile Include="InputControl.cs" />
|
||||
<Compile Include="InputKeys.cs" />
|
||||
<Compile Include="InputProfile.cs" />
|
||||
<Compile Include="LangRes.de.Designer.cs">
|
||||
<DependentUpon>LangRes.de.resx</DependentUpon>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<Compile Include="LangRes.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>LangRes.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="ActionCodes.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>ActionCodes.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Form1.de.resx">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Form1.resx">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="LangRes.de.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>LangRes.de.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="LangRes.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>LangRes.Designer.cs</LastGenOutput>
|
||||
</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>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\icons8_refresh_16px.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\icons8_game_controller_16px.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\icons8_play_16px.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\icons8_stop_squared_16px.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\icons8_play_button_circled_16px.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\icons8_save_16px.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\icons8_opened_folder_16px.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="FodyWeavers.xml" />
|
||||
<Content Include="icons8_data_backup.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Costura.Fody">
|
||||
<Version>3.3.3</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Fody">
|
||||
<Version>4.2.1</Version>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Newtonsoft.Json">
|
||||
<Version>12.0.3</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="SharpDX.DirectInput">
|
||||
<Version>4.2.0</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
44
Project64Savestater/VisualThemeHelper.cs
Normal file
44
Project64Savestater/VisualThemeHelper.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using Microsoft.Win32;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Telerik.WinControls;
|
||||
|
||||
namespace PJ64Savestater
|
||||
{
|
||||
internal static class VisualThemeHelper
|
||||
{
|
||||
private const string THEMENAME_FLUENT = "Fluent";
|
||||
private const string THEMENAME_FLUENTDARK = "FluentDark";
|
||||
|
||||
public static void SetVisualTheme()
|
||||
{
|
||||
RadThemeComponentBase? setTheme = null;
|
||||
|
||||
var curVers = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion", false);
|
||||
if (Convert.ToString(curVers?.GetValue("ProductName", "-"))?.StartsWith("Windows 1") ?? false)
|
||||
{
|
||||
var keyPersonalize = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Themes\Personalize", false);
|
||||
int useapptheme = Convert.ToInt32(keyPersonalize?.GetValue("AppsUseLightTheme", 1));
|
||||
|
||||
switch (useapptheme)
|
||||
{
|
||||
case 0:
|
||||
setTheme = new Telerik.WinControls.Themes.FluentDarkTheme();
|
||||
break;
|
||||
case 1:
|
||||
setTheme = new Telerik.WinControls.Themes.FluentTheme();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (setTheme is null)
|
||||
setTheme = new Telerik.WinControls.Themes.FluentTheme();
|
||||
|
||||
// Set theme
|
||||
ThemeResolutionService.ApplicationThemeName = setTheme.ThemeName;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user