private void ChangeSettings() { ReadIPList count = new ReadIPList(); int lineCounter = count.GetLineCounter(); bool isChangeSetting = false; if (lineCounter == 0) return; for (int i = 0; i < lineCounter; i++) { if (this.macAddress == count.myIpList[i].macAddress) { this.hostName = count.myIpList[i].hostName; this.ipAddress = count.myIpList[i].ipAddress; this.subnetMask= count.myIpList[i].subnetMask; this.gatewayAddress = count.myIpList[i].gatewayAddress; this.mainDns = count.myIpList[i].mainDns; this.subDns = count.myIpList[i].subDns; isChangeSetting = true; } } if (isChangeSetting == false) { //MessageBox.Show("맞는 MAC 리스트가 없습니다"); return; } ChangeAddress(); ChangeDns(); ChangeHostName(); }