| | |
| | | |
| | | if (!foundTargetSubnet && ipSelect.Items.Count > 0) |
| | | { |
| | | MessageBox.Show($"未找到网段为 {targetSubnet} 的IP地址,将默认选中第一个IP。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); |
| | | //MessageBox.Show($"未找到网段为 {targetSubnet} 的IP地址,将默认选中第一个IP。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); |
| | | ipSelect.SelectedIndex = 0; |
| | | } |
| | | |
| | | to_ipTxt.Text = ipSelect.SelectedItem?.ToString(); |
| | | |
| | | // 初始化 AutoMapper |
| | |
| | | string startupPath = Environment.GetFolderPath(Environment.SpecialFolder.Startup); // 启动文件夹路径 |
| | | CreateShortcut(shortcutName, targetPath, startupPath); // 创建快捷方式 |
| | | |
| | | if (ipSelect.Items.Count > 0) |
| | | { |
| | | StartReceive(); // 启动程序 |
| | | CreateDatabase(); // 初始化数据库 |
| | | } |
| | | |
| | | // 删除一个月前的数据 |
| | | new Thread(AutoDeleteHistoryDate.Handler).Start(); |