public FrmLogin() { InitializeComponent(); Vars.InitGlobalVars(); db = new UnitOfWork(); FormClosed += (s, e) => { db.Dispose(); }; lbVer.Text = "Аптека v." + Vars.Version; var sl = CNet.GetGatewayAddresses(); lbIp.Text = $"Ip адрес {CNet.LocalIpAddressAll(sl)} шлюз {sl}"; }
private void frmPing_Shown(object sender, EventArgs e) { meLog.Text = ""; string ip = CNet.GetGatewayAddresses(); if (!CNet.LocalIpAddress().Contains("10.10")) { if (ip == "") { meLog.Text += "Хато - Шлюз"; } else { meLog.Text += CNet.Ping("Шлюз ", ip); } meLog.Text += Environment.NewLine; } meLog.Text += CNet.Ping("Сервер ", "172.250.1.206"); }