Пример #1
0
        private void FixCertificateButton_OnClick(object sender, RoutedEventArgs e)
        {
            var userRegisterProvider = new InternetSettingProvider();

            userRegisterProvider.SetCertificateVerificationChecked(false);
            MessageBox.Show(Window.GetWindow(this), "设置成功", "提示");
        }
Пример #2
0
        private async void FixIeButton_OnClick(object sender, RoutedEventArgs e)
        {
            var userRegisterProvider = new InternetSettingProvider();
            //还原高级设置
            await userRegisterProvider.RevertHighSettingAsync();

            //重置IE
            await userRegisterProvider.ResetInternetSettingAsync();

            //设置证书吊销验证不勾选
            userRegisterProvider.SetCertificateVerificationChecked(false);
        }
Пример #3
0
 private void FixIe()
 {
     try
     {
         var userRegisterProvider = new InternetSettingProvider();
         userRegisterProvider.SetCertificateVerificationChecked(true);
         userRegisterProvider.SetSSLAndTSLState(false);
         userRegisterProvider.SetInternetProtectLevelNormal();
         LogHelper.Log($@"{true}{DataSepartor}{string.Empty}");
     }
     catch (Exception e)
     {
         LogHelper.Log($@"{false}{DataSepartor}{e.Message}");
     }
     finally
     {
         Environment.Exit(0);
     }
 }