ajuste na alteracao do IP

This commit is contained in:
Diego Freitas 2026-06-03 09:55:39 -03:00
parent c591e53d67
commit ca8b0123b5
1 changed files with 2 additions and 1 deletions

View File

@ -460,9 +460,10 @@ namespace AgroBase.Forms.IHM
private async void SalvarParametrosConfiguracao()
{
string _interface = cmbInterface.Text.Split('(')[0].Trim();
string _ipInterface = EthernetService.ObterIpAtual(_interface);
var p = VariaveisEquipamento.Parametros;
bool ip_mudou = p.rover_ip != txtEquipamentoIP.Text || p.rover_gateway != txtEquipamentoGateway.Text || p.rover_submask != txtEquipamentoSubmask.Text;
bool ip_mudou = p.rover_ip != txtEquipamentoIP.Text || p.rover_gateway != txtEquipamentoGateway.Text || p.rover_submask != txtEquipamentoSubmask.Text || p.rover_ip != _ipInterface;
bool ip_sucesso = !ip_mudou;
p.base_ip = txtBaseIP.Text;
p.base_porta_caminho = (int)nudPortaCaminho.Value;