private void EpisodeForm_Load(object sender, EventArgs e) { JsonClient = new XbmcConnection(App.Configuration.IpAddress, Convert.ToInt32(App.Configuration.WebPort), App.Configuration.Username, App.Configuration.Password); // set the list scroll fluidness this.senseListCtrl.MinimumMovement = App.Configuration.MinimumMovement; this.senseListCtrl.ThreadSleep = App.Configuration.ThreadSleep; this.senseListCtrl.Velocity = App.Configuration.Velocity; this.senseListCtrl.Springback = App.Configuration.Springback; // turn off UI updating this.senseListCtrl.BeginUpdate(); Episodes = JsonClient.VideoLibrary.GetEpisodesAllFields(Show, Season, null); foreach (Episode ep in Episodes) { StedySoft.SenseSDK.SensePanelItem itm = new StedySoft.SenseSDK.SensePanelItem(ep._id.ToString()); itm.ButtonAnimation = true; itm.PrimaryText = ep.Label; itm.SecondaryText = "Episode: " + ep.EpisodeNum.ToString(); itm.Tag = ep._id; itm.OnClick += new SensePanelItem.ClickEventHandler(OnClickGeneric); this.senseListCtrl.AddItem(itm); } // we are done so turn on UI updating this.senseListCtrl.EndUpdate(); }
private void ArtistForm_Load(object sender, EventArgs e) { JsonClient = new XbmcConnection(App.Configuration.IpAddress, Convert.ToInt32(App.Configuration.WebPort), App.Configuration.Username, App.Configuration.Password); // set the list scroll fluidness this.senseListCtrl.MinimumMovement = App.Configuration.MinimumMovement; this.senseListCtrl.ThreadSleep = App.Configuration.ThreadSleep; this.senseListCtrl.Velocity = App.Configuration.Velocity; this.senseListCtrl.Springback = App.Configuration.Springback; // turn off UI updating this.senseListCtrl.BeginUpdate(); Artists = JsonClient.AudioLibrary.GetArtists(new SortParams("artist", null, null, null)); foreach (Artist a in Artists) { StedySoft.SenseSDK.SensePanelItem itm = new StedySoft.SenseSDK.SensePanelItem(a._id.ToString()); itm.ButtonAnimation = true; itm.PrimaryText = a.Label; itm.Tag = a._id; itm.OnClick += new SensePanelItem.ClickEventHandler(OnClickGeneric); this.senseListCtrl.AddItem(itm); } // we are done so turn on UI updating this.senseListCtrl.EndUpdate(); }
private void Main_Load(object sender, EventArgs e) { // set the list scroll fluidness this.senseListCtrl.Velocity = .80f; // turn off UI updating this.senseListCtrl.BeginUpdate(); // create header divider item StedySoft.SenseSDK.SensePanelDividerItem header = new StedySoft.SenseSDK.SensePanelDividerItem(); //create panel item StedySoft.SenseSDK.SensePanelItem item = new StedySoft.SenseSDK.SensePanelItem(); //---main menu divider---// //header.Text = "Requests"; //this.senseListCtrl.AddItem(header); //add submit taxi request panel IImage iimg = this.getMenuIcon("submit_request"); item.IThumbnail = iimg; item.PrimaryText = "Submit a taxishare request "; item.SecondaryText = "Request a taxi from your destination"; item.Tag = "taxiReqTag"; item.OnClick += new SensePanelItem.ClickEventHandler(OnClickSubmitRequest); this.senseListCtrl.AddItem(item); //add about panel item = new StedySoft.SenseSDK.SensePanelItem(); iimg = this.getMenuIcon("about"); item.IThumbnail = iimg; item.PrimaryText = "About"; item.SecondaryText = "About the application"; item.Tag = "aboutAppTag"; item.OnClick += new SensePanelItem.ClickEventHandler(OnClickAbout); this.senseListCtrl.AddItem(item); //add quit panel item = new StedySoft.SenseSDK.SensePanelItem(); iimg = this.getMenuIcon("quit"); item.IThumbnail = iimg; item.PrimaryText = "Quit"; item.SecondaryText = "Exit the application"; item.Tag = "exitAppTag"; item.OnClick += new SensePanelItem.ClickEventHandler(OnClickQuit); this.senseListCtrl.AddItem(item); //update items so they show on the list this.senseListCtrl.EndUpdate(); }
private void AlbumForm_load(object sender, EventArgs e) { JsonClient = new XbmcConnection(App.Configuration.IpAddress, Convert.ToInt32(App.Configuration.WebPort), App.Configuration.Username, App.Configuration.Password); // set the list scroll fluidness this.senseListCtrl.MinimumMovement = App.Configuration.MinimumMovement; this.senseListCtrl.ThreadSleep = App.Configuration.ThreadSleep; this.senseListCtrl.Velocity = App.Configuration.Velocity; this.senseListCtrl.Springback = App.Configuration.Springback; // turn off UI updating this.senseListCtrl.BeginUpdate(); if (Artist != null) Albums = JsonClient.AudioLibrary.GetAlbumsByArtist((int)Artist); else Albums = JsonClient.AudioLibrary.GetAlbums(new string[] { "artist" }, new SortParams("label", null, null, null)); foreach (Album a in Albums) { StedySoft.SenseSDK.SensePanelItem itm = new StedySoft.SenseSDK.SensePanelItem(a._id.ToString()); itm.ButtonAnimation = true; itm.PrimaryText = a.Label; itm.SecondaryText = a.Artist; itm.Tag = a._id; itm.OnClick += new SensePanelItem.ClickEventHandler(OnClickGeneric); this.senseListCtrl.AddItem(itm); } if (Artist != null) { StedySoft.SenseSDK.SensePanelDividerItem divider = new StedySoft.SenseSDK.SensePanelDividerItem(); this.senseListCtrl.AddItem(divider); StedySoft.SenseSDK.SensePanelItem itm = new StedySoft.SenseSDK.SensePanelItem("PanelItemAll"); itm.ButtonAnimation = true; itm.PrimaryText = "All Songs"; itm.Tag = -1; itm.OnClick += new SensePanelItem.ClickEventHandler(OnClickGeneric); this.senseListCtrl.AddItem(itm); } // we are done so turn on UI updating this.senseListCtrl.EndUpdate(); }
private void MusicForm_Load(object sender, EventArgs e) { JsonClient = new XbmcConnection(App.Configuration.IpAddress, Convert.ToInt32(App.Configuration.WebPort), App.Configuration.Username, App.Configuration.Password); // set the list scroll fluidness this.senseListCtrl.MinimumMovement = App.Configuration.MinimumMovement; this.senseListCtrl.ThreadSleep = App.Configuration.ThreadSleep; this.senseListCtrl.Velocity = App.Configuration.Velocity; this.senseListCtrl.Springback = App.Configuration.Springback; // turn off UI updating this.senseListCtrl.BeginUpdate(); List<Song> Songs = JsonClient.AudioLibrary.GetSongs(); if (Songs == null) { if (SenseAPIs.SenseMessageBox.Show("There is no music in your library", "Error", SenseMessageBoxButtons.OK) == DialogResult.OK) { this.Close(); } } string[] list = {"By Genre", "By Artist", "By Album"}; foreach (string Label in list) { StedySoft.SenseSDK.SensePanelItem itm = new StedySoft.SenseSDK.SensePanelItem(); itm.ButtonAnimation = true; itm.PrimaryText = Label; itm.OnClick += new SensePanelItem.ClickEventHandler(OnClickGeneric); this.senseListCtrl.AddItem(itm); } // we are done so turn on UI updating this.senseListCtrl.EndUpdate(); }
private void SeasonForm_Load(object sender, EventArgs e) { JsonClient = new XbmcConnection(App.Configuration.IpAddress, Convert.ToInt32(App.Configuration.WebPort), App.Configuration.Username, App.Configuration.Password); // set the list scroll fluidness this.senseListCtrl.MinimumMovement = App.Configuration.MinimumMovement; this.senseListCtrl.ThreadSleep = App.Configuration.ThreadSleep; this.senseListCtrl.Velocity = App.Configuration.Velocity; this.senseListCtrl.Springback = App.Configuration.Springback; // turn off UI updating this.senseListCtrl.BeginUpdate(); Seasons = JsonClient.VideoLibrary.GetSeasonsAllFields(Show, new SortParams("label", null, null, null)); foreach (Season s in Seasons) { var episodes = JsonClient.VideoLibrary.GetEpisodes(Show, s._Season); StedySoft.SenseSDK.SensePanelItem itm = new StedySoft.SenseSDK.SensePanelItem(s._Season.ToString()); itm.ButtonAnimation = true; itm.PrimaryText = s.Label; itm.SecondaryText = episodes.Count.ToString() + " episodes"; itm.Tag = s._Season; IImage thumbImage = Functions.GetTvSeasonThumbnail(JsonClient, s.Thumbnail); ImageInfo info; thumbImage.GetImageInfo(out info); itm.IThumbnail = thumbImage; itm.Height = (int)(info.Height); thumbImage = null; itm.OnClick += new SensePanelItem.ClickEventHandler(OnClickGeneric); this.senseListCtrl.AddItem(itm); } // we are done so turn on UI updating this.senseListCtrl.EndUpdate(); }
private void SongForm_Load(object sender, EventArgs e) { JsonClient = new XbmcConnection(App.Configuration.IpAddress, Convert.ToInt32(App.Configuration.WebPort), App.Configuration.Username, App.Configuration.Password); // set the list scroll fluidness this.senseListCtrl.MinimumMovement = App.Configuration.MinimumMovement; this.senseListCtrl.ThreadSleep = App.Configuration.ThreadSleep; this.senseListCtrl.Velocity = App.Configuration.Velocity; this.senseListCtrl.Springback = App.Configuration.Springback; // turn off UI updating this.senseListCtrl.BeginUpdate(); if (artistId != null) { if (albumId == null) Songs = JsonClient.AudioLibrary.GetSongsByArtistAllFields((int)artistId); else Songs = JsonClient.AudioLibrary.GetSongsByArtistAndAlbumAllFields((int)artistId, (int)albumId); } else { Songs = JsonClient.AudioLibrary.GetSongsByAlbumAllFields((int)albumId); } foreach (Song s in Songs) { StedySoft.SenseSDK.SensePanelItem itm = new StedySoft.SenseSDK.SensePanelItem(s._id.ToString()); itm.ButtonAnimation = true; itm.PrimaryText = s.Label; itm.SecondaryText = s.Artist; itm.Tag = s._id; itm.OnClick += new SensePanelItem.ClickEventHandler(OnClickGeneric); this.senseListCtrl.AddItem(itm); } // we are done so turn on UI updating this.senseListCtrl.EndUpdate(); }