Example #1
0
        private void LoadProxySettings()
        {
            ClamConfig config = new ClamConfig();

            ProxyServerTextBox.Text   = config.ReadClamConfigKey("host");
            ProxyPortTextBox.Text     = config.ReadClamConfigKey("port");
            ProxyUserTextBox.Text     = config.ReadClamConfigKey("user");
            ProxyPasswordTextBox.Text = config.ReadClamConfigKey("password");
        }
Example #2
0
        private void QuarantineToolBarButton_Click(object sender, EventArgs e)
        {
            string quarDir = ClamAVConfig.ReadClamConfigKey("quarantinedir");

            //Open Quarantinne Directory in explorer
            if (Directory.Exists(quarDir))
            {
                System.Diagnostics.Process.Start(quarDir);
            }
        }
Example #3
0
 /// <summary>
 /// Set Proxy on WebRequest - should hold for all subsequent webrequests
 /// </summary>
 public static void SetProxy()
 {
     SetProxyHost();
     if (myProxy != null)
     {
         NetworkCredential credentials = new NetworkCredential(ClamWinConfig.ReadClamConfigKey("user"), ClamWinConfig.ReadClamConfigKey("password"));
         WebRequest.DefaultWebProxy             = myProxy;
         WebRequest.DefaultWebProxy.Credentials = credentials;
     }
 }