mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-12-26 00:21:48 +01:00
Version number is written into Profiles.xml
About Window shows version number
This commit is contained in:
parent
dacaada0ea
commit
00587cdc31
@ -184,6 +184,16 @@ namespace DS4Control
|
|||||||
return m_Config.useExclusiveMode;
|
return m_Config.useExclusiveMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void setVersion(double data)
|
||||||
|
{
|
||||||
|
m_Config.version = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static double getVersion()
|
||||||
|
{
|
||||||
|
return m_Config.version;
|
||||||
|
}
|
||||||
|
|
||||||
// New settings
|
// New settings
|
||||||
public static void saveLowColor(int device, byte red, byte green, byte blue)
|
public static void saveLowColor(int device, byte red, byte green, byte blue)
|
||||||
{
|
{
|
||||||
@ -410,7 +420,7 @@ namespace DS4Control
|
|||||||
public Int32 formWidth = 782;
|
public Int32 formWidth = 782;
|
||||||
public Int32 formHeight = 550;
|
public Int32 formHeight = 550;
|
||||||
public Boolean startMinimized = false;
|
public Boolean startMinimized = false;
|
||||||
|
public double version;
|
||||||
public Dictionary<DS4Controls, DS4KeyType>[] customMapKeyTypes = {null, null, null, null};
|
public Dictionary<DS4Controls, DS4KeyType>[] customMapKeyTypes = {null, null, null, null};
|
||||||
public Dictionary<DS4Controls, UInt16>[] customMapKeys = { null, null, null, null };
|
public Dictionary<DS4Controls, UInt16>[] customMapKeys = { null, null, null, null };
|
||||||
public Dictionary<DS4Controls, X360Controls>[] customMapButtons = { null, null, null, null };
|
public Dictionary<DS4Controls, X360Controls>[] customMapButtons = { null, null, null, null };
|
||||||
@ -921,6 +931,8 @@ namespace DS4Control
|
|||||||
catch { missingSetting = true; }
|
catch { missingSetting = true; }
|
||||||
try { Item = m_Xdoc.SelectSingleNode("/Profile/Controller4"); profilePath[3] = Item.InnerText; }
|
try { Item = m_Xdoc.SelectSingleNode("/Profile/Controller4"); profilePath[3] = Item.InnerText; }
|
||||||
catch { missingSetting = true; }
|
catch { missingSetting = true; }
|
||||||
|
try { Item = m_Xdoc.SelectSingleNode("/Profile/DS4Version"); Double.TryParse(Item.InnerText, out version); }
|
||||||
|
catch { missingSetting = true; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
@ -960,6 +972,7 @@ namespace DS4Control
|
|||||||
XmlNode xmlController3 = m_Xdoc.CreateNode(XmlNodeType.Element, "Controller3", null); xmlController3.InnerText = profilePath[2]; Node.AppendChild(xmlController3);
|
XmlNode xmlController3 = m_Xdoc.CreateNode(XmlNodeType.Element, "Controller3", null); xmlController3.InnerText = profilePath[2]; Node.AppendChild(xmlController3);
|
||||||
XmlNode xmlController4 = m_Xdoc.CreateNode(XmlNodeType.Element, "Controller4", null); xmlController4.InnerText = profilePath[3]; Node.AppendChild(xmlController4);
|
XmlNode xmlController4 = m_Xdoc.CreateNode(XmlNodeType.Element, "Controller4", null); xmlController4.InnerText = profilePath[3]; Node.AppendChild(xmlController4);
|
||||||
|
|
||||||
|
XmlNode xmlVersion = m_Xdoc.CreateNode(XmlNodeType.Element, "DS4Version", null); xmlVersion.InnerText = version.ToString(); Node.AppendChild(xmlVersion);
|
||||||
m_Xdoc.AppendChild(Node);
|
m_Xdoc.AppendChild(Node);
|
||||||
|
|
||||||
m_Xdoc.Save(m_Profile);
|
m_Xdoc.Save(m_Profile);
|
||||||
|
4
DS4Tool/Hotkeys.Designer.cs
generated
4
DS4Tool/Hotkeys.Designer.cs
generated
@ -206,9 +206,9 @@
|
|||||||
this.lbAbout.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
this.lbAbout.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.lbAbout.Location = new System.Drawing.Point(26, 9);
|
this.lbAbout.Location = new System.Drawing.Point(26, 9);
|
||||||
this.lbAbout.Name = "lbAbout";
|
this.lbAbout.Name = "lbAbout";
|
||||||
this.lbAbout.Size = new System.Drawing.Size(229, 13);
|
this.lbAbout.Size = new System.Drawing.Size(201, 13);
|
||||||
this.lbAbout.TabIndex = 0;
|
this.lbAbout.TabIndex = 0;
|
||||||
this.lbAbout.Text = "DS4Windows is Open Source software!";
|
this.lbAbout.Text = "DS4Windows - J2K Build (Version ";
|
||||||
//
|
//
|
||||||
// Hotkeys
|
// Hotkeys
|
||||||
//
|
//
|
||||||
|
@ -15,6 +15,7 @@ namespace ScpServer
|
|||||||
public Hotkeys()
|
public Hotkeys()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
lbAbout.Text += Global.getVersion().ToString() + ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
private void button1_Click(object sender, EventArgs e)
|
private void button1_Click(object sender, EventArgs e)
|
||||||
|
@ -13,7 +13,7 @@ namespace ScpServer
|
|||||||
{
|
{
|
||||||
private DS4Control.Control rootHub;
|
private DS4Control.Control rootHub;
|
||||||
delegate void LogDebugDelegate(DateTime Time, String Data);
|
delegate void LogDebugDelegate(DateTime Time, String Data);
|
||||||
double version = 6.8;
|
double version = 6.9;
|
||||||
|
|
||||||
protected void LogDebug(DateTime Time, String Data)
|
protected void LogDebug(DateTime Time, String Data)
|
||||||
{
|
{
|
||||||
@ -88,7 +88,7 @@ namespace ScpServer
|
|||||||
ebns = new Button[4] { bnEditC1, bnEditC2, bnEditC3, bnEditC4 };
|
ebns = new Button[4] { bnEditC1, bnEditC2, bnEditC3, bnEditC4 };
|
||||||
dbns = new Button[4] { bnDeleteC1, bnDeleteC2, bnDeleteC3, bnDeleteC4 };
|
dbns = new Button[4] { bnDeleteC1, bnDeleteC2, bnDeleteC3, bnDeleteC4 };
|
||||||
protexts = new Label[4] { lbSelPro1, lbSelPro2, lbSelPro3, lbSelPro4 };
|
protexts = new Label[4] { lbSelPro1, lbSelPro2, lbSelPro3, lbSelPro4 };
|
||||||
|
|
||||||
shortcuts = new ToolStripMenuItem[4] { (ToolStripMenuItem)notifyIcon1.ContextMenuStrip.Items[0],
|
shortcuts = new ToolStripMenuItem[4] { (ToolStripMenuItem)notifyIcon1.ContextMenuStrip.Items[0],
|
||||||
(ToolStripMenuItem)notifyIcon1.ContextMenuStrip.Items[1],
|
(ToolStripMenuItem)notifyIcon1.ContextMenuStrip.Items[1],
|
||||||
(ToolStripMenuItem)notifyIcon1.ContextMenuStrip.Items[2],
|
(ToolStripMenuItem)notifyIcon1.ContextMenuStrip.Items[2],
|
||||||
@ -99,8 +99,6 @@ namespace ScpServer
|
|||||||
Directory.CreateDirectory(Global.appdatapath);
|
Directory.CreateDirectory(Global.appdatapath);
|
||||||
wc.DownloadFileAsync(url, Global.appdatapath + "\\version.txt");
|
wc.DownloadFileAsync(url, Global.appdatapath + "\\version.txt");
|
||||||
wc.DownloadFileCompleted += Check_Version;
|
wc.DownloadFileCompleted += Check_Version;
|
||||||
// if (Directory.Exists(Directory.GetParent(Assembly.GetExecutingAssembly().Location).FullName + @"\Profiles\"))
|
|
||||||
//File.C
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Check_Version(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
|
private void Check_Version(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
|
||||||
@ -140,6 +138,8 @@ namespace ScpServer
|
|||||||
Log.TrayIconLog += ShowNotification;
|
Log.TrayIconLog += ShowNotification;
|
||||||
// tmrUpdate.Enabled = true; TODO remove tmrUpdate and leave tick()
|
// tmrUpdate.Enabled = true; TODO remove tmrUpdate and leave tick()
|
||||||
Global.Load();
|
Global.Load();
|
||||||
|
Global.setVersion(version);
|
||||||
|
Global.Save();
|
||||||
hideDS4CheckBox.CheckedChanged -= hideDS4CheckBox_CheckedChanged;
|
hideDS4CheckBox.CheckedChanged -= hideDS4CheckBox_CheckedChanged;
|
||||||
hideDS4CheckBox.Checked = Global.getUseExclusiveMode();
|
hideDS4CheckBox.Checked = Global.getUseExclusiveMode();
|
||||||
hideDS4CheckBox.CheckedChanged += hideDS4CheckBox_CheckedChanged;
|
hideDS4CheckBox.CheckedChanged += hideDS4CheckBox_CheckedChanged;
|
||||||
|
Loading…
Reference in New Issue
Block a user