Ejemplo n.º 1
0
        private void frmMain_Load(object sender, EventArgs e)
        {
            try
            {
                if (!Directory.Exists(CommonFunctions.SettingsPath))
                {
                    Directory.CreateDirectory(CommonFunctions.SettingsPath);
                }
            }
            catch (Exception ex)
            {
                lblMessage.ForeColor = Color.Red;
                lblMessage.Text      = ex.Message;
            }

            settings = new AppSettingsManager(CommonFunctions.SettingsPath +
                                              CommonFunctions.AppConfigFile);
            netSettings = new NetSettings(CommonFunctions.SettingsPath +
                                          CommonFunctions.NetSettingsFile);
            if (!settings.LoadConfig())
            {
                lblMessage.ForeColor = Color.Red;
                lblMessage.Text      = settings.ConfigError;
                return;
            }

            NetConfigStatus status = netSettings.LoadConfig();

            if (status != NetConfigStatus.OK)
            {
                lblMessage.ForeColor = Color.Red;
                lblMessage.Text      = netSettings.ConfigError;
                return;
            }

            TorPath = CommonFunctions.SettingsPath +
                      CommonFunctions.TorDir + CommonFunctions.IPDatabaseFile;
        }
Ejemplo n.º 2
0
 private void btnSystemProxy_Click(object sender, EventArgs e)
 {
     NetSettings.ShowSystemProxyWindow();
 }