【发布时间】:2018-02-19 00:01:47
【问题描述】:
选择选项后如何更改路由器IP地址并使用按钮保存。
想做一个小程序,可以方便快捷的更改路由器的IP地址。
namespace WpfApplication1
{
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private void radioButton_Checked(object sender, RoutedEventArgs e)
{
}
private void button_Click(object sender, RoutedEventArgs e)
{
if (checkbox1.IsChecked == true)
{
netsh interface ip set address "Ethernet" static 192.168.1.8 255.255.255.0 192.168.1.1 1
} else if (checkbox2.IsChecked == true)
{
netsh interface ip set address "Ethernet" static 192.168.1.8 255.255.255.0 192.168.1.3 1
} else
{
}
}
}
}
【问题讨论】:
-
已经回答了好几次了,比如她link