/// <summary> /// Creates a new <see cref="ConfigurationForm"/> instance. /// </summary> public ConfigurationForm(XPluginHelper xHelper) { // // Required for Windows Form Designer support // InitializeComponent(); // Custom Initializations ReadLocations(); radarMap.DataSource = ReadRegionMaps(); ReadVariables(); // Check to see if we are in the US to default the unit checkbox correctly if (CultureInfo.CurrentCulture.LCID == 1033) { this.rbUnitStandard.Checked = true; } else { this.rbUnitMetric.Checked = true; } // Set version code versionLabel.Text += Helper.GetVersion(); lbEvents.DataSource = Logger.Log; Logger.Changed += new EventHandler(Logger_Changed); this.xHelper = xHelper; }
/// <summary> /// This method is called by Xlobby to pass the plugin SDK helper object /// to us. Upon receiving this XoapWeather will initiate a background /// update of forecasts. /// </summary> /// <param name="xhelper">Helper object</param> public void SetHelper(XPluginHelper xhelper) { // Store the pointer to the xhelper object this.xHelper = xhelper; // Start the background update thread if ((wxUpdateThread.ThreadState & System.Threading.ThreadState.Unstarted) == System.Threading.ThreadState.Unstarted) { Trace.WriteLine("Starting background weather update thread", "plugin"); wxUpdateThread.Start(); } }
/// <summary> /// Creates a new <see cref="ConfigurationForm"/> instance. /// </summary> public ConfigurationForm(XPluginHelper xHelper) { // // Required for Windows Form Designer support // InitializeComponent(); // Custom Initializations ReadLocations(); radarMap.DataSource = ReadRegionMaps(); ReadVariables(); // Check to see if we are in the US to default the unit checkbox correctly if (CultureInfo.CurrentCulture.LCID == 1033) this.rbUnitStandard.Checked = true; else this.rbUnitMetric.Checked = true; // Set version code versionLabel.Text += Helper.GetVersion(); lbEvents.DataSource = Logger.Log; Logger.Changed += new EventHandler(Logger_Changed); this.xHelper = xHelper; }