Example #1
0
        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("A valid ip address or hostname is required");
                nbRight.CurrentPage = 3;
            }
        }
Example #2
0
    public MainWindow()
        : base(Gtk.WindowType.Toplevel)
    {
        oXbmc = new XBMC_Communicator();
        oXbmc.SetIp("10.0.0.5");
        oXbmc.SetConnectionTimeout(4000);
        oXbmc.SetCredentials("", "");
        oXbmc.Status.StartHeartBeat();

        Build ();

        this.AllowStaticAccess();

        //Create objects used
        oPlaylist 		= new Playlist(this);
        oControls		= new Controls(this);
        oMenuItems		= new MenuItems(this);
        oContextMenu 	= new ContextMenu(this);
        oShareBrowser 	= new ShareBrowser(this);
        oTrayicon 		= new SysTrayIcon(this);
        oStatusUpdate	= new StatusUpdate(this);
        oMediaInfo		= new MediaInfo(this);
        oNowPlaying		= new NowPlaying(this);
        oGuiConfig		= new GuiConfig(this);

        nbDataContainer.CurrentPage = 0;
    }
Example #3
0
 private void InitObjects()
 {
     oShareBrowser  = new ShareBrowser(this);
     oFileBrowser   = new FileBrowser(this);
     oMenuItems     = new MenuItems(this);
     oContextMenu   = new ContextMenu(this);
     oControls      = new Controls(this);
     oPlaylist      = new Playlist(this);
     oHelper        = new HelperFunctions(this);
     oStatusUpdate  = new StatusUpdate(this);
     oSysTrayIcon   = new SysTrayIcon(this);
     oGenreBrowser  = new GenreBrowser(this);
     oArtistBrowser = new ArtistBrowser(this);
     oAlbumBrowser  = new AlbumBrowser(this);
 }
Example #4
0
 /// <summary>
 ///  Initialise objects
 /// </summary>
 private void InitObjects()
 {
     oHelper        = new HelperFunctions(this);
     oImages        = new Images(this);
     oConfiguration = new Configuration(this);
     oXbmc          = new XBMC_Communicator();
     oShareBrowser  = new ShareBrowser(this);
     oFileBrowser   = new FileBrowser(this);
     oMenuItems     = new MenuItems(this);
     oContextMenu   = new ContextMenu(this);
     oSysTrayIcon   = new SysTrayIcon(this);
     oControls      = new Controls(this);
     oPlaylist      = new Playlist(this);
     oGenreBrowser  = new GenreBrowser(this);
     oArtistBrowser = new ArtistBrowser(this);
     oAlbumBrowser  = new AlbumBrowser(this);
     oNowPlaying    = new NowPlaying(this);
     oStatusUpdate  = new StatusUpdate(this);
 }
Example #5
0
        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;
            }
        }
Example #6
0
 /// <summary>
 ///  Initialise objects
 /// </summary>
 private void InitObjects()
 {
     oHelper			= new HelperFunctions(this);
     oConfiguration 	= new Configuration(this);
     oXbmc 			= new XBMC_Communicator();
     oShareBrowser 	= new ShareBrowser(this);
     oFileBrowser	= new FileBrowser(this);
     oMenuItems		= new MenuItems(this);
     oContextMenu	= new ContextMenu(this);
     oSysTrayIcon 	= new SysTrayIcon(this);
     oControls		= new Controls(this);
     oPlaylist		= new Playlist(this);
     oGenreBrowser	= new GenreBrowser(this);
     oArtistBrowser 	= new ArtistBrowser(this);
     oAlbumBrowser	= new AlbumBrowser(this);
     oStatusUpdate	= new StatusUpdate(this);
 }