Refresh GUI documentation and profile synchronization
This commit is contained in:
+19
-5
@@ -4,7 +4,11 @@
|
||||
|
||||
## Verantwortung
|
||||
|
||||
Hauptkonfigurationsfenster: zeigt alle 20 MX-Buttons und 4 Encoder, öffnet `ActionDialog` bei Klick, speichert Config + Makros auf das Board.
|
||||
Hauptkonfigurationsfenster: wählt eines von drei Profilen, zeigt dessen 20
|
||||
MX-Buttons und 4 Encoder, öffnet `ActionDialog` bei Klick und speichert Config
|
||||
plus Makros auf das Board.
|
||||
|
||||
Oberhalb des Tasten-Grids befindet sich die Profilauswahl für Profil 1 bis 3.
|
||||
|
||||
## Layout
|
||||
|
||||
@@ -45,15 +49,23 @@ Entspricht `key_id - 5` in der Firmware. Im TableLayoutPanel: Spalte=col, Zeile=
|
||||
|
||||
```csharp
|
||||
Task.Run(() => {
|
||||
_serial.SendConfig(_config); // ~300 ms
|
||||
Thread.Sleep(50);
|
||||
_serial.SendMacros(_macros); // ~250 ms
|
||||
bool cfgOk = _serial.SendConfig(_config); // wartet auf ACK/NACK
|
||||
bool macroOk = _serial.SendMacros(_macros);
|
||||
InvokeOnUi(() => { /* Button-Text + Enabled zurücksetzen */ });
|
||||
});
|
||||
```
|
||||
|
||||
Save-Button wird während der Übertragung deaktiviert, Text wechselt zu "Wird gesendet...".
|
||||
Save-Button ist nur aktiviert wenn Board verbunden (`_serial.IsConnected`).
|
||||
Config und Makros werden sequenziell gesendet; ein gemeinsamer Transfer-Lock
|
||||
verhindert parallele Blob-Transfers.
|
||||
|
||||
## Profile
|
||||
|
||||
Die Profilauswahl setzt `ActiveProfileIndex` und schaltet alle Komfortzugriffe
|
||||
von `DeviceConfig` auf das gewählte Profil um. `RefreshAll()` synchronisiert
|
||||
die Auswahl nach Board-Reload oder JSON-Import und zeichnet anschließend die
|
||||
20 MX- und 12 Encoder-Schaltflächen neu.
|
||||
|
||||
## Import / Export
|
||||
|
||||
@@ -64,7 +76,9 @@ Fehler (IO, JSON-Parse, falsche Version) werden per `MessageBox` angezeigt.
|
||||
|
||||
## RefreshAll
|
||||
|
||||
Wird von `TrayApp` nach erfolgreicher Config vom Board aufgerufen (über `_configForm?.RefreshAll()`). Aktualisiert alle 20 MX-Buttons und 12 Encoder-Buttons ohne Dialog.
|
||||
Wird von `TrayApp` nach erfolgreicher Config oder Makrotabelle vom Board sowie
|
||||
nach JSON-Import aufgerufen. Aktualisiert Profilauswahl, alle 20 MX-Buttons und
|
||||
12 Encoder-Buttons ohne Dialog.
|
||||
|
||||
## Extensions (in derselben Datei)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user