private void XbmcConnect() { oStatusUpdate.Stop(); if (oConfiguration.values.ipAddress != "") { oXbmc.SetIp(oConfiguration.values.ipAddress); oXbmc.SetConnectionTimeout(Convert.ToInt32(oConfiguration.values.connectionTimeout) * 1000); oXbmc.SetCredentials(oConfiguration.values.username, oConfiguration.values.password); this.isConnected = (oXbmc.Status.WebServerEnabled()) ? true : false; if (IsConnected()) { if (!oStatusUpdate.IsRunning()) { oStatusUpdate.Start(); } SetStartupvalues(); oStatusUpdate = new StatusUpdate(this); } else { oStatusUpdate.Stop(); oHelper.Messagebox("Could not connect to XBMC with the current configuration."); nbRight.CurrentPage = 3; } } else { oStatusUpdate.Stop(); oHelper.Messagebox("Configure XBMControl to connect with XBMC."); nbRight.CurrentPage = 3; } }
protected void on_cbShares_changed(object o, EventArgs args) { try { this.oShareBrowser.SetCurrentShareType(this.cbShares.Active); this.oShareBrowser.Populate(); } catch (Exception e) { oHelper.Messagebox(e.Message); } }