From 7d83de924d1807d79429c574b3787ffe250d2f86 Mon Sep 17 00:00:00 2001 From: Z3R0N3 <34522527+RY0M43CH1Z3N@users.noreply.github.com> Date: Fri, 27 Dec 2019 22:37:21 +0100 Subject: [PATCH 01/21] Create spanish translation --- DS4Windows/Translations/Strings.esp.resx | 309 +++++++++++++++++++++++ 1 file changed, 309 insertions(+) create mode 100644 DS4Windows/Translations/Strings.esp.resx diff --git a/DS4Windows/Translations/Strings.esp.resx b/DS4Windows/Translations/Strings.esp.resx new file mode 100644 index 0000000..11ecfd2 --- /dev/null +++ b/DS4Windows/Translations/Strings.esp.resx @@ -0,0 +1,309 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Acelerar + + + Acción + + + Añadir Directorio + + + Añadir Programas + + + Añadir al Menú de Inicio de Programas + + + Añadir Juegos de Steam + + + Todo + + + Perfiles automáticos + + + Batería + + + Navegar + + + Navegar en Otros Programas + + + Cancelar + + + Buscar Actualizaciones + + + Buscar Actualizaciones de DS4Windows al Inicio + + + Vaciar + + + Cerrar Minimizado + + + Color + + + Mando 1 + + + Mando 2 + + + Mando 3 + + + Mando 4 + + + Mandos + + + Panel de Control + + + Eliminar + + + Configuración del Mando/Driver + + + Duplicar + + + Editar + + + Editar Acción + + + Exportar + + + Todo + + + Gyro + + + Ocultar Desmarcado + + + Importar + + + Stick Izquierdo + + + Registro + + + Nombre + + + Nuevo + + + Nueva Acción + + + Nuevo Perfil + + + Ninguno + + + Ruta + + + Perfil + + + Directorio del Perfil + + + Cambio Rápido + + + Guardar + + + Quitar + + + Quitar Acción + + + Stick Derecho + + + Vibración + + + Ejecutar al Iniciar el Equipo + + + Guardar + + + Guardar + + + Opciones + + + Mostrar Notificaciones + + + Iniciar Minimizado + + + Iniciar + + + Estado + + + Detener + + + Desplazar + + + Deslizar + + + Pulsar + + + Disparador + + + Solo Advertencias + + From d2b5be610e0fffb458856586d027b7b262821d12 Mon Sep 17 00:00:00 2001 From: Melati Date: Fri, 27 Dec 2019 19:14:58 -0300 Subject: [PATCH 02/21] Add file Strings.pt-BR.resx --- DS4Windows/DS4WinWPF.csproj | 4 + DS4Windows/Translations/Strings.pt-BR.resx | 309 +++++++++++++++++++++ DS4Windows/Translations/Strings.resx | 6 +- contributors.txt | 1 + 4 files changed, 316 insertions(+), 4 deletions(-) create mode 100644 DS4Windows/Translations/Strings.pt-BR.resx diff --git a/DS4Windows/DS4WinWPF.csproj b/DS4Windows/DS4WinWPF.csproj index ed51a29..8a0ef11 100644 --- a/DS4Windows/DS4WinWPF.csproj +++ b/DS4Windows/DS4WinWPF.csproj @@ -370,6 +370,10 @@ Designer Strings.resx + + Designer + Strings.resx + Designer Strings.resx diff --git a/DS4Windows/Translations/Strings.pt-BR.resx b/DS4Windows/Translations/Strings.pt-BR.resx new file mode 100644 index 0000000..f90ab11 --- /dev/null +++ b/DS4Windows/Translations/Strings.pt-BR.resx @@ -0,0 +1,309 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Aceleração + + + Ação + + + Adicionar Diretório + + + Adicionar Programas + + + Adicionar Programas do Menu de Inicialização + + + Adicionar Jogos da Steam + + + Todos + + + Perfis Automáticos + + + Bateria + + + Procurar + + + Procurar por Outros Programas + + + Cancelar + + + Verificar Atualizações Agora + + + Verificar Atualizações para DS4Windows na inicialização + + + Limpar + + + Fechar Minimiza + + + Cor + + + Controle 1 + + + Controle 2 + + + Controle 3 + + + Controle 4 + + + Controles + + + Painel de COntrole + + + Deletar + + + Configuração Controle/Driver + + + Duplicar + + + Editar + + + Editar Ação + + + Exportar + + + Cheio + + + Giroscópio + + + Ocultar Desmarcados + + + Importar + + + Controle Esquerdo + + + Registro + + + Nome + + + Novo + + + Nova Ação + + + Novo Perfil + + + Nenhum + + + Caminho + + + Perfil + + + Pasta de Perfil + + + Carregamento Rápido + + + Gravar + + + Remover + + + Remover Ação + + + Controle Direito + + + Vibração + + + Executar na Inicialização + + + Salvar + + + Salvar + + + Configurações + + + Mostrar Notificações + + + Iniciar Minimizado + + + Começar + + + Status + + + Parar + + + Rolagem + + + Deslizar + + + Pressionar + + + Gatilho + + + Apenas Avisos + + \ No newline at end of file diff --git a/DS4Windows/Translations/Strings.resx b/DS4Windows/Translations/Strings.resx index bbf5f50..2b21599 100644 --- a/DS4Windows/Translations/Strings.resx +++ b/DS4Windows/Translations/Strings.resx @@ -160,8 +160,7 @@ Check for DS4Windows Updates at Startup - Clear - + Clear Close Minimizes @@ -293,8 +292,7 @@ Stop - Scroll - + Scroll Slide diff --git a/contributors.txt b/contributors.txt index 78d26be..1e47c7b 100644 --- a/contributors.txt +++ b/contributors.txt @@ -12,3 +12,4 @@ Rajko Stojadinovic (rajkosto) Sander0542 xrossb Yuki-nyan +Leonardo Melati (Leomelati) From cde7d19c80dc987c8af46059a4065bf81cf66aa1 Mon Sep 17 00:00:00 2001 From: "ryochan7@protonmail.com" Date: Sun, 29 Dec 2019 16:28:58 -0600 Subject: [PATCH 03/21] Updated ViGEmBus installer URL Related to issue #982 --- DS4Windows/DS4Forms/WelcomeDialog.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DS4Windows/DS4Forms/WelcomeDialog.xaml.cs b/DS4Windows/DS4Forms/WelcomeDialog.xaml.cs index 8d4f092..03d7fbe 100644 --- a/DS4Windows/DS4Forms/WelcomeDialog.xaml.cs +++ b/DS4Windows/DS4Forms/WelcomeDialog.xaml.cs @@ -14,7 +14,7 @@ namespace DS4WinWPF.DS4Forms public partial class WelcomeDialog : Window { private const string InstallerDL = - "https://github.com/ViGEm/ViGEmBus/releases/download/v1.16.112/ViGEmBus_Setup_1.16.115.exe"; + "https://github.com/ViGEm/ViGEmBus/releases/download/setup-v1.16.115/ViGEmBus_Setup_1.16.115.exe"; private const string InstFileName = "ViGEmBus_Setup_1.16.115.exe"; private string tempInstFileName; From 34d2d74415f1eb706b12a2a80cb6c73117d7f704 Mon Sep 17 00:00:00 2001 From: "ryochan7@protonmail.com" Date: Sun, 29 Dec 2019 16:33:23 -0600 Subject: [PATCH 04/21] Added minor check if timer needs to be run --- DS4Windows/DS4Forms/WelcomeDialog.xaml.cs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/DS4Windows/DS4Forms/WelcomeDialog.xaml.cs b/DS4Windows/DS4Forms/WelcomeDialog.xaml.cs index 03d7fbe..891d687 100644 --- a/DS4Windows/DS4Forms/WelcomeDialog.xaml.cs +++ b/DS4Windows/DS4Forms/WelcomeDialog.xaml.cs @@ -87,17 +87,26 @@ namespace DS4WinWPF.DS4Forms { File.Move(tempInstFileName, filename); } + success = false; // Reset for later check if (File.Exists(DS4Windows.Global.exedirpath + $"\\{InstFileName}")) { //vigemInstallBtn.Content = Properties.Resources.OpeningInstaller; monitorProc = Process.Start(DS4Windows.Global.exedirpath + $"\\{InstFileName}"); vigemInstallBtn.Content = Properties.Resources.Installing; + success = true; } - monitorTimer = new NonFormTimer(); - monitorTimer.Elapsed += ViGEmInstallTimer_Tick; - monitorTimer.Start(); + if (success) + { + monitorTimer = new NonFormTimer(); + monitorTimer.Elapsed += ViGEmInstallTimer_Tick; + monitorTimer.Start(); + } + else + { + vigemInstallBtn.Content = Properties.Resources.InstallFailed; + } } private void ViGEmInstallTimer_Tick(object sender, System.Timers.ElapsedEventArgs e) From 1ce2f50cbaf940ba5b3ff39a9dbad182e58d4217 Mon Sep 17 00:00:00 2001 From: "ryochan7@protonmail.com" Date: Sun, 29 Dec 2019 16:48:03 -0600 Subject: [PATCH 05/21] Minor refactor of tray menu Related to issue #947 --- .../DS4Forms/ViewModels/TrayIconViewModel.cs | 61 ++++++++++--------- 1 file changed, 32 insertions(+), 29 deletions(-) diff --git a/DS4Windows/DS4Forms/ViewModels/TrayIconViewModel.cs b/DS4Windows/DS4Forms/ViewModels/TrayIconViewModel.cs index 1046dcf..6680336 100644 --- a/DS4Windows/DS4Forms/ViewModels/TrayIconViewModel.cs +++ b/DS4Windows/DS4Forms/ViewModels/TrayIconViewModel.cs @@ -18,6 +18,11 @@ namespace DS4WinWPF.DS4Forms.ViewModels public static string trayTitle = $"DS4Windows v{Global.exeversion}"; private ContextMenu contextMenu; private MenuItem changeServiceItem; + private MenuItem openItem; + private MenuItem minimizeItem; + private MenuItem openProgramItem; + private MenuItem closeItem; + public string TooltipText { get => tooltipText; set @@ -69,6 +74,15 @@ namespace DS4WinWPF.DS4Forms.ViewModels changeServiceItem.Click += ChangeControlServiceItem_Click; changeServiceItem.IsEnabled = false; + openItem = new MenuItem() { Header = "Open" }; + openItem.Click += OpenMenuItem_Click; + minimizeItem = new MenuItem() { Header = "Minimize" }; + minimizeItem.Click += MinimizeMenuItem_Click; + openProgramItem = new MenuItem() { Header = "Open Program Folder" }; + openProgramItem.Click += OpenProgramFolderItem_Click; + closeItem = new MenuItem() { Header = "Exit (Middle Mouse)" }; ; + closeItem.Click += ExitMenuItem_Click; + PopulateControllerList(); PopulateToolText(); PopulateContextMenu(); @@ -187,25 +201,16 @@ namespace DS4WinWPF.DS4Forms.ViewModels idx++; } + if (idx == 0) + { + item.IsEnabled = false; + } + _colLocker.ExitReadLock(); items.Add(item); items.Add(new Separator()); - item = changeServiceItem; - items.Add(item); - item = new MenuItem() { Header = "Open" }; - item.Click += OpenMenuItem_Click; - items.Add(item); - item = new MenuItem() { Header = "Minimize" }; - item.Click += MinimizeMenuItem_Click; - items.Add(item); - item = new MenuItem() { Header = "Open Program Folder" }; - item.Click += OpenProgramFolderItem_Click; - items.Add(item); - items.Add(new Separator()); - item = new MenuItem() { Header = "Exit (Middle Mouse)" }; - item.Click += ExitMenuItem_Click; - items.Add(item); + PopulateStaticItems(); } private void ChangeControlServiceItem_Click(object sender, System.Windows.RoutedEventArgs e) @@ -370,23 +375,21 @@ namespace DS4WinWPF.DS4Forms.ViewModels //contextMenu.Items.Clear(); } + private void PopulateStaticItems() + { + ItemCollection items = contextMenu.Items; + items.Add(changeServiceItem); + items.Add(openItem); + items.Add(minimizeItem); + items.Add(openProgramItem); + items.Add(new Separator()); + items.Add(closeItem); + } + public void ClearContextMenu() { contextMenu.Items.Clear(); - ItemCollection items = contextMenu.Items; - MenuItem item; - item = changeServiceItem; - items.Add(item); - item = new MenuItem() { Header = "Open" }; - item.Click += OpenMenuItem_Click; - items.Add(item); - item = new MenuItem() { Header = "Minimize" }; - item.Click += MinimizeMenuItem_Click; - items.Add(item); - items.Add(new Separator()); - item = new MenuItem() { Header = "Exit (Middle Mouse)" }; - item.Click += ExitMenuItem_Click; - items.Add(item); + PopulateStaticItems(); } private void ExitMenuItem_Click(object sender, System.Windows.RoutedEventArgs e) From e39cccf279c88c5a4c49f2ef2b6c5740ffc37ec6 Mon Sep 17 00:00:00 2001 From: "ryochan7@protonmail.com" Date: Mon, 30 Dec 2019 01:18:19 -0600 Subject: [PATCH 06/21] Make sure RecordBox can have focus. Allow extra keys to be usable while recording a macro. --- DS4Windows/DS4Forms/RecordBox.xaml | 2 +- DS4Windows/DS4Forms/RecordBox.xaml.cs | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/DS4Windows/DS4Forms/RecordBox.xaml b/DS4Windows/DS4Forms/RecordBox.xaml index 903ed7c..6fcc38e 100644 --- a/DS4Windows/DS4Forms/RecordBox.xaml +++ b/DS4Windows/DS4Forms/RecordBox.xaml @@ -10,7 +10,7 @@ lex:ResxLocalizationProvider.DefaultDictionary="Strings" xmlns:local="clr-namespace:DS4WinWPF.DS4Forms" mc:Ignorable="d" - d:DesignHeight="350" d:DesignWidth="800" KeyDown="UserControl_KeyDown" KeyUp="UserControl_KeyUp" MouseDown="UserControl_MouseDown" MouseUp="UserControl_MouseUp" > + d:DesignHeight="350" d:DesignWidth="800" KeyDown="UserControl_KeyDown" KeyUp="UserControl_KeyUp" MouseDown="UserControl_MouseDown" MouseUp="UserControl_MouseUp" Focusable="True" > diff --git a/DS4Windows/DS4Forms/RecordBox.xaml.cs b/DS4Windows/DS4Forms/RecordBox.xaml.cs index cfa4f32..ac2c07e 100644 --- a/DS4Windows/DS4Forms/RecordBox.xaml.cs +++ b/DS4Windows/DS4Forms/RecordBox.xaml.cs @@ -62,6 +62,23 @@ namespace DS4WinWPF.DS4Forms private void SetupLateEvents() { macroListBox.SelectionChanged += MacroListBox_SelectionChanged; + recordBoxVM.MacroSteps.CollectionChanged += MacroSteps_CollectionChanged; + } + + private void MacroSteps_CollectionChanged(object sender, + System.Collections.Specialized.NotifyCollectionChangedEventArgs e) + { + if (e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Add) + { + Dispatcher.BeginInvoke((Action)(() => + { + int count = recordBoxVM.MacroSteps.Count; + if (count > 0) + { + macroListBox.ScrollIntoView(recordBoxVM.MacroSteps[count - 1]); + } + })); + } } private void MacroListBox_SelectionChanged(object sender, SelectionChangedEventArgs e) @@ -271,12 +288,14 @@ namespace DS4WinWPF.DS4Forms recordBoxVM.KeysdownMap.Add(value, true); } + e.Handled = true; //Console.WriteLine(e.Key); //Console.WriteLine(e.SystemKey); } else if (e.Key == Key.Delete && recordBoxVM.MacroStepIndex >= 0) { recordBoxVM.MacroSteps.RemoveAt(recordBoxVM.MacroStepIndex); + e.Handled = true; } } @@ -294,6 +313,7 @@ namespace DS4WinWPF.DS4Forms recordBoxVM.KeysdownMap.Remove(value); } + e.Handled = true; //Console.WriteLine(e.Key); //Console.WriteLine(e.SystemKey); } @@ -499,6 +519,7 @@ namespace DS4WinWPF.DS4Forms DS4Windows.MacroStep.StepType.ActDown, DS4Windows.MacroStep.StepOutput.Button); recordBoxVM.AddMacroStep(step); recordBoxVM.KeysdownMap.Add(value, true); + e.Handled = true; } } @@ -521,6 +542,7 @@ namespace DS4WinWPF.DS4Forms DS4Windows.MacroStep.StepType.ActUp, DS4Windows.MacroStep.StepOutput.Button); recordBoxVM.AddMacroStep(step); recordBoxVM.KeysdownMap.Remove(value); + e.Handled = true; } } } From cd35daee423744a2e5e08735871be998f61bb7b2 Mon Sep 17 00:00:00 2001 From: "ryochan7@protonmail.com" Date: Mon, 30 Dec 2019 01:18:33 -0600 Subject: [PATCH 07/21] Minor tweak --- DS4Windows/DS4Forms/MainWindow.xaml.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/DS4Windows/DS4Forms/MainWindow.xaml.cs b/DS4Windows/DS4Forms/MainWindow.xaml.cs index 619c208..802f88f 100644 --- a/DS4Windows/DS4Forms/MainWindow.xaml.cs +++ b/DS4Windows/DS4Forms/MainWindow.xaml.cs @@ -301,7 +301,10 @@ Suspend support not enabled.", true); Dispatcher.BeginInvoke((Action)(() => { int count = logListView.Items.Count; - logListView.ScrollIntoView(logvm.LogItems[count > 0 ? count-1 : 0]); + if (count > 0) + { + logListView.ScrollIntoView(logvm.LogItems[count - 1]); + } })); } } From 109d2587c45491a9fa63b2e2fea86311ccf71ab2 Mon Sep 17 00:00:00 2001 From: "ryochan7@protonmail.com" Date: Mon, 30 Dec 2019 12:06:17 -0600 Subject: [PATCH 08/21] Move overlay buttons in Profile editor --- DS4Windows/DS4Forms/ProfileEditor.xaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/DS4Windows/DS4Forms/ProfileEditor.xaml b/DS4Windows/DS4Forms/ProfileEditor.xaml index 751dde4..5b50c87 100644 --- a/DS4Windows/DS4Forms/ProfileEditor.xaml +++ b/DS4Windows/DS4Forms/ProfileEditor.xaml @@ -57,16 +57,16 @@