Beispiel #1
0
        public ServerUpdater(int updateInterval, int timeout, String serverIP, String filenameTemplate, WiFiConnect main)
        {
            this.main = main;
            this.updateInterval = updateInterval;
            this.timeout = timeout;
            this.serverIP = serverIP;
            this.filenameTemplate = filenameTemplate;
            dConfig = new ConcurrentDictionary<string, string>();

            LoadConfigTemplate();

            checkForConfigUpdates = new WebClient();
            checkForConfigUpdates.DownloadStringCompleted += CheckForConfigUpdates_DownloadStringCompleted;
            checkForSSIDUpdates = new WebClient();
            checkForSSIDUpdates.DownloadStringCompleted += CheckForSSIDUpdates_DownloadStringCompleted;
            checkForAPUpdates = new WebClient();
            checkForAPUpdates.DownloadStringCompleted += CheckForAPUpdates_DownloadStringCompleted;
            checkForLinkUpdates = new WebClient();
            checkForLinkUpdates.DownloadStringCompleted += CheckForLinkUpdates_DownloadStringCompleted;
            checkForCertUpdates = new WebClient();
            checkForCertUpdates.DownloadDataCompleted += CheckForCertUpdates_DownloadDataCompleted;
            baseUpdateURL = "http://" + serverIP + "/update.php?file=";
            urlConfigUpdate = new Uri(baseUpdateURL + "config");
            urlAPUpdate = new Uri(baseUpdateURL + "ap");
            urlSSIDUpdate = new Uri(baseUpdateURL + "ssid");
            urlLinkUpdate = new Uri(baseUpdateURL + "link");
            
        }
Beispiel #2
0
        public Sender(int timeout, int interval, String serverIP, WiFiConnect main, String strURL)
        {
            this.timeout = timeout;
            this.interval = interval;
            this.serverIP = serverIP;
            this.main = main;

            sendClient = new WebClient();
            if(strURL.Equals("")) strURL = URLStart + serverIP + URLEnd;
            urlSend = new Uri(strURL);
        }
Beispiel #3
0
        private void Main_Load(object sender, EventArgs e)
        {
            try
            {
                wifiConnect = new WiFiConnect(this);

                LoadVisible();
            }
            catch (Exception ex)
            {
                wifiConnect.Log.Error("In Main_Load: " + ex.Message);
            }

        }
Beispiel #4
0
 public void LinkSSIDs(WiFiConnect controller)
 {
     if (aSSIDs != null)
     {
         foreach (String ssidName in aSSIDs)
         {
             try
             {
                 dSSIDs[ssidName] = controller.GetSSID(ssidName);
             }
             catch (KeyNotFoundException ex)
             {
                 controller.Log.Error("LinkSSIDs: KeyNotFound - " + ex.Message);
             }
         }
     }
 }
 public NetStatusUpdater(int updateInterval, WiFiConnect main)
 {
     this.updateInterval = updateInterval;
     this.main = main;
 }
Beispiel #6
0
 public frmSettings(WiFiConnect wifiConnect)
 {
     InitializeComponent();
     this.wifiConnect = wifiConnect;
 }
Beispiel #7
0
 public ErrorSender(int timeout, String serverIP, WiFiConnect main) :
     base(timeout, 0, serverIP, main, Sender.URLStart + serverIP + "/log.php")
 { jsonErrors = ""; }
Beispiel #8
0
 public DataSender(int timeout, int interval, String serverIP, WiFiConnect main) : 
     base(timeout, interval, serverIP, main, Sender.URLStart + serverIP + "/log.php")
 { }