mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-26 11:04:21 +01:00
Change how hover text is displayed. Added some tooltips to DS4Form. Minor changes.
This commit is contained in:
parent
0e923ea0ee
commit
1535ec18d6
@ -35,7 +35,8 @@ namespace DS4Windows
|
|||||||
protected PictureBox[] statPB;
|
protected PictureBox[] statPB;
|
||||||
protected ToolStripMenuItem[] shortcuts;
|
protected ToolStripMenuItem[] shortcuts;
|
||||||
WebClient wc = new WebClient();
|
WebClient wc = new WebClient();
|
||||||
Timer test = new Timer(), hotkeysTimer = new Timer();
|
//Timer test = new Timer(), hotkeysTimer = new Timer();
|
||||||
|
Timer hotkeysTimer = new Timer();
|
||||||
string exepath = Directory.GetParent(Assembly.GetExecutingAssembly().Location).FullName;
|
string exepath = Directory.GetParent(Assembly.GetExecutingAssembly().Location).FullName;
|
||||||
string appDataPpath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\DS4Windows";
|
string appDataPpath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\DS4Windows";
|
||||||
string oldappdatapath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\DS4Tool";
|
string oldappdatapath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\DS4Tool";
|
||||||
@ -56,10 +57,11 @@ namespace DS4Windows
|
|||||||
public bool mAllowVisible;
|
public bool mAllowVisible;
|
||||||
bool contextclose;
|
bool contextclose;
|
||||||
string logFile = appdatapath + @"\DS4Service.log";
|
string logFile = appdatapath + @"\DS4Service.log";
|
||||||
StreamWriter logWriter;
|
//StreamWriter logWriter;
|
||||||
bool turnOffTemp;
|
bool turnOffTemp;
|
||||||
bool runningBat;
|
bool runningBat;
|
||||||
//bool outputlog = false;
|
//bool outputlog = false;
|
||||||
|
Dictionary<Control, string> hoverTextDict = new Dictionary<Control, string>();
|
||||||
|
|
||||||
internal const int BCM_FIRST = 0x1600; // Normal button
|
internal const int BCM_FIRST = 0x1600; // Normal button
|
||||||
internal const int BCM_SETSHIELD = (BCM_FIRST + 0x000C); // Elevated button
|
internal const int BCM_SETSHIELD = (BCM_FIRST + 0x000C); // Elevated button
|
||||||
@ -306,7 +308,7 @@ namespace DS4Windows
|
|||||||
opt.Dock = DockStyle.Fill;
|
opt.Dock = DockStyle.Fill;
|
||||||
opt.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
opt.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||||
tabProfiles.Controls.Add(opt);
|
tabProfiles.Controls.Add(opt);
|
||||||
NewVersion();
|
//NewVersion();
|
||||||
for (int i = 0; i < 4; i++)
|
for (int i = 0; i < 4; i++)
|
||||||
{
|
{
|
||||||
LoadProfile(i, true, Program.rootHub);
|
LoadProfile(i, true, Program.rootHub);
|
||||||
@ -367,7 +369,7 @@ namespace DS4Windows
|
|||||||
//test.Start();
|
//test.Start();
|
||||||
hotkeysTimer.Start();
|
hotkeysTimer.Start();
|
||||||
hotkeysTimer.Tick += Hotkeys;
|
hotkeysTimer.Tick += Hotkeys;
|
||||||
test.Tick += test_Tick;
|
//test.Tick += test_Tick;
|
||||||
if (!Directory.Exists(appdatapath + "\\Virtual Bus Driver"))
|
if (!Directory.Exists(appdatapath + "\\Virtual Bus Driver"))
|
||||||
linkUninstall.Visible = false;
|
linkUninstall.Visible = false;
|
||||||
|
|
||||||
@ -378,6 +380,7 @@ namespace DS4Windows
|
|||||||
AddUACShieldToImage(tempImg);
|
AddUACShieldToImage(tempImg);
|
||||||
uacPictureBox.BackgroundImage = tempImg;
|
uacPictureBox.BackgroundImage = tempImg;
|
||||||
uacPictureBox.Visible = true;
|
uacPictureBox.Visible = true;
|
||||||
|
new ToolTip().SetToolTip(uacPictureBox, Properties.Resources.UACTask);
|
||||||
runStartTaskRadio.Enabled = false;
|
runStartTaskRadio.Enabled = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -412,6 +415,24 @@ namespace DS4Windows
|
|||||||
UpdateTheUpdater();
|
UpdateTheUpdater();
|
||||||
|
|
||||||
this.StartWindowsCheckBox.CheckedChanged += new System.EventHandler(this.StartWindowsCheckBox_CheckedChanged);
|
this.StartWindowsCheckBox.CheckedChanged += new System.EventHandler(this.StartWindowsCheckBox_CheckedChanged);
|
||||||
|
new ToolTip().SetToolTip(StartWindowsCheckBox, Properties.Resources.RunAtStartup);
|
||||||
|
|
||||||
|
populateHoverTextDict();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void populateHoverTextDict()
|
||||||
|
{
|
||||||
|
hoverTextDict.Clear();
|
||||||
|
hoverTextDict[linkUninstall] = Properties.Resources.IfRemovingDS4Windows;
|
||||||
|
hoverTextDict[cBSwipeProfiles] = Properties.Resources.TwoFingerSwipe;
|
||||||
|
hoverTextDict[cBQuickCharge] = Properties.Resources.QuickCharge;
|
||||||
|
hoverTextDict[pnlXIPorts] = Properties.Resources.XinputPorts;
|
||||||
|
hoverTextDict[lbUseXIPorts] = Properties.Resources.XinputPorts;
|
||||||
|
hoverTextDict[nUDXIPorts] = Properties.Resources.XinputPorts;
|
||||||
|
hoverTextDict[lbLastXIPort] = Properties.Resources.XinputPorts;
|
||||||
|
hoverTextDict[cBCloseMini] = Properties.Resources.CloseMinimize;
|
||||||
|
hoverTextDict[uacPictureBox] = Properties.Resources.UACTask;
|
||||||
|
hoverTextDict[StartWindowsCheckBox] = Properties.Resources.RunAtStartup;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Image AddUACShieldToImage(Image image)
|
private Image AddUACShieldToImage(Image image)
|
||||||
@ -465,7 +486,8 @@ namespace DS4Windows
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void NewVersion()
|
/* TODO: Possibly remove */
|
||||||
|
/*void NewVersion()
|
||||||
{
|
{
|
||||||
if (File.Exists(exepath + "\\1.4.22.ds4w"))
|
if (File.Exists(exepath + "\\1.4.22.ds4w"))
|
||||||
{
|
{
|
||||||
@ -511,6 +533,7 @@ namespace DS4Windows
|
|||||||
File.Delete(exepath + "\\1.4.22.ds4w");
|
File.Delete(exepath + "\\1.4.22.ds4w");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
protected override void SetVisibleCore(bool value)
|
protected override void SetVisibleCore(bool value)
|
||||||
{
|
{
|
||||||
@ -1680,9 +1703,17 @@ namespace DS4Windows
|
|||||||
|
|
||||||
private void Items_MouseHover(object sender, EventArgs e)
|
private void Items_MouseHover(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
switch (((System.Windows.Forms.Control)sender).Name)
|
string hoverText = Properties.Resources.HoverOverItems;
|
||||||
|
string temp = "";
|
||||||
|
if (hoverTextDict.TryGetValue((Control)sender, out temp))
|
||||||
{
|
{
|
||||||
|
hoverText = temp;
|
||||||
|
}
|
||||||
|
|
||||||
|
lbLastMessage.Text = hoverText;
|
||||||
|
|
||||||
|
/*switch (((System.Windows.Forms.Control)sender).Name)
|
||||||
|
{
|
||||||
//if (File.Exists(appdatapath + "\\Auto Profiles.xml"))
|
//if (File.Exists(appdatapath + "\\Auto Profiles.xml"))
|
||||||
case "linkUninstall": lbLastMessage.Text = Properties.Resources.IfRemovingDS4Windows; break;
|
case "linkUninstall": lbLastMessage.Text = Properties.Resources.IfRemovingDS4Windows; break;
|
||||||
case "cBSwipeProfiles": lbLastMessage.Text = Properties.Resources.TwoFingerSwipe; break;
|
case "cBSwipeProfiles": lbLastMessage.Text = Properties.Resources.TwoFingerSwipe; break;
|
||||||
@ -1694,8 +1725,10 @@ namespace DS4Windows
|
|||||||
case "cBCloseMini": lbLastMessage.Text = Properties.Resources.CloseMinimize; break;
|
case "cBCloseMini": lbLastMessage.Text = Properties.Resources.CloseMinimize; break;
|
||||||
default: lbLastMessage.Text = Properties.Resources.HoverOverItems; break;
|
default: lbLastMessage.Text = Properties.Resources.HoverOverItems; break;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
if (lbLastMessage.Text != Properties.Resources.HoverOverItems)
|
//if (lbLastMessage.Text != Properties.Resources.HoverOverItems)
|
||||||
|
if (hoverText != Properties.Resources.HoverOverItems)
|
||||||
lbLastMessage.ForeColor = Color.Black;
|
lbLastMessage.ForeColor = Color.Black;
|
||||||
else
|
else
|
||||||
lbLastMessage.ForeColor = SystemColors.GrayText;
|
lbLastMessage.ForeColor = SystemColors.GrayText;
|
||||||
@ -1749,11 +1782,14 @@ namespace DS4Windows
|
|||||||
bool therewasanxml = false;
|
bool therewasanxml = false;
|
||||||
string[] files = (string[])e.Data.GetData(DataFormats.FileDrop, false);
|
string[] files = (string[])e.Data.GetData(DataFormats.FileDrop, false);
|
||||||
for (int i = 0; i < files.Length; i++)
|
for (int i = 0; i < files.Length; i++)
|
||||||
|
{
|
||||||
if (files[i].EndsWith(".xml"))
|
if (files[i].EndsWith(".xml"))
|
||||||
{
|
{
|
||||||
File.Copy(files[i], appdatapath + "\\Profiles\\" + Path.GetFileName(files[i]), true);
|
File.Copy(files[i], appdatapath + "\\Profiles\\" + Path.GetFileName(files[i]), true);
|
||||||
therewasanxml = true;
|
therewasanxml = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (therewasanxml)
|
if (therewasanxml)
|
||||||
RefreshProfiles();
|
RefreshProfiles();
|
||||||
}
|
}
|
||||||
|
22
DS4Windows/Properties/Resources.Designer.cs
generated
22
DS4Windows/Properties/Resources.Designer.cs
generated
@ -293,7 +293,7 @@ namespace DS4Windows.Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Color by Battey %.
|
/// Looks up a localized string similar to Color by Battery %.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static string ColorByBattery {
|
internal static string ColorByBattery {
|
||||||
get {
|
get {
|
||||||
@ -412,7 +412,7 @@ namespace DS4Windows.Properties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Dim by Battey %.
|
/// Looks up a localized string similar to Dim by Battery %.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static string DimByBattery {
|
internal static string DimByBattery {
|
||||||
get {
|
get {
|
||||||
@ -1573,6 +1573,15 @@ namespace DS4Windows.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Tells Windows to start DS4Windows after login.
|
||||||
|
/// </summary>
|
||||||
|
internal static string RunAtStartup {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("RunAtStartup", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -1945,6 +1954,15 @@ namespace DS4Windows.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to You need to run DS4Windows as the Administrator in order to activate this mode..
|
||||||
|
/// </summary>
|
||||||
|
internal static string UACTask {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("UACTask", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Unassigned.
|
/// Looks up a localized string similar to Unassigned.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -775,4 +775,10 @@
|
|||||||
<data name="SelectMacro" xml:space="preserve">
|
<data name="SelectMacro" xml:space="preserve">
|
||||||
<value>Select a macro</value>
|
<value>Select a macro</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="RunAtStartup" xml:space="preserve">
|
||||||
|
<value>Tells Windows to start DS4Windows after login</value>
|
||||||
|
</data>
|
||||||
|
<data name="UACTask" xml:space="preserve">
|
||||||
|
<value>You need to run DS4Windows as the Administrator in order to activate this mode.</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
Loading…
Reference in New Issue
Block a user