internal View(IMediaProviderSupportV7 aSupport, SoundDriver aDirectSound) { iSupport = aSupport; iSupport.ViewSupport.EventSupportChanged += EventSupportChanged; iDirectSound = aDirectSound; iMutex = new Mutex(); iLevel = 0; iLocation = new List <string>(); iViewSize = 1; iListView = new ListViewKinsky(); iListView.Dock = DockStyle.Fill; iListView.Visible = true; iListView.AllowDrop = true; SetViewColours(); iListView.View = System.Windows.Forms.View.Tile; ColumnHeader header; header = new ColumnHeader(); header.Name = "Icon"; header.Text = "Icon"; iListView.Columns.Add(header); header = new ColumnHeader(); header.Name = "Title"; header.Text = "Title"; header.Width = -2; iListView.Columns.Add(header); iListView.HeaderStyle = ColumnHeaderStyle.None; iListView.ItemActivate += OnActivate; iListView.ItemDrag += OnItemDrag; iListView.DragOver += OnDragOver; Populate(); Controls.Add(iListView); Dock = DockStyle.Fill; }
internal View(IMediaProviderSupportV7 aSupport, Lrf aPodcasts) { iPanel = new PanelBusy(); iSupport = aSupport; iSupport.ViewSupport.EventSupportChanged += EventSupportChanged; iLrf = aPodcasts; iLrf.EventChanged += EventFeedsChanged; iMutex = new Mutex(); iLevel = 0; iLocation = new List <string>(); iViewSize = 1; iFeedList = iLrf.FeedList; iListView = new ListViewKinsky(); iListView.Dock = DockStyle.Fill; iListView.Visible = true; iListView.AllowDrop = true; SetViewColours(); iListView.View = System.Windows.Forms.View.Tile; ColumnHeader header; header = new ColumnHeader(); header.Name = "Icon"; header.Text = "Icon"; iListView.Columns.Add(header); header = new ColumnHeader(); header.Name = "Title"; header.Text = "Title"; iListView.Columns.Add(header); header = new ColumnHeader(); header.Name = "Items"; header.Text = "Items"; header.Width = -2; iListView.Columns.Add(header); iListView.HeaderStyle = ColumnHeaderStyle.None; iListView.ItemActivate += OnActivate; iListView.ItemDrag += OnItemDrag; iListView.DragDrop += OnDragDrop; iListView.DragOver += OnDragOver; iWebBrowser = new WebBrowser(); iWebBrowser.Dock = DockStyle.Fill; iWebBrowser.AllowNavigation = false; iWebBrowser.AllowWebBrowserDrop = false; iWebBrowser.IsWebBrowserContextMenuEnabled = false; iWebBrowser.Visible = false; var input = new StringReader(Properties.Resources.Details); var reader = new XmlTextReader(input); iArguments = new XsltArgumentList(); iArguments.AddParam("bg", String.Empty, System.Drawing.ColorTranslator.ToHtml(iSupport.ViewSupport.BackColour)); iArguments.AddParam("fg", String.Empty, System.Drawing.ColorTranslator.ToHtml(iSupport.ViewSupport.ForeColour)); iArguments.AddParam("hibg", String.Empty, System.Drawing.ColorTranslator.ToHtml(iSupport.ViewSupport.HighlightBackColour)); iArguments.AddParam("hifg", String.Empty, System.Drawing.ColorTranslator.ToHtml(iSupport.ViewSupport.HighlightForeColour)); iTransform = new XslCompiledTransform(); iTransform.Load(reader); Populate(); Controls.Add(iListView); Controls.Add(iWebBrowser); Dock = DockStyle.Fill; iPanel.Controls.Add(this); }
internal View(IMediaProviderSupportV7 aSupport) { iPanel = new PanelBusy(); iSupport = aSupport; iSupport.ViewSupport.EventSupportChanged += EventSupportChanged; iMutex = new Mutex(); iLogo = OssKinskyMppWorldCup2010.Properties.Resources.Logo; iGroups = new List <Group>(); Group group; group = new Group("A"); group.Add(new Team(iSupport, iLogo, "France", "http://www.navyband.navy.mil/anthems/ANTHEMS/France.mp3", "http://www.flags.net/images/largeflags/FRAN0001.GIF")); group.Add(new Team(iSupport, iLogo, "Mexico", "http://www.navyband.navy.mil/anthems/ANTHEMS/Mexico.mp3", "http://www.flags.net/images/largeflags/MEXC0001.GIF")); group.Add(new Team(iSupport, iLogo, "South Africa", "http://www.navyband.navy.mil/anthems/ANTHEMS/South Africa.mp3", "http://www.flags.net/images/largeflags/SOAF0001.GIF")); group.Add(new Team(iSupport, iLogo, "Uruguay", "http://www.navyband.navy.mil/anthems/ANTHEMS/Uruguay (Short).mp3", "http://www.flags.net/images/largeflags/URGY0001.GIF")); iGroups.Add(group); group = new Group("B"); group.Add(new Team(iSupport, iLogo, "Argentina", "http://www.navyband.navy.mil/anthems/ANTHEMS/Argentina (Short).mp3", "http://www.flags.net/images/largeflags/ARGE0001.GIF")); group.Add(new Team(iSupport, iLogo, "Greece", "http://www.navyband.navy.mil/anthems/ANTHEMS/Greece.mp3", "http://www.flags.net/images/largeflags/GREC0001.GIF")); group.Add(new Team(iSupport, iLogo, "Korea Republic", "http://www.navyband.navy.mil/anthems/ANTHEMS/Korea, South.mp3", "http://www.flags.net/images/largeflags/SKOR0001.GIF")); group.Add(new Team(iSupport, iLogo, "Nigeria", "http://www.navyband.navy.mil/anthems/ANTHEMS/Nigeria.mp3", "http://www.flags.net/images/largeflags/NGRA0001.GIF")); iGroups.Add(group); group = new Group("C"); group.Add(new Team(iSupport, iLogo, "Algeria", "http://www.navyband.navy.mil/anthems/ANTHEMS/Algeria.mp3", "http://www.flags.net/images/largeflags/ALGE0001.GIF")); group.Add(new Team(iSupport, iLogo, "England", "http://www.navyband.navy.mil/anthems/ANTHEMS/United Kingdom.mp3", "http://www.flags.net/images/largeflags/UNKG0100.GIF")); group.Add(new Team(iSupport, iLogo, "Slovenia", "http://www.navyband.navy.mil/anthems/ANTHEMS/Slovenia.mp3", "http://www.flags.net/images/largeflags/SLVA0001.GIF")); group.Add(new Team(iSupport, iLogo, "United States", "http://www.navyband.navy.mil/anthems/ANTHEMS/United States.mp3", "http://www.flags.net/images/largeflags/UNST0001.GIF")); iGroups.Add(group); group = new Group("D"); group.Add(new Team(iSupport, iLogo, "Australia", "http://www.navyband.navy.mil/anthems/ANTHEMS/Australia (Advance Australia Fair).mp3", "http://www.flags.net/images/largeflags/ASTL0001.GIF")); group.Add(new Team(iSupport, iLogo, "Germany", "http://www.navyband.navy.mil/anthems/ANTHEMS/Germany.mp3", "http://www.flags.net/images/largeflags/GERM0001.GIF")); group.Add(new Team(iSupport, iLogo, "Ghana", "http://www.navyband.navy.mil/anthems/ANTHEMS/Ghana.mp3", "http://www.flags.net/images/largeflags/GHAN0001.GIF")); group.Add(new Team(iSupport, iLogo, "Serbia", "http://www.navyband.navy.mil/anthems/ANTHEMS/Serbia.mp3", "http://www.flags.net/images/largeflags/SERB0001.GIF")); iGroups.Add(group); group = new Group("E"); group.Add(new Team(iSupport, iLogo, "Cameroon", "http://www.navyband.navy.mil/anthems/ANTHEMS/Cameroon.mp3", "http://www.flags.net/images/largeflags/CAME0001.GIF")); group.Add(new Team(iSupport, iLogo, "Denmark", "http://www.navyband.navy.mil/anthems/ANTHEMS/Denmark (National Anthem).mp3", "http://www.flags.net/images/largeflags/DENM0001.GIF")); group.Add(new Team(iSupport, iLogo, "Japan", "http://www.navyband.navy.mil/anthems/ANTHEMS/Japan.mp3", "http://www.flags.net/images/largeflags/JAPA0001.GIF")); group.Add(new Team(iSupport, iLogo, "Netherlands", "http://www.navyband.navy.mil/anthems/ANTHEMS/Netherlands.mp3", "http://www.flags.net/images/largeflags/NETH0001.GIF")); iGroups.Add(group); group = new Group("F"); group.Add(new Team(iSupport, iLogo, "Italy", "http://www.navyband.navy.mil/anthems/ANTHEMS/Italy (Short).mp3", "http://www.flags.net/images/largeflags/ITAL0001.GIF")); group.Add(new Team(iSupport, iLogo, "New Zealand", "http://www.navyband.navy.mil/anthems/ANTHEMS/New Zealand (God Defend New Zealand).mp3", "http://www.flags.net/images/largeflags/NWZE0001.GIF")); group.Add(new Team(iSupport, iLogo, "Paraguay", "http://www.navyband.navy.mil/anthems/ANTHEMS/Paraguay.mp3", "http://www.flags.net/images/largeflags/PARA0001.GIF")); group.Add(new Team(iSupport, iLogo, "Slovakia", "http://www.navyband.navy.mil/anthems/ANTHEMS/Slovack Republic.mp3", "http://www.flags.net/images/largeflags/SVKA0001.GIF")); iGroups.Add(group); group = new Group("G"); group.Add(new Team(iSupport, iLogo, "Brazil", "http://www.navyband.navy.mil/anthems/ANTHEMS/Brazil.mp3", "http://www.flags.net/images/largeflags/BRAZ0001.GIF")); group.Add(new Team(iSupport, iLogo, "Côte d'Ivoire", "http://www.navyband.navy.mil/anthems/ANTHEMS/Cote d'Ivorie.mp3", "http://www.flags.net/images/largeflags/CDIV0001.GIF")); group.Add(new Team(iSupport, iLogo, "Korea DPR", "http://www.big.or.jp/~jrldr/m/1na1.mp3", "http://www.flags.net/images/largeflags/NKOR0001.GIF")); group.Add(new Team(iSupport, iLogo, "Portugal", "http://www.navyband.navy.mil/anthems/ANTHEMS/Portugal.mp3", "http://www.flags.net/images/largeflags/PORT0001.GIF")); iGroups.Add(group); group = new Group("H"); group.Add(new Team(iSupport, iLogo, "Chile", "http://www.navyband.navy.mil/anthems/ANTHEMS/Chile.mp3", "http://www.flags.net/images/largeflags/CHIL0001.GIF")); group.Add(new Team(iSupport, iLogo, "Honduras", "http://www.navyband.navy.mil/anthems/ANTHEMS/Honduras.mp3", "http://www.flags.net/images/largeflags/HOND0001.GIF")); group.Add(new Team(iSupport, iLogo, "Spain", "http://www.navyband.navy.mil/anthems/ANTHEMS/Spain (Short).mp3", "http://www.flags.net/images/largeflags/SPAN0001.GIF")); group.Add(new Team(iSupport, iLogo, "Switzerland", "http://www.navyband.navy.mil/anthems/ANTHEMS/Switzerland.mp3", "http://www.flags.net/images/largeflags/SWIT0001.GIF")); iGroups.Add(group); foreach (Group g in iGroups) { foreach (Team t in g.Teams) { t.EventArtworkUpdated += EventArtworkUpdated; } } iLevel = 0; iLocation = new List <string>(); iViewSize = 1; iListView = new ListViewKinsky(); iListView.Dock = DockStyle.Fill; iListView.Visible = true; iListView.AllowDrop = false; SetViewColours(); ColumnHeader header; header = new ColumnHeader(); header.Name = "Icon"; header.Text = "Icon"; iListView.Columns.Add(header); header = new ColumnHeader(); header.Name = "Title"; header.Text = "Title"; iListView.Columns.Add(header); header = new ColumnHeader(); header.Name = "Items"; header.Text = "Items"; header.Width = -2; iListView.Columns.Add(header); iListView.HeaderStyle = ColumnHeaderStyle.None; iListView.ItemActivate += OnActivate; iListView.ItemDrag += OnItemDrag; Populate(); Controls.Add(iListView); Dock = DockStyle.Fill; iPanel.Controls.Add(this); }