фиксы переключения интерфейсов

This commit is contained in:
kirill.labutin 2026-02-07 23:38:41 +03:00
parent a9fa99cf53
commit 3906ca14d1
1 changed files with 4 additions and 0 deletions

View File

@ -38,11 +38,13 @@ namespace EthernetSwitcher
switch (newMode) switch (newMode)
{ {
case EthernetMode.Primary: case EthernetMode.Primary:
DeselectInterface(settings.SecondaryName);
SelectInterface(settings.PrimaryName); SelectInterface(settings.PrimaryName);
UpdateIconFromResource("icon_yellow.ico"); UpdateIconFromResource("icon_yellow.ico");
break; break;
case EthernetMode.Secondary: case EthernetMode.Secondary:
DeselectInterface(settings.PrimaryName);
SelectInterface(settings.SecondaryName); SelectInterface(settings.SecondaryName);
UpdateIconFromResource("icon_yellow.ico"); UpdateIconFromResource("icon_yellow.ico");
break; break;
@ -71,11 +73,13 @@ namespace EthernetSwitcher
switch (settings.Mode) switch (settings.Mode)
{ {
case EthernetMode.Primary: case EthernetMode.Primary:
DeselectInterface(settings.SecondaryName);
SelectInterface(settings.PrimaryName); SelectInterface(settings.PrimaryName);
UpdateIconFromResource("icon_yellow.ico"); UpdateIconFromResource("icon_yellow.ico");
break; break;
case EthernetMode.Secondary: case EthernetMode.Secondary:
DeselectInterface(settings.PrimaryName);
SelectInterface(settings.SecondaryName); SelectInterface(settings.SecondaryName);
UpdateIconFromResource("icon_yellow.ico"); UpdateIconFromResource("icon_yellow.ico");
break; break;