|
From: <kro...@us...> - 2007-03-07 20:34:05
|
Revision: 165
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=165&view=rev
Author: kroko_koenig
Date: 2007-03-07 12:33:19 -0800 (Wed, 07 Mar 2007)
Log Message:
-----------
Added Paths:
-----------
trunk/plugins/MyDbox/
trunk/plugins/MyDbox/Release/
trunk/plugins/MyDbox/Release/Plugins/
trunk/plugins/MyDbox/Release/Plugins/ExternalPlayers/
trunk/plugins/MyDbox/Release/Plugins/ExternalPlayers/ExternalPlayers.dll
trunk/plugins/MyDbox/Release/Plugins/Windows/
trunk/plugins/MyDbox/Release/Plugins/Windows/ExternalPlayers.dll
trunk/plugins/MyDbox/Release/Plugins/Windows/MyDbox.dll
trunk/plugins/MyDbox/Release/Skin/
trunk/plugins/MyDbox/Release/Skin/Blue Two/
trunk/plugins/MyDbox/Release/Skin/Blue Two/mydboxmain.xml
trunk/plugins/MyDbox/Source/
trunk/plugins/MyDbox/Source/MyDbox/
trunk/plugins/MyDbox/Source/MyDbox/ChannelInfo.cs
trunk/plugins/MyDbox/Source/MyDbox/Data.cs
trunk/plugins/MyDbox/Source/MyDbox/DboxSetupForm.Designer.cs
trunk/plugins/MyDbox/Source/MyDbox/DboxSetupForm.cs
trunk/plugins/MyDbox/Source/MyDbox/DboxSetupForm.resx
trunk/plugins/MyDbox/Source/MyDbox/Epg.cs
trunk/plugins/MyDbox/Source/MyDbox/GuiDbox.cs
trunk/plugins/MyDbox/Source/MyDbox/MyDbox.csproj
trunk/plugins/MyDbox/Source/MyDbox/MyDbox.csproj.user
trunk/plugins/MyDbox/Source/MyDbox/MyDboxGui.cs
trunk/plugins/MyDbox/Source/MyDbox/MyDboxPlugin.cs
trunk/plugins/MyDbox/Source/MyDbox/Properties/
trunk/plugins/MyDbox/Source/MyDbox/Properties/AssemblyInfo.cs
trunk/plugins/MyDbox/Source/MyDbox/Request.cs
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/ConfigurationForm.cs
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/ConfigurationForm.resx
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/IPlayer.cs
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/InnerVlcWindow.cs
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/InnerVlcWindow.designer.cs
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/InnerVlcWindow.resx
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/NativeLibVlc.cs
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VideoLanControl.cs
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VideoLanControl.designer.cs
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VideoLanControl.resx
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VideoLanPlugin.cs
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VideoLanPlugin.cs.bak
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/IPlayer.cs
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/InnerVlcWindow.Designer.cs
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/InnerVlcWindow.cs
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/NativeLibVlc.cs
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/Properties/
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/VLanControl.csproj
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/VLanControl.sln
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/VLanControl.suo
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/VlcUserControl.Designer.cs
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/VlcUserControl.cs
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/VlcUserControl.resx
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/bin/
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/bin/Debug/
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/bin/Release/
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/obj/
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/obj/Debug/
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/obj/Debug/TempPE/
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/obj/Release/
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/obj/Release/TempPE/
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/obj/Release/VLanControl.VlcUserControl.resources
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/obj/Release/VLanControl.csproj.GenerateResource.Cache
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcControl/obj/VLanControl.csproj.FileList.txt
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcUserControl.cs
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcUserControl.designer.cs
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/VlcUserControl.resx
trunk/plugins/MyDbox/Source/MyDbox/VideoLAN/mk.txt
trunk/plugins/MyDbox/Source/MyDbox/Zap.cs
trunk/plugins/MyDbox/Source/MyDbox/bin/
trunk/plugins/MyDbox/Source/MyDbox/bin/Debug/
trunk/plugins/MyDbox/Source/MyDbox/bin/Release/
trunk/plugins/MyDbox/Source/MyDbox/bin/Release/Communications.DLL
trunk/plugins/MyDbox/Source/MyDbox/bin/Release/Core.dll
trunk/plugins/MyDbox/Source/MyDbox/bin/Release/Dialogs.dll
trunk/plugins/MyDbox/Source/MyDbox/bin/Release/ExternalPlayers.dll
trunk/plugins/MyDbox/Source/MyDbox/bin/Release/MyDbox.dll
trunk/plugins/MyDbox/Source/MyDbox/bin/Release/MyDbox.pdb
trunk/plugins/MyDbox/Source/MyDbox/bin/Release/Utils.dll
trunk/plugins/MyDbox/Source/MyDbox/bin/Release/copy.bat
trunk/plugins/MyDbox/Source/MyDbox/obj/
trunk/plugins/MyDbox/Source/MyDbox/obj/Debug/
trunk/plugins/MyDbox/Source/MyDbox/obj/Debug/MyDbox.dll
trunk/plugins/MyDbox/Source/MyDbox/obj/Debug/MyDbox.pdb
trunk/plugins/MyDbox/Source/MyDbox/obj/Debug/ResolveAssemblyReference.cache
trunk/plugins/MyDbox/Source/MyDbox/obj/Debug/TempPE/
trunk/plugins/MyDbox/Source/MyDbox/obj/MyDbox.csproj.FileList.txt
trunk/plugins/MyDbox/Source/MyDbox/obj/Release/
trunk/plugins/MyDbox/Source/MyDbox/obj/Release/Interop.WinGrabEngine.dll
trunk/plugins/MyDbox/Source/MyDbox/obj/Release/MediaPortal.GUI.Mydbox.DboxSetupForm.resources
trunk/plugins/MyDbox/Source/MyDbox/obj/Release/MyDbox.csproj.GenerateResource.Cache
trunk/plugins/MyDbox/Source/MyDbox/obj/Release/MyDbox.csproj.ResolveComReference.cache
trunk/plugins/MyDbox/Source/MyDbox/obj/Release/MyDbox.dll
trunk/plugins/MyDbox/Source/MyDbox/obj/Release/MyDbox.pdb
trunk/plugins/MyDbox/Source/MyDbox/obj/Release/ResolveAssemblyReference.cache
trunk/plugins/MyDbox/Source/MyDbox/obj/Release/TempPE/
trunk/plugins/MyDbox/Source/MyDbox.sln
trunk/plugins/MyDbox/Source/MyDbox.suo
trunk/plugins/MyDbox/read_me.txt
Added: trunk/plugins/MyDbox/Release/Plugins/ExternalPlayers/ExternalPlayers.dll
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/MyDbox/Release/Plugins/ExternalPlayers/ExternalPlayers.dll
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/MyDbox/Release/Plugins/Windows/ExternalPlayers.dll
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/MyDbox/Release/Plugins/Windows/ExternalPlayers.dll
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/MyDbox/Release/Plugins/Windows/MyDbox.dll
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/MyDbox/Release/Plugins/Windows/MyDbox.dll
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/MyDbox/Release/Skin/Blue Two/mydboxmain.xml
===================================================================
--- trunk/plugins/MyDbox/Release/Skin/Blue Two/mydboxmain.xml (rev 0)
+++ trunk/plugins/MyDbox/Release/Skin/Blue Two/mydboxmain.xml 2007-03-07 20:33:19 UTC (rev 165)
@@ -0,0 +1,251 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<window>
+ <id>2203</id>
+ <defaultcontrol>2</defaultcontrol>
+ <allowoverlay>no</allowoverlay>
+ <define>#header.image:television_logo.png</define>
+ <define>#header.label:605</define>
+ <define>#header.hover:hover_my tv.png</define>
+ <controls>
+ <import>common.window.xml</import>
+ <import>common.time.xml</import>
+ <control>
+ <type>group</type>
+ <layout>StackLayout</layout>
+ <description>group element</description>
+ <animation>FlyInFromLeft</animation>
+ <posX>60</posX>
+ <posY>97</posY>
+ <control>
+ <description>TVGuide</description>
+ <type>button</type>
+ <id>2</id>
+ <label>600</label>
+ <hyperlink>600</hyperlink>
+ <onup>17</onup>
+ <ondown>3</ondown>
+ <onright>99</onright>
+ </control>
+ <control>
+ <description>Record Now</description>
+ <type>button</type>
+ <id>3</id>
+ <label>601</label>
+ <onup>2</onup>
+ <ondown>6</ondown>
+ <onright>99</onright>
+ </control>
+ <control>
+ <description>Group button</description>
+ <type>button</type>
+ <id>6</id>
+ <label>971</label>
+ <onup>3</onup>
+ <ondown>7</ondown>
+ <onright>99</onright>
+ </control>
+ <control>
+ <description>Channel button</description>
+ <type>button</type>
+ <id>7</id>
+ <label>602</label>
+ <onup>6</onup>
+ <ondown>8</ondown>
+ <onright>99</onright>
+ </control>
+ <control>
+ <description>TV On/Off button</description>
+ <type>togglebutton</type>
+ <id>8</id>
+ <font>font13</font>
+ <textcolor>White</textcolor>
+ <colordiffuse>White</colordiffuse>
+ <disabledcolor>#60ffffff</disabledcolor>
+ <label>707</label>
+ <onup>7</onup>
+ <ondown>9</ondown>
+ <onright>99</onright>
+ </control>
+ <control>
+ <description>Timeshifting On/Off button</description>
+ <type>togglebutton</type>
+ <id>9</id>
+ <font>font13</font>
+ <textcolor>White</textcolor>
+ <colordiffuse>White</colordiffuse>
+ <label>708</label>
+ <onup>8</onup>
+ <ondown>10</ondown>
+ <onright>99</onright>
+ </control>
+ <control>
+ <description>Scheduler</description>
+ <type>button</type>
+ <id>10</id>
+ <label>603</label>
+ <hyperlink>601</hyperlink>
+ <onup>9</onup>
+ <ondown>11</ondown>
+ <onright>99</onright>
+ </control>
+ <control>
+ <description>Recordings</description>
+ <type>button</type>
+ <id>11</id>
+ <label>604</label>
+ <onup>10</onup>
+ <ondown>12</ondown>
+ <onright>99</onright>
+ </control>
+ <control>
+ <description>Raido</description>
+ <type>button</type>
+ <id>12</id>
+ <label>665</label>
+ <onup>11</onup>
+ <ondown>13</ondown>
+ <onright>99</onright>
+ </control>
+ <control>
+ <description>DirectChannel</description>
+ <type>button</type>
+ <id>13</id>
+ <label>891</label>
+ <onup>12</onup>
+ <ondown>14</ondown>
+ <onright>99</onright>
+ </control>
+ </control>
+ <control>
+ <description>TV background</description>
+ <type>image</type>
+ <id>1</id>
+ <posX>281</posX>
+ <posY>87</posY>
+ <width>396</width>
+ <height>335</height>
+ <colordiffuse>60ffffff</colordiffuse>
+ <texture>tv_background.png</texture>
+ </control>
+ <control>
+ <description>video window</description>
+ <type>videowindow</type>
+ <id>99</id>
+ <posX>300</posX>
+ <posY>107</posY>
+ <width>350</width>
+ <height>260</height>
+ <onleft>2</onleft>
+ <onright>2</onright>
+ <action>18</action>
+ <textureFocus>tv_green_border.png</textureFocus>
+ </control>
+ <control>
+ <description>Current program title</description>
+ <type>fadelabel</type>
+ <id>13</id>
+ <posX>290</posX>
+ <posY>415</posY>
+ <width>250</width>
+ <label>#TV.View.title</label>
+ <font>font13</font>
+ <textcolor>White</textcolor>
+ </control>
+ <control>
+ <description>Channel label</description>
+ <type>label</type>
+ <id>13</id>
+ <posX>660</posX>
+ <posY>415</posY>
+ <label>602</label>
+ <font>font13</font>
+ <align>right</align>
+ <textcolor>FFFFFFFF</textcolor>
+ </control>
+ <control>
+ <description>Current program time</description>
+ <type>label</type>
+ <id>13</id>
+ <posX>290</posX>
+ <posY>435</posY>
+ <label>#TV.View.start-#TV.View.stop</label>
+ <font>font13</font>
+ <align>left</align>
+ <textcolor>FFB2D4F5</textcolor>
+ </control>
+ <control>
+ <description>Current Channelname</description>
+ <type>fadelabel</type>
+ <id>30</id>
+ <posX>660</posX>
+ <posY>435</posY>
+ <width>90</width>
+ <label>#TV.View.channel</label>
+ <font>font13</font>
+ <align>right</align>
+ <textcolor>FFB2D4F5</textcolor>
+ </control>
+ <control>
+ <description>Description1</description>
+ <type>textboxscrollup</type>
+ <id>15</id>
+ <posX>290</posX>
+ <posY>455</posY>
+ <width>350</width>
+ <height>90</height>
+ <seperator>----------------------------------------------------------------------------------------------</seperator>
+ <label>#TV.View.description</label>
+ <font>font13</font>
+ <textcolor>White</textcolor>
+ </control>
+ <control>
+ <description>Progress background</description>
+ <type>image</type>
+ <id>1</id>
+ <posX>300</posX>
+ <posY>377</posY>
+ <width>350</width>
+ <texture>osd_progress_background.png</texture>
+ </control>
+ <control>
+ <description>progress bar</description>
+ <type>progress</type>
+ <id>20</id>
+ <posX>289</posX>
+ <posY>376</posY>
+ <width>372</width>
+ <label>#TV.View.Percentage</label>
+ <visible>yes</visible>
+ </control>
+ <control>
+ <description>Recording Channel</description>
+ <type>image</type>
+ <id>22</id>
+ <posX>90</posX>
+ <posY>425</posY>
+ <width>80</width>
+ <height>80</height>
+ <texture>#TV.Record.thumb</texture>
+ </control>
+ <control>
+ <description>record info label</description>
+ <type>fadelabel</type>
+ <id>23</id>
+ <width>150</width>
+ <height>30</height>
+ <posX>85</posX>
+ <label>#TV.Record.channel\r#TV.Record.title\r#TV.Record.start-#TV.Record.stop</label>
+ <font>font13</font>
+ <textcolor>White</textcolor>
+ </control>
+ <control>
+ <description>record pin</description>
+ <type>image</type>
+ <id>24</id>
+ <posX>260</posX>
+ <posY>425</posY>
+ <texture>tvguide_record_button.png</texture>
+ <visible>no</visible>
+ </control>
+ </controls>
+</window>
\ No newline at end of file
Added: trunk/plugins/MyDbox/Source/MyDbox/ChannelInfo.cs
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/MyDbox/Source/MyDbox/ChannelInfo.cs
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/MyDbox/Source/MyDbox/Data.cs
===================================================================
--- trunk/plugins/MyDbox/Source/MyDbox/Data.cs (rev 0)
+++ trunk/plugins/MyDbox/Source/MyDbox/Data.cs 2007-03-07 20:33:19 UTC (rev 165)
@@ -0,0 +1,189 @@
+#region Copyright (C) 2005-2007 Team MediaPortal
+
+/*
+ * Copyright (C) 2005-2007 Team MediaPortal
+ * http://www.team-mediaportal.com
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Make; see the file COPYING. If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ */
+
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Data;
+using System.Text.RegularExpressions;
+
+namespace MediaPortal.GUI.Mydbox
+{
+ public class Data
+ {
+ private string _Url = "";
+ private string _UserName = "";
+ private string _Password = "";
+ private string _Command = "/control/";
+
+ public Data(string url, string username, string password)
+ {
+ _Url = url;
+ _UserName = username;
+ _Password = password;
+ }
+
+ public DataSet UserTVBouquets
+ {
+ get
+ {
+ string temp = "";
+ Request request = new Request(_Url, _UserName, _Password);
+ string sreturn = request.PostData(_Command + "getbouquets");
+ string[] allBouquets = sreturn.Split('\n');
+
+ // convert to dataset
+ DataSet ds = new DataSet();
+ DataTable table = new DataTable("BouquetsTV");
+ DataRow row = null;
+
+ try
+ {
+ table.Columns.Add("Ref", Type.GetType("System.String"));
+ table.Columns.Add("Bouquet", Type.GetType("System.String"));
+ table.Columns.Add("Channel", Type.GetType("System.String"));
+ table.Columns.Add("ID", Type.GetType("System.String"));
+ table.Columns.Add("Name", Type.GetType("System.String"));
+
+ foreach (string s in allBouquets)
+ {
+ temp = s.Split(' ')[0];
+
+ sreturn = request.PostData(_Command + "getbouquet?bouquet=" + temp + "&mode=TV");
+ string[] OneBouquet = sreturn.Split('\n');
+
+ if (OneBouquet[0] != "")
+ {
+
+ foreach (string bouquets in OneBouquet)
+ {
+ if (bouquets.IndexOf(' ') > -1 && bouquets.Length > 0)
+ {
+ row = table.NewRow();
+ int start = 0;
+
+ String tmp_Ref = s.Split(' ')[0];
+ start = tmp_Ref.Length + 1;
+ String tmp_Bouquet = s.Substring(start,s.Length-start);
+ String tmp_Channel = bouquets.Split(' ')[0];
+ String tmp_ID = bouquets.Split(' ')[1];
+ start = tmp_Channel.Length + tmp_ID.Length + 2;
+ String tmp_Name = bouquets.Substring(start, bouquets.Length - start);
+
+ row["Ref"] = tmp_Ref;
+ row["Bouquet"] = tmp_Bouquet;
+ row["Channel"] = tmp_Channel;
+ row["ID"] = tmp_ID;
+ row["Name"] = tmp_Name;
+
+ table.Rows.Add(row);
+ }
+ }
+ }
+ }
+ ds.Tables.Add(table);
+ }
+ catch
+ {
+
+ }
+
+ return ds;
+ }
+ }
+
+ public DataSet UserRadioBouquets
+ {
+ get
+ {
+ string temp = "";
+ Request request = new Request(_Url, _UserName, _Password);
+ string sreturn = request.PostData(_Command + "getbouquets");
+ string[] allBouquets = sreturn.Split('\n');
+
+ // convert to dataset
+ DataSet ds = new DataSet();
+ DataTable table = new DataTable("BouquetsRadio");
+ DataRow row = null;
+
+ try
+ {
+
+ table.Columns.Add("Ref", Type.GetType("System.String"));
+ table.Columns.Add("Bouquet", Type.GetType("System.String"));
+ table.Columns.Add("Channel", Type.GetType("System.String"));
+ table.Columns.Add("ID", Type.GetType("System.String"));
+ table.Columns.Add("Name", Type.GetType("System.String"));
+
+ foreach (string s in allBouquets)
+ {
+ temp = s.Split(' ')[0];
+
+ sreturn = request.PostData(_Command + "getbouquet?bouquet=" + temp + "&mode=RADIO");
+ string[] OneBouquet = sreturn.Split('\n');
+
+ if (OneBouquet[0] != "")
+ {
+
+ foreach (string bouquets in OneBouquet)
+ {
+ if (bouquets.IndexOf(' ') > -1 && bouquets.Length > 0)
+ {
+ row = table.NewRow();
+ int start = 0;
+
+ String tmp_Ref = s.Split(' ')[0];
+ start = tmp_Ref.Length + 1;
+ String tmp_Bouquet = s.Substring(start, s.Length - start);
+ String tmp_Channel = bouquets.Split(' ')[0];
+ String tmp_ID = bouquets.Split(' ')[1];
+ start = tmp_Ref.Length + tmp_ID.Length + 2;
+ String tmp_Name = bouquets.Substring(start, bouquets.Length - start);
+
+ row["Ref"] = tmp_Ref;
+ row["Bouquet"] = tmp_Bouquet;
+ row["Channel"] = tmp_Channel;
+ row["ID"] = tmp_ID;
+ row["Name"] = tmp_Name;
+
+ table.Rows.Add(row);
+ }
+ }
+ }
+ }
+ ds.Tables.Add(table);
+ }
+ catch
+ {
+
+ }
+
+ return ds;
+ }
+ }
+
+ }
+
+}
Added: trunk/plugins/MyDbox/Source/MyDbox/DboxSetupForm.Designer.cs
===================================================================
--- trunk/plugins/MyDbox/Source/MyDbox/DboxSetupForm.Designer.cs (rev 0)
+++ trunk/plugins/MyDbox/Source/MyDbox/DboxSetupForm.Designer.cs 2007-03-07 20:33:19 UTC (rev 165)
@@ -0,0 +1,40 @@
+#region Copyright (C) 2005-2007 Team MediaPortal
+
+/*
+ * Copyright (C) 2005-2007 Team MediaPortal
+ * http://www.team-mediaportal.com
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Make; see the file COPYING. If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ */
+
+#endregion
+
+namespace MediaPortal.GUI.Mydbox
+{
+ partial class DboxSetupForm
+ {
+
+ private MediaPortal.UserInterface.Controls.MPLabel mpLabel3;
+ private MediaPortal.UserInterface.Controls.MPTextBox edtPassword;
+ private MediaPortal.UserInterface.Controls.MPButton mpButton1;
+ private MediaPortal.UserInterface.Controls.MPTextBox edtUserName;
+ private MediaPortal.UserInterface.Controls.MPGroupBox mpGroupBox1;
+ private MediaPortal.UserInterface.Controls.MPLabel mpLabel2;
+ private MediaPortal.UserInterface.Controls.MPTextBox edtIP;
+ private MediaPortal.UserInterface.Controls.MPLabel mpLabel1;
+ }
+}
\ No newline at end of file
Added: trunk/plugins/MyDbox/Source/MyDbox/DboxSetupForm.cs
===================================================================
--- trunk/plugins/MyDbox/Source/MyDbox/DboxSetupForm.cs (rev 0)
+++ trunk/plugins/MyDbox/Source/MyDbox/DboxSetupForm.cs 2007-03-07 20:33:19 UTC (rev 165)
@@ -0,0 +1,197 @@
+#region Copyright (C) 2005-2007 Team MediaPortal
+
+/*
+ * Copyright (C) 2005-2007 Team MediaPortal
+ * http://www.team-mediaportal.com
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Make; see the file COPYING. If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ */
+
+#endregion
+
+using System;
+using System.Collections;
+using System.ComponentModel;
+using System.IO;
+using System.Windows.Forms;
+using MediaPortal.Profile;
+using MediaPortal.Util;
+
+
+namespace MediaPortal.GUI.Mydbox
+{
+ public partial class DboxSetupForm : Form
+ {
+ public DboxSetupForm()
+ {
+ InitializeComponent();
+ LoadSettings();
+ }
+
+ private void DboxSetupForm_Load(object sender, EventArgs e)
+ {
+ LoadSettings();
+ }
+
+ private void btnClose_Click(object sender, EventArgs e)
+ {
+ SaveSettings();
+ this.Close();
+ }
+
+ private void InitializeComponent()
+ {
+ this.mpGroupBox1 = new MediaPortal.UserInterface.Controls.MPGroupBox();
+ this.edtPassword = new MediaPortal.UserInterface.Controls.MPTextBox();
+ this.mpLabel3 = new MediaPortal.UserInterface.Controls.MPLabel();
+ this.edtUserName = new MediaPortal.UserInterface.Controls.MPTextBox();
+ this.mpLabel2 = new MediaPortal.UserInterface.Controls.MPLabel();
+ this.edtIP = new MediaPortal.UserInterface.Controls.MPTextBox();
+ this.mpLabel1 = new MediaPortal.UserInterface.Controls.MPLabel();
+ this.mpButton1 = new MediaPortal.UserInterface.Controls.MPButton();
+ this.mpGroupBox1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // mpGroupBox1
+ //
+ this.mpGroupBox1.Controls.Add(this.edtPassword);
+ this.mpGroupBox1.Controls.Add(this.mpLabel3);
+ this.mpGroupBox1.Controls.Add(this.edtUserName);
+ this.mpGroupBox1.Controls.Add(this.mpLabel2);
+ this.mpGroupBox1.Controls.Add(this.edtIP);
+ this.mpGroupBox1.Controls.Add(this.mpLabel1);
+ this.mpGroupBox1.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+ this.mpGroupBox1.Location = new System.Drawing.Point(3, 3);
+ this.mpGroupBox1.Name = "mpGroupBox1";
+ this.mpGroupBox1.Size = new System.Drawing.Size(310, 144);
+ this.mpGroupBox1.TabIndex = 0;
+ this.mpGroupBox1.TabStop = false;
+ this.mpGroupBox1.Text = "D-Box Login Settings";
+ //
+ // edtPassword
+ //
+ this.edtPassword.BorderColor = System.Drawing.Color.Empty;
+ this.edtPassword.Location = new System.Drawing.Point(120, 94);
+ this.edtPassword.Name = "edtPassword";
+ this.edtPassword.Size = new System.Drawing.Size(157, 20);
+ this.edtPassword.TabIndex = 5;
+ this.edtPassword.Visible = false;
+ //
+ // mpLabel3
+ //
+ this.mpLabel3.AutoSize = true;
+ this.mpLabel3.Location = new System.Drawing.Point(58, 97);
+ this.mpLabel3.Name = "mpLabel3";
+ this.mpLabel3.Size = new System.Drawing.Size(56, 13);
+ this.mpLabel3.TabIndex = 4;
+ this.mpLabel3.Text = "Password:";
+ this.mpLabel3.Visible = false;
+ //
+ // edtUserName
+ //
+ this.edtUserName.BorderColor = System.Drawing.Color.Empty;
+ this.edtUserName.Location = new System.Drawing.Point(120, 68);
+ this.edtUserName.Name = "edtUserName";
+ this.edtUserName.Size = new System.Drawing.Size(157, 20);
+ this.edtUserName.TabIndex = 3;
+ this.edtUserName.Visible = false;
+ //
+ // mpLabel2
+ //
+ this.mpLabel2.AutoSize = true;
+ this.mpLabel2.Location = new System.Drawing.Point(53, 71);
+ this.mpLabel2.Name = "mpLabel2";
+ this.mpLabel2.Size = new System.Drawing.Size(61, 13);
+ this.mpLabel2.TabIndex = 2;
+ this.mpLabel2.Text = "User name:";
+ this.mpLabel2.Visible = false;
+ //
+ // edtIP
+ //
+ this.edtIP.BorderColor = System.Drawing.Color.Empty;
+ this.edtIP.Location = new System.Drawing.Point(120, 42);
+ this.edtIP.Name = "edtIP";
+ this.edtIP.Size = new System.Drawing.Size(157, 20);
+ this.edtIP.TabIndex = 1;
+ //
+ // mpLabel1
+ //
+ this.mpLabel1.AutoSize = true;
+ this.mpLabel1.Location = new System.Drawing.Point(26, 45);
+ this.mpLabel1.Name = "mpLabel1";
+ this.mpLabel1.Size = new System.Drawing.Size(92, 13);
+ this.mpLabel1.TabIndex = 0;
+ this.mpLabel1.Text = "IP address D-Box:";
+ //
+ // mpButton1
+ //
+ this.mpButton1.Location = new System.Drawing.Point(238, 153);
+ this.mpButton1.Name = "mpButton1";
+ this.mpButton1.Size = new System.Drawing.Size(75, 23);
+ this.mpButton1.TabIndex = 1;
+ this.mpButton1.Text = "OK";
+ this.mpButton1.UseVisualStyleBackColor = true;
+ this.mpButton1.Click += new System.EventHandler(this.mpButton1_Click);
+ //
+ // DboxSetupForm
+ //
+ this.ClientSize = new System.Drawing.Size(316, 179);
+ this.Controls.Add(this.mpButton1);
+ this.Controls.Add(this.mpGroupBox1);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "DboxSetupForm";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+ this.Text = "Dbox Settings";
+ this.mpGroupBox1.ResumeLayout(false);
+ this.mpGroupBox1.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ private void mpButton1_Click(object sender, EventArgs e)
+ {
+ SaveSettings();
+ this.Close();
+ }
+
+ void LoadSettings()
+ {
+ using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml"))
+ {
+ edtIP.Text = xmlreader.GetValue("mydbox", "IP");
+ edtUserName.Text = xmlreader.GetValue("mydbox", "UserName");
+ edtPassword.Text = xmlreader.GetValue("mydbox", "Password");
+ }
+ }
+
+ void SaveSettings()
+ {
+ if (edtIP.Text.Length == 0)
+ return;
+
+ using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings("MediaPortal.xml"))
+
+ {
+ xmlwriter.SetValue("mydbox", "IP", edtIP.Text);
+ xmlwriter.SetValue("mydbox", "UserName", edtUserName.Text);
+ xmlwriter.SetValue("mydbox", "Password", edtPassword.Text);
+ }
+ }
+ }
+}
\ No newline at end of file
Added: trunk/plugins/MyDbox/Source/MyDbox/DboxSetupForm.resx
===================================================================
--- trunk/plugins/MyDbox/Source/MyDbox/DboxSetupForm.resx (rev 0)
+++ trunk/plugins/MyDbox/Source/MyDbox/DboxSetupForm.resx 2007-03-07 20:33:19 UTC (rev 165)
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root>
\ No newline at end of file
Added: trunk/plugins/MyDbox/Source/MyDbox/Epg.cs
===================================================================
--- trunk/plugins/MyDbox/Source/MyDbox/Epg.cs (rev 0)
+++ trunk/plugins/MyDbox/Source/MyDbox/Epg.cs 2007-03-07 20:33:19 UTC (rev 165)
@@ -0,0 +1,193 @@
+#region Copyright (C) 2005-2007 Team MediaPortal
+
+/*
+ * Copyright (C) 2005-2007 Team MediaPortal
+ * http://www.team-mediaportal.com
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Make; see the file COPYING. If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ */
+
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Data;
+using System.Text.RegularExpressions;
+
+namespace MediaPortal.GUI.Mydbox
+{
+ public class EPG
+ {
+ private string _Url = "";
+ private string _UserName = "";
+ private string _Password = "";
+ private string _Command = "/control/";
+
+ private DateTime StartTime;
+ private DateTime EndTime;
+ private DateTime ActTime;
+
+ public EPG(string url, string username, string password)
+ {
+ _Url = url;
+ _UserName = username;
+ _Password = password;
+ }
+
+ public DataSet EPG_Now
+ {
+ get
+ {
+ //get all actual programms EPG
+ Request request = new Request(_Url, _UserName, _Password);
+ string sreturn = request.PostData(_Command + "epg?ext");
+ string[] allChannels = sreturn.Split('\n');
+
+ // convert to dataset
+ DataSet ds = new DataSet();
+ DataTable table = new DataTable("EPG");
+ DataRow row = null;
+
+ try
+ {
+ table.Columns.Add("ID", Type.GetType("System.String"));
+ table.Columns.Add("Start", Type.GetType("System.DateTime"));
+ table.Columns.Add("Stop", Type.GetType("System.DateTime"));
+ table.Columns.Add("Duration", Type.GetType("System.String"));
+ table.Columns.Add("EventID", Type.GetType("System.String"));
+ table.Columns.Add("Title", Type.GetType("System.String"));
+
+
+ foreach (string s in allChannels)
+ {
+ if (s != "")
+ {
+ string[] allFields = s.Split(' ');
+
+ row = table.NewRow();
+
+ ActTime = DateTime.Now;
+
+
+ StartTime = DateTime.Parse("01.01.1970 01:00");
+ StartTime = StartTime.AddSeconds(Convert.ToInt32(allFields[1]));
+ EndTime = StartTime.AddSeconds(Convert.ToInt32(allFields[2]));
+
+ String title = "";
+
+ for (int j = 4; j <= allFields.GetUpperBound(0); j++)
+ {
+ title = title + allFields[j] + " ";
+ }
+
+ row["ID"] = allFields[0];
+ row["Start"] = StartTime;
+ row["Stop"] = EndTime;
+ row["Duration"] = Convert.ToInt32(allFields[2]);
+ row["EventID"] = allFields[3];
+ row["Title"] = title;
+
+ table.Rows.Add(row);
+ }
+ }
+
+ ds.Tables.Add(table);
+ }
+ catch
+ {
+
+ }
+ return ds;
+ }
+ }
+
+ public DataSet EPG_Channel
+ {
+ get
+ {
+ //get actual channel (ID)
+ Request request = new Request(_Url, _UserName, _Password);
+ string sreturn = request.PostData(_Command + "zapto");
+ sreturn = sreturn.Replace("\n", "");
+ string channel = sreturn;
+
+ //Get EPG for channel
+ sreturn = request.PostData(_Command + "epg?" + channel);
+ string[] allRows = sreturn.Split('\n');
+
+ // convert to dataset
+ DataSet ds = new DataSet();
+ DataTable table = new DataTable("EPG");
+ DataRow row = null;
+
+ try
+ {
+ table.Columns.Add("ID", Type.GetType("System.String"));
+ table.Columns.Add("Start", Type.GetType("System.DateTime"));
+ table.Columns.Add("Stop", Type.GetType("System.DateTime"));
+ table.Columns.Add("Duration", Type.GetType("System.String"));
+ table.Columns.Add("EventID", Type.GetType("System.String"));
+ table.Columns.Add("Title", Type.GetType("System.String"));
+
+ foreach (string s in allRows)
+ {
+ if (s != "")
+ {
+ string[] allFields = s.Split(' ');
+
+ row = table.NewRow();
+
+ ActTime = DateTime.Now;
+
+ StartTime = DateTime.Parse("01.01.1970 01:00");
+ StartTime = StartTime.AddSeconds(Convert.ToInt32(allFields[1]));
+ EndTime = StartTime.AddSeconds(Convert.ToInt32(allFields[2]));
+
+ String title = "";
+
+ for (int j = 3; j <= allFields.GetUpperBound(0); j++)
+ {
+ title = title + allFields[j] + " ";
+ }
+
+ row["ID"] = channel;
+ row["Start"] = StartTime;
+ row["Stop"] = EndTime;
+ row["Duration"] = Convert.ToInt32(allFields[2]);
+ row["EventID"] = allFields[0];
+ row["Title"] = title;
+
+ table.Rows.Add(row);
+ }
+ }
+
+ ds.Tables.Add(table);
+ }
+ catch
+ {
+
+ }
+ return ds;
+ }
+ }
+
+ }
+}
+
+
+
Added: trunk/plugins/MyDbox/Source/MyDbox/GuiDbox.cs
===================================================================
--- trunk/plugins/MyDbox/Source/MyDbox/GuiDbox.cs (rev 0)
+++ trunk/plugins/MyDbox/Source/MyDbox/GuiDbox.cs 2007-03-07 20:33:19 UTC (rev 165)
@@ -0,0 +1,181 @@
+#region Copyright (C) 2005-2007 Team MediaPortal
+
+/*
+ * Copyright (C) 2005-2007 Team MediaPortal
+ * http://www.team-mediaportal.com
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Make; see the file COPYING. If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ */
+
+#endregion
+
+using System;
+using System.ComponentModel;
+using System.Collections.Generic;
+using System.Collections.Specialized;
+using System.Text;
+using System.Text.RegularExpressions;
+using MediaPortal.GUI.Library;
+using MediaPortal.Player;
+using MediaPortal.Dialogs;
+using MediaPortal.Configuration;
+using MediaPortal.Playlists;
+using System.Xml;
+using System.IO;
+using System.Data;
+using MediaPortal.Util;
+
+namespace MediaPortal.GUI.Mydbox
+{
+ public class DboxGui : GUIWindow
+ {
+ public const int WindowID = 9900;
+
+ #region Constructor
+ public DboxGui()
+ {
+ GetID = (int)MyDboxGui.WindowID;
+ }
+ #endregion
+
+ #region SkinControlAttributes
+ [SkinControlAttribute(50)]
+ protected GUIFacadeControl facadeview = null;
+ [SkinControlAttribute(2)]
+ protected GUIButtonControl btnFavoriet = null;
+ [SkinControlAttribute(3)]
+ protected GUIButtonControl btnRadio = null;
+ [SkinControlAttribute(4)]
+ protected GUIButtonControl btnRecordings = null;
+ #endregion
+
+ #region Variables
+ //private DBox.Core _Dreambox = null;
+ //PlayListPlayer playlistPlayer;
+
+ // bools
+ //private bool _ShowChannels = false;
+
+ private static string server;
+ private static string username;
+ private static string password;
+
+ private string _Url = "";
+ private string _UserName = "";
+ private string _Password = "";
+
+ private static DataTable _TV_Bouquets = null;
+ //private static DataTable _Radio_Bouquets = null;
+
+ #endregion
+
+ #region Overrides
+ public override bool Init()
+ {
+ //playlistPlayer = PlayListPlayer.SingletonPlayer;
+ LoadSettings();
+
+ return Load(GUIGraphicsContext.Skin + @"\mydbox.xml");
+ }
+
+ #endregion
+
+ #region Private Methods
+ void LoadSettings()
+ {
+ string path = Path.Combine(Config.GetFolder(Config.Dir.Config), "MediaPortal.xml");
+ using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(path))
+ //using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml")))
+ {
+ server = xmlreader.GetValue("mydbox", "IP");
+ username = xmlreader.GetValue("mydbox", "UserName");
+ password = xmlreader.GetValue("mydbox", "Password");
+ }
+
+ ShowBoutiques();
+
+ }
+
+ void ShowBoutiques()
+ {
+ _Url = "http://" + server ;
+ _UserName = "";
+ _Password = "";
+
+ //_ShowChannels = false;
+ facadeview.Clear();
+
+ //get bouquets
+ Data _DBox = new Data(_Url, _UserName, _Password);
+ _TV_Bouquets = _DBox.UserTVBouquets.Tables[0];
+
+ foreach (DataRow row in _TV_Bouquets.Rows)
+ {
+ GUIListItem li = new GUIListItem();
+ li.Label = row["Name"].ToString();
+ facadeview.Add(li);
+ }
+ }
+ void ShowChannels(GUIListItem guiListItem)
+ {
+ _Url = "http://192.168.0.100/";
+ _UserName = "";
+ _Password = "";
+
+ //_ShowChannels = true;
+ facadeview.Clear();
+ Data _DBox = new Data(_Url, _UserName, _Password);
+ string reference = GetChannelReference(guiListItem);
+ //DataTable dt = _DBox.Channels(reference).Tables[0];
+ //foreach (DataRow row in dt.Rows)
+ {
+ // GUIListItem li = new GUIListItem();
+ // li.Label = row["Name"].ToString();
+ // facadeview.Add(li);
+ }
+ try
+ {
+ //string currentChannelName = _Dbox.CurrentChannel.Name;
+ //GUIPropertyManager.SetProperty("#Play.Current.File", currentChannelName);
+ //GUIPropertyManager.SetProperty("#Play.Current.Title", currentChannelName);
+ }
+ catch (Exception) { }
+ }
+ string GetChannelReference(GUIListItem guiListItem)
+ {
+ string reference = "";
+ Data _DBox = new Data(_Url, _UserName, _Password);
+ DataTable dt = _DBox.UserTVBouquets.Tables[0];
+ foreach (DataRow row in dt.Rows)
+ {
+ if (guiListItem.Label == row["Name"].ToString())
+ {
+ reference = row["Ref"].ToString();
+ break;
+ }
+ }
+ return reference;
+ }
+ #endregion
+
+
+ }
+
+
+
+
+}
\ No newline at end of file
Added: trunk/plugins/MyDbox/Source/MyDbox/MyDbox.csproj
===================================================================
--- trunk/plugins/MyDbox/Source/MyDbox/MyDbox.csproj (rev 0)
+++ trunk/plugins/MyDbox/Source/MyDbox/MyDbox.csproj 2007-03-07 20:33:19 UTC (rev 165)
@@ -0,0 +1,71 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{F8CC05AA-6306-459E-BD32-40C02489EFEC}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>MyDbox</RootNamespace>
+ <AssemblyName>MyDbox</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Core, Version=1.0.2593.1921, Culture=neutral, processorArchitecture=MSIL" />
+ <Reference Include="Dialogs, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL" />
+ <Reference Include="ExternalPlayers, Version=1.0.2604.25450, Culture=neutral, processorArchitecture=MSIL" />
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Windows.Forms" />
+ <Reference Include="System.Xml" />
+ <Reference Include="Utils, Version=1.0.2593.1896, Culture=neutral, processorArchitecture=MSIL" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="ChannelInfo.cs" />
+ <Compile Include="Data.cs" />
+ <Compile Include="DboxSetupForm.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="DboxSetupForm.Designer.cs">
+ <DependentUpon>DboxSetupForm.cs</DependentUpon>
+ </Compile>
+ <Compile Include="Epg.cs" />
+ <Compile Include="MyDboxGui.cs" />
+ <Compile Include="MyDboxPlugin.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Request.cs" />
+ <Compile Include="Zap.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="DboxSetupForm.resx">
+ <SubType>Designer</SubType>
+ <DependentUpon>DboxSetupForm.cs</DependentUpon>
+ </EmbeddedResource>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
Added: trunk/plugins/MyDbox/Source/MyDbox/MyDbox.csproj.user
===================================================================
--- trunk/plugins/MyDbox/Source/MyDbox/MyDbox.csproj.user (rev 0)
+++ trunk/plugins/MyDbox/Source/MyDbox/MyDbox.csproj.user 2007-03-07 20:33:19 UTC (rev 165)
@@ -0,0 +1,5 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectView>ProjectFiles</ProjectView>
+ </PropertyGroup>
+</Project>
\ No newline at end of file
Added: trunk/plugins/MyDbox/Source/MyDbox/MyDboxGui.cs
===================================================================
--- trunk/plugins/MyDbox/Source/MyDbox/MyDboxGui.cs (rev 0)
+++ trunk/plugins/MyDbox/Source/MyDbox/MyDboxGui.cs 2007-03-07 20:33:19 UTC (rev 165)
@@ -0,0 +1,630 @@
+#region Copyright (C) 2005-2007 Team MediaPortal
+
+/*
+ * Copyright (C) 2005-2007 Team MediaPortal
+ * http://www.team-mediaportal.com
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Make; see the file COPYING. If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ */
+
+#endregion
+
+using System;
+using System.ComponentModel;
+using System.Collections.Generic;
+using System.Collections.Specialized;
+using System.Text;
+using System.Text.RegularExpressions;
+using MediaPortal.GUI.Library;
+using MediaPortal.Player;
+using MediaPortal.Dialogs;
+using MediaPortal.Playlists;
+using System.Xml;
+using System.IO;
+using System.Data;
+using System.Drawing;
+using MediaPortal.Util;
+
+namespace MediaPortal.GUI.Mydbox
+{
+ public class MyDboxGui : GUIWindow
+ {
+ #region SkinControlAttributes
+ [SkinControlAttribute(3)]
+ protected GUIButtonControl btnRecord = null;
+ [SkinControlAttribute(6)]
+ protected GUIButtonControl btnBouquet = null;
+ [SkinControlAttribute(7)]
+ protected GUIButtonControl btnChannel = null;
+ [SkinControlAttribute(8)]
+ protected GUIToggleButtonControl btnTVOnOff = null;
+ [SkinControlAttribute(11)]
+ protected GUIButtonControl btnRecordings = null;
+ [SkinControlAttribute(13)]
+ protected GUIButtonControl SelChannel = null;
+ [SkinControlAttribute(50)]
+ protected GUIFacadeControl facadeView = null;
+ [SkinControlAttribute(20)]
+ protected GUIProgressControl progressBar = null;
+ [SkinControlAttribute(99)]
+ protected GUIVideoControl videoWindow = null;
+ #endregion
+
+ #region Private Variables
+
+ private string _Url = "";
+ private string _UserName = "";
+ private string _Password = "";
+
+ private static PlayList playlist = new PlayList();
+
+ private static string server;
+ private static string username;
+ private static string password;
+
+ private static DataTable _TV_Bouquets = null;
+ //private static DataTable _Radio_Bouquets = null;
+ private static DataTable _EPG = null;
+
+ private static int ActBouquet = 0;
+ private static int ActChannelList;
+
+ private static String ActID = "";
+
+ private static VirtualDirectory recDirectory = new VirtualDirectory();
+ private static string vlciptvdir = Directory.GetCurrentDirectory() + @"\vlciptv";
+
+ private string LogPathName = Directory.GetCurrentDirectory() + @"\log\MyDbox.log";
+
+ private static OnActionHandler ah;
+
+ #endregion
+
+ #region Private Enumerations
+ enum Controls
+ {
+ BouquetButton = 6,
+ ChannelButton = 7,...
[truncated message content] |