mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-30 13:04:20 +01:00
8d9f69db44
Complete rehaul of the profile settings, bigger workspace to edit controls, and all the settings are on the side now Added option to change the lightbar color, regardless of the profile's lightbar setting (useful for using one profile on the same controller). to change click the colored button beside edit in the main tab Can now set the Gyro as an 1:1 absolute mouse, in this mode the mouse now moves as the controller is moved Removed the experimental exclusive connection button if on the newest Windows 10 build (1511/TH2) Finally updated all the translations and added some new ones (such as Chinese and Polish, the translations sheets have been merged to one so it's easier for me to update
63 lines
2.5 KiB
C#
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;
|
|
|
|
|
|
namespace DS4Windows
|
|
{
|
|
public partial class DupBox : Form
|
|
{
|
|
public string oldfilename;
|
|
DS4Form yes;
|
|
public DupBox(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();
|
|
}
|
|
}
|
|
}
|