private void runNoIPUpdate()
 {
     if (noIPDNSSettings.Hosts.Any() && !string.IsNullOrEmpty(noIPDNSSettings.Login) && !string.IsNullOrEmpty(noIPDNSSettings.Password) && noIPDNSSettings.Enabled)
     {
         string messages = NoIPHelper.RunUpdates(noIPDNSSettings, IPAddress);
         parseMessagesAndShowResults(messages);
     }
 }
Example #2
0
        private void saveNoIPSettings()
        {
            NoIPDNSSettings noIPSettings = new NoIPDNSSettings();

            noIPSettings.Enabled = noIPEnabled.Checked;
            noIPSettings.Hosts   = noIPHosts.Items.Cast <String>().ToList();
            noIPSettings.Login   = noIPLogin.Text;

            string result = NoIPHelper.SaveOptions(noIPSettings, this);

            if (result != string.Empty)
            {
                customError err = new customError("You have the following problems with your " + NoIPHelper.serviceName + " settings!", result);
                err.intervalForTimer = 30000;
                err.Show();
                errorCount++;
            }
            else
            {
                successCount++;
                saveSuccess += "Your " + NoIPHelper.serviceName + " settings were successfully saved! \n";
            }
        }
        private void getSavedOptions()
        {
            appSettings = AppHelper.LoadOptions();

            // Reading Saved Options:
            switch (appSettings.TimeIntervalMode)
            {
            default:
            case 1:
                timer1.Interval = appSettings.TimeInterval * 1000;
                break;

            case 2:
                timer1.Interval = appSettings.TimeInterval * 1000 * 60;
                break;

            case 3:
                timer1.Interval = appSettings.TimeInterval * 1000 * 3600;
                break;
            }

            if (appSettings.AutoStart)
            {
                timer1.Enabled         = true;
                timer2.Enabled         = true;
                scanButton.Visible     = false;
                stopScanButton.Visible = true;
            }
            else
            {
                timer1.Enabled         = false;
                timer2.Enabled         = false;
                scanButton.Visible     = true;
                stopScanButton.Visible = false;
            }

            switch (appSettings.IPService)
            {
            case 1:
                urlForIPCheck = "https://dynamix.run/ip.php";
                break;

            case 3:
                urlForIPCheck = "http://dinofly.com/misc/ipcheck.php";
                break;

            case 2:
                urlForIPCheck = "http://grabip.tk";
                break;

            default:
                urlForIPCheck = "https://dynamix.run/ip.php";
                break;
            }


            if (File.Exists(phpPathFile))
            {
                phpPath = File.ReadAllText(phpPathFile);
            }

            if (appSettings.RunDynamicServices)
            {
                XpertDNSSettings  = XpertDNSHelper.LoadOptions();
                dynamixSettings   = DynamixHelper.LoadOptions();
                afraidDNSSettings = AfraidDNSHelper.LoadOptions();
                noIPDNSSettings   = NoIPHelper.LoadOptions();
            }
        }
Example #4
0
 private void getNoIPSettings()
 {
     noIPSettings = NoIPHelper.LoadOptions(this);
 }