private void runXPertDNSUpdate() { if (XpertDNSSettings.Hosts.Any() && !string.IsNullOrEmpty(XpertDNSSettings.Login) && !string.IsNullOrEmpty(XpertDNSSettings.Password) && XpertDNSSettings.Enabled) { string messages = XpertDNSHelper.RunUpdates(XpertDNSSettings, IPAddress); parseMessagesAndShowResults(messages); } }
private void saveXpertSettings() { XPertDNSSettings xSettings = new XPertDNSSettings(); xSettings.Enabled = xpertEnable.Checked; xSettings.Hosts = dynIDsXPertDNS.Items.Cast <String>().ToList(); xSettings.Login = login4XPertDNS.Text; var success = XpertDNSHelper.SaveOptions(xSettings, this); if (string.IsNullOrEmpty(success)) { successCount++; saveSuccess += "Your " + XpertDNSHelper.serviceName + " settings were successfully saved! \n"; } else { customError err = new customError("You have the following problems with your " + XpertDNSHelper.serviceName + " Settings!", success); err.intervalForTimer = 30000; err.Show(); errorCount++; } }
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(); } }
private void getXpertSettings() { xpertDNSSettings = XpertDNSHelper.LoadOptions(this); }