private void Button_Click_4(object sender, RoutedEventArgs e) { ConfigureAppConfig.DellAll(); ConfigureAppConfig.AddAndUPAppSeting("isAuto", "2"); CheckAdministrator(); AutoRun(); MessageBox.Show("初始化程序,完成!\n请重新配置!"); }
private void WriteSeting() { ConfigureAppConfig.AddAndUPAppSeting("pageNum", newPages.Count.ToString()); foreach (var page in newPages) { if (string.IsNullOrEmpty(page.Page)) { continue; } ConfigureAppConfig.AddAndUPAppSeting("page" + page.Id.ToString(), page.Page); } }
private void Button_Click_3(object sender, RoutedEventArgs e) { //清除 newPages.Clear(); //获取文本内容 string error = FromTBGetPages(); if (!string.IsNullOrWhiteSpace(error)) { MessageBox.Show($"第{error}行网址输入错误请修改"); return; } //写入配置 WriteSeting(); //开机启动+检测 ConfigureAppConfig.AddAndUPAppSeting("isAuto", "1"); CheckAdministrator(); AutoRun(); MessageBox.Show("设置成功!欢迎使用!"); }