cemu-DS4Windows/DS4Tool/MessageTextBox.cs
jays2kings b4a6249fa3 Version 1.4.156
Significant CPU usage decrease by reworking how single instances work,
on a mobile i7 for example with a single controller connected usage went
from 4-6% to .5-1.5%. With no controllers connected the usage went from
2.5-4.5% to 0%!
As mentioned before, single instances has been reworked, so trying to
relaunch DS4W more reliably opens the previous instance
Fixed Shift modifier not working if main controls were not modified
Fixed Tilt Left for Shift modifier
Fixed default text of shift controls
Remove touchpad movement notification when swipe for controls is enabled
Can test the rumble motors separately via Heavy and Light
Truly implemented Flush HID (I think)
Slight change in profiles, when loading profiles in for the first time
in this new version, there may be a slight delay
Updated French Translations
Removed mouse moving as an option for touch swipes controls, as they
weren't implemented nor have a purpose to be
2014-11-18 16:23:41 -05:00

63 lines
2.5 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DS4Control;
namespace DS4Windows
{
public partial class MessageTextBox : Form
{
public string oldfilename;
DS4Form yes;
public MessageTextBox(string name, DS4Form mainwindow)
{
InitializeComponent();
oldfilename = name;
yes = mainwindow;
}
private void button1_Click(object sender, EventArgs e)
{
if (tBProfile.Text != null && tBProfile.Text != "" && !tBProfile.Text.Contains("\\") && !tBProfile.Text.Contains("/") && !tBProfile.Text.Contains(":") && !tBProfile.Text.Contains("*") && !tBProfile.Text.Contains("?") && !tBProfile.Text.Contains("\"") && !tBProfile.Text.Contains("<") && !tBProfile.Text.Contains(">") && !tBProfile.Text.Contains("|"))
{
System.IO.File.Copy(Global.appdatapath + "\\Profiles\\" + oldfilename + ".xml", Global.appdatapath + "\\Profiles\\" + tBProfile.Text + ".xml", true);
yes.RefreshProfiles();
this.Close();
}
else
MessageBox.Show(Properties.Resources.ValidName, Properties.Resources.NotValid, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
private void tBProfile_TextChanged(object sender, EventArgs e)
{
if (tBProfile.Text != null && tBProfile.Text != "" && !tBProfile.Text.Contains("\\") && !tBProfile.Text.Contains("/") && !tBProfile.Text.Contains(":") && !tBProfile.Text.Contains("*") && !tBProfile.Text.Contains("?") && !tBProfile.Text.Contains("\"") && !tBProfile.Text.Contains("<") && !tBProfile.Text.Contains(">") && !tBProfile.Text.Contains("|"))
tBProfile.ForeColor = System.Drawing.SystemColors.WindowText;
else
tBProfile.ForeColor = System.Drawing.SystemColors.GrayText;
}
private void tBProfile_Enter(object sender, EventArgs e)
{
if (tBProfile.Text == "<" + Properties.Resources.TypeNewName + ">")
tBProfile.Text = "";
}
private void tBProfile_Leave(object sender, EventArgs e)
{
if (tBProfile.Text == "")
tBProfile.Text = "<" + Properties.Resources.TypeNewName + ">";
}
private void button2_Click(object sender, EventArgs e)
{
this.Close();
}
}
}