From 7a27345f0a65f901c752e33e985572ed1f26ddc1 Mon Sep 17 00:00:00 2001 From: Arnaud HOUDELETTE-LANGLOIS Date: Thu, 29 Oct 2026 00:28:47 +0100 Subject: [PATCH] =?UTF-8?q?Correction=20bug=20de=20r=C3=A9percussion=20sur?= =?UTF-8?q?=20Sequenceur=20Maitre=20sur=20ajout=20suppression=20entr=C3=A9?= =?UTF-8?q?es=20dans=20les=20Seq=20Macro,=20Midi=20et=20OSC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DMX-2.0/SequenceurMacro.cs | 2 +- DMX-2.0/SequenceurMidi.cs | 2 +- DMX-2.0/SequenceurOSC.cs | 12 ++++++++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/DMX-2.0/SequenceurMacro.cs b/DMX-2.0/SequenceurMacro.cs index 4b13ff2..9240eba 100644 --- a/DMX-2.0/SequenceurMacro.cs +++ b/DMX-2.0/SequenceurMacro.cs @@ -658,7 +658,7 @@ namespace DMX2 var cmd = regexCommand2.Match(commands[i]); if(cmd.Success){ int ef = int.Parse(cmd.Groups["effet"].Value); - if (ef-1>index) { + if (ef>index) { ef++; commands[i] = ef.ToString() + cmd.Groups["params"].Value; } diff --git a/DMX-2.0/SequenceurMidi.cs b/DMX-2.0/SequenceurMidi.cs index 683960e..f36b102 100644 --- a/DMX-2.0/SequenceurMidi.cs +++ b/DMX-2.0/SequenceurMidi.cs @@ -566,7 +566,7 @@ namespace DMX2 var cmd = regexCommand2.Match(commands[i]); if(cmd.Success){ int ef = int.Parse(cmd.Groups["effet"].Value); - if (ef-1>index) { + if (ef>index) { ef++; commands[i] = ef.ToString() + cmd.Groups["params"].Value; } diff --git a/DMX-2.0/SequenceurOSC.cs b/DMX-2.0/SequenceurOSC.cs index c781214..766d0ad 100644 --- a/DMX-2.0/SequenceurOSC.cs +++ b/DMX-2.0/SequenceurOSC.cs @@ -309,6 +309,7 @@ namespace DMX2 string[] data = enCours.Commande.Split(' '); OSCMessage message = new OSCMessage(data[0]); + if (data.Length < 2) return; for (int i = 1; i < data.Length; i++) { if (int.TryParse(data[i], out int di)) @@ -320,7 +321,14 @@ namespace DMX2 var buff = message.Encode(); - udpClient.Send(buff, buff.Length); + try + { + udpClient.Send(buff, buff.Length); + } + catch (SocketException) + { + + } } @@ -479,7 +487,7 @@ namespace DMX2 var cmd = regexCommand2.Match(commands[i]); if(cmd.Success){ int ef = int.Parse(cmd.Groups["effet"].Value); - if (ef-1>index) { + if (ef>index) { ef++; commands[i] = ef.ToString() + cmd.Groups["params"].Value; }