public WifiWidget(WiFi_RS21 wifi_RS21) : base() { this.font = Resources.GetFont(Resources.FontResources.small); this.x = x; this.y = y; background.set_position(0, 28); background.set_size(UserInterface.Instance.screen_width, UserInterface.Instance.screen_height - 28); background.set_colours(BackgroundColor, BorderColor); elements.Clear(); elements.Add(background); // NetworkInterfaceExtension.AssignNetworkingStackTo((NetworkInterfaceExtension)wifi_RS21); this.wifi_RS21 = wifi_RS21; this.wifi_RS21.UseThisNetworkInterface(); this.wifi_RS21.Interface.NetworkInterface.EnableDhcp(); this.wifi_RS21.UseDHCP(); this.wifi_RS21.NetworkDown += new GT.Modules.Module.NetworkModule.NetworkEventHandler(wifi_NetworkDown); this.wifi_RS21.NetworkUp += new GT.Modules.Module.NetworkModule.NetworkEventHandler(wifi_NetworkUp); // connect to known wifi GT.Timer t = new GT.Timer(1000); t.Tick += new GT.Timer.TickEventHandler(t_Tick); t.Start(); }
public WiFi(WiFi_RS21 module) { wifi = module.Interface; if (!wifi.IsOpen) { wifi.Open(); } wifi.NetworkInterface.EnableDhcp(); NetworkInterfaceExtension.AssignNetworkingStackTo(wifi); module.NetworkDown += new GTM.Module.NetworkModule.NetworkEventHandler(Wifi_NetworkDown); module.NetworkUp += new GTM.Module.NetworkModule.NetworkEventHandler(Wifi_NetworkUp); wifi.WirelessConnectivityChanged += new WiFiRS9110.WirelessConnectivityChangedEventHandler(Interface_WirelessConnectivityChanged); wifi.NetworkAddressChanged += new NetworkInterfaceExtension.NetworkAddressChangedEventHandler(Interface_NetworkAddressChanged); }
public void init(Display_T35 display, Ethernet_J11D ethernet_J11D, WiFi_RS21 wifi_RS21) { this.display_T35 = display; this.ethernet_J11D = ethernet_J11D; this.wifi_RS21 = wifi_RS21; }
public GadgeteerWiFiNetworkController(WiFi_RS21 wiFiSensor) { this.wiFiSensor = wiFiSensor; }