You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(9) |
Jun
(7) |
Jul
|
Aug
(2) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
|
Feb
(4) |
Mar
(13) |
Apr
(10) |
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
(3) |
Oct
(1) |
Nov
(1) |
Dec
|
2008 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <mas...@us...> - 2007-03-08 12:13:10
|
Revision: 30 http://svn.sourceforge.net/mp-webinterface/?rev=30&view=rev Author: maschine Date: 2007-03-08 04:13:06 -0800 (Thu, 08 Mar 2007) Log Message: ----------- -Fixed bug with startstopButton -Set physical path on save settings -Added TestPage Modified Paths: -------------- trunk/Version2/Control Center/Control_Center_App.cs trunk/Version2/Setup/Setup.vdproj Added Paths: ----------- trunk/Version2/TestPage/ trunk/Version2/TestPage/Test.htm Modified: trunk/Version2/Control Center/Control_Center_App.cs =================================================================== --- trunk/Version2/Control Center/Control_Center_App.cs 2007-03-07 21:45:15 UTC (rev 29) +++ trunk/Version2/Control Center/Control_Center_App.cs 2007-03-08 12:13:06 UTC (rev 30) @@ -18,16 +18,16 @@ private ServiceController MPWServiceController = new ServiceController("MPW"); //MPW Webserver settings - private String appPath; private String port; private String bindIP; private int accesMode; - private String file = System.AppDomain.CurrentDomain.BaseDirectory + "Configuration.xml"; + private String file; public Control_Center_App() { InitializeComponent(); + file = System.AppDomain.CurrentDomain.BaseDirectory + "Configuration.xml"; RefreshControllers(); LoadSettings(); } @@ -48,12 +48,12 @@ if (statusMPWServerConn.Text == "Running") { statusMPWServerConn.ForeColor = Color.Green; - startstopButton.Enabled = true; + startstopButton.Text = "Stop"; } else { statusMPWServerConn.ForeColor = Color.Red; - startstopButton.Enabled = false; + startstopButton.Text = "Start"; } //TV Server @@ -159,6 +159,8 @@ node.InnerText = port; node = doc.DocumentElement.SelectSingleNode("/configuration/allowedAccesMode"); node.InnerText = accesMode.ToString(); + node = doc.DocumentElement.SelectSingleNode("/configuration/physicalPath"); + node.InnerText = System.AppDomain.CurrentDomain.BaseDirectory + @"wwwroot\"; doc.Save(file); } @@ -169,8 +171,17 @@ bindIP = bindIPBox.Text; accesMode = accessModeDropDown.SelectedIndex; SaveSettings(); - if (statusMPWServerConn.Text == "Running") - MPWServiceController.ExecuteCommand(0); //ReloadConfiguration + try + { + if (MPWServiceController.Status == ServiceControllerStatus.Running) + MPWServiceController.ExecuteCommand(0); //ReloadConfiguration + else + MessageBox.Show("You will need to restart the server to use the new configuration!"); + } + catch + { + MessageBox.Show("Error setting the new configuration."); + } linkLabel2.Text = ConstructServerURL(); } Modified: trunk/Version2/Setup/Setup.vdproj =================================================================== --- trunk/Version2/Setup/Setup.vdproj 2007-03-07 21:45:15 UTC (rev 29) +++ trunk/Version2/Setup/Setup.vdproj 2007-03-08 12:13:06 UTC (rev 30) @@ -21,18 +21,6 @@ } "Entry" { - "MsmKey" = "8:_3306E9F964F5FB2F9C11CD8F2ADE103C" - "OwnerKey" = "8:_0F712DF68ED348C597086DD86FC56227" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_3306E9F964F5FB2F9C11CD8F2ADE103C" - "OwnerKey" = "8:_7CD9E17A5A2443F381DBF7313078D211" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { "MsmKey" = "8:_38708A2E22BC4439A7DFB5A5CC780498" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" @@ -46,7 +34,7 @@ "Entry" { "MsmKey" = "8:_5AA324D14C7A0BEB13CF3C6839DE8AF7" - "OwnerKey" = "8:_3306E9F964F5FB2F9C11CD8F2ADE103C" + "OwnerKey" = "8:_F7CBCAAB235DF8EE243AD47CE5AE60AD" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -75,6 +63,24 @@ } "Entry" { + "MsmKey" = "8:_DB1EB6A709194CA9A153A70E56357E20" + "OwnerKey" = "8:_UNDEFINED" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_F7CBCAAB235DF8EE243AD47CE5AE60AD" + "OwnerKey" = "8:_0F712DF68ED348C597086DD86FC56227" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_F7CBCAAB235DF8EE243AD47CE5AE60AD" + "OwnerKey" = "8:_7CD9E17A5A2443F381DBF7313078D211" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { "MsmKey" = "8:_UNDEFINED" "OwnerKey" = "8:_B21808006FD74A33B7D97E8F41C2A72E" "MsmSig" = "8:_UNDEFINED" @@ -82,7 +88,7 @@ "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_3306E9F964F5FB2F9C11CD8F2ADE103C" + "OwnerKey" = "8:_F7CBCAAB235DF8EE243AD47CE5AE60AD" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -249,23 +255,43 @@ } "File" { - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_3306E9F964F5FB2F9C11CD8F2ADE103C" + "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_38708A2E22BC4439A7DFB5A5CC780498" { + "SourcePath" = "8:LICENSE.rtf" + "TargetName" = "8:LICENSE.rtf" + "Tag" = "8:" + "Folder" = "8:_3AAF0448C26C4EFC8D390F14EF2EACFB" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:TRUE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:FALSE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:1" + "Exclude" = "11:FALSE" + "IsDependency" = "11:FALSE" + "IsolateTo" = "8:" + } + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_5AA324D14C7A0BEB13CF3C6839DE8AF7" + { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:WebServer, Version=1.2.0.0, Culture=neutral, PublicKeyToken=6a8f2e8c25e1b4e0, processorArchitecture=MSIL" + "AssemblyAsmDisplayName" = "8:log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL" "ScatterAssemblies" { - "_3306E9F964F5FB2F9C11CD8F2ADE103C" + "_5AA324D14C7A0BEB13CF3C6839DE8AF7" { - "Name" = "8:WebServer.dll" + "Name" = "8:log4net.dll" "Attributes" = "3:512" } } - "SourcePath" = "8:WebServer.dll" + "SourcePath" = "8:log4net.dll" "TargetName" = "8:" "Tag" = "8:" - "Folder" = "8:_4AF64E14F05F48C6B6561E3A84C622CC" + "Folder" = "8:_3AAF0448C26C4EFC8D390F14EF2EACFB" "Condition" = "8:" "Transitive" = "11:FALSE" "Vital" = "11:TRUE" @@ -280,12 +306,12 @@ "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_38708A2E22BC4439A7DFB5A5CC780498" + "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_DB1EB6A709194CA9A153A70E56357E20" { - "SourcePath" = "8:LICENSE.rtf" - "TargetName" = "8:LICENSE.rtf" + "SourcePath" = "8:..\\TestPage\\Test.htm" + "TargetName" = "8:Test.htm" "Tag" = "8:" - "Folder" = "8:_3AAF0448C26C4EFC8D390F14EF2EACFB" + "Folder" = "8:_630010CA5B27470EBA4BEB29C8484993" "Condition" = "8:" "Transitive" = "11:FALSE" "Vital" = "11:TRUE" @@ -300,23 +326,23 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_5AA324D14C7A0BEB13CF3C6839DE8AF7" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_F7CBCAAB235DF8EE243AD47CE5AE60AD" { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL" + "AssemblyAsmDisplayName" = "8:WebServer, Version=1.2.0.0, Culture=neutral, PublicKeyToken=6a8f2e8c25e1b4e0, processorArchitecture=MSIL" "ScatterAssemblies" { - "_5AA324D14C7A0BEB13CF3C6839DE8AF7" + "_F7CBCAAB235DF8EE243AD47CE5AE60AD" { - "Name" = "8:log4net.dll" + "Name" = "8:WebServer.dll" "Attributes" = "3:512" } } - "SourcePath" = "8:log4net.dll" + "SourcePath" = "8:WebServer.dll" "TargetName" = "8:" "Tag" = "8:" - "Folder" = "8:_3AAF0448C26C4EFC8D390F14EF2EACFB" + "Folder" = "8:_4AF64E14F05F48C6B6561E3A84C622CC" "Condition" = "8:" "Transitive" = "11:FALSE" "Vital" = "11:TRUE" @@ -380,6 +406,17 @@ "Property" = "8:TARGETDIR" "Folders" { + "{9EF0B969-E518-4E46-987F-47570745A589}:_630010CA5B27470EBA4BEB29C8484993" + { + "Name" = "8:wwwroot" + "AlwaysCreate" = "11:TRUE" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Property" = "8:_2F2F0EE650724C609BA21DC3BA41CEC6" + "Folders" + { + } + } } } "{1525181F-901A-416C-8A58-119130FE478E}:_45AC748FDB2649E7871E48E65EC863D3" @@ -420,7 +457,7 @@ "Name" = "8:Microsoft Visual Studio" "ProductName" = "8:MPW" "ProductCode" = "8:{FFA1A109-9C5B-4D11-9B85-9E8B4F5392E4}" - "PackageCode" = "8:{9B6BD622-B13D-4D05-B187-801B6D9E200D}" + "PackageCode" = "8:{91217F2D-1313-4C9F-B9B7-124AA41D22C3}" "UpgradeCode" = "8:{4F72B4EB-D91C-4E25-9ABE-C7669CDE4B98}" "RestartWWWService" = "11:FALSE" "RemovePreviousVersions" = "11:TRUE" @@ -1043,7 +1080,7 @@ } "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_0F712DF68ED348C597086DD86FC56227" { - "SourcePath" = "8:..\\Control Center\\obj\\Release\\MPW Monitor.exe" + "SourcePath" = "8:..\\Control Center\\obj\\Release\\MPW Control Center.exe" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_3AAF0448C26C4EFC8D390F14EF2EACFB" Added: trunk/Version2/TestPage/Test.htm =================================================================== --- trunk/Version2/TestPage/Test.htm (rev 0) +++ trunk/Version2/TestPage/Test.htm 2007-03-08 12:13:06 UTC (rev 30) @@ -0,0 +1 @@ +Hello World! \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mas...@us...> - 2007-03-07 21:45:17
|
Revision: 29 http://svn.sourceforge.net/mp-webinterface/?rev=29&view=rev Author: maschine Date: 2007-03-07 13:45:15 -0800 (Wed, 07 Mar 2007) Log Message: ----------- 2nd try: initial commit of the MPW Control Center ;-) Added Paths: ----------- trunk/Version2/Control Center/ trunk/Version2/Control Center/Control Center.cs trunk/Version2/Control Center/Control Center.csproj trunk/Version2/Control Center/Control_Center_App.Designer.cs trunk/Version2/Control Center/Control_Center_App.cs trunk/Version2/Control Center/Control_Center_App.resx trunk/Version2/Control Center/Properties/ trunk/Version2/Control Center/Properties/AssemblyInfo.cs trunk/Version2/Control Center/mp.ico Added: trunk/Version2/Control Center/Control Center.cs =================================================================== --- trunk/Version2/Control Center/Control Center.cs (rev 0) +++ trunk/Version2/Control Center/Control Center.cs 2007-03-07 21:45:15 UTC (rev 29) @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Windows.Forms; + +namespace MPW.Control_Center +{ + static class Control_Center + { + /// <summary> + /// The main entry point for the MPW Control Center. + /// </summary> + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Control_Center_App()); + } + } +} \ No newline at end of file Added: trunk/Version2/Control Center/Control Center.csproj =================================================================== --- trunk/Version2/Control Center/Control Center.csproj (rev 0) +++ trunk/Version2/Control Center/Control Center.csproj 2007-03-07 21:45:15 UTC (rev 29) @@ -0,0 +1,81 @@ +<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>{8B650819-E843-488A-89CF-E629A389D4DA}</ProjectGuid> + <OutputType>WinExe</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>MPW.Control_Center</RootNamespace> + <AssemblyName>MPW Control Center</AssemblyName> + <ApplicationIcon>mp.ico</ApplicationIcon> + </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="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.ServiceProcess" /> + <Reference Include="System.Web" /> + <Reference Include="System.Web.Mobile" /> + <Reference Include="System.Web.RegularExpressions" /> + <Reference Include="System.Web.Services" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Control Center.cs" /> + <Compile Include="Control_Center_App.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="Control_Center_App.Designer.cs"> + <DependentUpon>Control_Center_App.cs</DependentUpon> + </Compile> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\WebServer\WebServer.csproj"> + <Project>{4CEEFA1E-7F95-43DF-A78C-9FE86082FDC3}</Project> + <Name>WebServer</Name> + <Private>True</Private> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="Control_Center_App.resx"> + <DependentUpon>Control_Center_App.cs</DependentUpon> + <SubType>Designer</SubType> + </EmbeddedResource> + </ItemGroup> + <ItemGroup> + <Content Include="mp.ico" /> + </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> + --> + <PropertyGroup> + <PostBuildEvent> + </PostBuildEvent> + </PropertyGroup> +</Project> \ No newline at end of file Added: trunk/Version2/Control Center/Control_Center_App.Designer.cs =================================================================== --- trunk/Version2/Control Center/Control_Center_App.Designer.cs (rev 0) +++ trunk/Version2/Control Center/Control_Center_App.Designer.cs 2007-03-07 21:45:15 UTC (rev 29) @@ -0,0 +1,382 @@ +namespace MPW.Control_Center +{ + partial class Control_Center_App + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Control_Center_App)); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.statusMPWServerConn = new System.Windows.Forms.Label(); + this.statusTVService = new System.Windows.Forms.Label(); + this.statusTVServerConn = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.linkLabel1 = new System.Windows.Forms.LinkLabel(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.saveButton = new System.Windows.Forms.Button(); + this.bindIPBox = new System.Windows.Forms.TextBox(); + this.accessModeDropDown = new System.Windows.Forms.ComboBox(); + this.label9 = new System.Windows.Forms.Label(); + this.label8 = new System.Windows.Forms.Label(); + this.linkLabel2 = new System.Windows.Forms.LinkLabel(); + this.label7 = new System.Windows.Forms.Label(); + this.portBox = new System.Windows.Forms.TextBox(); + this.label4 = new System.Windows.Forms.Label(); + this.startstopButton = new System.Windows.Forms.Button(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.button1 = new System.Windows.Forms.Button(); + this.trayIcon = new System.Windows.Forms.NotifyIcon(this.components); + this.trayContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components); + this.trayStart = new System.Windows.Forms.ToolStripMenuItem(); + this.stopToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.groupBox1.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.groupBox3.SuspendLayout(); + this.trayContextMenu.SuspendLayout(); + this.SuspendLayout(); + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.statusMPWServerConn); + this.groupBox1.Controls.Add(this.statusTVService); + this.groupBox1.Controls.Add(this.statusTVServerConn); + this.groupBox1.Controls.Add(this.label3); + this.groupBox1.Controls.Add(this.label2); + this.groupBox1.Controls.Add(this.label1); + this.groupBox1.Location = new System.Drawing.Point(12, 12); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(300, 139); + this.groupBox1.TabIndex = 0; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Status information"; + // + // statusMPWServerConn + // + this.statusMPWServerConn.AutoSize = true; + this.statusMPWServerConn.Location = new System.Drawing.Point(139, 102); + this.statusMPWServerConn.Name = "statusMPWServerConn"; + this.statusMPWServerConn.Size = new System.Drawing.Size(86, 13); + this.statusMPWServerConn.TabIndex = 7; + this.statusMPWServerConn.Text = "Not checked yet"; + // + // statusTVService + // + this.statusTVService.AutoSize = true; + this.statusTVService.Location = new System.Drawing.Point(139, 35); + this.statusTVService.Name = "statusTVService"; + this.statusTVService.Size = new System.Drawing.Size(86, 13); + this.statusTVService.TabIndex = 6; + this.statusTVService.Text = "Not checked yet"; + // + // statusTVServerConn + // + this.statusTVServerConn.AutoSize = true; + this.statusTVServerConn.Location = new System.Drawing.Point(139, 67); + this.statusTVServerConn.Name = "statusTVServerConn"; + this.statusTVServerConn.Size = new System.Drawing.Size(86, 13); + this.statusTVServerConn.TabIndex = 5; + this.statusTVServerConn.Text = "Not checked yet"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(6, 102); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(92, 13); + this.label3.TabIndex = 2; + this.label3.Text = "MPW Webserver:"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(6, 67); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(127, 13); + this.label2.TabIndex = 1; + this.label2.Text = "Connection to TV Server:"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(6, 35); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(63, 13); + this.label1.TabIndex = 0; + this.label1.Text = "TV Service:"; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(6, 118); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(92, 13); + this.label6.TabIndex = 4; + this.label6.Text = "MPW Homepage:"; + // + // linkLabel1 + // + this.linkLabel1.AutoSize = true; + this.linkLabel1.Location = new System.Drawing.Point(104, 118); + this.linkLabel1.Name = "linkLabel1"; + this.linkLabel1.Size = new System.Drawing.Size(166, 13); + this.linkLabel1.TabIndex = 3; + this.linkLabel1.TabStop = true; + this.linkLabel1.Text = "http://www.mp-webinterface.com"; + this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.saveButton); + this.groupBox2.Controls.Add(this.bindIPBox); + this.groupBox2.Controls.Add(this.accessModeDropDown); + this.groupBox2.Controls.Add(this.label9); + this.groupBox2.Controls.Add(this.label8); + this.groupBox2.Controls.Add(this.linkLabel2); + this.groupBox2.Controls.Add(this.label7); + this.groupBox2.Controls.Add(this.portBox); + this.groupBox2.Controls.Add(this.label4); + this.groupBox2.Location = new System.Drawing.Point(318, 12); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(300, 283); + this.groupBox2.TabIndex = 1; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "MPW Webserver setup"; + // + // saveButton + // + this.saveButton.Location = new System.Drawing.Point(126, 132); + this.saveButton.Name = "saveButton"; + this.saveButton.Size = new System.Drawing.Size(115, 23); + this.saveButton.TabIndex = 10; + this.saveButton.Text = "Save Configuration"; + this.saveButton.UseVisualStyleBackColor = true; + this.saveButton.Click += new System.EventHandler(this.saveButton_Click); + // + // bindIPBox + // + this.bindIPBox.Location = new System.Drawing.Point(126, 59); + this.bindIPBox.Name = "bindIPBox"; + this.bindIPBox.Size = new System.Drawing.Size(115, 20); + this.bindIPBox.TabIndex = 9; + // + // accessModeDropDown + // + this.accessModeDropDown.FormattingEnabled = true; + this.accessModeDropDown.Items.AddRange(new object[] { + "Local", + "Global", + "Restricted"}); + this.accessModeDropDown.Location = new System.Drawing.Point(126, 94); + this.accessModeDropDown.Name = "accessModeDropDown"; + this.accessModeDropDown.Size = new System.Drawing.Size(115, 21); + this.accessModeDropDown.TabIndex = 8; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(6, 102); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(74, 13); + this.label9.TabIndex = 7; + this.label9.Text = "Access mode:"; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(6, 67); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(81, 13); + this.label8.TabIndex = 6; + this.label8.Text = "Bind to local IP:"; + // + // linkLabel2 + // + this.linkLabel2.AutoSize = true; + this.linkLabel2.Location = new System.Drawing.Point(82, 262); + this.linkLabel2.Name = "linkLabel2"; + this.linkLabel2.Size = new System.Drawing.Size(0, 13); + this.linkLabel2.TabIndex = 5; + this.linkLabel2.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel2_LinkClicked); + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(9, 263); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(66, 13); + this.label7.TabIndex = 4; + this.label7.Text = "Server URL:"; + // + // portBox + // + this.portBox.Location = new System.Drawing.Point(126, 32); + this.portBox.Name = "portBox"; + this.portBox.Size = new System.Drawing.Size(115, 20); + this.portBox.TabIndex = 1; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(6, 35); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(114, 13); + this.label4.TabIndex = 0; + this.label4.Text = "MPW Webserver Port:"; + // + // startstopButton + // + this.startstopButton.Location = new System.Drawing.Point(9, 37); + this.startstopButton.Name = "startstopButton"; + this.startstopButton.Size = new System.Drawing.Size(100, 23); + this.startstopButton.TabIndex = 3; + this.startstopButton.Text = "Start"; + this.startstopButton.UseVisualStyleBackColor = true; + this.startstopButton.Click += new System.EventHandler(this.startstopButton_Click); + // + // groupBox3 + // + this.groupBox3.Controls.Add(this.button1); + this.groupBox3.Controls.Add(this.label6); + this.groupBox3.Controls.Add(this.linkLabel1); + this.groupBox3.Controls.Add(this.startstopButton); + this.groupBox3.Location = new System.Drawing.Point(12, 157); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(300, 138); + this.groupBox3.TabIndex = 2; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "MPW Webserver Control"; + // + // button1 + // + this.button1.Location = new System.Drawing.Point(142, 37); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(83, 23); + this.button1.TabIndex = 5; + this.button1.Text = "Refresh status"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // trayIcon + // + this.trayIcon.ContextMenuStrip = this.trayContextMenu; + this.trayIcon.Icon = ((System.Drawing.Icon)(resources.GetObject("trayIcon.Icon"))); + this.trayIcon.Text = "MPW"; + this.trayIcon.Visible = true; + this.trayIcon.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.trayIcon_MouseDoubleClick); + // + // trayContextMenu + // + this.trayContextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.trayStart, + this.stopToolStripMenuItem, + this.exitToolStripMenuItem}); + this.trayContextMenu.Name = "trayContextMenu"; + this.trayContextMenu.Size = new System.Drawing.Size(110, 70); + this.trayContextMenu.Text = "MPW"; + // + // trayStart + // + this.trayStart.Name = "trayStart"; + this.trayStart.Size = new System.Drawing.Size(109, 22); + this.trayStart.Text = "Start"; + this.trayStart.Click += new System.EventHandler(this.trayStart_Click); + // + // stopToolStripMenuItem + // + this.stopToolStripMenuItem.Name = "stopToolStripMenuItem"; + this.stopToolStripMenuItem.Size = new System.Drawing.Size(109, 22); + this.stopToolStripMenuItem.Text = "Stop"; + this.stopToolStripMenuItem.Click += new System.EventHandler(this.stopToolStripMenuItem_Click); + // + // exitToolStripMenuItem + // + this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; + this.exitToolStripMenuItem.Size = new System.Drawing.Size(109, 22); + this.exitToolStripMenuItem.Text = "Exit"; + this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); + // + // Control_Center_App + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(632, 307); + this.Controls.Add(this.groupBox3); + this.Controls.Add(this.groupBox2); + this.Controls.Add(this.groupBox1); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.MaximizeBox = false; + this.Name = "Control_Center_App"; + this.Text = "MPW Control Center"; + this.Resize += new System.EventHandler(this.Control_Center_App_Resize); + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Control_Center_App_FormClosing); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + this.groupBox3.ResumeLayout(false); + this.groupBox3.PerformLayout(); + this.trayContextMenu.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.LinkLabel linkLabel1; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.TextBox portBox; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Button startstopButton; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.LinkLabel linkLabel2; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Label statusTVServerConn; + private System.Windows.Forms.Label statusMPWServerConn; + private System.Windows.Forms.Label statusTVService; + private System.Windows.Forms.ComboBox accessModeDropDown; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.TextBox bindIPBox; + private System.Windows.Forms.Button saveButton; + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.NotifyIcon trayIcon; + private System.Windows.Forms.ContextMenuStrip trayContextMenu; + private System.Windows.Forms.ToolStripMenuItem trayStart; + private System.Windows.Forms.ToolStripMenuItem stopToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem; + private System.Windows.Forms.Button button1; + } +} + Added: trunk/Version2/Control Center/Control_Center_App.cs =================================================================== --- trunk/Version2/Control Center/Control_Center_App.cs (rev 0) +++ trunk/Version2/Control Center/Control_Center_App.cs 2007-03-07 21:45:15 UTC (rev 29) @@ -0,0 +1,226 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; +using System.IO; +using System.ServiceProcess; +using System.Xml; + +namespace MPW.Control_Center +{ + public partial class Control_Center_App : Form + { + //Service Controllers + private ServiceController TVServiceController = new ServiceController("TVService"); + private ServiceController MPWServiceController = new ServiceController("MPW"); + + //MPW Webserver settings + private String appPath; + private String port; + private String bindIP; + private int accesMode; + + private String file = System.AppDomain.CurrentDomain.BaseDirectory + "Configuration.xml"; + + public Control_Center_App() + { + InitializeComponent(); + RefreshControllers(); + LoadSettings(); + } + + private void RefreshControllers() + { + //MPW Webserver + MPWServiceController.Refresh(); + try + { + statusMPWServerConn.Text = MPWServiceController.Status.ToString(); + } + catch + { + statusMPWServerConn.Text = "Error: Service not found!"; + startstopButton.Enabled = false; + } + if (statusMPWServerConn.Text == "Running") + { + statusMPWServerConn.ForeColor = Color.Green; + startstopButton.Enabled = true; + } + else + { + statusMPWServerConn.ForeColor = Color.Red; + startstopButton.Enabled = false; + } + + //TV Server + TVServiceController.Refresh(); + try + { + statusTVService.Text = TVServiceController.Status.ToString(); + } + catch + { + statusTVService.Text = "Error: Service not found!"; + } + if (statusTVService.Text == "Running") + statusTVService.ForeColor = Color.Green; + else + statusTVService.ForeColor = Color.Red; + } + + private void startstopButton_Click(object sender, EventArgs e) + { + if (startstopButton.Text == "Start") + Start(); + else + Stop(); + } + + private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + System.Diagnostics.Process.Start(linkLabel1.Text); + } + + private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + System.Diagnostics.Process.Start(linkLabel2.Text); + } + + //Start the server + private void Start() + { + RefreshControllers(); + try + { + MPWServiceController.Start(); + startstopButton.Text = "Stop"; + } + catch + { + statusMPWServerConn.Text = "Error, could not start Service."; + } + RefreshControllers(); + } + + //Stop the server + private void Stop() + { + RefreshControllers(); + if (statusMPWServerConn.Text == "Running") + { + MPWServiceController.Stop(); + startstopButton.Text = "Start"; + } + RefreshControllers(); + } + + //Build a String with the server URL + private String ConstructServerURL() + { + String url = "http://"; + url += bindIP; + url += ":" + port; + url += "/"; + return url; + } + + //Load the configuration + private void LoadSettings() + { + XmlDocument doc = new XmlDocument(); + doc.Load(file); + XmlNode node = doc.DocumentElement.SelectSingleNode("/configuration/bindAddress"); + bindIP = node.InnerText; + node = doc.DocumentElement.SelectSingleNode("/configuration/port"); + port = node.InnerText; + node = doc.DocumentElement.SelectSingleNode("/configuration/allowedAccesMode"); + accesMode = int.Parse(node.InnerText); + + //Set the read values to the various TextBoxes + portBox.Text = port; + bindIPBox.Text = bindIP; + accessModeDropDown.SelectedIndex = accesMode; + linkLabel2.Text = ConstructServerURL(); + } + + //Save the configuration + private void SaveSettings() + { + XmlDocument doc = new XmlDocument(); + doc.Load(file); + + XmlNode node = doc.DocumentElement.SelectSingleNode("/configuration/bindAddress"); + node.InnerText = bindIP; + node = doc.DocumentElement.SelectSingleNode("/configuration/port"); + node.InnerText = port; + node = doc.DocumentElement.SelectSingleNode("/configuration/allowedAccesMode"); + node.InnerText = accesMode.ToString(); + + doc.Save(file); + } + + private void saveButton_Click(object sender, EventArgs e) + { + port = portBox.Text; + bindIP = bindIPBox.Text; + accesMode = accessModeDropDown.SelectedIndex; + SaveSettings(); + if (statusMPWServerConn.Text == "Running") + MPWServiceController.ExecuteCommand(0); //ReloadConfiguration + linkLabel2.Text = ConstructServerURL(); + } + + //Restore by double-clicking the tray icon + private void trayIcon_MouseDoubleClick(object sender, MouseEventArgs e) + { + this.WindowState = System.Windows.Forms.FormWindowState.Normal; + trayIcon.Visible = true; + this.ShowInTaskbar = true; + RefreshControllers(); + } + + //Minimize to tray on closing + private void Control_Center_App_FormClosing(object sender, FormClosingEventArgs e) + { + e.Cancel = true; + this.WindowState = System.Windows.Forms.FormWindowState.Minimized; + this.ShowInTaskbar = false; + } + + //Tray menu action "Exit" + private void exitToolStripMenuItem_Click(object sender, EventArgs e) + { + trayIcon.Dispose(); + this.Dispose(); + } + + //Tray menu action "Stop" + private void stopToolStripMenuItem_Click(object sender, EventArgs e) + { + Start(); + } + + //Tray menu action "Start" + private void trayStart_Click(object sender, EventArgs e) + { + Stop(); + } + + //Status refreh button + private void button1_Click(object sender, EventArgs e) + { + RefreshControllers(); + } + + private void Control_Center_App_Resize(object sender, EventArgs e) + { + if (this.WindowState == FormWindowState.Minimized) + this.ShowInTaskbar = false; + } + + } +} \ No newline at end of file Added: trunk/Version2/Control Center/Control_Center_App.resx =================================================================== --- trunk/Version2/Control Center/Control_Center_App.resx (rev 0) +++ trunk/Version2/Control Center/Control_Center_App.resx 2007-03-07 21:45:15 UTC (rev 29) @@ -0,0 +1,18231 @@ +<?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> + <metadata name="trayIcon.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="trayContextMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>110, 17</value> + </metadata> + <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> + <data name="trayIcon.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAA... [truncated message content] |
From: <mas...@us...> - 2007-03-07 21:36:54
|
Revision: 28 http://svn.sourceforge.net/mp-webinterface/?rev=28&view=rev Author: maschine Date: 2007-03-07 13:36:48 -0800 (Wed, 07 Mar 2007) Log Message: ----------- Cleanup. Removed Paths: ------------- trunk/Version2/WebApplication/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mas...@us...> - 2007-03-07 21:34:34
|
Revision: 27 http://svn.sourceforge.net/mp-webinterface/?rev=27&view=rev Author: maschine Date: 2007-03-07 13:34:30 -0800 (Wed, 07 Mar 2007) Log Message: ----------- Initial commit of the MPW Control Center. Modified Paths: -------------- trunk/Version2/MPW.sln trunk/Version2/Setup/Setup.vdproj Modified: trunk/Version2/MPW.sln =================================================================== --- trunk/Version2/MPW.sln 2007-03-07 21:25:44 UTC (rev 26) +++ trunk/Version2/MPW.sln 2007-03-07 21:34:30 UTC (rev 27) @@ -7,7 +7,7 @@ Release.AspNetCompiler.Debug = "False" EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Monitor", "Monitor\Monitor.csproj", "{8B650819-E843-488A-89CF-E629A389D4DA}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Control Center", "Control Center\Control Center.csproj", "{8B650819-E843-488A-89CF-E629A389D4DA}" ProjectSection(WebsiteProperties) = preProject Debug.AspNetCompiler.Debug = "True" Release.AspNetCompiler.Debug = "False" Modified: trunk/Version2/Setup/Setup.vdproj =================================================================== --- trunk/Version2/Setup/Setup.vdproj 2007-03-07 21:25:44 UTC (rev 26) +++ trunk/Version2/Setup/Setup.vdproj 2007-03-07 21:34:30 UTC (rev 27) @@ -15,62 +15,62 @@ { "Entry" { - "MsmKey" = "8:_05D805932CC71752C28FA767F3678305" - "OwnerKey" = "8:_7CD9E17A5A2443F381DBF7313078D211" + "MsmKey" = "8:_0F712DF68ED348C597086DD86FC56227" + "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_05D805932CC71752C28FA767F3678305" - "OwnerKey" = "8:_EA8F7A80D3473F41C3549F182E1199AB" + "MsmKey" = "8:_3306E9F964F5FB2F9C11CD8F2ADE103C" + "OwnerKey" = "8:_0F712DF68ED348C597086DD86FC56227" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_05D805932CC71752C28FA767F3678305" - "OwnerKey" = "8:_0F712DF68ED348C597086DD86FC56227" + "MsmKey" = "8:_3306E9F964F5FB2F9C11CD8F2ADE103C" + "OwnerKey" = "8:_7CD9E17A5A2443F381DBF7313078D211" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_05D805932CC71752C28FA767F3678305" - "OwnerKey" = "8:_B21808006FD74A33B7D97E8F41C2A72E" + "MsmKey" = "8:_38708A2E22BC4439A7DFB5A5CC780498" + "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_0F712DF68ED348C597086DD86FC56227" - "OwnerKey" = "8:_UNDEFINED" + "MsmKey" = "8:_5AA324D14C7A0BEB13CF3C6839DE8AF7" + "OwnerKey" = "8:_7CD9E17A5A2443F381DBF7313078D211" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_38708A2E22BC4439A7DFB5A5CC780498" - "OwnerKey" = "8:_UNDEFINED" + "MsmKey" = "8:_5AA324D14C7A0BEB13CF3C6839DE8AF7" + "OwnerKey" = "8:_3306E9F964F5FB2F9C11CD8F2ADE103C" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_7CD9E17A5A2443F381DBF7313078D211" - "OwnerKey" = "8:_UNDEFINED" + "MsmKey" = "8:_5AA324D14C7A0BEB13CF3C6839DE8AF7" + "OwnerKey" = "8:_0F712DF68ED348C597086DD86FC56227" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_B21808006FD74A33B7D97E8F41C2A72E" - "OwnerKey" = "8:_UNDEFINED" + "MsmKey" = "8:_5AA324D14C7A0BEB13CF3C6839DE8AF7" + "OwnerKey" = "8:_B21808006FD74A33B7D97E8F41C2A72E" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_EA8F7A80D3473F41C3549F182E1199AB" - "OwnerKey" = "8:_0F712DF68ED348C597086DD86FC56227" + "MsmKey" = "8:_7CD9E17A5A2443F381DBF7313078D211" + "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_EA8F7A80D3473F41C3549F182E1199AB" - "OwnerKey" = "8:_7CD9E17A5A2443F381DBF7313078D211" + "MsmKey" = "8:_B21808006FD74A33B7D97E8F41C2A72E" + "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -82,19 +82,19 @@ "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_EA8F7A80D3473F41C3549F182E1199AB" + "OwnerKey" = "8:_3306E9F964F5FB2F9C11CD8F2ADE103C" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_05D805932CC71752C28FA767F3678305" + "OwnerKey" = "8:_7CD9E17A5A2443F381DBF7313078D211" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_7CD9E17A5A2443F381DBF7313078D211" + "OwnerKey" = "8:_5AA324D14C7A0BEB13CF3C6839DE8AF7" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -249,23 +249,23 @@ } "File" { - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_05D805932CC71752C28FA767F3678305" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_3306E9F964F5FB2F9C11CD8F2ADE103C" { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL" + "AssemblyAsmDisplayName" = "8:WebServer, Version=1.2.0.0, Culture=neutral, PublicKeyToken=6a8f2e8c25e1b4e0, processorArchitecture=MSIL" "ScatterAssemblies" { - "_05D805932CC71752C28FA767F3678305" + "_3306E9F964F5FB2F9C11CD8F2ADE103C" { - "Name" = "8:log4net.dll" + "Name" = "8:WebServer.dll" "Attributes" = "3:512" } } - "SourcePath" = "8:log4net.dll" + "SourcePath" = "8:WebServer.dll" "TargetName" = "8:" "Tag" = "8:" - "Folder" = "8:_3AAF0448C26C4EFC8D390F14EF2EACFB" + "Folder" = "8:_4AF64E14F05F48C6B6561E3A84C622CC" "Condition" = "8:" "Transitive" = "11:FALSE" "Vital" = "11:TRUE" @@ -300,23 +300,23 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_EA8F7A80D3473F41C3549F182E1199AB" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_5AA324D14C7A0BEB13CF3C6839DE8AF7" { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:WebServer, Version=1.2.0.0, Culture=neutral, PublicKeyToken=6a8f2e8c25e1b4e0, processorArchitecture=MSIL" + "AssemblyAsmDisplayName" = "8:log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL" "ScatterAssemblies" { - "_EA8F7A80D3473F41C3549F182E1199AB" + "_5AA324D14C7A0BEB13CF3C6839DE8AF7" { - "Name" = "8:WebServer.dll" + "Name" = "8:log4net.dll" "Attributes" = "3:512" } } - "SourcePath" = "8:WebServer.dll" + "SourcePath" = "8:log4net.dll" "TargetName" = "8:" "Tag" = "8:" - "Folder" = "8:_4AF64E14F05F48C6B6561E3A84C622CC" + "Folder" = "8:_3AAF0448C26C4EFC8D390F14EF2EACFB" "Condition" = "8:" "Transitive" = "11:FALSE" "Vital" = "11:TRUE" @@ -541,7 +541,7 @@ { "{970C0BB2-C7D0-45D7-ABFA-7EC378858BC0}:_13A365B1690A409EB9E87ABAF5DDA181" { - "Name" = "8:MPW Monitor" + "Name" = "8:MPW Control Center" "Arguments" = "8:" "Description" = "8:" "ShowCmd" = "3:1" @@ -580,7 +580,7 @@ "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_B1584998A09F427082BCF46718C0C570" { "Sequence" = "3:100" - "DisplayName" = "8:Fertig" + "DisplayName" = "8:Finished" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:<VsdDialogDir>\\VsdAdminFinishedDlg.wid" @@ -611,7 +611,7 @@ "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_94D03F977132429FBBD6418777261174" { "Sequence" = "3:300" - "DisplayName" = "8:Installation bestätigen" + "DisplayName" = "8:Confirm Installation" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:<VsdDialogDir>\\VsdAdminConfirmDlg.wid" @@ -633,7 +633,7 @@ "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_E05C4005485D47439C17C7AC1A1EAC65" { "Sequence" = "3:200" - "DisplayName" = "8:Installationsordner" + "DisplayName" = "8:Installation Folder" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:<VsdDialogDir>\\VsdAdminFolderDlg.wid" @@ -655,7 +655,7 @@ "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_EBE473BDD5F8412DBB37D16CCA223DFF" { "Sequence" = "3:100" - "DisplayName" = "8:Willkommen" + "DisplayName" = "8:Welcome" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:<VsdDialogDir>\\VsdAdminWelcomeDlg.wid" @@ -712,7 +712,7 @@ "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_BED07783EE9947B297A58A9FAEEF6827" { "Sequence" = "3:100" - "DisplayName" = "8:Status" + "DisplayName" = "8:Progress" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:<VsdDialogDir>\\VsdAdminProgressDlg.wid" @@ -762,7 +762,7 @@ "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_BEB2FE317C50407D87F081FB69A4FD9E" { "Sequence" = "3:100" - "DisplayName" = "8:Status" + "DisplayName" = "8:Progress" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:<VsdDialogDir>\\VsdProgressDlg.wid" @@ -806,7 +806,7 @@ "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_D99336E17C9749B0944FC73E4CFE2CDD" { "Sequence" = "3:100" - "DisplayName" = "8:Fertig" + "DisplayName" = "8:Finished" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:<VsdDialogDir>\\VsdFinishedDlg.wid" @@ -856,7 +856,7 @@ "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_2503CF60970443588CDBC79F581A5BD4" { "Sequence" = "3:100" - "DisplayName" = "8:Willkommen" + "DisplayName" = "8:Welcome" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:<VsdDialogDir>\\VsdWelcomeDlg.wid" @@ -904,7 +904,7 @@ "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_A16E4C3A15EF4A8990691556F34BE558" { "Sequence" = "3:400" - "DisplayName" = "8:Installation bestätigen" + "DisplayName" = "8:Confirm Installation" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:<VsdDialogDir>\\VsdConfirmDlg.wid" @@ -926,7 +926,7 @@ "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_A58153D0871E4939901D4247BA51B655" { "Sequence" = "3:300" - "DisplayName" = "8:Installationsordner" + "DisplayName" = "8:Installation Folder" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:<VsdDialogDir>\\VsdFolderDlg.wid" @@ -961,7 +961,7 @@ "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_E643D62580F74973B53C88C67DCF9D77" { "Sequence" = "3:200" - "DisplayName" = "8:Lizenzvertrag" + "DisplayName" = "8:License Agreement" "UseDynamicProperties" = "11:TRUE" "IsDependency" = "11:FALSE" "SourcePath" = "8:<VsdDialogDir>\\VsdLicenseDlg.wid" @@ -1043,7 +1043,7 @@ } "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_0F712DF68ED348C597086DD86FC56227" { - "SourcePath" = "8:..\\Monitor\\obj\\Release\\MPW Monitor.exe" + "SourcePath" = "8:..\\Control Center\\obj\\Release\\MPW Monitor.exe" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_3AAF0448C26C4EFC8D390F14EF2EACFB" @@ -1126,8 +1126,5 @@ } } } - "VJSharpPlugin" - { - } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mas...@us...> - 2007-03-07 21:25:48
|
Revision: 26 http://svn.sourceforge.net/mp-webinterface/?rev=26&view=rev Author: maschine Date: 2007-03-07 13:25:44 -0800 (Wed, 07 Mar 2007) Log Message: ----------- Initial commit of the MPW Control Center. Removed Paths: ------------- trunk/Version2/Monitor/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mas...@us...> - 2007-03-07 21:23:56
|
Revision: 25 http://svn.sourceforge.net/mp-webinterface/?rev=25&view=rev Author: maschine Date: 2007-03-07 13:23:51 -0800 (Wed, 07 Mar 2007) Log Message: ----------- Initial commit of the MPW Control Center. Modified Paths: -------------- trunk/Version2/Monitor/Properties/AssemblyInfo.cs Added Paths: ----------- trunk/Version2/Monitor/Control Center.cs trunk/Version2/Monitor/Control Center.csproj trunk/Version2/Monitor/Control_Center_App.Designer.cs trunk/Version2/Monitor/Control_Center_App.cs trunk/Version2/Monitor/Control_Center_App.resx Removed Paths: ------------- trunk/Version2/Monitor/Monitor.csproj trunk/Version2/Monitor/Program.cs trunk/Version2/Monitor/ServiceControl.Designer.cs trunk/Version2/Monitor/ServiceControl.cs trunk/Version2/Monitor/ServiceControl.resx Added: trunk/Version2/Monitor/Control Center.cs =================================================================== --- trunk/Version2/Monitor/Control Center.cs (rev 0) +++ trunk/Version2/Monitor/Control Center.cs 2007-03-07 21:23:51 UTC (rev 25) @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Windows.Forms; + +namespace MPW.Control_Center +{ + static class Control_Center + { + /// <summary> + /// The main entry point for the MPW Control Center. + /// </summary> + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Control_Center_App()); + } + } +} \ No newline at end of file Added: trunk/Version2/Monitor/Control Center.csproj =================================================================== --- trunk/Version2/Monitor/Control Center.csproj (rev 0) +++ trunk/Version2/Monitor/Control Center.csproj 2007-03-07 21:23:51 UTC (rev 25) @@ -0,0 +1,81 @@ +<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>{8B650819-E843-488A-89CF-E629A389D4DA}</ProjectGuid> + <OutputType>WinExe</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>MPW.Control_Center</RootNamespace> + <AssemblyName>MPW Control Center</AssemblyName> + <ApplicationIcon>mp.ico</ApplicationIcon> + </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="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.ServiceProcess" /> + <Reference Include="System.Web" /> + <Reference Include="System.Web.Mobile" /> + <Reference Include="System.Web.RegularExpressions" /> + <Reference Include="System.Web.Services" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Control Center.cs" /> + <Compile Include="Control_Center_App.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="Control_Center_App.Designer.cs"> + <DependentUpon>Control_Center_App.cs</DependentUpon> + </Compile> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\WebServer\WebServer.csproj"> + <Project>{4CEEFA1E-7F95-43DF-A78C-9FE86082FDC3}</Project> + <Name>WebServer</Name> + <Private>True</Private> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="Control_Center_App.resx"> + <DependentUpon>Control_Center_App.cs</DependentUpon> + <SubType>Designer</SubType> + </EmbeddedResource> + </ItemGroup> + <ItemGroup> + <Content Include="mp.ico" /> + </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> + --> + <PropertyGroup> + <PostBuildEvent> + </PostBuildEvent> + </PropertyGroup> +</Project> \ No newline at end of file Added: trunk/Version2/Monitor/Control_Center_App.Designer.cs =================================================================== --- trunk/Version2/Monitor/Control_Center_App.Designer.cs (rev 0) +++ trunk/Version2/Monitor/Control_Center_App.Designer.cs 2007-03-07 21:23:51 UTC (rev 25) @@ -0,0 +1,382 @@ +namespace MPW.Control_Center +{ + partial class Control_Center_App + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Control_Center_App)); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.statusMPWServerConn = new System.Windows.Forms.Label(); + this.statusTVService = new System.Windows.Forms.Label(); + this.statusTVServerConn = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.linkLabel1 = new System.Windows.Forms.LinkLabel(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.saveButton = new System.Windows.Forms.Button(); + this.bindIPBox = new System.Windows.Forms.TextBox(); + this.accessModeDropDown = new System.Windows.Forms.ComboBox(); + this.label9 = new System.Windows.Forms.Label(); + this.label8 = new System.Windows.Forms.Label(); + this.linkLabel2 = new System.Windows.Forms.LinkLabel(); + this.label7 = new System.Windows.Forms.Label(); + this.portBox = new System.Windows.Forms.TextBox(); + this.label4 = new System.Windows.Forms.Label(); + this.startstopButton = new System.Windows.Forms.Button(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.button1 = new System.Windows.Forms.Button(); + this.trayIcon = new System.Windows.Forms.NotifyIcon(this.components); + this.trayContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components); + this.trayStart = new System.Windows.Forms.ToolStripMenuItem(); + this.stopToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.groupBox1.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.groupBox3.SuspendLayout(); + this.trayContextMenu.SuspendLayout(); + this.SuspendLayout(); + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.statusMPWServerConn); + this.groupBox1.Controls.Add(this.statusTVService); + this.groupBox1.Controls.Add(this.statusTVServerConn); + this.groupBox1.Controls.Add(this.label3); + this.groupBox1.Controls.Add(this.label2); + this.groupBox1.Controls.Add(this.label1); + this.groupBox1.Location = new System.Drawing.Point(12, 12); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(300, 139); + this.groupBox1.TabIndex = 0; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Status information"; + // + // statusMPWServerConn + // + this.statusMPWServerConn.AutoSize = true; + this.statusMPWServerConn.Location = new System.Drawing.Point(139, 102); + this.statusMPWServerConn.Name = "statusMPWServerConn"; + this.statusMPWServerConn.Size = new System.Drawing.Size(86, 13); + this.statusMPWServerConn.TabIndex = 7; + this.statusMPWServerConn.Text = "Not checked yet"; + // + // statusTVService + // + this.statusTVService.AutoSize = true; + this.statusTVService.Location = new System.Drawing.Point(139, 35); + this.statusTVService.Name = "statusTVService"; + this.statusTVService.Size = new System.Drawing.Size(86, 13); + this.statusTVService.TabIndex = 6; + this.statusTVService.Text = "Not checked yet"; + // + // statusTVServerConn + // + this.statusTVServerConn.AutoSize = true; + this.statusTVServerConn.Location = new System.Drawing.Point(139, 67); + this.statusTVServerConn.Name = "statusTVServerConn"; + this.statusTVServerConn.Size = new System.Drawing.Size(86, 13); + this.statusTVServerConn.TabIndex = 5; + this.statusTVServerConn.Text = "Not checked yet"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(6, 102); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(92, 13); + this.label3.TabIndex = 2; + this.label3.Text = "MPW Webserver:"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(6, 67); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(127, 13); + this.label2.TabIndex = 1; + this.label2.Text = "Connection to TV Server:"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(6, 35); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(63, 13); + this.label1.TabIndex = 0; + this.label1.Text = "TV Service:"; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(6, 118); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(92, 13); + this.label6.TabIndex = 4; + this.label6.Text = "MPW Homepage:"; + // + // linkLabel1 + // + this.linkLabel1.AutoSize = true; + this.linkLabel1.Location = new System.Drawing.Point(104, 118); + this.linkLabel1.Name = "linkLabel1"; + this.linkLabel1.Size = new System.Drawing.Size(166, 13); + this.linkLabel1.TabIndex = 3; + this.linkLabel1.TabStop = true; + this.linkLabel1.Text = "http://www.mp-webinterface.com"; + this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.saveButton); + this.groupBox2.Controls.Add(this.bindIPBox); + this.groupBox2.Controls.Add(this.accessModeDropDown); + this.groupBox2.Controls.Add(this.label9); + this.groupBox2.Controls.Add(this.label8); + this.groupBox2.Controls.Add(this.linkLabel2); + this.groupBox2.Controls.Add(this.label7); + this.groupBox2.Controls.Add(this.portBox); + this.groupBox2.Controls.Add(this.label4); + this.groupBox2.Location = new System.Drawing.Point(318, 12); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(300, 283); + this.groupBox2.TabIndex = 1; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "MPW Webserver setup"; + // + // saveButton + // + this.saveButton.Location = new System.Drawing.Point(126, 132); + this.saveButton.Name = "saveButton"; + this.saveButton.Size = new System.Drawing.Size(115, 23); + this.saveButton.TabIndex = 10; + this.saveButton.Text = "Save Configuration"; + this.saveButton.UseVisualStyleBackColor = true; + this.saveButton.Click += new System.EventHandler(this.saveButton_Click); + // + // bindIPBox + // + this.bindIPBox.Location = new System.Drawing.Point(126, 59); + this.bindIPBox.Name = "bindIPBox"; + this.bindIPBox.Size = new System.Drawing.Size(115, 20); + this.bindIPBox.TabIndex = 9; + // + // accessModeDropDown + // + this.accessModeDropDown.FormattingEnabled = true; + this.accessModeDropDown.Items.AddRange(new object[] { + "Local", + "Global", + "Restricted"}); + this.accessModeDropDown.Location = new System.Drawing.Point(126, 94); + this.accessModeDropDown.Name = "accessModeDropDown"; + this.accessModeDropDown.Size = new System.Drawing.Size(115, 21); + this.accessModeDropDown.TabIndex = 8; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(6, 102); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(74, 13); + this.label9.TabIndex = 7; + this.label9.Text = "Access mode:"; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(6, 67); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(81, 13); + this.label8.TabIndex = 6; + this.label8.Text = "Bind to local IP:"; + // + // linkLabel2 + // + this.linkLabel2.AutoSize = true; + this.linkLabel2.Location = new System.Drawing.Point(82, 262); + this.linkLabel2.Name = "linkLabel2"; + this.linkLabel2.Size = new System.Drawing.Size(0, 13); + this.linkLabel2.TabIndex = 5; + this.linkLabel2.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel2_LinkClicked); + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(9, 263); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(66, 13); + this.label7.TabIndex = 4; + this.label7.Text = "Server URL:"; + // + // portBox + // + this.portBox.Location = new System.Drawing.Point(126, 32); + this.portBox.Name = "portBox"; + this.portBox.Size = new System.Drawing.Size(115, 20); + this.portBox.TabIndex = 1; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(6, 35); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(114, 13); + this.label4.TabIndex = 0; + this.label4.Text = "MPW Webserver Port:"; + // + // startstopButton + // + this.startstopButton.Location = new System.Drawing.Point(9, 37); + this.startstopButton.Name = "startstopButton"; + this.startstopButton.Size = new System.Drawing.Size(100, 23); + this.startstopButton.TabIndex = 3; + this.startstopButton.Text = "Start"; + this.startstopButton.UseVisualStyleBackColor = true; + this.startstopButton.Click += new System.EventHandler(this.startstopButton_Click); + // + // groupBox3 + // + this.groupBox3.Controls.Add(this.button1); + this.groupBox3.Controls.Add(this.label6); + this.groupBox3.Controls.Add(this.linkLabel1); + this.groupBox3.Controls.Add(this.startstopButton); + this.groupBox3.Location = new System.Drawing.Point(12, 157); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(300, 138); + this.groupBox3.TabIndex = 2; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "MPW Webserver Control"; + // + // button1 + // + this.button1.Location = new System.Drawing.Point(142, 37); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(83, 23); + this.button1.TabIndex = 5; + this.button1.Text = "Refresh status"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // trayIcon + // + this.trayIcon.ContextMenuStrip = this.trayContextMenu; + this.trayIcon.Icon = ((System.Drawing.Icon)(resources.GetObject("trayIcon.Icon"))); + this.trayIcon.Text = "MPW"; + this.trayIcon.Visible = true; + this.trayIcon.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.trayIcon_MouseDoubleClick); + // + // trayContextMenu + // + this.trayContextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.trayStart, + this.stopToolStripMenuItem, + this.exitToolStripMenuItem}); + this.trayContextMenu.Name = "trayContextMenu"; + this.trayContextMenu.Size = new System.Drawing.Size(110, 70); + this.trayContextMenu.Text = "MPW"; + // + // trayStart + // + this.trayStart.Name = "trayStart"; + this.trayStart.Size = new System.Drawing.Size(109, 22); + this.trayStart.Text = "Start"; + this.trayStart.Click += new System.EventHandler(this.trayStart_Click); + // + // stopToolStripMenuItem + // + this.stopToolStripMenuItem.Name = "stopToolStripMenuItem"; + this.stopToolStripMenuItem.Size = new System.Drawing.Size(109, 22); + this.stopToolStripMenuItem.Text = "Stop"; + this.stopToolStripMenuItem.Click += new System.EventHandler(this.stopToolStripMenuItem_Click); + // + // exitToolStripMenuItem + // + this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; + this.exitToolStripMenuItem.Size = new System.Drawing.Size(109, 22); + this.exitToolStripMenuItem.Text = "Exit"; + this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); + // + // Control_Center_App + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(632, 307); + this.Controls.Add(this.groupBox3); + this.Controls.Add(this.groupBox2); + this.Controls.Add(this.groupBox1); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.MaximizeBox = false; + this.Name = "Control_Center_App"; + this.Text = "MPW Control Center"; + this.Resize += new System.EventHandler(this.Control_Center_App_Resize); + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Control_Center_App_FormClosing); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + this.groupBox3.ResumeLayout(false); + this.groupBox3.PerformLayout(); + this.trayContextMenu.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.LinkLabel linkLabel1; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.TextBox portBox; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Button startstopButton; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.LinkLabel linkLabel2; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Label statusTVServerConn; + private System.Windows.Forms.Label statusMPWServerConn; + private System.Windows.Forms.Label statusTVService; + private System.Windows.Forms.ComboBox accessModeDropDown; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.TextBox bindIPBox; + private System.Windows.Forms.Button saveButton; + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.NotifyIcon trayIcon; + private System.Windows.Forms.ContextMenuStrip trayContextMenu; + private System.Windows.Forms.ToolStripMenuItem trayStart; + private System.Windows.Forms.ToolStripMenuItem stopToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem; + private System.Windows.Forms.Button button1; + } +} + Added: trunk/Version2/Monitor/Control_Center_App.cs =================================================================== --- trunk/Version2/Monitor/Control_Center_App.cs (rev 0) +++ trunk/Version2/Monitor/Control_Center_App.cs 2007-03-07 21:23:51 UTC (rev 25) @@ -0,0 +1,226 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; +using System.IO; +using System.ServiceProcess; +using System.Xml; + +namespace MPW.Control_Center +{ + public partial class Control_Center_App : Form + { + //Service Controllers + private ServiceController TVServiceController = new ServiceController("TVService"); + private ServiceController MPWServiceController = new ServiceController("MPW"); + + //MPW Webserver settings + private String appPath; + private String port; + private String bindIP; + private int accesMode; + + private String file = System.AppDomain.CurrentDomain.BaseDirectory + "Configuration.xml"; + + public Control_Center_App() + { + InitializeComponent(); + RefreshControllers(); + LoadSettings(); + } + + private void RefreshControllers() + { + //MPW Webserver + MPWServiceController.Refresh(); + try + { + statusMPWServerConn.Text = MPWServiceController.Status.ToString(); + } + catch + { + statusMPWServerConn.Text = "Error: Service not found!"; + startstopButton.Enabled = false; + } + if (statusMPWServerConn.Text == "Running") + { + statusMPWServerConn.ForeColor = Color.Green; + startstopButton.Enabled = true; + } + else + { + statusMPWServerConn.ForeColor = Color.Red; + startstopButton.Enabled = false; + } + + //TV Server + TVServiceController.Refresh(); + try + { + statusTVService.Text = TVServiceController.Status.ToString(); + } + catch + { + statusTVService.Text = "Error: Service not found!"; + } + if (statusTVService.Text == "Running") + statusTVService.ForeColor = Color.Green; + else + statusTVService.ForeColor = Color.Red; + } + + private void startstopButton_Click(object sender, EventArgs e) + { + if (startstopButton.Text == "Start") + Start(); + else + Stop(); + } + + private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + System.Diagnostics.Process.Start(linkLabel1.Text); + } + + private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + System.Diagnostics.Process.Start(linkLabel2.Text); + } + + //Start the server + private void Start() + { + RefreshControllers(); + try + { + MPWServiceController.Start(); + startstopButton.Text = "Stop"; + } + catch + { + statusMPWServerConn.Text = "Error, could not start Service."; + } + RefreshControllers(); + } + + //Stop the server + private void Stop() + { + RefreshControllers(); + if (statusMPWServerConn.Text == "Running") + { + MPWServiceController.Stop(); + startstopButton.Text = "Start"; + } + RefreshControllers(); + } + + //Build a String with the server URL + private String ConstructServerURL() + { + String url = "http://"; + url += bindIP; + url += ":" + port; + url += "/"; + return url; + } + + //Load the configuration + private void LoadSettings() + { + XmlDocument doc = new XmlDocument(); + doc.Load(file); + XmlNode node = doc.DocumentElement.SelectSingleNode("/configuration/bindAddress"); + bindIP = node.InnerText; + node = doc.DocumentElement.SelectSingleNode("/configuration/port"); + port = node.InnerText; + node = doc.DocumentElement.SelectSingleNode("/configuration/allowedAccesMode"); + accesMode = int.Parse(node.InnerText); + + //Set the read values to the various TextBoxes + portBox.Text = port; + bindIPBox.Text = bindIP; + accessModeDropDown.SelectedIndex = accesMode; + linkLabel2.Text = ConstructServerURL(); + } + + //Save the configuration + private void SaveSettings() + { + XmlDocument doc = new XmlDocument(); + doc.Load(file); + + XmlNode node = doc.DocumentElement.SelectSingleNode("/configuration/bindAddress"); + node.InnerText = bindIP; + node = doc.DocumentElement.SelectSingleNode("/configuration/port"); + node.InnerText = port; + node = doc.DocumentElement.SelectSingleNode("/configuration/allowedAccesMode"); + node.InnerText = accesMode.ToString(); + + doc.Save(file); + } + + private void saveButton_Click(object sender, EventArgs e) + { + port = portBox.Text; + bindIP = bindIPBox.Text; + accesMode = accessModeDropDown.SelectedIndex; + SaveSettings(); + if (statusMPWServerConn.Text == "Running") + MPWServiceController.ExecuteCommand(0); //ReloadConfiguration + linkLabel2.Text = ConstructServerURL(); + } + + //Restore by double-clicking the tray icon + private void trayIcon_MouseDoubleClick(object sender, MouseEventArgs e) + { + this.WindowState = System.Windows.Forms.FormWindowState.Normal; + trayIcon.Visible = true; + this.ShowInTaskbar = true; + RefreshControllers(); + } + + //Minimize to tray on closing + private void Control_Center_App_FormClosing(object sender, FormClosingEventArgs e) + { + e.Cancel = true; + this.WindowState = System.Windows.Forms.FormWindowState.Minimized; + this.ShowInTaskbar = false; + } + + //Tray menu action "Exit" + private void exitToolStripMenuItem_Click(object sender, EventArgs e) + { + trayIcon.Dispose(); + this.Dispose(); + } + + //Tray menu action "Stop" + private void stopToolStripMenuItem_Click(object sender, EventArgs e) + { + Start(); + } + + //Tray menu action "Start" + private void trayStart_Click(object sender, EventArgs e) + { + Stop(); + } + + //Status refreh button + private void button1_Click(object sender, EventArgs e) + { + RefreshControllers(); + } + + private void Control_Center_App_Resize(object sender, EventArgs e) + { + if (this.WindowState == FormWindowState.Minimized) + this.ShowInTaskbar = false; + } + + } +} \ No newline at end of file Added: trunk/Version2/Monitor/Control_Center_App.resx =================================================================== --- trunk/Version2/Monitor/Control_Center_App.resx (rev 0) +++ trunk/Version2/Monitor/Control_Center_App.resx 2007-03-07 21:23:51 UTC (rev 25) @@ -0,0 +1,18231 @@ +<?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> + <metadata name="trayIcon.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="trayContextMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>110, 17</value> + </metadata> + <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> + <data name="trayIcon.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAABAA8AAAAAAAEACAAoJAEA9gAAADAwAAABAAgAqA4AAB4lAQAgIAAAAQAIAKgIAADGMwEAGBgAAAEA + CADIBgAAbjwBABAQAAABAAgAaAUAADZDAQAAAAAAAQAgACggBACeSAEAgIAAAAEAIAAoCAEAxmgFAGBg + AAABACAAqJQAAO5wBgBQUAAAAQAg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AAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAA... [truncated message content] |
From: <mis...@us...> - 2007-03-05 22:26:10
|
Revision: 24 http://svn.sourceforge.net/mp-webinterface/?rev=24&view=rev Author: misterd_sf Date: 2007-03-05 14:26:02 -0800 (Mon, 05 Mar 2007) Log Message: ----------- Initial version of web server, windows service and monitor for version 2 of MPW Added Paths: ----------- trunk/Version2/MPW.sln trunk/Version2/Monitor/ trunk/Version2/Monitor/Monitor.csproj trunk/Version2/Monitor/Program.cs trunk/Version2/Monitor/Properties/ trunk/Version2/Monitor/Properties/AssemblyInfo.cs trunk/Version2/Monitor/ServiceControl.Designer.cs trunk/Version2/Monitor/ServiceControl.cs trunk/Version2/Monitor/ServiceControl.resx trunk/Version2/Monitor/mp.ico trunk/Version2/Setup/ trunk/Version2/Setup/LICENSE.rtf trunk/Version2/Setup/Setup.vdproj trunk/Version2/WebServer/AssemblyInfo.cs trunk/Version2/WebServer/ByteParser.cs trunk/Version2/WebServer/ByteString.cs trunk/Version2/WebServer/Connection.cs trunk/Version2/WebServer/Host.cs trunk/Version2/WebServer/Messages.cs trunk/Version2/WebServer/Properties/ trunk/Version2/WebServer/Properties/AssemblyInfo.cs trunk/Version2/WebServer/RemoteServer.snk trunk/Version2/WebServer/Request.cs trunk/Version2/WebServer/Server.cs trunk/Version2/WebServer/ServerConfiguration.cs trunk/Version2/WebServer/WebServer.csproj trunk/Version2/WindowsService/ trunk/Version2/WindowsService/Configuration.xml trunk/Version2/WindowsService/DebugServiceControlForm.Designer.cs trunk/Version2/WindowsService/DebugServiceControlForm.cs trunk/Version2/WindowsService/DebugServiceControlForm.resx trunk/Version2/WindowsService/LoggingConfiguration.xml trunk/Version2/WindowsService/Program.cs trunk/Version2/WindowsService/ProjectInstaller.Designer.cs trunk/Version2/WindowsService/ProjectInstaller.cs trunk/Version2/WindowsService/ProjectInstaller.resx trunk/Version2/WindowsService/Properties/ trunk/Version2/WindowsService/Properties/AssemblyInfo.cs trunk/Version2/WindowsService/Properties/Resources.Designer.cs trunk/Version2/WindowsService/Properties/Resources.resx trunk/Version2/WindowsService/Resources/ trunk/Version2/WindowsService/Resources/Error.bmp trunk/Version2/WindowsService/Resources/Message.bmp trunk/Version2/WindowsService/Resources/NotFound.bmp trunk/Version2/WindowsService/Resources/Warning.bmp trunk/Version2/WindowsService/Service.Designer.cs trunk/Version2/WindowsService/Service.cs trunk/Version2/WindowsService/Service.resx trunk/Version2/WindowsService/WindowsService.csproj trunk/Version2/WindowsService/app.config trunk/Version2/WindowsService/mp.ico trunk/Version2/lib/ trunk/Version2/lib/log4net.dll Added: trunk/Version2/MPW.sln =================================================================== --- trunk/Version2/MPW.sln (rev 0) +++ trunk/Version2/MPW.sln 2007-03-05 22:26:02 UTC (rev 24) @@ -0,0 +1,78 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebServer", "WebServer\WebServer.csproj", "{4CEEFA1E-7F95-43DF-A78C-9FE86082FDC3}" + ProjectSection(WebsiteProperties) = preProject + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.Debug = "False" + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Monitor", "Monitor\Monitor.csproj", "{8B650819-E843-488A-89CF-E629A389D4DA}" + ProjectSection(WebsiteProperties) = preProject + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.Debug = "False" + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WindowsService", "WindowsService\WindowsService.csproj", "{23FDEE0E-6842-4E8D-B0E0-616F6A3D681F}" + ProjectSection(WebsiteProperties) = preProject + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.Debug = "False" + EndProjectSection +EndProject +Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "Setup", "Setup\Setup.vdproj", "{8258A5A9-36D2-4917-90CC-D5A83C429F37}" + ProjectSection(WebsiteProperties) = preProject + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.Debug = "False" + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|.NET = Debug|.NET + Debug|Any CPU = Debug|Any CPU + Debug|Mixed Platforms = Debug|Mixed Platforms + Release|.NET = Release|.NET + Release|Any CPU = Release|Any CPU + Release|Mixed Platforms = Release|Mixed Platforms + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4CEEFA1E-7F95-43DF-A78C-9FE86082FDC3}.Debug|.NET.ActiveCfg = Debug|Any CPU + {4CEEFA1E-7F95-43DF-A78C-9FE86082FDC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4CEEFA1E-7F95-43DF-A78C-9FE86082FDC3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4CEEFA1E-7F95-43DF-A78C-9FE86082FDC3}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {4CEEFA1E-7F95-43DF-A78C-9FE86082FDC3}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {4CEEFA1E-7F95-43DF-A78C-9FE86082FDC3}.Release|.NET.ActiveCfg = Release|Any CPU + {4CEEFA1E-7F95-43DF-A78C-9FE86082FDC3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4CEEFA1E-7F95-43DF-A78C-9FE86082FDC3}.Release|Any CPU.Build.0 = Release|Any CPU + {4CEEFA1E-7F95-43DF-A78C-9FE86082FDC3}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {4CEEFA1E-7F95-43DF-A78C-9FE86082FDC3}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {8B650819-E843-488A-89CF-E629A389D4DA}.Debug|.NET.ActiveCfg = Debug|Any CPU + {8B650819-E843-488A-89CF-E629A389D4DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8B650819-E843-488A-89CF-E629A389D4DA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8B650819-E843-488A-89CF-E629A389D4DA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {8B650819-E843-488A-89CF-E629A389D4DA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {8B650819-E843-488A-89CF-E629A389D4DA}.Release|.NET.ActiveCfg = Release|Any CPU + {8B650819-E843-488A-89CF-E629A389D4DA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8B650819-E843-488A-89CF-E629A389D4DA}.Release|Any CPU.Build.0 = Release|Any CPU + {8B650819-E843-488A-89CF-E629A389D4DA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {8B650819-E843-488A-89CF-E629A389D4DA}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {23FDEE0E-6842-4E8D-B0E0-616F6A3D681F}.Debug|.NET.ActiveCfg = Debug|Any CPU + {23FDEE0E-6842-4E8D-B0E0-616F6A3D681F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {23FDEE0E-6842-4E8D-B0E0-616F6A3D681F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {23FDEE0E-6842-4E8D-B0E0-616F6A3D681F}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {23FDEE0E-6842-4E8D-B0E0-616F6A3D681F}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {23FDEE0E-6842-4E8D-B0E0-616F6A3D681F}.Release|.NET.ActiveCfg = Release|Any CPU + {23FDEE0E-6842-4E8D-B0E0-616F6A3D681F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {23FDEE0E-6842-4E8D-B0E0-616F6A3D681F}.Release|Any CPU.Build.0 = Release|Any CPU + {23FDEE0E-6842-4E8D-B0E0-616F6A3D681F}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {23FDEE0E-6842-4E8D-B0E0-616F6A3D681F}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {8258A5A9-36D2-4917-90CC-D5A83C429F37}.Debug|.NET.ActiveCfg = Debug + {8258A5A9-36D2-4917-90CC-D5A83C429F37}.Debug|Any CPU.ActiveCfg = Debug + {8258A5A9-36D2-4917-90CC-D5A83C429F37}.Debug|Mixed Platforms.ActiveCfg = Debug + {8258A5A9-36D2-4917-90CC-D5A83C429F37}.Release|.NET.ActiveCfg = Release + {8258A5A9-36D2-4917-90CC-D5A83C429F37}.Release|Any CPU.ActiveCfg = Release + {8258A5A9-36D2-4917-90CC-D5A83C429F37}.Release|Mixed Platforms.ActiveCfg = Release + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal Added: trunk/Version2/Monitor/Monitor.csproj =================================================================== --- trunk/Version2/Monitor/Monitor.csproj (rev 0) +++ trunk/Version2/Monitor/Monitor.csproj 2007-03-05 22:26:02 UTC (rev 24) @@ -0,0 +1,81 @@ +<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>{8B650819-E843-488A-89CF-E629A389D4DA}</ProjectGuid> + <OutputType>WinExe</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>MPW.Monitor</RootNamespace> + <AssemblyName>MPW Monitor</AssemblyName> + <ApplicationIcon>mp.ico</ApplicationIcon> + </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="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.ServiceProcess" /> + <Reference Include="System.Web" /> + <Reference Include="System.Web.Mobile" /> + <Reference Include="System.Web.RegularExpressions" /> + <Reference Include="System.Web.Services" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Program.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="ServiceControl.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="ServiceControl.Designer.cs"> + <DependentUpon>ServiceControl.cs</DependentUpon> + </Compile> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\WebServer\WebServer.csproj"> + <Project>{4CEEFA1E-7F95-43DF-A78C-9FE86082FDC3}</Project> + <Name>WebServer</Name> + <Private>True</Private> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="ServiceControl.resx"> + <SubType>Designer</SubType> + <DependentUpon>ServiceControl.cs</DependentUpon> + </EmbeddedResource> + </ItemGroup> + <ItemGroup> + <Content Include="mp.ico" /> + </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> + --> + <PropertyGroup> + <PostBuildEvent> + </PostBuildEvent> + </PropertyGroup> +</Project> \ No newline at end of file Added: trunk/Version2/Monitor/Program.cs =================================================================== --- trunk/Version2/Monitor/Program.cs (rev 0) +++ trunk/Version2/Monitor/Program.cs 2007-03-05 22:26:02 UTC (rev 24) @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Windows.Forms; + +namespace MPW.Monitor { + static class Program { + /// <summary> + /// Der Haupteinstiegspunkt für die Anwendung. + /// </summary> + [STAThread] + static void Main() { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new ServiceControl()); + } + } +} \ No newline at end of file Added: trunk/Version2/Monitor/Properties/AssemblyInfo.cs =================================================================== --- trunk/Version2/Monitor/Properties/AssemblyInfo.cs (rev 0) +++ trunk/Version2/Monitor/Properties/AssemblyInfo.cs 2007-03-05 22:26:02 UTC (rev 24) @@ -0,0 +1,33 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Allgemeine Informationen über eine Assembly werden über die folgenden +// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, +// die mit einer Assembly verknüpft sind. +[assembly: AssemblyTitle("MPW - Monitor")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("-")] +[assembly: AssemblyProduct("MPW - Monitor")] +[assembly: AssemblyCopyright("Copyright © - 2007")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar +// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von +// COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest. +[assembly: ComVisible(false)] + +// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird +[assembly: Guid("1d6554bd-ef37-4566-bbec-5abd522f2034")] + +// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: +// +// Hauptversion +// Nebenversion +// Buildnummer +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] Added: trunk/Version2/Monitor/ServiceControl.Designer.cs =================================================================== --- trunk/Version2/Monitor/ServiceControl.Designer.cs (rev 0) +++ trunk/Version2/Monitor/ServiceControl.Designer.cs 2007-03-05 22:26:02 UTC (rev 24) @@ -0,0 +1,249 @@ +namespace MPW.Monitor { + partial class ServiceControl { + /// <summary> + /// Erforderliche Designervariable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Verwendete Ressourcen bereinigen. + /// </summary> + /// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param> + protected override void Dispose(bool disposing) { + if (disposing && (components != null)) { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Vom Windows Form-Designer generierter Code + + /// <summary> + /// Erforderliche Methode für die Designerunterstützung. + /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. + /// </summary> + private void InitializeComponent() { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ServiceControl)); + this.start = new System.Windows.Forms.Button(); + this.stop = new System.Windows.Forms.Button(); + this.systray = new System.Windows.Forms.NotifyIcon(this.components); + this.contextMenu = new System.Windows.Forms.ContextMenuStrip(this.components); + this.restoreContext = new System.Windows.Forms.ToolStripMenuItem(); + this.startContext = new System.Windows.Forms.ToolStripMenuItem(); + this.stopContext = new System.Windows.Forms.ToolStripMenuItem(); + this.exitContext = new System.Windows.Forms.ToolStripMenuItem(); + this.exit = new System.Windows.Forms.Button(); + this.serviceStatusLabel = new System.Windows.Forms.Label(); + this.serviceStatus = new System.Windows.Forms.Label(); + this.pause = new System.Windows.Forms.Button(); + this.conitnueButton = new System.Windows.Forms.Button(); + this.customCommandLabel = new System.Windows.Forms.Label(); + this.refreshButton = new System.Windows.Forms.Button(); + this.customCommand = new System.Windows.Forms.ComboBox(); + this.execute = new System.Windows.Forms.Button(); + this.contextMenu.SuspendLayout(); + this.SuspendLayout(); + // + // start + // + this.start.Location = new System.Drawing.Point(11, 42); + this.start.Name = "start"; + this.start.Size = new System.Drawing.Size(75, 23); + this.start.TabIndex = 0; + this.start.Text = "Start"; + this.start.UseVisualStyleBackColor = true; + this.start.Click += new System.EventHandler(this.start_Click); + // + // stop + // + this.stop.Location = new System.Drawing.Point(92, 42); + this.stop.Name = "stop"; + this.stop.Size = new System.Drawing.Size(75, 23); + this.stop.TabIndex = 7; + this.stop.Text = "Stop"; + this.stop.UseVisualStyleBackColor = true; + this.stop.Click += new System.EventHandler(this.stop_Click); + // + // systray + // + this.systray.ContextMenuStrip = this.contextMenu; + this.systray.Icon = ((System.Drawing.Icon)(resources.GetObject("systray.Icon"))); + this.systray.Text = "MPW"; + this.systray.Visible = true; + // + // contextMenu + // + this.contextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.restoreContext, + this.startContext, + this.stopContext, + this.exitContext}); + this.contextMenu.Name = "contextMenu"; + this.contextMenu.Size = new System.Drawing.Size(124, 92); + // + // restoreContext + // + this.restoreContext.Name = "restoreContext"; + this.restoreContext.Size = new System.Drawing.Size(123, 22); + this.restoreContext.Text = "Restore"; + this.restoreContext.Click += new System.EventHandler(this.restoreContext_Click); + // + // startContext + // + this.startContext.Name = "startContext"; + this.startContext.Size = new System.Drawing.Size(123, 22); + this.startContext.Text = "Start"; + this.startContext.Click += new System.EventHandler(this.startContext_Click); + // + // stopContext + // + this.stopContext.Name = "stopContext"; + this.stopContext.Size = new System.Drawing.Size(123, 22); + this.stopContext.Text = "Stop"; + this.stopContext.Click += new System.EventHandler(this.stopContext_Click); + // + // exitContext + // + this.exitContext.Name = "exitContext"; + this.exitContext.Size = new System.Drawing.Size(123, 22); + this.exitContext.Text = "Exit"; + this.exitContext.Click += new System.EventHandler(this.exitContext_Click); + // + // exit + // + this.exit.Location = new System.Drawing.Point(233, 141); + this.exit.Name = "exit"; + this.exit.Size = new System.Drawing.Size(75, 23); + this.exit.TabIndex = 11; + this.exit.Text = "Exit"; + this.exit.UseVisualStyleBackColor = true; + this.exit.Click += new System.EventHandler(this.exit_Click); + // + // serviceStatusLabel + // + this.serviceStatusLabel.AutoSize = true; + this.serviceStatusLabel.Location = new System.Drawing.Point(9, 17); + this.serviceStatusLabel.Name = "serviceStatusLabel"; + this.serviceStatusLabel.Size = new System.Drawing.Size(77, 13); + this.serviceStatusLabel.TabIndex = 12; + this.serviceStatusLabel.Text = "Service status:"; + // + // serviceStatus + // + this.serviceStatus.AutoSize = true; + this.serviceStatus.Location = new System.Drawing.Point(92, 17); + this.serviceStatus.Name = "serviceStatus"; + this.serviceStatus.Size = new System.Drawing.Size(47, 13); + this.serviceStatus.TabIndex = 13; + this.serviceStatus.Text = "Stopped"; + // + // pause + // + this.pause.Location = new System.Drawing.Point(11, 71); + this.pause.Name = "pause"; + this.pause.Size = new System.Drawing.Size(75, 23); + this.pause.TabIndex = 14; + this.pause.Text = "Pause"; + this.pause.UseVisualStyleBackColor = true; + this.pause.Click += new System.EventHandler(this.pause_Click); + // + // conitnueButton + // + this.conitnueButton.Location = new System.Drawing.Point(92, 71); + this.conitnueButton.Name = "conitnueButton"; + this.conitnueButton.Size = new System.Drawing.Size(75, 23); + this.conitnueButton.TabIndex = 15; + this.conitnueButton.Text = "Continue"; + this.conitnueButton.UseVisualStyleBackColor = true; + this.conitnueButton.Click += new System.EventHandler(this.conitnueButton_Click); + // + // customCommandLabel + // + this.customCommandLabel.AutoSize = true; + this.customCommandLabel.Location = new System.Drawing.Point(8, 108); + this.customCommandLabel.Name = "customCommandLabel"; + this.customCommandLabel.Size = new System.Drawing.Size(92, 13); + this.customCommandLabel.TabIndex = 16; + this.customCommandLabel.Text = "CustomCommand:"; + // + // refreshButton + // + this.refreshButton.Location = new System.Drawing.Point(234, 12); + this.refreshButton.Name = "refreshButton"; + this.refreshButton.Size = new System.Drawing.Size(75, 23); + this.refreshButton.TabIndex = 17; + this.refreshButton.Text = "Refresh"; + this.refreshButton.UseVisualStyleBackColor = true; + this.refreshButton.Click += new System.EventHandler(this.refreshButton_Click); + // + // customCommand + // + this.customCommand.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.customCommand.FormattingEnabled = true; + this.customCommand.Items.AddRange(new object[] { + "ReloadConfiguration", + "Reinit Logging"}); + this.customCommand.Location = new System.Drawing.Point(106, 105); + this.customCommand.Name = "customCommand"; + this.customCommand.Size = new System.Drawing.Size(121, 21); + this.customCommand.TabIndex = 18; + // + // execute + // + this.execute.Location = new System.Drawing.Point(233, 103); + this.execute.Name = "execute"; + this.execute.Size = new System.Drawing.Size(75, 23); + this.execute.TabIndex = 19; + this.execute.Text = "Execute"; + this.execute.UseVisualStyleBackColor = true; + this.execute.Click += new System.EventHandler(this.execute_Click); + // + // ServiceControl + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(321, 182); + this.Controls.Add(this.execute); + this.Controls.Add(this.customCommand); + this.Controls.Add(this.refreshButton); + this.Controls.Add(this.customCommandLabel); + this.Controls.Add(this.conitnueButton); + this.Controls.Add(this.pause); + this.Controls.Add(this.serviceStatus); + this.Controls.Add(this.serviceStatusLabel); + this.Controls.Add(this.exit); + this.Controls.Add(this.stop); + this.Controls.Add(this.start); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "ServiceControl"; + this.Text = "ServiceControl"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ServiceControl_FormClosing); + this.contextMenu.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button start; + private System.Windows.Forms.Button stop; + private System.Windows.Forms.NotifyIcon systray; + private System.Windows.Forms.ContextMenuStrip contextMenu; + private System.Windows.Forms.ToolStripMenuItem restoreContext; + private System.Windows.Forms.ToolStripMenuItem startContext; + private System.Windows.Forms.ToolStripMenuItem stopContext; + private System.Windows.Forms.ToolStripMenuItem exitContext; + private System.Windows.Forms.Button exit; + private System.Windows.Forms.Label serviceStatusLabel; + private System.Windows.Forms.Label serviceStatus; + private System.Windows.Forms.Button pause; + private System.Windows.Forms.Button conitnueButton; + private System.Windows.Forms.Label customCommandLabel; + private System.Windows.Forms.Button refreshButton; + private System.Windows.Forms.ComboBox customCommand; + private System.Windows.Forms.Button execute; + } +} \ No newline at end of file Added: trunk/Version2/Monitor/ServiceControl.cs =================================================================== --- trunk/Version2/Monitor/ServiceControl.cs (rev 0) +++ trunk/Version2/Monitor/ServiceControl.cs 2007-03-05 22:26:02 UTC (rev 24) @@ -0,0 +1,124 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Threading; +using System.ServiceProcess; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +namespace MPW.Monitor { + public partial class ServiceControl : Form { + private ServiceController serviceController; + private bool exitRequest; + + public ServiceControl() { + InitializeComponent(); + exitRequest = false; + serviceController = new ServiceController("MPW"); + serviceController.Refresh(); + serviceStatus.Text = serviceController.Status.ToString(); + } + + private void port_KeyPress(object sender, KeyPressEventArgs e) { + if (!Char.IsNumber(e.KeyChar) && !Char.IsControl(e.KeyChar)) { + e.Handled = true; + } + } + + private void start_Click(object sender, EventArgs e) { + serviceController.Refresh(); + if (serviceController.Status == ServiceControllerStatus.Stopped) { + serviceController.Start(); + } + serviceController.Refresh(); + serviceStatus.Text = serviceController.Status.ToString(); + } + + private void stop_Click(object sender, EventArgs e) { + serviceController.Refresh(); + if (serviceController.Status == ServiceControllerStatus.Running) { + serviceController.Stop(); + } + serviceController.Refresh(); + serviceStatus.Text = serviceController.Status.ToString(); + } + + private void ServiceControl_FormClosing(object sender, FormClosingEventArgs e) { + if (!exitRequest) { + e.Cancel = true; + this.WindowState = System.Windows.Forms.FormWindowState.Minimized; + systray.Visible = true; + this.ShowInTaskbar = false; + } + } + + private void restoreContext_Click(object sender, EventArgs e) { + this.WindowState = System.Windows.Forms.FormWindowState.Normal; + systray.Visible = false; + this.ShowInTaskbar = true; + serviceStatus.Text = serviceController.Status.ToString(); + } + + private void startContext_Click(object sender, EventArgs e) { + serviceController.Refresh(); + if (serviceController.Status == ServiceControllerStatus.Stopped) { + serviceController.Start(); + } + serviceController.Refresh(); + serviceStatus.Text = serviceController.Status.ToString(); + } + + private void stopContext_Click(object sender, EventArgs e) { + serviceController.Refresh(); + if (serviceController.Status == ServiceControllerStatus.Running) { + serviceController.Stop(); + } + serviceController.Refresh(); + serviceStatus.Text = serviceController.Status.ToString(); + } + + private void exitContext_Click(object sender, EventArgs e) { + exitRequest = true; + this.Close(); + } + + private void exit_Click(object sender, EventArgs e) { + exitRequest = true; + this.Close(); + } + + private void refreshButton_Click(object sender, EventArgs e) { + serviceController.Refresh(); + serviceStatus.Text = serviceController.Status.ToString(); + } + + private void pause_Click(object sender, EventArgs e) { + serviceController.Refresh(); + if (serviceController.Status == ServiceControllerStatus.Running) { + serviceController.Pause(); + } + serviceController.Refresh(); + serviceStatus.Text = serviceController.Status.ToString(); + } + + private void conitnueButton_Click(object sender, EventArgs e) { + serviceController.Refresh(); + if (serviceController.Status == ServiceControllerStatus.Paused) { + serviceController.Continue(); + } + serviceController.Refresh(); + serviceStatus.Text = serviceController.Status.ToString(); + } + + private void execute_Click(object sender, EventArgs e) { + serviceController.Refresh(); + if (serviceController.Status == ServiceControllerStatus.Running) { + serviceController.ExecuteCommand(customCommand.SelectedIndex); + } + serviceController.Refresh(); + serviceStatus.Text = serviceController.Status.ToString(); + } + } +} \ No newline at end of file Added: trunk/Version2/Monitor/ServiceControl.resx =================================================================== --- trunk/Version2/Monitor/ServiceControl.resx (rev 0) +++ trunk/Version2/Monitor/ServiceControl.resx 2007-03-05 22:26:02 UTC (rev 24) @@ -0,0 +1,9179 @@ +<?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> + <metadata name="systray.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="contextMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>103, 17</value> + </metadata> + <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> + <data name="systray.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAABAA8AAAAAAAEACAAoJAEA9gAAADAwAAABAAgAqA4AAB4lAQAgIAAAAQAIAKgIAADGMwEAGBgAAAEA + CADIBgAAbjwBABAQAAABAAgAaAUAADZDAQAAAAAAAQAgACggBACeSAEAgIAAAAEAIAAoCAEAxmgFAGBg + AAABACAAqJQAAO5wBgBQUAAAAQAgAOhnAACWBQcASEgAAAEAIACIVAAAfm0HAEBAAAABACAAKEIAAAbC + BwAwMAAAAQAgAKglAAAuBAgAICAAAAEAIACoEAAA1ikIABgYAAABACAAiAkAAH46CAAQEAAAAQAgAGgE + AAAGRAgAKAAAAAABAAAAAgAAAQAIAAAAAAAAAAEAAAAAAAAAAAAAAQAAAAEAAAAAAACLjIwAjY2NAI+Q + kACRkZEAk5SUAJWVlQCXmJgAmZmZAJucnACdnZ0An6CgAKGhoQCjpKQApaamAKaoqACpqqoAq6ysAK2t + rQCvsLAAsbGxALO0tAC1tbUAt7i4ALi5uQC7vLwAvb6+AL/AwADBwcEAw8TEAMXFxQDHyMgAycnJAMvM + zADNzc0Az9DQANHR0QDT1NQA1dXVANfY2ADY2dkA29zcAN3d3QDf4OAA4eHhAOPk5ADl5uYA5+joAOjp + 6QDr7OwA7O3tAO/w8ADx8fEA8/T0APX19QD5+fkA/v7+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA... [truncated message content] |
From: <sam...@us...> - 2007-02-24 14:30:48
|
Revision: 23 http://svn.sourceforge.net/mp-webinterface/?rev=23&view=rev Author: samuel337 Date: 2007-02-24 06:30:45 -0800 (Sat, 24 Feb 2007) Log Message: ----------- Added folder for WebServer Added Paths: ----------- trunk/Version2/WebServer/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sam...@us...> - 2007-02-20 14:04:25
|
Revision: 22 http://svn.sourceforge.net/mp-webinterface/?rev=22&view=rev Author: samuel337 Date: 2007-02-20 06:04:16 -0800 (Tue, 20 Feb 2007) Log Message: ----------- Thought of something better - improved client discovery code Modified Paths: -------------- trunk/source/ECP2Assembly/clsClientDiscovery.cs Modified: trunk/source/ECP2Assembly/clsClientDiscovery.cs =================================================================== --- trunk/source/ECP2Assembly/clsClientDiscovery.cs 2007-02-20 13:44:06 UTC (rev 21) +++ trunk/source/ECP2Assembly/clsClientDiscovery.cs 2007-02-20 14:04:16 UTC (rev 22) @@ -24,9 +24,9 @@ GroupTTL = groupTTL; } - public void IssueClientPing() + public void Refresh() { - if (udpComm != null) + if (udpComm == null) { udpComm = new UdpMCHelper(GroupIP, GroupTTL); udpComm.Start(GroupUdpPort); @@ -35,21 +35,89 @@ } ClientList.Clear(); + ClientListChangedEvent(new ClientListChangedEventArgs(string.Empty, ClientListChangedEventArgs.ChangeTypes.Cleared)); udpComm.Send(GroupUdpPort, UdpCommunication.MessageTypes.PING_REQUEST, "", DateTime.Now); } private void UdpComm_ReceiveEvent(UdpMCHelper.ReceiveEventArgs e) { - if (e.Type == UdpCommunication.MessageTypes.PING_RESPONSE) + switch (e.Type) { - lock (ClientList) - { - ClientList.Add(e.HostName); - } + case UdpCommunication.MessageTypes.PING_RESPONSE: + lock (ClientList) + { + if (!ClientList.Contains(e.HostName)) + { + ClientList.Add(e.HostName); + ClientListChangedEvent(new ClientListChangedEventArgs(e.HostName, ClientListChangedEventArgs.ChangeTypes.Added)); + } + } + break; + + case UdpCommunication.MessageTypes.PLUGIN_START: + lock (ClientList) + { + if (!ClientList.Contains(e.HostName)) + { + ClientList.Add(e.HostName); + ClientListChangedEvent(new ClientListChangedEventArgs(e.HostName, ClientListChangedEventArgs.ChangeTypes.Started)); + } + } + break; + + case UdpCommunication.MessageTypes.PLUGIN_STOP: + lock (ClientList) + { + if (ClientList.Contains(e.HostName)) + { + ClientList.Remove(e.HostName); + ClientListChangedEvent(new ClientListChangedEventArgs(e.HostName, ClientListChangedEventArgs.ChangeTypes.Stopped)); + } + } + break; } } + public delegate void ClientListChangedEventHandler(ClientListChangedEventArgs e); + public event ClientListChangedEventHandler ClientListChangedEvent; + + public class ClientListChangedEventArgs : EventArgs + { + public enum ChangeTypes + { + Added, + Started, + Stopped, + Cleared + } + + string m_Hostname; + ChangeTypes m_Change; + + public ClientListChangedEventArgs() + { + } + + public ClientListChangedEventArgs(string hostname, ChangeTypes change) + { + Hostname = hostname; + Change = change; + } + + public string Hostname + { + get { return m_Hostname; } + set { m_Hostname = value; } + } + + public ChangeTypes Change + { + get { return m_Change; } + set { m_Change = value; } + } + } + public void StopWaitingForResponses() { if (udpComm != null) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sam...@us...> - 2007-02-20 13:44:10
|
Revision: 21 http://svn.sourceforge.net/mp-webinterface/?rev=21&view=rev Author: samuel337 Date: 2007-02-20 05:44:06 -0800 (Tue, 20 Feb 2007) Log Message: ----------- added folders for version 2 development Added Paths: ----------- trunk/Version2/ trunk/Version2/WebApplication/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sam...@us...> - 2007-02-20 13:40:55
|
Revision: 20 http://svn.sourceforge.net/mp-webinterface/?rev=20&view=rev Author: samuel337 Date: 2007-02-20 05:40:41 -0800 (Tue, 20 Feb 2007) Log Message: ----------- Added client discovery code to ECP2Assembly; removed and recoded bits in preparation for client/server configuration. Modified Paths: -------------- trunk/source/ECP2Assembly/ECP2Assembly.csproj trunk/source/ECP2Assembly/clsMPHandler.cs trunk/source/ECP2Plugin/ECP2Plugin.csproj trunk/source/ECP2Plugin/clsMain.cs trunk/source/ECP2Plugin/frmSetup.cs Added Paths: ----------- trunk/source/ECP2Assembly/clsClientDiscovery.cs trunk/source/ECP2Assembly/clsUdpCommunication.cs trunk/source/ECP2Assembly/clsUdpMCHelper.cs Modified: trunk/source/ECP2Assembly/ECP2Assembly.csproj =================================================================== --- trunk/source/ECP2Assembly/ECP2Assembly.csproj 2006-09-09 17:41:13 UTC (rev 19) +++ trunk/source/ECP2Assembly/ECP2Assembly.csproj 2007-02-20 13:40:41 UTC (rev 20) @@ -38,6 +38,7 @@ </Reference> <Reference Include="System" /> <Reference Include="System.Data" /> + <Reference Include="System.Drawing" /> <Reference Include="System.Runtime.Remoting" /> <Reference Include="System.Windows.Forms" /> <Reference Include="System.Xml" /> @@ -45,15 +46,23 @@ <SpecificVersion>False</SpecificVersion> <HintPath>..\..\..\..\MediaPortal Source\mediaportal\TVCapture\bin\Debug\TVCapture.dll</HintPath> </Reference> + <Reference Include="Utils, Version=1.0.2563.41060, Culture=neutral, processorArchitecture=x86"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\..\..\MediaPortal Source\mediaportal\Utils\bin\Debug\Utils.dll</HintPath> + </Reference> <Reference Include="WindowPlugins, Version=1.0.2231.40336, Culture=neutral, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\..\..\..\MediaPortal Source\mediaportal\WindowPlugins\bin\Debug\WindowPlugins.dll</HintPath> </Reference> </ItemGroup> <ItemGroup> - <Compile Include="AssemblyResolve.cs" /> - <Compile Include="AssemblySettings.cs" /> + <None Include="AssemblyResolve.cs" /> + <None Include="AssemblySettings.cs" /> + <Compile Include="clsClientDiscovery.cs" /> + <Compile Include="clsCustomMPObjects.cs" /> + <Compile Include="clsUdpCommunication.cs" /> <Compile Include="clsMPHandler.cs" /> + <Compile Include="clsUdpMCHelper.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> Added: trunk/source/ECP2Assembly/clsClientDiscovery.cs =================================================================== --- trunk/source/ECP2Assembly/clsClientDiscovery.cs (rev 0) +++ trunk/source/ECP2Assembly/clsClientDiscovery.cs 2007-02-20 13:40:41 UTC (rev 20) @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace ECP2Assembly +{ + class ClientDiscovery : IDisposable + { + public List<string> ClientList; + private UdpMCHelper udpComm; + + private System.Net.IPAddress GroupIP = System.Net.IPAddress.Parse("225.2.100.1"); + private int GroupUdpPort = 3333; + private int GroupTTL = 2; + + public ClientDiscovery() + { + } + + public ClientDiscovery(System.Net.IPAddress groupIP, int groupUdpPort, int groupTTL) + { + GroupIP = groupIP; + GroupUdpPort = groupUdpPort; + GroupTTL = groupTTL; + } + + public void IssueClientPing() + { + if (udpComm != null) + { + udpComm = new UdpMCHelper(GroupIP, GroupTTL); + udpComm.Start(GroupUdpPort); + + udpComm.ReceiveEvent += new UdpMCHelper.ReceiveEventHandler(UdpComm_ReceiveEvent); + } + + ClientList.Clear(); + + udpComm.Send(GroupUdpPort, UdpCommunication.MessageTypes.PING_REQUEST, "", DateTime.Now); + } + + private void UdpComm_ReceiveEvent(UdpMCHelper.ReceiveEventArgs e) + { + if (e.Type == UdpCommunication.MessageTypes.PING_RESPONSE) + { + lock (ClientList) + { + ClientList.Add(e.HostName); + } + } + } + + public void StopWaitingForResponses() + { + if (udpComm != null) + { + udpComm.Stop(); + udpComm = null; + } + } + + #region IDisposable Members + + void IDisposable.Dispose() + { + if (udpComm != null) + { + udpComm.Stop(); + udpComm = null; + } + } + + #endregion + } +} Modified: trunk/source/ECP2Assembly/clsMPHandler.cs =================================================================== --- trunk/source/ECP2Assembly/clsMPHandler.cs 2006-09-09 17:41:13 UTC (rev 19) +++ trunk/source/ECP2Assembly/clsMPHandler.cs 2007-02-20 13:40:41 UTC (rev 20) @@ -35,55 +35,58 @@ #endregion #region Global variables, settings and instance code - static string sMPComputerName; - static string sConfigFileName; - static bool ResolveEventAttached = false; + //CLEANUP: remove commented code below when satisfied with changes + // AssemblySettings & AssemblyResolve already disabled, remove when done - public static string ConfigFileName - { - get - { - if (sConfigFileName==null) - { - sConfigFileName = AssemblySettings.GetDefaultConfigPath(); - } + //static string sMPComputerName; + //static string sConfigFileName; + //static bool ResolveEventAttached = false; - return sConfigFileName; - } - set - { - sConfigFileName = value; - } - } + //public static string ConfigFileName + //{ + // get + // { + // if (sConfigFileName==null) + // { + // sConfigFileName = AssemblySettings.GetDefaultConfigPath(); + // } - public static string MPComputerName - { - get - { - if (sMPComputerName==null) - { - AssemblySettings AssemblyConfig = new AssemblySettings(ConfigFileName); - sMPComputerName = AssemblyConfig.GetSetting("MPComputerAddress"); - } + // return sConfigFileName; + // } + // set + // { + // sConfigFileName = value; + // } + //} - return sMPComputerName; - } - set - { - //prevent unnecessary writing to file and also fixes web service errors - if (sMPComputerName!=value) - { - sMPComputerName = value; - AssemblySettings AssemblyConfig = new AssemblySettings(ConfigFileName); - AssemblyConfig.SaveSetting("MPComputerAddress", sMPComputerName ); - } - } - } + //public static string MPComputerName + //{ + // get + // { + // if (sMPComputerName==null) + // { + // AssemblySettings AssemblyConfig = new AssemblySettings(ConfigFileName); + // sMPComputerName = AssemblyConfig.GetSetting("MPComputerAddress"); + // } + // return sMPComputerName; + // } + // set + // { + // //prevent unnecessary writing to file and also fixes web service errors + // if (sMPComputerName!=value) + // { + // sMPComputerName = value; + // AssemblySettings AssemblyConfig = new AssemblySettings(ConfigFileName); + // AssemblyConfig.SaveSetting("MPComputerAddress", sMPComputerName ); + // } + // } + //} + public static void WriteLog(string msg) { string logFileName; - logFileName = ConfigFileName + ".log"; + logFileName = System.Reflection.Assembly.GetExecutingAssembly().FullName + ".log"; System.IO.FileStream Wfs = new System.IO.FileStream(logFileName, System.IO.FileMode.Append, System.IO.FileAccess.Write); System.IO.StreamWriter w = new System.IO.StreamWriter(Wfs); @@ -94,49 +97,62 @@ Wfs.Close(); } - public static MPHandler Instance - { - get - { - if (ResolveEventAttached == false) - { - AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(ECP2Assembly.AssemblyResolve.MyResolveEventHandler); - ResolveEventAttached = true; - } + //public static MPHandler Instance + //{ + // get + // { + // if (ResolveEventAttached == false) + // { + // AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(ECP2Assembly.AssemblyResolve.MyResolveEventHandler); + // ResolveEventAttached = true; + // } - try - { - System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel(new System.Runtime.Remoting.Channels.Tcp.TcpClientChannel(),false); - } - catch - {} + // try + // { + // System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel(new System.Runtime.Remoting.Channels.Tcp.TcpClientChannel(),false); + // } + // catch + // {} - AssemblySettings AssemblyConfig = new AssemblySettings(ConfigFileName); + // AssemblySettings AssemblyConfig = new AssemblySettings(ConfigFileName); - string AssemblyDir = AssemblyConfig.GetSetting("MPDirectory"); + // string AssemblyDir = AssemblyConfig.GetSetting("MPDirectory"); - //see if can connect to MPLaunchInfo to get MP path, if not, the return nothing and exit sub - try - { - ECP2Assembly.MPLaunchInfo eMPLI; - eMPLI = (MPLaunchInfo)Activator.GetObject(typeof(MPLaunchInfo), "tcp://" + MPComputerName + ":3334/MPLaunchInfo"); + // //see if can connect to MPLaunchInfo to get MP path + // try + // { + // ECP2Assembly.MPLaunchInfo eMPLI; + // eMPLI = (MPLaunchInfo)Activator.GetObject(typeof(MPLaunchInfo), "tcp://" + MPComputerName + ":3334/MPLaunchInfo"); - //save the path if it doesn't match the currently saved path - if (AssemblyDir!=eMPLI.MediaPortalDir) - { - AssemblyDir = eMPLI.MediaPortalDir; - if (System.IO.Directory.Exists(AssemblyDir) == true) - { - AssemblyConfig.SaveSetting("MPDirectory",AssemblyDir); - } - } - } - catch - {} + // //save the path if it doesn't match the currently saved path + // if (AssemblyDir!=eMPLI.MediaPortalDir) + // { + // AssemblyDir = eMPLI.MediaPortalDir; + // if (System.IO.Directory.Exists(AssemblyDir) == true) + // { + // AssemblyConfig.SaveSetting("MPDirectory",AssemblyDir); + // } + // } + // } + // catch + // {} - //otherwise, return an instance of the remoted assembly - return (MPHandler)Activator.GetObject(typeof(MPHandler), "tcp://" + MPComputerName + ":3334/MPHandler"); + // //otherwise, return an instance of the remoted assembly + // return (MPHandler)Activator.GetObject(typeof(MPHandler), "tcp://" + MPComputerName + ":3334/MPHandler"); + // } + //} + + public static MPHandler Instance(string clientAddress) + { + try + { + System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel(new System.Runtime.Remoting.Channels.Tcp.TcpClientChannel(), false); } + catch + { } + + //return an instance of the remoted assembly + return (MPHandler)Activator.GetObject(typeof(MPHandler), "tcp://" + clientAddress + ":3334/MPHandler"); } //variable to hold BurnerThread for transcoding @@ -150,7 +166,7 @@ MediaPortal.GUI.Library.Action act = new MediaPortal.GUI.Library.Action(); act.wID = (MediaPortal.GUI.Library.Action.ActionType)aID; - MediaPortal.GUI.Library.Log.WriteFile(Log.LogType.Log,"ECP2: SendActionByID actionID {0}", act.wID.ToString()); + MediaPortal.GUI.Library.Log.Debug("ECP2: SendActionByID actionID {0}", act.wID.ToString()); //check that action is valid in the current window if (MediaPortal.GUI.Library.ActionTranslator.GetActionDetail(MediaPortal.GUI.Library.GUIWindowManager.ActiveWindow, act) == false) @@ -174,7 +190,7 @@ msg.Message = (MediaPortal.GUI.Library.GUIMessage.MessageType)mID; msg.Label = label; - MediaPortal.GUI.Library.Log.WriteFile(Log.LogType.Log,"ECP2: SendMessageByID messageID {0}, Label {1}", msg.Message.ToString(), msg.Label); + MediaPortal.GUI.Library.Log.Debug("ECP2: SendMessageByID messageID {0}, Label {1}", msg.Message.ToString(), msg.Label); //send message MediaPortal.GUI.Library.GUIWindowManager.SendMessage(msg); @@ -188,7 +204,7 @@ msg.Message = (MediaPortal.GUI.Library.GUIMessage.MessageType)Enum.Parse(typeof(MediaPortal.GUI.Library.GUIMessage.MessageType), mEnum); msg.Label = label; - MediaPortal.GUI.Library.Log.WriteFile(Log.LogType.Log,"ECP2: SendThreadMessageByID messageID {0}, Label {1}", msg.Message.ToString(), msg.Label); + MediaPortal.GUI.Library.Log.Debug("ECP2: SendThreadMessageByID messageID {0}, Label {1}", msg.Message.ToString(), msg.Label); //send message MediaPortal.GUI.Library.GUIWindowManager.SendThreadMessage(msg); @@ -275,19 +291,19 @@ if (methodInfo==null) { - MediaPortal.GUI.Library.Log.WriteFile(Log.LogType.Log,"ECP2Assembly - GetRecorderProps: Method/Property, {0}, not found",PropName); + MediaPortal.GUI.Library.Log.Warn("ECP2Assembly - GetRecorderProps: Method/Property, {0}, not found", PropName); return null; } if (methodInfo.ReturnType == System.Type.GetType("System.Void")) { - MediaPortal.GUI.Library.Log.WriteFile(Log.LogType.Log,"ECP2Assembly - GetRecorderProps: Method {0} does not return anything - not a property; ", PropName); + MediaPortal.GUI.Library.Log.Warn("ECP2Assembly - GetRecorderProps: Method {0} does not return anything - not a property; ", PropName); return null; } if (methodInfo.GetParameters().Length > 0) { - MediaPortal.GUI.Library.Log.WriteFile(Log.LogType.Log, "ECP2Assembly - GetRecorderProps: Method {0} has parameters, thus cannot be accessed.", PropName); + MediaPortal.GUI.Library.Log.Warn("ECP2Assembly - GetRecorderProps: Method {0} has parameters, thus cannot be accessed.", PropName); throw new Exception("ECP2Assembly - GetRecorderProps; This method cannot be accessed because it has parameters"); } @@ -297,7 +313,7 @@ { if (propInfo.GetIndexParameters().Length > 0) { - MediaPortal.GUI.Library.Log.Write("ECP2Assembly - GetRecorderProps: Property {0} has parameters so it cannot be accessed.", PropName); + MediaPortal.GUI.Library.Log.Warn("ECP2Assembly - GetRecorderProps: Property {0} has parameters so it cannot be accessed.", PropName); throw new Exception("ECP2Assembly - GetRecorderProps; This property cannot be accessed because it has parameters."); } @@ -306,6 +322,7 @@ } catch (Exception ex) { + MediaPortal.GUI.Library.Log.Error("ECP2Assembly - GetRecorderProps exception: {0}", ex.ToString()); throw new Exception("ECP2Assembly - GetRecorderProps exception: " + ex.ToString()); } } @@ -365,14 +382,14 @@ //if not found, exit if (propInfo==null) { - MediaPortal.GUI.Library.Log.WriteFile(Log.LogType.Log,"ECP2Assembly - GetgPlayerProps: No property found with the name {0}", PropName); + MediaPortal.GUI.Library.Log.Warn("ECP2Assembly - GetgPlayerProps: No property found with the name {0}", PropName); return null; } //exit if it contains parameters if (propInfo.GetIndexParameters().Length>0) { - MediaPortal.GUI.Library.Log.WriteFile(Log.LogType.Log, "ECP2Assembly - GetgPlayerProps: Properties with parameters cannot be accessed; {0}", PropName); + MediaPortal.GUI.Library.Log.Warn("ECP2Assembly - GetgPlayerProps: Properties with parameters cannot be accessed; {0}", PropName); throw new Exception("ECP2Assembly - GetgPlayerProps; This property cannot be accessed because it has parameters"); } @@ -380,6 +397,7 @@ } catch (Exception ex) { + MediaPortal.GUI.Library.Log.Error("ECP2Assembly - GetgPlayerProps exception: {0}", ex.ToString()); throw new Exception("ECP2Assembly - GetgPlayerProps exception: " + ex.ToString()); } } @@ -470,7 +488,7 @@ } finally { - MediaPortal.GUI.Library.Log.Write("ECP2Assembly - RefreshRecordings executed."); + MediaPortal.GUI.Library.Log.Debug("ECP2Assembly - RefreshRecordings executed."); } } @@ -487,12 +505,12 @@ try { MediaPortal.TV.Database.TVDatabase.AddRecording(ref rec); - MediaPortal.GUI.Library.Log.Write("ECP2 - AddRecording: recording ({0}, {1}, {2}) added.", rec.Title, rec.Channel, rec.StartTime.ToString()); + MediaPortal.GUI.Library.Log.Debug("ECP2 - AddRecording: recording ({0}, {1}, {2}) added.", rec.Title, rec.Channel, rec.StartTime.ToString()); return true; } catch (Exception ex) { - MediaPortal.GUI.Library.Log.Write("ECP2 - AddRecording: " + ex.ToString()); + MediaPortal.GUI.Library.Log.Error("ECP2 - AddRecording: " + ex.ToString()); return false; } } @@ -502,12 +520,12 @@ try { MediaPortal.TV.Database.TVDatabase.UpdateRecording(rec, changeReason); - MediaPortal.GUI.Library.Log.Write("ECP2 - UpdateRecording: recording ({0}, {1}, {2}) updated.", rec.Title, rec.Channel, rec.StartTime.ToString()); + MediaPortal.GUI.Library.Log.Debug("ECP2 - UpdateRecording: recording ({0}, {1}, {2}) updated.", rec.Title, rec.Channel, rec.StartTime.ToString()); return true; } catch (Exception ex) { - MediaPortal.GUI.Library.Log.Write("ECP2 - UpdateRecording: " + ex.ToString()); + MediaPortal.GUI.Library.Log.Error("ECP2 - UpdateRecording: " + ex.ToString()); return false; } } @@ -536,13 +554,13 @@ if (ScheduleToDel ==true) { MediaPortal.TV.Database.TVDatabase.RemoveRecording(rec); - MediaPortal.GUI.Library.Log.Write("ECP2 - DelRecording: recording ({0}, {1}, {2}) deleted.", rec.Title, rec.Channel, rec.StartTime.ToString()); + MediaPortal.GUI.Library.Log.Debug("ECP2 - DelRecording: recording ({0}, {1}, {2}) deleted.", rec.Title, rec.Channel, rec.StartTime.ToString()); return true; } } catch (Exception ex) { - MediaPortal.GUI.Library.Log.WriteFile(Log.LogType.Log, "ECP2 - DelRecording: " + ex.ToString()); + MediaPortal.GUI.Library.Log.Error("ECP2 - DelRecording: " + ex.ToString()); } return false; @@ -573,14 +591,14 @@ if (ScheduleToDel==true) { MediaPortal.TV.Database.TVDatabase.RemoveRecording(rec); - MediaPortal.GUI.Library.Log.Write("ECP2 - DelRecording: recording ({0}, {1}, {2}) deleted.", rec.Title, rec.Channel, rec.StartTime.ToString()); + MediaPortal.GUI.Library.Log.Debug("ECP2 - DelRecording: recording ({0}, {1}, {2}) deleted.", rec.Title, rec.Channel, rec.StartTime.ToString()); return true; } } catch (Exception ex) { - MediaPortal.GUI.Library.Log.WriteFile(Log.LogType.Log, "ECP2 - DelRecording: " + ex.ToString()); + MediaPortal.GUI.Library.Log.Error("ECP2 - DelRecording: " + ex.ToString()); } return false; @@ -617,7 +635,7 @@ } catch (Exception ex) { - MediaPortal.GUI.Library.Log.WriteFile(Log.LogType.Log,"ECP2 - DelRecording: exception - " + ex.ToString()); + MediaPortal.GUI.Library.Log.Error("ECP2 - DelRecording: exception - " + ex.ToString()); } return false; @@ -769,12 +787,12 @@ } MediaPortal.TV.Database.TVDatabase.AddNotify(notify); - MediaPortal.GUI.Library.Log.Write("ECP2 - AddTVNotify: TVNotify ({0}, {1}) added.",notify.Program.Title,notify.Program.StartTime.ToString()); + MediaPortal.GUI.Library.Log.Debug("ECP2 - AddTVNotify: TVNotify ({0}, {1}) added.",notify.Program.Title,notify.Program.StartTime.ToString()); return true; } catch (Exception ex) { - MediaPortal.GUI.Library.Log.Write("ECP2 - AddTVNotify: " + ex.ToString()); + MediaPortal.GUI.Library.Log.Error("ECP2 - AddTVNotify: " + ex.ToString()); return false; } } @@ -791,12 +809,12 @@ } MediaPortal.TV.Database.TVDatabase.DeleteNotify(notify); - MediaPortal.GUI.Library.Log.Write("ECP2 - DeleteTVNotify: TVNotify ({0}, {1}) deleted.", notify.Program.Title, notify.Program.StartTime.ToString()); + MediaPortal.GUI.Library.Log.Debug("ECP2 - DeleteTVNotify: TVNotify ({0}, {1}) deleted.", notify.Program.Title, notify.Program.StartTime.ToString()); return true; } catch (Exception ex) { - MediaPortal.GUI.Library.Log.Write("ECP2 - DeleteTVNotify: " + ex.ToString()); + MediaPortal.GUI.Library.Log.Error("ECP2 - DeleteTVNotify: " + ex.ToString()); return false; } } @@ -813,12 +831,12 @@ } MediaPortal.TV.Database.TVDatabase.DeleteNotify(notify); - MediaPortal.GUI.Library.Log.Write("ECP2 - DeleteTVNotify: TVNotify ({0}, {1}) deleted.", notify.Program.Title, notify.Program.StartTime.ToString()); + MediaPortal.GUI.Library.Log.Debug("ECP2 - DeleteTVNotify: TVNotify ({0}, {1}) deleted.", notify.Program.Title, notify.Program.StartTime.ToString()); return true; } catch (Exception ex) { - MediaPortal.GUI.Library.Log.Write("ECP2 - DeleteTVNotify: " + ex.ToString()); + MediaPortal.GUI.Library.Log.Error("ECP2 - DeleteTVNotify: " + ex.ToString()); return false; } } @@ -840,7 +858,7 @@ } catch (Exception ex) { - MediaPortal.GUI.Library.Log.Write("ECP2 - GetNotify: " + ex.ToString()); + MediaPortal.GUI.Library.Log.Error("ECP2 - GetNotify: " + ex.ToString()); return null; } } @@ -875,7 +893,7 @@ } catch (Exception ex) { - MediaPortal.GUI.Library.Log.WriteFile(Log.LogType.Log, "ECP2 - GetTVNotify: " + ex.ToString()); + MediaPortal.GUI.Library.Log.Error("ECP2 - GetTVNotify: " + ex.ToString()); return null; } } @@ -926,7 +944,7 @@ } catch (Exception ex) { - MediaPortal.GUI.Library.Log.WriteFile(Log.LogType.Log, "ECP2 - GetTVGroup: " + ex.ToString()); + MediaPortal.GUI.Library.Log.Error("ECP2 - GetTVGroup: " + ex.ToString()); return null; } } @@ -961,7 +979,7 @@ } catch (Exception ex) { - MediaPortal.GUI.Library.Log.WriteFile(Log.LogType.Log, "ECP2 - GetTVGroup: " + ex.ToString()); + MediaPortal.GUI.Library.Log.Error("ECP2 - GetTVGroup: " + ex.ToString()); return null; } } Added: trunk/source/ECP2Assembly/clsUdpCommunication.cs =================================================================== --- trunk/source/ECP2Assembly/clsUdpCommunication.cs (rev 0) +++ trunk/source/ECP2Assembly/clsUdpCommunication.cs 2007-02-20 13:40:41 UTC (rev 20) @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace ECP2Assembly +{ + public class UdpCommunication + { + public static UdpMCHelper GetDefaultUdpMCHelper() + { + System.Net.IPAddress GroupIP = System.Net.IPAddress.Parse("225.2.100.1"); + int GroupUdpPort = 3333; + int GroupTTL = 2; + + UdpMCHelper udpComm; + udpComm = new UdpMCHelper(GroupIP, GroupTTL); + udpComm.Start(GroupUdpPort); + + return udpComm; + } + + //class to hold message type values + public class MessageTypes + { + public static string PLUGIN_START + { + get { return "PLUGIN_START"; } + } + + public static string PLUGIN_STOP + { + get { return "PLUGIN_STOP"; } + } + + public static string PING_REQUEST + { + get { return "PING_REQUEST"; } + } + + public static string PING_RESPONSE + { + get { return "PING_RESPONSE"; } + } + } + } +} Added: trunk/source/ECP2Assembly/clsUdpMCHelper.cs =================================================================== --- trunk/source/ECP2Assembly/clsUdpMCHelper.cs (rev 0) +++ trunk/source/ECP2Assembly/clsUdpMCHelper.cs 2007-02-20 13:40:41 UTC (rev 20) @@ -0,0 +1,279 @@ +//UDP unicast code taken from MP; modified to multicast and redirected calls to use UdpClient. + +#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.Net; +using System.Net.Sockets; +using System.Net.NetworkInformation; +using System.Text; + +namespace ECP2Assembly +{ + public class UdpMCHelper : IDisposable + { + UdpClient udpClient; + + IPAddress groupIP = null; + int TTL = 2; + + #region Logging + public delegate void LogEventHandler(LogEventArgs e); + public event LogEventHandler LogEvent; + + public class LogEventArgs : EventArgs + { + string m_LogLevel; + string m_LogMessage; + + public LogEventArgs() + { + } + + public LogEventArgs(string logLevel, string logMessage) + { + LogLevel = logLevel; + LogMessage = logMessage; + } + + public string LogLevel + { + get { return m_LogLevel; } + set { m_LogLevel = value; } + } + + public string LogMessage + { + get { return m_LogMessage; } + set { m_LogMessage = value; } + } + } + + private void Log(string logLabel, string logMessageFormat, params string[] logMessageParams) + { + if (LogEvent == null) return; + + string logMessage; + logMessage = string.Format(logMessageFormat, logMessageParams); + + LogEventArgs e = new LogEventArgs(logLabel, logMessage); + LogEvent(e); + } + + #endregion + + #region ReceiveEvent + public delegate void ReceiveEventHandler(ReceiveEventArgs e); + public event ReceiveEventHandler ReceiveEvent; + + public class ReceiveEventArgs : EventArgs + { + string m_Type; + string m_Message; + string m_HostName; + string m_Timestamp; + + public ReceiveEventArgs() + { + } + + public ReceiveEventArgs(string type, string message, string hostName, string timestamp) + { + Type = type; + Message = message; + HostName = hostName; + Timestamp = timestamp; + } + + public string Type + { + get { return m_Type; } + set { m_Type = value; } + } + + public string Message + { + get { return m_Message; } + set { m_Message = value; } + } + + public string HostName + { + get { return m_HostName; } + set { m_HostName = value; } + } + + public string Timestamp + { + get { return m_Timestamp; } + set { m_Timestamp = value; } + } + + } + + protected virtual void OnReceive(string strReceive) + { + //check to see if entire message is received + if (!strReceive.EndsWith("~")) + { + //if not, ignore message + return; + } + + if (ReceiveEvent != null) + { + ReceiveEventArgs e = new ReceiveEventArgs(); + + //strip off check character + strReceive = strReceive.Remove(strReceive.Length - 2); + + string[] strReceiveArray = strReceive.Split("|".ToCharArray()); + + if (strReceiveArray.Length < 4) { return; } + + e.Type = strReceiveArray[0]; + e.Message = strReceiveArray[1]; + e.HostName = strReceiveArray[2]; + e.Timestamp = strReceiveArray[3]; + + ReceiveEvent(e); + } + } + #endregion + + class UdpState + { + public IPEndPoint EndPoint; + public UdpClient UdpClient; + } + + public UdpMCHelper(IPAddress groupAddress) + { + groupIP = groupAddress; + } + + public UdpMCHelper(IPAddress groupAddress, int timeToLive) + { + groupIP = groupAddress; + TTL = timeToLive; + } + + public bool Start(int udpPort) + { + try + { + Log("Info","UDPHelper: Starting listener on port {0}", udpPort.ToString()); + + // Port already used? + IPGlobalProperties properties = IPGlobalProperties.GetIPGlobalProperties(); + TcpConnectionInformation[] connections = properties.GetActiveTcpConnections(); + foreach (TcpConnectionInformation c in connections) + { + if (c.RemoteEndPoint.Port == udpPort) + { + Log("Error", "UDPHelper: UDP port {0} is already in use", udpPort.ToString()); + return false; + } + } + + IPEndPoint endPoint = new IPEndPoint(groupIP, udpPort); + udpClient = new UdpClient(udpPort, AddressFamily.InterNetwork); + udpClient.JoinMulticastGroup(groupIP, TTL); + + UdpState state = new UdpState(); + state.EndPoint = endPoint; + state.UdpClient = udpClient; + udpClient.BeginReceive(new AsyncCallback(ReceiveCallback), state); + Log("Info","UDPHelper: Listening for messages on port {0}", udpPort.ToString()); + return true; + } + catch (SocketException se) + { + Log("Error","UDPHelper: Start port {0}: {1} - {2}", udpPort.ToString(), se.ErrorCode.ToString(), se.Message); + return false; + } + } + + public void Stop() + { + try + { + udpClient.DropMulticastGroup(groupIP); + udpClient.Close(); + } + catch (System.NullReferenceException) + { } + udpClient = null; + } + + public bool Send(int udpPort, string strType, string strSend, DateTime timeStamp) + { + try + { + byte[] sendbuf = Encoding.UTF8.GetBytes(string.Format("{0}|{1}|{2}|{3}~", strType, strSend, System.Net.Dns.GetHostName(), timeStamp.ToBinary())); + + IPEndPoint endPoint = new IPEndPoint(groupIP, udpPort); + udpClient.Send(sendbuf, sendbuf.Length, endPoint); + return true; + } + catch (SocketException se) + { + Log("Error","UDPHelper: Send port {0}: {1} - {2}", udpPort.ToString(), se.ErrorCode.ToString(), se.Message); + return false; + } + } + + public void ReceiveCallback(IAsyncResult ar) + { + UdpClient udpClientLoc = (UdpClient)((UdpState)(ar.AsyncState)).UdpClient; + IPEndPoint endPoint = (IPEndPoint)((UdpState)(ar.AsyncState)).EndPoint; + + try + { + Byte[] bytesReceived = udpClientLoc.EndReceive(ar, ref endPoint); + string strReceived = Encoding.UTF8.GetString(bytesReceived); + OnReceive(strReceived); + udpClientLoc.BeginReceive(new AsyncCallback(ReceiveCallback), (UdpState)(ar.AsyncState)); + } + catch (System.ObjectDisposedException) + { + } + catch (SocketException) + { + } + } + + #region IDisposable Members + + void IDisposable.Dispose() + { + Stop(); + } + + #endregion +} +} Modified: trunk/source/ECP2Plugin/ECP2Plugin.csproj =================================================================== --- trunk/source/ECP2Plugin/ECP2Plugin.csproj 2006-09-09 17:41:13 UTC (rev 19) +++ trunk/source/ECP2Plugin/ECP2Plugin.csproj 2007-02-20 13:40:41 UTC (rev 20) @@ -38,6 +38,10 @@ <Reference Include="System.Runtime.Remoting" /> <Reference Include="System.Windows.Forms" /> <Reference Include="System.Xml" /> + <Reference Include="Utils, Version=1.0.2423.4606, Culture=neutral, processorArchitecture=x86"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\..\..\MediaPortal Source\mediaportal\Utils\bin\Debug\Utils.dll</HintPath> + </Reference> </ItemGroup> <ItemGroup> <Compile Include="clsCustomSink.cs" /> Modified: trunk/source/ECP2Plugin/clsMain.cs =================================================================== --- trunk/source/ECP2Plugin/clsMain.cs 2006-09-09 17:41:13 UTC (rev 19) +++ trunk/source/ECP2Plugin/clsMain.cs 2007-02-20 13:40:41 UTC (rev 20) @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Text; +using ECP2Assembly; namespace ECP2Plugin { @@ -13,12 +14,17 @@ //track activity and disallows shutdown depending on time lapsed private static DateTime lastActivity; + private UdpMCHelper UdpComm; + private int UdpCommPort; + #region IPlugin Members void MediaPortal.GUI.Library.IPlugin.Start() { //define HTTPchannel and setup remoting - System.Runtime.Remoting.RemotingConfiguration.Configure("MediaPortal.exe.config", false); + //removed config file parameter as it was causing issues (not needed anyway) + //System.Runtime.Remoting.RemotingConfiguration.Configure("MediaPortal.exe.config", false); + System.Runtime.Remoting.RemotingConfiguration.Configure(null, false); //turn to RemoteOnly for production version! System.Runtime.Remoting.RemotingConfiguration.CustomErrorsMode = System.Runtime.Remoting.CustomErrorsModes.Off; System.Runtime.Remoting.Channels.Tcp.TcpServerChannel channel = new System.Runtime.Remoting.Channels.Tcp.TcpServerChannel("MediaPortal ECP2", 3334, new ServerActivitySinkProvider()); @@ -27,17 +33,37 @@ System.Runtime.Remoting.RemotingConfiguration.RegisterWellKnownServiceType(typeof(ECP2Assembly.MPLaunchInfo), "MPLaunchInfo", System.Runtime.Remoting.WellKnownObjectMode.SingleCall); //get settings - MediaPortal.Profile.Settings MPSettings = new MediaPortal.Profile.Settings("mediaportal.xml"); + MediaPortal.Profile.Settings MPSettings = new MediaPortal.Profile.Settings(MediaPortal.Configuration.Config.GetFile(MediaPortal.Configuration.Config.Dir.Config, "MediaPortal.xml")); shutdownDelay = MPSettings.GetValueAsInt("ECP2", "ShutdownDelay", 10); ResetLastActivityTime(); - MediaPortal.GUI.Library.Log.Write("ECP2: Remoting initialised."); + MediaPortal.GUI.Library.Log.Info("ECP2: Remoting initialised."); + + //load UDP communication + System.Net.IPAddress GroupAddress = System.Net.IPAddress.Parse(MPSettings.GetValueAsString("ECP2", "GroupAddress", "225.2.100.1")); + UdpComm = new UdpMCHelper(GroupAddress, MPSettings.GetValueAsInt("ECP2", "GroupTTL", 2)); + + UdpComm.LogEvent += new UdpMCHelper.LogEventHandler(UdpComm_LogEvent); + + UdpCommPort = MPSettings.GetValueAsInt("ECP2", "GroupPort", 3333); + UdpComm.Start(UdpCommPort); + + UdpComm.ReceiveEvent += new UdpMCHelper.ReceiveEventHandler(UdpComm_ReceiveEvent); + + //send startup message + UdpComm.Send(UdpCommPort, UdpCommunication.MessageTypes.PLUGIN_START, "", DateTime.Now); + } void MediaPortal.GUI.Library.IPlugin.Stop() { - + //send shutdown message + UdpComm.Send(UdpCommPort, UdpCommunication.MessageTypes.PLUGIN_STOP, "", DateTime.Now); + + //stop udpcomm + UdpComm.Stop(); + UdpComm = null; } #endregion @@ -126,6 +152,34 @@ { //MediaPortal.GUI.Library.Log.Write("ECP2: LastActivityTimer resetted."); lastActivity = DateTime.Now; - } + } + + #region UdpComm + private void UdpComm_LogEvent(UdpMCHelper.LogEventArgs e) + { + switch (e.LogLevel) + { + case "Error": + MediaPortal.GUI.Library.Log.Error(e.LogMessage); + break; + + default: + MediaPortal.GUI.Library.Log.Info(e.LogMessage); + break; + } + } + + private void UdpComm_ReceiveEvent(UdpMCHelper.ReceiveEventArgs e) + { + //respond to PING requests + if (e.Type == UdpCommunication.MessageTypes.PING_REQUEST) + { + lock (UdpComm) + { + UdpComm.Send(UdpCommPort, UdpCommunication.MessageTypes.PING_RESPONSE, "", DateTime.Now); + } + } + } + #endregion } } Modified: trunk/source/ECP2Plugin/frmSetup.cs =================================================================== --- trunk/source/ECP2Plugin/frmSetup.cs 2006-09-09 17:41:13 UTC (rev 19) +++ trunk/source/ECP2Plugin/frmSetup.cs 2007-02-20 13:40:41 UTC (rev 20) @@ -22,14 +22,14 @@ private void cmdSaveSettings_Click(object sender, EventArgs e) { - MediaPortal.Profile.Settings MPSettings = new MediaPortal.Profile.Settings("mediaportal.xml"); + MediaPortal.Profile.Settings MPSettings = new MediaPortal.Profile.Settings(MediaPortal.Configuration.Config.GetFile(MediaPortal.Configuration.Config.Dir.Config, "MediaPortal.xml")); MPSettings.SetValue("ECP2", "ShutdownDelay", NUDShutdownDelay.Value); this.Close(); } private void frmSetup_Load(object sender, EventArgs e) { - MediaPortal.Profile.Settings MPSettings = new MediaPortal.Profile.Settings("mediaportal.xml"); + MediaPortal.Profile.Settings MPSettings = new MediaPortal.Profile.Settings(MediaPortal.Configuration.Config.GetFile(MediaPortal.Configuration.Config.Dir.Config, "MediaPortal.xml")); NUDShutdownDelay.Value = MPSettings.GetValueAsInt("ECP2", "ShutdownDelay", 10); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sam...@us...> - 2006-09-09 17:41:37
|
Revision: 19 http://svn.sourceforge.net/mp-webinterface/?rev=19&view=rev Author: samuel337 Date: 2006-09-09 10:41:13 -0700 (Sat, 09 Sep 2006) Log Message: ----------- added coverart features, alternate RemovePlaylistItem method, fixed asynchronous usage bugs, updated Playlist & music methods, plus more that I can't remember ;-) Modified Paths: -------------- trunk/source/ECP2Assembly/AssemblySettings.cs trunk/source/ECP2Assembly/clsMPHandler.cs trunk/source/ECP2Plugin/Properties/AssemblyInfo.cs trunk/source/ECP2Plugin/clsMain.cs trunk/source/ECP2WebService/App_Code/Service.cs Added Paths: ----------- trunk/source/ECP2Assembly/clsCustomMPObjects.cs trunk/source/ECP2WebService/CoverArtHandler.ashx Modified: trunk/source/ECP2Assembly/AssemblySettings.cs =================================================================== --- trunk/source/ECP2Assembly/AssemblySettings.cs 2006-08-19 17:27:28 UTC (rev 18) +++ trunk/source/ECP2Assembly/AssemblySettings.cs 2006-09-09 17:41:13 UTC (rev 19) @@ -47,29 +47,32 @@ //initialize the apps config file, create it if it doesn't exist private void InitializeConfigFile(string configFileName) { - //if the file name that was passed is blank, then run another overloaded method - if (configFileName == null) + lock (this) { - InitializeConfigFile(); - return; - } + //if the file name that was passed is blank, then run another overloaded method + if (configFileName == null) + { + InitializeConfigFile(); + return; + } - _configFileName = configFileName; + _configFileName = configFileName; - //if the file doesn't exist, create a blank xml - if (!System.IO.File.Exists(_configFileName)) - { - System.IO.StreamWriter fn = new System.IO.StreamWriter(System.IO.File.Open(_configFileName, System.IO.FileMode.Create)); - fn.WriteLine(@"<?xml version=""1.0"" encoding=""utf-8""?>"); - fn.WriteLine(@"<configuration>"); - fn.WriteLine(@" <appSettings>"); - fn.WriteLine(@" <!-- User application and configured property settings go here.-->"); - fn.WriteLine(@" <!-- Example: <add key=""settingName"" value=""settingValue""/> -->"); - fn.WriteLine(@" <add key=""MPComputerAddress"" value=""localhost"" />"); - fn.WriteLine(@" <add key=""MPDirectory"" value="""" />"); - fn.WriteLine(@" </appSettings>"); - fn.WriteLine(@"</configuration>"); - fn.Close(); //all done + //if the file doesn't exist, create a blank xml + if (!System.IO.File.Exists(_configFileName)) + { + System.IO.StreamWriter fn = new System.IO.StreamWriter(System.IO.File.Open(_configFileName, System.IO.FileMode.Create)); + fn.WriteLine(@"<?xml version=""1.0"" encoding=""utf-8""?>"); + fn.WriteLine(@"<configuration>"); + fn.WriteLine(@" <appSettings>"); + fn.WriteLine(@" <!-- User application and configured property settings go here.-->"); + fn.WriteLine(@" <!-- Example: <add key=""settingName"" value=""settingValue""/> -->"); + fn.WriteLine(@" <add key=""MPComputerAddress"" value=""localhost"" />"); + fn.WriteLine(@" <add key=""MPDirectory"" value="""" />"); + fn.WriteLine(@" </appSettings>"); + fn.WriteLine(@"</configuration>"); + fn.Close(); //all done + } } } @@ -97,58 +100,62 @@ } //save an application setting, takes a key and a value - public void SaveSetting(string key, string value) - { - //xml document object - System.Xml.XmlDocument xd = new System.Xml.XmlDocument(); + public void SaveSetting(string key, string value) + { + lock (this) + { - //load the xml file - xd.Load(_configFileName); + //xml document object + System.Xml.XmlDocument xd = new System.Xml.XmlDocument(); - //get the value - System.Xml.XmlElement Node = (System.Xml.XmlElement)xd.DocumentElement.SelectSingleNode(@"/configuration/appSettings/add[@key=""" + key + @"""]"); - if (!(Node==null)) - { - //key found, set the value - Node.Attributes.GetNamedItem("value").Value = value; - } - else - { - //key not found, create it - Node = xd.CreateElement("add"); - Node.SetAttribute("key", key); - Node.SetAttribute("value", value); + //load the xml file + xd.Load(_configFileName); - //look for the appsettings node - System.Xml.XmlNode Root = xd.DocumentElement.SelectSingleNode(@"/configuration/appSettings"); - - //add the new child node (this key) - if (!(Root==null)) - { - Root.AppendChild(Node); - } - else - { - try + //get the value + System.Xml.XmlElement Node = (System.Xml.XmlElement)xd.DocumentElement.SelectSingleNode(@"/configuration/appSettings/add[@key=""" + key + @"""]"); + if (!(Node == null)) { - //appsettings node didn't exist, add it before adding the new child - Root = xd.DocumentElement.SelectSingleNode("/configuration"); - Root.AppendChild(xd.CreateElement("appSettings")); - Root = xd.DocumentElement.SelectSingleNode("/configuration/appSettings"); - Root.AppendChild(Node); + //key found, set the value + Node.Attributes.GetNamedItem("value").Value = value; } - catch (Exception ex) + else { - //failed adding node, throw an error - throw new Exception("Could not set value", ex); + //key not found, create it + Node = xd.CreateElement("add"); + Node.SetAttribute("key", key); + Node.SetAttribute("value", value); + + //look for the appsettings node + System.Xml.XmlNode Root = xd.DocumentElement.SelectSingleNode(@"/configuration/appSettings"); + + //add the new child node (this key) + if (!(Root == null)) + { + Root.AppendChild(Node); + } + else + { + try + { + //appsettings node didn't exist, add it before adding the new child + Root = xd.DocumentElement.SelectSingleNode("/configuration"); + Root.AppendChild(xd.CreateElement("appSettings")); + Root = xd.DocumentElement.SelectSingleNode("/configuration/appSettings"); + Root.AppendChild(Node); + } + catch (Exception ex) + { + //failed adding node, throw an error + throw new Exception("Could not set value", ex); + } + } } + + //finally, save the new version of the config file + xd.Save(_configFileName); } } - //finally, save the new version of the config file - xd.Save(_configFileName); - } - } } \ No newline at end of file Added: trunk/source/ECP2Assembly/clsCustomMPObjects.cs =================================================================== --- trunk/source/ECP2Assembly/clsCustomMPObjects.cs (rev 0) +++ trunk/source/ECP2Assembly/clsCustomMPObjects.cs 2006-09-09 17:41:13 UTC (rev 19) @@ -0,0 +1,204 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace ECP2Assembly.CustomMPObjects +{ + [Serializable()] + public class MusicArtist + { + private int m_artistID; + private string m_artistName; + //private MediaPortal.Music.Database.ArtistInfo m_artistInfo; + + + public MusicArtist() + { + + } + + public int ArtistID + { + get + { + return m_artistID; + } + set + { + m_artistID = value; + } + } + + public string ArtistName + { + get + { + return m_artistName; + } + set + { + m_artistName = value; + } + } + + //public MediaPortal.Music.Database.ArtistInfo ArtistInfo + //{ + // get + // { + // return m_artistInfo; + // } + // set + // { + // m_artistInfo = value; + // } + //} + } + + [Serializable()] + public class MusicAlbum + { + private int m_albumID; + private string m_albumName; + private int m_artistID; + private int m_numOfArtists; + //private MediaPortal.Music.Database.AlbumInfo m_albumInfo; + + + public MusicAlbum() + { + + } + + public int AlbumID + { + get + { + return m_albumID; + } + set + { + m_albumID = value; + } + } + + public string AlbumName + { + get + { + return m_albumName; + } + set + { + m_albumName = value; + } + } + + public int ArtistID + { + get + { + return m_artistID; + } + set + { + m_artistID = value; + } + } + + public int NumOfArtists + { + get + { + return m_numOfArtists; + } + set + { + m_numOfArtists = value; + } + } + + //public MediaPortal.Music.Database.AlbumInfo AlbumInfo + //{ + // get + // { + // return m_albumInfo; + // } + // set + // { + // m_albumInfo = value; + // } + //} + } + + [Serializable()] + public class MusicGenre + { + private int m_genreID; + private string m_genreName; + + public MusicGenre() + { + + } + + public int GenreID + { + get + { + return m_genreID; + } + set + { + m_genreID = value; + } + } + + public string GenreName + { + get + { + return m_genreName; + } + set + { + m_genreName = value; + } + } + } + + [Serializable()] + public class PlayList + { + private string m_PlayListName; + private List<MediaPortal.Playlists.PlayListItem> m_PlayListItems; + + public PlayList() + { + m_PlayListItems = new List<MediaPortal.Playlists.PlayListItem>(); + } + + public string PlayListName + { + get + { + return m_PlayListName; + } + set + { + m_PlayListName = value; + } + } + + public List<MediaPortal.Playlists.PlayListItem> PlayListItems + { + get + { + return m_PlayListItems; + } + set + { + m_PlayListItems = value; + } + } + } +} Modified: trunk/source/ECP2Assembly/clsMPHandler.cs =================================================================== --- trunk/source/ECP2Assembly/clsMPHandler.cs 2006-08-19 17:27:28 UTC (rev 18) +++ trunk/source/ECP2Assembly/clsMPHandler.cs 2006-09-09 17:41:13 UTC (rev 19) @@ -312,48 +312,48 @@ public object GetgPlayerProps(string PropName) { - switch(PropName) + switch(PropName.ToLower()) { - case "CurrentFile": + case "currentfile": return MediaPortal.Player.g_Player.CurrentFile; - case "CurrentPosition": + case "currentposition": return MediaPortal.Player.g_Player.CurrentPosition; - case "Duration": + case "duration": return MediaPortal.Player.g_Player.Duration; - case "FullScreen": + case "fullscreen": return MediaPortal.Player.g_Player.FullScreen; - case "HasVideo": + case "hasvideo": return MediaPortal.Player.g_Player.HasVideo; - case "IsDVD": + case "isdvd": return MediaPortal.Player.g_Player.IsDVD; - case "IsRadio": + case "isradio": return MediaPortal.Player.g_Player.IsRadio; - case "IsTV": + case "istv": return MediaPortal.Player.g_Player.IsTV; - case "IsVideo": + case "isvideo": return MediaPortal.Player.g_Player.IsVideo; - case "Paused": + case "paused": return MediaPortal.Player.g_Player.Paused; - case "Playing": + case "playing": return MediaPortal.Player.g_Player.Playing; - case "Speed": + case "speed": return MediaPortal.Player.g_Player.Speed; - case "Stopped": + case "stopped": return MediaPortal.Player.g_Player.Stopped; - case "Volume": + case "volume": return MediaPortal.Player.g_Player.Volume; //if not one of the currently defined ones, use reflection to find it @@ -1023,7 +1023,7 @@ #region Playlist commands - public string CurrentPlaylistName + public string CurrentPlaylistType { get { @@ -1031,7 +1031,7 @@ } } - public int CurrentSongNo + public int CurrentItemNo { get { @@ -1058,7 +1058,20 @@ for (int i = 0; i < pl.Count; i++) { - ECP2PlayList.PlayListItems.Add(pl[i]); + //make a copy of the playlist item so it doesn't affect the actual playlist + MediaPortal.Playlists.PlayListItem OriginalPli; + MediaPortal.Playlists.PlayListItem NewPli; + OriginalPli = pl[i]; + NewPli = new MediaPortal.Playlists.PlayListItem(); + + NewPli.Description = OriginalPli.Description; + NewPli.Duration = OriginalPli.Duration; + NewPli.FileName = OriginalPli.FileName; + NewPli.Played = OriginalPli.Played; + NewPli.Type = OriginalPli.Type; + //ignore the MusicTag property as it can't be serialized properly + + ECP2PlayList.PlayListItems.Add(NewPli); } return ECP2PlayList; @@ -1138,14 +1151,31 @@ return false; } - public bool PlayPlaylistItem(MediaPortal.Playlists.PlayListType playlistType, int songNum) + public bool RemovePlaylistItem(MediaPortal.Playlists.PlayListType playlistType, int itemNum) { + MediaPortal.Playlists.PlayList pl = MediaPortal.Playlists.PlayListPlayer.SingletonPlayer.GetPlaylist(playlistType); + + if (pl == null) { return false; } + + if (itemNum >= pl.Count){ return false; } + + if (pl.Remove(pl[itemNum].FileName) > 0) + { + return true; + } + + return false; + } + + //has bugs - COM call related - FIX ASAP! + public bool PlayPlaylistItem(MediaPortal.Playlists.PlayListType playlistType, int itemNum) + { if (playlistType != MediaPortal.Playlists.PlayListPlayer.SingletonPlayer.CurrentPlaylistType) { MediaPortal.Playlists.PlayListPlayer.SingletonPlayer.CurrentPlaylistType = playlistType; } - MediaPortal.Playlists.PlayListPlayer.SingletonPlayer.Play(songNum); + MediaPortal.Playlists.PlayListPlayer.SingletonPlayer.Play(itemNum); return true; } @@ -1820,6 +1850,105 @@ return albumList; } + + public byte[] GetCoverArtForSong(int SongID) + { + //get song + MediaPortal.Music.Database.Song song = GetSong(SongID); + if (song == null) + { + return null; + } + + return GetCoverArtForSong(song); + } + + public byte[] GetCoverArtForSong(MediaPortal.Music.Database.Song song) + { + //build MusicTag + MediaPortal.TagReader.MusicTag tag = new MediaPortal.TagReader.MusicTag(); + tag.Album = song.Album; + tag.Artist = song.Artist; + tag.Duration = song.Duration; + tag.Genre = song.Genre; + tag.Rating = song.Rating; + tag.TimesPlayed = song.TimesPlayed; + tag.Title = song.Title; + tag.Track = song.Track; + tag.Year = song.Year; + + string artFilename = string.Empty ; + artFilename = MediaPortal.GUI.Music.GUIMusicFiles.GetCoverArt(false, song.FileName, tag); + + if (artFilename == string.Empty) + { + //get default icons + //make GUIListItem to get default icons (no other method available) + MediaPortal.GUI.Library.GUIListItem listItem = new GUIListItem(); + listItem.IsFolder = false; + listItem.Label = "dummy listItem to get default icons"; + listItem.Path = song.FileName; + MediaPortal.Util.Utils.SetDefaultIcons(listItem); + + artFilename = listItem.IconImageBig; + } + + //get absolute path if needed + artFilename= System.IO.Path.GetFullPath(artFilename); + + if (System.IO.File.Exists(artFilename)) + { + //turn file into byte array via fileStream as System.Drawing.Image has serialization issues + System.IO.FileStream fs = new System.IO.FileStream(artFilename, System.IO.FileMode.Open); + byte[] artFile = new byte[fs.Length]; + fs.Read(artFile, 0, (int)fs.Length); + fs.Close(); + fs.Dispose(); + return artFile; + } + + return null; + } + + public byte[] GetCoverArtForFolder(string path) + { + if (!System.IO.Directory.Exists(path)) + { + return null; + } + + string artFilename = string.Empty; + artFilename = MediaPortal.GUI.Music.GUIMusicFiles.GetCoverArt(true, path, null); + + if (artFilename == string.Empty) + { + //get default icons + //make GUIListItem to get default icons (no other method available) + MediaPortal.GUI.Library.GUIListItem listItem = new GUIListItem(); + listItem.IsFolder = true; + listItem.Label = "dummy listItem to get default icons"; + listItem.Path = path; + MediaPortal.Util.Utils.SetDefaultIcons(listItem); + + artFilename = listItem.IconImageBig; + } + + //get absolute path if needed + artFilename = System.IO.Path.GetFullPath(artFilename); + + if (System.IO.File.Exists(artFilename)) + { + //turn file into byte array via fileStream as System.Drawing.Image has serialization issues + System.IO.FileStream fs = new System.IO.FileStream(artFilename, System.IO.FileMode.Open); + byte[] artFile = new byte[fs.Length]; + fs.Read(artFile, 0, (int)fs.Length); + fs.Close(); + fs.Dispose(); + return artFile; + } + + return null; + } #endregion #region Volume commands @@ -1858,7 +1987,7 @@ } #endregion - #region ECP2 Version commands +#region ECP2 Version commands public string MPECP2Version { get Modified: trunk/source/ECP2Plugin/Properties/AssemblyInfo.cs =================================================================== --- trunk/source/ECP2Plugin/Properties/AssemblyInfo.cs 2006-08-19 17:27:28 UTC (rev 18) +++ trunk/source/ECP2Plugin/Properties/AssemblyInfo.cs 2006-09-09 17:41:13 UTC (rev 19) @@ -31,5 +31,5 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.1.2.0")] -[assembly: AssemblyFileVersion("1.1.2.0")] +[assembly: AssemblyVersion("1.1.2.1")] +[assembly: AssemblyFileVersion("1.1.2.1")] Modified: trunk/source/ECP2Plugin/clsMain.cs =================================================================== --- trunk/source/ECP2Plugin/clsMain.cs 2006-08-19 17:27:28 UTC (rev 18) +++ trunk/source/ECP2Plugin/clsMain.cs 2006-09-09 17:41:13 UTC (rev 19) @@ -17,21 +17,23 @@ void MediaPortal.GUI.Library.IPlugin.Start() { - //define HTTPchannel and setup remoting - System.Runtime.Remoting.RemotingConfiguration.Configure("MediaPortal.exe.config", false); - System.Runtime.Remoting.Channels.Tcp.TcpServerChannel channel = new System.Runtime.Remoting.Channels.Tcp.TcpServerChannel("MediaPortal ECP2", 3334, new ServerActivitySinkProvider()); - System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel(channel, false); - System.Runtime.Remoting.RemotingConfiguration.RegisterWellKnownServiceType(typeof(ECP2Assembly.MPHandler), "MPHandler", System.Runtime.Remoting.WellKnownObjectMode.SingleCall); - System.Runtime.Remoting.RemotingConfiguration.RegisterWellKnownServiceType(typeof(ECP2Assembly.MPLaunchInfo), "MPLaunchInfo", System.Runtime.Remoting.WellKnownObjectMode.SingleCall); + //define HTTPchannel and setup remoting + System.Runtime.Remoting.RemotingConfiguration.Configure("MediaPortal.exe.config", false); + //turn to RemoteOnly for production version! + System.Runtime.Remoting.RemotingConfiguration.CustomErrorsMode = System.Runtime.Remoting.CustomErrorsModes.Off; + System.Runtime.Remoting.Channels.Tcp.TcpServerChannel channel = new System.Runtime.Remoting.Channels.Tcp.TcpServerChannel("MediaPortal ECP2", 3334, new ServerActivitySinkProvider()); + System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel(channel, false); + System.Runtime.Remoting.RemotingConfiguration.RegisterWellKnownServiceType(typeof(ECP2Assembly.MPHandler), "MPHandler", System.Runtime.Remoting.WellKnownObjectMode.SingleCall); + System.Runtime.Remoting.RemotingConfiguration.RegisterWellKnownServiceType(typeof(ECP2Assembly.MPLaunchInfo), "MPLaunchInfo", System.Runtime.Remoting.WellKnownObjectMode.SingleCall); - //get settings - MediaPortal.Profile.Settings MPSettings = new MediaPortal.Profile.Settings("mediaportal.xml"); - shutdownDelay = MPSettings.GetValueAsInt("ECP2", "ShutdownDelay", 10); + //get settings + MediaPortal.Profile.Settings MPSettings = new MediaPortal.Profile.Settings("mediaportal.xml"); + shutdownDelay = MPSettings.GetValueAsInt("ECP2", "ShutdownDelay", 10); - ResetLastActivityTime(); + ResetLastActivityTime(); - MediaPortal.GUI.Library.Log.Write("ECP2: Remoting initialised."); - } + MediaPortal.GUI.Library.Log.Write("ECP2: Remoting initialised."); + } void MediaPortal.GUI.Library.IPlugin.Stop() { Modified: trunk/source/ECP2WebService/App_Code/Service.cs =================================================================== --- trunk/source/ECP2WebService/App_Code/Service.cs 2006-08-19 17:27:28 UTC (rev 18) +++ trunk/source/ECP2WebService/App_Code/Service.cs 2006-09-09 17:41:13 UTC (rev 19) @@ -1142,16 +1142,16 @@ #endregion #region playlist commands - [WebMethod(Description="This command returns the name of the current playlist.")] + [WebMethod(Description="This command returns the type of the current playlist.")] public string GetCurrentPlaylistName() { - return GetEMPH().CurrentPlaylistName; + return GetEMPH().CurrentPlaylistType; } - [WebMethod(Description="This command returns song number that's currently playing in the current playlist.")] + [WebMethod(Description="This command returns the item number that's currently playing in the current playlist.")] public int GetCurrentSongNo() { - return GetEMPH().CurrentSongNo; + return GetEMPH().CurrentItemNo ; } [WebMethod(Description="This command returns the items in a playlist given the playlist name (PLAYLIST_MUSIC, PLAYLIST_MUSIC_TEMP, PLAYLIST_VIDEO, PLAYLIST_VIDEO_TEMP) in XML format.")] @@ -1214,7 +1214,7 @@ return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); } - [WebMethod(Description="This command adds an item to the nominated playlist.")] + [WebMethod(Description = "This command adds an item to the nominated playlist (PLAYLIST_MUSIC, PLAYLIST_MUSIC_TEMP, PLAYLIST_VIDEO, PLAYLIST_VIDEO_TEMP).")] public bool AddPlaylistItem(string playlistType, string fileName, string description, int duration, string itemType) { if (fileName=="") {return false;} @@ -1241,7 +1241,7 @@ return GetEMPH().AddPlaylistItem(playlistTypeResolve,fileName,description,duration,itemTypeResolve); } - [WebMethod(Description="This command adds an item to the nominated playlist.")] + [WebMethod(Description = "This command adds an item to the nominated playlist (PLAYLIST_MUSIC, PLAYLIST_MUSIC_TEMP, PLAYLIST_VIDEO, PLAYLIST_VIDEO_TEMP).")] public bool AddPlaylistItemUsingDB(string playlistType, string itemType, string fileName) { if (fileName=="") {return false;} @@ -1267,8 +1267,8 @@ return GetEMPH().AddPlaylistItem(playlistTypeResolve,itemTypeResolve,fileName ); } - [WebMethod(Description="This command removes an item from the nominated playlist.")] - public bool RemovePlaylistItem(string playlistType, string fileName) + [WebMethod(Description = "This command removes an item from the nominated playlist (PLAYLIST_MUSIC, PLAYLIST_MUSIC_TEMP, PLAYLIST_VIDEO, PLAYLIST_VIDEO_TEMP).")] + public bool RemovePlaylistItemByFileName(string playlistType, string fileName) { if (fileName=="") {return false;} @@ -1284,7 +1284,22 @@ return GetEMPH().RemovePlaylistItem(playlistTypeResolve,fileName); } - [WebMethod(Description="This command plays an item from the nominated playlist.")] + [WebMethod(Description = "This command removes an item specified by its location in the playlist from the nominated playlist (PLAYLIST_MUSIC, PLAYLIST_MUSIC_TEMP, PLAYLIST_VIDEO, PLAYLIST_VIDEO_TEMP).")] + public bool RemovePlaylistItem(string playlistType, int itemNum) + { + //resolve playlistType + MediaPortal.Playlists.PlayListType playlistTypeResolve; + if (Enum.IsDefined(typeof(MediaPortal.Playlists.PlayListType), playlistType) == false) + { + return false; + } + + playlistTypeResolve = (MediaPortal.Playlists.PlayListType)Enum.Parse(typeof(MediaPortal.Playlists.PlayListType), playlistType); + + return GetEMPH().RemovePlaylistItem(playlistTypeResolve,itemNum); + } + + [WebMethod(Description = "This command plays an item from the nominated playlist (PLAYLIST_MUSIC, PLAYLIST_MUSIC_TEMP, PLAYLIST_VIDEO, PLAYLIST_VIDEO_TEMP).")] public bool PlayPlaylistItem(string playlistType, int songNum) { //resolve playlistType @@ -1299,8 +1314,8 @@ return GetEMPH().PlayPlaylistItem(playlistTypeResolve,songNum); } - [WebMethod(Description="This command clears a playlist.")] - public bool ClearPlaylistItem(string playlistType) + [WebMethod(Description = "This command clears the nominated playlist (PLAYLIST_MUSIC, PLAYLIST_MUSIC_TEMP, PLAYLIST_VIDEO, PLAYLIST_VIDEO_TEMP).")] + public bool ClearPlaylist(string playlistType) { //resolve playlistType MediaPortal.Playlists.PlayListType playlistTypeResolve; Added: trunk/source/ECP2WebService/CoverArtHandler.ashx =================================================================== --- trunk/source/ECP2WebService/CoverArtHandler.ashx (rev 0) +++ trunk/source/ECP2WebService/CoverArtHandler.ashx 2006-09-09 17:41:13 UTC (rev 19) @@ -0,0 +1,125 @@ +<%@ WebHandler Language="C#" Class="ECP2WebService.CoverArtHandler" %> + +using System; +using System.Web; + +namespace ECP2WebService +{ + public class CoverArtHandler : IHttpHandler + { + + public ECP2Assembly.MPHandler GetEMPH() + { + ECP2Assembly.MPHandler.ConfigFileName = System.Web.HttpRuntime.AppDomainAppPath + "config" + System.IO.Path.DirectorySeparatorChar + "ECP2Assembly.dll.config"; + ECP2Assembly.MPHandler.MPComputerName = System.Configuration.ConfigurationManager.AppSettings.Get("MPComputerAddress"); + + return ECP2Assembly.MPHandler.Instance; + } + + //based on code from http://msdn.microsoft.com/asp.net/whidbey/beta2changes.aspx + public void ProcessRequest(HttpContext context) + { + byte[] imageBytes; + string cacheId = string.Empty; + + if (context.Request.QueryString["SongID"] != null) + { + int songId = 0; + int.TryParse(context.Request.QueryString["SongID"], out songId); + if (songId==0) + { + //parameter not an integer + context.Response.ContentType = "text/plain"; + context.Response.Write("The SongID parameter must be an integer."); + return; + } + + cacheId = songId.ToString(); + + //check to see if cache contains image + Object cachedImageBytes = context.Cache.Get(cacheId); + + if (cachedImageBytes != null) + { + imageBytes = (Byte[])cachedImageBytes; + } + else + { + imageBytes = GetEMPH().GetCoverArtForSong(songId); + if (imageBytes == null) + { + //image not found + context.Response.ContentType = "text/plain"; + context.Response.Write("No image found for the specified SongID."); + return; + } + + // store image in cache for later requests, expire after 2 hrs (above average length of album) + context.Cache.Add(cacheId, imageBytes, null, DateTime.MaxValue, new TimeSpan(2, 0, 0),System.Web.Caching.CacheItemPriority.Normal, null); + } + } + + else if (context.Request.QueryString["FolderPath"] != null) + { + string folderPath = string.Empty; + folderPath = context.Request.QueryString["FolderPath"]; + if (folderPath == string.Empty) + { + //parameter empty + context.Response.ContentType = "text/plain"; + context.Response.Write("The FolderPath parameter must not be empty."); + return; + } + + //convert folderPath from HTML encoding + folderPath = System.Web.HttpUtility.HtmlDecode(folderPath); + + cacheId = folderPath; + + //check to see if cache contains image + Object cachedImageBytes = context.Cache.Get(cacheId); + + if (cachedImageBytes != null) + { + imageBytes = (Byte[])cachedImageBytes; + } + else + { + imageBytes = GetEMPH().GetCoverArtForFolder(folderPath); + if (imageBytes == null) + { + //image not found + context.Response.ContentType = "text/plain"; + context.Response.Write("No image found for the specified folder path."); + return; + } + + // store image in cache for later requests, expire after 2 hrs (above average length of album) + context.Cache.Add(cacheId, imageBytes, null, DateTime.MaxValue, new TimeSpan(2, 0, 0), System.Web.Caching.CacheItemPriority.Normal, null); + } + } + else + { + //no parameters specified + context.Response.ContentType = "text/plain"; + context.Response.Write("no parameters specified - please specify either SongID or FolderPath."); + return; + } + + // return image + context.Response.ContentType = "image/jpeg"; + context.Response.Cache.SetCacheability(HttpCacheability.Public); + context.Response.BufferOutput = false; + context.Response.OutputStream.Write(imageBytes, 0, imageBytes.Length); + } + + public bool IsReusable + { + get + { + return false; + } + } + + } +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sam...@us...> - 2006-08-19 17:27:44
|
Revision: 18 Author: samuel337 Date: 2006-08-19 10:27:28 -0700 (Sat, 19 Aug 2006) ViewCVS: http://svn.sourceforge.net/mp-webinterface/?rev=18&view=rev Log Message: ----------- implemented music DB functions, fixed GetPlaylist function, added volume and player seek functions. Modified Paths: -------------- trunk/source/ECP2Assembly/clsMPHandler.cs trunk/source/ECP2WebService/App_Code/Service.cs Modified: trunk/source/ECP2Assembly/clsMPHandler.cs =================================================================== --- trunk/source/ECP2Assembly/clsMPHandler.cs 2006-08-13 12:40:07 UTC (rev 17) +++ trunk/source/ECP2Assembly/clsMPHandler.cs 2006-08-19 17:27:28 UTC (rev 18) @@ -385,6 +385,58 @@ } } + public bool gPlayerSeekAbsolute(double TimePosition) + { + try + { + MediaPortal.Player.g_Player.SeekAbsolute(TimePosition); + return true; + } + catch + { + return false; + } + } + + public bool gPlayerSeekAbsolutePercentage(int TimePositionPercentage) + { + try + { + MediaPortal.Player.g_Player.SeekAsolutePercentage(TimePositionPercentage); + return true; + } + catch + { + return false; + } + } + + public bool gPlayerSeekRelative(double RelativeTimePosition) + { + try + { + MediaPortal.Player.g_Player.SeekRelative(RelativeTimePosition); + return true; + } + catch + { + return false; + } + } + + public bool gPlayerSeekRelativePercentage(int RelativeTimePositionPercentage) + { + try + { + MediaPortal.Player.g_Player.SeekRelativePercentage(RelativeTimePositionPercentage); + return true; + } + catch + { + return false; + } + } + #endregion private long DateToLong(DateTime date) @@ -987,7 +1039,6 @@ } } - public MediaPortal.Playlists.PlayListItem CurrentPlaylistItem { get @@ -996,12 +1047,21 @@ } } - public MediaPortal.Playlists.PlayList GetPlaylist(MediaPortal.Playlists.PlayListType playlistType) + public ECP2Assembly.CustomMPObjects.PlayList GetPlaylist(MediaPortal.Playlists.PlayListType playlistType) { MediaPortal.Playlists.PlayList pl; pl = MediaPortal.Playlists.PlayListPlayer.SingletonPlayer.GetPlaylist(playlistType); - return pl; + //morph into ECP2CustomObject + ECP2Assembly.CustomMPObjects.PlayList ECP2PlayList = new ECP2Assembly.CustomMPObjects.PlayList(); + ECP2PlayList.PlayListName = pl.Name; + + for (int i = 0; i < pl.Count; i++) + { + ECP2PlayList.PlayListItems.Add(pl[i]); + } + + return ECP2PlayList; } public bool AddPlaylistItem(MediaPortal.Playlists.PlayListType playlistType, string fileName, string description, int duration, MediaPortal.Playlists.PlayListItem.PlayListItemType itemType) @@ -1065,7 +1125,7 @@ public bool RemovePlaylistItem(MediaPortal.Playlists.PlayListType playlistType, string fileName) { - MediaPortal.Playlists.PlayList pl = GetPlaylist(playlistType); + MediaPortal.Playlists.PlayList pl = MediaPortal.Playlists.PlayListPlayer.SingletonPlayer.GetPlaylist(playlistType); if (pl==null) {return false;} @@ -1092,7 +1152,7 @@ public bool ClearPlaylist(MediaPortal.Playlists.PlayListType playlistType) { - MediaPortal.Playlists.PlayList pl = GetPlaylist(playlistType); + MediaPortal.Playlists.PlayList pl = MediaPortal.Playlists.PlayListPlayer.SingletonPlayer.GetPlaylist(playlistType); try { @@ -1108,7 +1168,697 @@ #endregion -#region ECP2 Version commands +#region Music commands + //public MediaPortal.Music.Database.AlbumInfo GetAlbumInfo(int albumID) + //{ + // MediaPortal.Music.Database.AlbumInfo albumInfo; + + // MediaPortal.Music.Database.MusicDatabase m_db = new MediaPortal.Music.Database.MusicDatabase(); + // m_db.GetAlbumInfo(albumID, ref albumInfo); + + // return albumInfo; + //} + + //public MediaPortal.Music.Database.AlbumInfo GetAlbumInfo(string albumName, string albumPath) + //{ + // MediaPortal.Music.Database.AlbumInfo albumInfo; + + // MediaPortal.Music.Database.MusicDatabase m_db = new MediaPortal.Music.Database.MusicDatabase(); + // m_db.GetAlbumInfo(albumName, albumPath, ref albumInfo); + + // return albumInfo; + //} + + public List<ECP2Assembly.CustomMPObjects.MusicAlbum> GetAlbums() + { + List<ECP2Assembly.CustomMPObjects.MusicAlbum> albumList = new List<ECP2Assembly.CustomMPObjects.MusicAlbum>(); + + string strSQL = string.Empty ; + strSQL = "SELECT idAlbum, strAlbum, idArtist, iNumArtists FROM album"; + + SQLite.NET.SQLiteResultSet results; + results = MediaPortal.Music.Database.MusicDatabase.m_db.Execute(strSQL); + + for (int i = 0; i < results.Rows.Count; ++i) + { + ECP2Assembly.CustomMPObjects.MusicAlbum album = new ECP2Assembly.CustomMPObjects.MusicAlbum(); + + album.AlbumID = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "album.idAlbum"); + album.AlbumName = MediaPortal.Database.DatabaseUtility.Get(results, i, "album.strAlbum"); + album.ArtistID = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "album.idArtist"); + album.NumOfArtists = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "album.iNumArtists"); + + albumList.Add(album); + } + + return albumList; + } + + public List<ECP2Assembly.CustomMPObjects.MusicAlbum> GetAlbums(string SearchType, string AlbumTitle) + { + int SearchKind; + + //convert SearchType to SearchKind + switch (SearchType.ToLower()) + { + case "wildcardatend": + SearchKind = 0; + break; + + case "wildcardatstartend": + SearchKind = 1; + break; + + case "wildcardatstart": + SearchKind = 2; + break; + + case "exact": + SearchKind = 3; + break; + + default: + SearchKind = 0; + break; + } + + string strSQL = string.Empty; + + switch (SearchKind) + { + case 0: + strSQL = String.Format("SELECT idAlbum, strAlbum, idArtist, iNumArtists FROM album WHERE album.strAlbum like '{0}%'", AlbumTitle); + break; + case 1: + strSQL = String.Format("SELECT idAlbum, strAlbum, idArtist, iNumArtists FROM album WHERE album.strAlbum like '%{0}%'", AlbumTitle); + break; + case 2: + strSQL = String.Format("SELECT idAlbum, strAlbum, idArtist, iNumArtists FROM album WHERE album.strAlbum like '%{0}'", AlbumTitle); + break; + case 3: + strSQL = String.Format("SELECT idAlbum, strAlbum, idArtist, iNumArtists FROM album WHERE album.strAlbum like '{0}'", AlbumTitle); + break; + } + + List<ECP2Assembly.CustomMPObjects.MusicAlbum> albumList = new List<ECP2Assembly.CustomMPObjects.MusicAlbum>(); + + SQLite.NET.SQLiteResultSet results; + results = MediaPortal.Music.Database.MusicDatabase.m_db.Execute(strSQL); + + for (int i = 0; i < results.Rows.Count; ++i) + { + ECP2Assembly.CustomMPObjects.MusicAlbum album = new ECP2Assembly.CustomMPObjects.MusicAlbum(); + + album.AlbumID = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "album.idAlbum"); + album.AlbumName = MediaPortal.Database.DatabaseUtility.Get(results, i, "album.strAlbum"); + album.ArtistID = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "album.idArtist"); + album.NumOfArtists = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "album.iNumArtists"); + + albumList.Add(album); + } + + return albumList; + } + + //public MediaPortal.Music.Database.ArtistInfo GetArtistInfo(string artistName) + //{ + // MediaPortal.Music.Database.ArtistInfo artistInfo; + + // MediaPortal.Music.Database.MusicDatabase m_db = new MediaPortal.Music.Database.MusicDatabase(); + // m_db.GetArtistInfo(artistName, ref artistInfo); + + // return artistInfo; + //} + + public List<ECP2Assembly.CustomMPObjects.MusicArtist> GetArtists() + { + List<ECP2Assembly.CustomMPObjects.MusicArtist> artistList = new List<ECP2Assembly.CustomMPObjects.MusicArtist>(); + + string strSQL = string.Empty; + strSQL = "SELECT idArtist, strArtist FROM artist"; + + SQLite.NET.SQLiteResultSet results; + results = MediaPortal.Music.Database.MusicDatabase.m_db.Execute(strSQL); + + for (int i = 0; i < results.Rows.Count; ++i) + { + ECP2Assembly.CustomMPObjects.MusicArtist artist = new ECP2Assembly.CustomMPObjects.MusicArtist(); + + artist.ArtistID = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "artist.idArtist"); + artist.ArtistName = MediaPortal.Database.DatabaseUtility.Get(results, i, "artist.strArtist"); + + artistList.Add(artist); + } + + return artistList; + } + + public List<ECP2Assembly.CustomMPObjects.MusicArtist> GetArtists(string SearchType, string ArtistName) + { + int SearchKind; + + //convert SearchType to SearchKind + switch (SearchType.ToLower()) + { + case "wildcardatend": + SearchKind = 0; + break; + + case "wildcardatstartend": + SearchKind = 1; + break; + + case "wildcardatstart": + SearchKind = 2; + break; + + case "exact": + SearchKind = 3; + break; + + default: + SearchKind = 0; + break; + } + + List<ECP2Assembly.CustomMPObjects.MusicArtist> artistList = new List<ECP2Assembly.CustomMPObjects.MusicArtist>(); + + string strSQL = string.Empty; + + switch (SearchKind) + { + case 0: + strSQL = String.Format("SELECT idArtist, strArtist FROM artist WHERE strArtist like '{0}%' ", ArtistName); + break; + case 1: + strSQL = String.Format("SELECT idArtist, strArtist FROM artist WHERE strArtist like '%{0}%' ", ArtistName); + break; + case 2: + strSQL = String.Format("SELECT idArtist, strArtist FROM artist WHERE strArtist like '%{0}' ", ArtistName); + break; + case 3: + strSQL = String.Format("SELECT idArtist, strArtist FROM artist WHERE strArtist like '{0}' ", ArtistName); + break; + } + + SQLite.NET.SQLiteResultSet results; + results = MediaPortal.Music.Database.MusicDatabase.m_db.Execute(strSQL); + + for (int i = 0; i < results.Rows.Count; ++i) + { + ECP2Assembly.CustomMPObjects.MusicArtist artist = new ECP2Assembly.CustomMPObjects.MusicArtist(); + + artist.ArtistID = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "artist.idArtist"); + artist.ArtistName = MediaPortal.Database.DatabaseUtility.Get(results, i, "artist.strArtist"); + + artistList.Add(artist); + } + + return artistList; + } + + public List<ECP2Assembly.CustomMPObjects.MusicGenre> GetMusicGenres() + { + List<ECP2Assembly.CustomMPObjects.MusicGenre> genreList = new List<ECP2Assembly.CustomMPObjects.MusicGenre>(); + + string strSQL = string.Empty; + strSQL = "SELECT idGenre, strGenre FROM genre"; + + SQLite.NET.SQLiteResultSet results; + results = MediaPortal.Music.Database.MusicDatabase.m_db.Execute(strSQL); + + for (int i = 0; i < results.Rows.Count; ++i) + { + ECP2Assembly.CustomMPObjects.MusicGenre genre = new ECP2Assembly.CustomMPObjects.MusicGenre(); + + genre.GenreID = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "genre.idGenre"); + genre.GenreName = MediaPortal.Database.DatabaseUtility.Get(results, i, "genre.strGenre"); + + genreList.Add(genre); + } + + return genreList; + } + + public List<ECP2Assembly.CustomMPObjects.MusicGenre> GetMusicGenres(string SearchType, string GenreName) + { + int SearchKind; + + //convert SearchType to SearchKind + switch (SearchType.ToLower()) + { + case "wildcardatend": + SearchKind = 0; + break; + + case "wildcardatstartend": + SearchKind = 1; + break; + + case "wildcardatstart": + SearchKind = 2; + break; + + case "exact": + SearchKind = 3; + break; + + default: + SearchKind = 0; + break; + } + + List<ECP2Assembly.CustomMPObjects.MusicGenre> genreList = new List<ECP2Assembly.CustomMPObjects.MusicGenre>(); + + string strSQL = string.Empty; + + switch (SearchKind) + { + case 0: + strSQL = String.Format("SELECT idGenre, strGenre FROM genre WHERE strGenre like '{0}%'", GenreName ); + break; + case 1: + strSQL = String.Format("SELECT idGenre, strGenre FROM genre WHERE strGenre like '%{0}%'", GenreName); + break; + case 2: + strSQL = String.Format("SELECT idGenre, strGenre FROM genre WHERE strGenre like '%{0}'", GenreName); + break; + case 3: + strSQL = String.Format("SELECT idGenre, strGenre FROM genre WHERE strGenre like '{0}'", GenreName); + break; + } + + SQLite.NET.SQLiteResultSet results; + results = MediaPortal.Music.Database.MusicDatabase.m_db.Execute(strSQL); + + for (int i = 0; i < results.Rows.Count; ++i) + { + ECP2Assembly.CustomMPObjects.MusicGenre genre = new ECP2Assembly.CustomMPObjects.MusicGenre(); + + genre.GenreID = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "genre.idGenre"); + genre.GenreName = MediaPortal.Database.DatabaseUtility.Get(results, i, "genre.strGenre"); + + genreList.Add(genre); + } + + return genreList; + } + + public int GetNumOfSongs() + { + MediaPortal.Music.Database.MusicDatabase m_db = new MediaPortal.Music.Database.MusicDatabase(); + return m_db.GetNumOfSongs(); + } + + public MediaPortal.Music.Database.Song GetRandomSong() + { + MediaPortal.Music.Database.Song song = new MediaPortal.Music.Database.Song(); + + MediaPortal.Music.Database.MusicDatabase m_db = new MediaPortal.Music.Database.MusicDatabase(); + m_db.GetRandomSong(ref song); + + return song; + } + + //public List<MediaPortal.Music.Database.AlbumInfo> GetRecentlyPlayedAlbums() + //{ + // List<MediaPortal.Music.Database.AlbumInfo> albumList = new List<MediaPortal.Music.Database.AlbumInfo>(); + // System.Collections.ArrayList albumArrList = new System.Collections.ArrayList(); + + // MediaPortal.Music.Database.MusicDatabase m_db = new MediaPortal.Music.Database.MusicDatabase(); + // m_db.GetRecentlyPlayedAlbums(ref albumArrList); + + // for (int i = 0; i < albumArrList.Count - 1; i++) + // { + // albumList.Add((MediaPortal.Music.Database.AlbumInfo)albumArrList[i]); + // } + + // return albumList; + //} + + public MediaPortal.Music.Database.Song GetSong(int SongID) + { + MediaPortal.Music.Database.Song song = new MediaPortal.Music.Database.Song(); + + string strSQL = string.Empty; + strSQL = String.Format("SELECT song.idSong, song.idArtist, artist.strArtist, song.idAlbum, album.strAlbum, song.idGenre, genre.strGenre, song.idPath, path.strPath, song.strTitle, song.iTrack, song.iDuration, song.iYear, song.strFileName, song.iTimesPlayed, song.iRating, song.favorite FROM song, album, artist, genre, path WHERE song.idPath=path.idPath AND song.idAlbum=album.idAlbum AND song.idGenre=genre.idGenre AND song.idArtist=artist.idArtist AND song.idSong={0}", SongID ); + + SQLite.NET.SQLiteResultSet results; + results = MediaPortal.Music.Database.MusicDatabase.m_db.Execute(strSQL); + + if (results.Rows.Count<1) + { + return null; + } + + song.songId = MediaPortal.Database.DatabaseUtility.GetAsInt(results, 0, "song.idSong"); + song.artistId = MediaPortal.Database.DatabaseUtility.GetAsInt(results, 0, "song.idArtist"); + song.Artist = MediaPortal.Database.DatabaseUtility.Get(results, 0, "artist.strArtist"); + song.albumId = MediaPortal.Database.DatabaseUtility.GetAsInt(results, 0, "song.idAlbum"); + song.Album = MediaPortal.Database.DatabaseUtility.Get(results, 0, "album.strAlbum"); + song.genreId = MediaPortal.Database.DatabaseUtility.GetAsInt(results, 0, "song.idGenre"); + song.Genre = MediaPortal.Database.DatabaseUtility.Get(results, 0, "genre.strGenre"); + song.Title = MediaPortal.Database.DatabaseUtility.Get(results, 0, "song.strTitle"); + song.Track = MediaPortal.Database.DatabaseUtility.GetAsInt(results, 0, "song.iTrack"); + song.Duration = MediaPortal.Database.DatabaseUtility.GetAsInt(results, 0, "song.iDuration"); + song.Year = MediaPortal.Database.DatabaseUtility.GetAsInt(results, 0, "song.iYear"); + + string strFileName = MediaPortal.Database.DatabaseUtility.Get(results, 0, "path.strPath"); + strFileName += MediaPortal.Database.DatabaseUtility.Get(results, 0, "song.strFileName"); + song.FileName = strFileName; + + song.TimesPlayed = MediaPortal.Database.DatabaseUtility.GetAsInt(results, 0, "song.iTimesPlayed"); + song.Rating = MediaPortal.Database.DatabaseUtility.GetAsInt(results, 0, "song.iRating"); + song.Favorite = (int)Math.Floor(0.5d + Double.Parse(MediaPortal.Database.DatabaseUtility.Get(results, 0, "song.favorite"))) != 0; ; + + return song; + } + + public MediaPortal.Music.Database.Song GetSong(string songTitle) + { + MediaPortal.Music.Database.Song song = new MediaPortal.Music.Database.Song(); + + MediaPortal.Music.Database.MusicDatabase m_db = new MediaPortal.Music.Database.MusicDatabase(); + m_db.GetSong(songTitle, ref song); + + return song; + } + + public MediaPortal.Music.Database.Song GetSongByFileName(string songFileName) + { + MediaPortal.Music.Database.Song song = new MediaPortal.Music.Database.Song(); + + MediaPortal.Music.Database.MusicDatabase m_db = new MediaPortal.Music.Database.MusicDatabase(); + m_db.GetSongByFileName(songFileName, ref song); + + return song; + } + + public List<MediaPortal.Music.Database.Song> GetSongs(string SearchType, string SongTitle) + { + int SearchKind; + + //convert SearchType to SearchKind + switch (SearchType.ToLower()) + { + case "wildcardatend": + SearchKind = 0; + break; + + case "wildcardatstartend": + SearchKind = 1; + break; + + case "wildcardatstart": + SearchKind = 2; + break; + + case "exact": + SearchKind = 3; + break; + + default: + SearchKind = 0; + break; + } + + List<MediaPortal.Music.Database.Song> songList = new List<MediaPortal.Music.Database.Song>(); + + string strSQL = string.Empty; + + switch (SearchKind) + { + case 0: + strSQL = String.Format("SELECT song.idSong, song.idArtist, artist.strArtist, song.idAlbum, album.strAlbum, song.idGenre, genre.strGenre, song.idPath, path.strPath, song.strTitle, song.iTrack, song.iDuration, song.iYear, song.strFileName, song.iTimesPlayed, song.iRating, song.favorite FROM song, album, artist, genre, path WHERE song.idPath=path.idPath AND song.idAlbum=album.idAlbum AND song.idGenre=genre.idGenre AND song.idArtist=artist.idArtist AND strTitle LIKE '{0}%'", SongTitle); + break; + case 1: + strSQL = String.Format("SELECT song.idSong, song.idArtist, artist.strArtist, song.idAlbum, album.strAlbum, song.idGenre, genre.strGenre, song.idPath, path.strPath, song.strTitle, song.iTrack, song.iDuration, song.iYear, song.strFileName, song.iTimesPlayed, song.iRating, song.favorite FROM song, album, artist, genre, path WHERE song.idPath=path.idPath AND song.idAlbum=album.idAlbum AND song.idGenre=genre.idGenre AND song.idArtist=artist.idArtist AND strTitle like '%{0}%'", SongTitle); + break; + case 2: + strSQL = String.Format("SELECT song.idSong, song.idArtist, artist.strArtist, song.idAlbum, album.strAlbum, song.idGenre, genre.strGenre, song.idPath, path.strPath, song.strTitle, song.iTrack, song.iDuration, song.iYear, song.strFileName, song.iTimesPlayed, song.iRating, song.favorite FROM song, album, artist, genre, path WHERE song.idPath=path.idPath AND song.idAlbum=album.idAlbum AND song.idGenre=genre.idGenre AND song.idArtist=artist.idArtist AND strTitle like '%{0}'", SongTitle); + break; + case 3: + strSQL = String.Format("SELECT song.idSong, song.idArtist, artist.strArtist, song.idAlbum, album.strAlbum, song.idGenre, genre.strGenre, song.idPath, path.strPath, song.strTitle, song.iTrack, song.iDuration, song.iYear, song.strFileName, song.iTimesPlayed, song.iRating, song.favorite FROM song, album, artist, genre, path WHERE song.idPath=path.idPath AND song.idAlbum=album.idAlbum AND song.idGenre=genre.idGenre AND song.idArtist=artist.idArtist AND strTitle like '{0}'", SongTitle); + break; + } + + SQLite.NET.SQLiteResultSet results; + results = MediaPortal.Music.Database.MusicDatabase.m_db.Execute(strSQL); + + for (int i = 0; i < results.Rows.Count; ++i) + { + MediaPortal.Music.Database.Song song = new MediaPortal.Music.Database.Song(); + + song.songId = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.idSong"); + song.artistId = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.idArtist"); + song.Artist = MediaPortal.Database.DatabaseUtility.Get(results, i, "artist.strArtist"); + song.albumId = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.idAlbum"); + song.Album = MediaPortal.Database.DatabaseUtility.Get(results, i, "album.strAlbum"); + song.genreId = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.idGenre"); + song.Genre = MediaPortal.Database.DatabaseUtility.Get(results, i, "genre.strGenre"); + song.Title = MediaPortal.Database.DatabaseUtility.Get(results, i, "song.strTitle"); + song.Track = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.iTrack"); + song.Duration = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.iDuration"); + song.Year = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.iYear"); + + string strFileName = MediaPortal.Database.DatabaseUtility.Get(results, i, "path.strPath"); + strFileName += MediaPortal.Database.DatabaseUtility.Get(results, i, "song.strFileName"); + song.FileName = strFileName; + + song.TimesPlayed = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.iTimesPlayed"); + song.Rating = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.iRating"); + song.Favorite = (int)Math.Floor(0.5d + Double.Parse(MediaPortal.Database.DatabaseUtility.Get(results, i, "song.favorite"))) != 0; ; + + songList.Add(song); + } + + return songList; + } + + public List<MediaPortal.Music.Database.Song> GetSongsByAlbum(int AlbumID) + { + //custom SQL as in-built function does not return songID + List<MediaPortal.Music.Database.Song> songList = new List<MediaPortal.Music.Database.Song>(); + + string strSQL = string.Empty; + strSQL = String.Format("SELECT song.idSong, song.idArtist, artist.strArtist, song.idAlbum, album.strAlbum, song.idGenre, genre.strGenre, song.idPath, path.strPath, song.strTitle, song.iTrack, song.iDuration, song.iYear, song.strFileName, song.iTimesPlayed, song.iRating, song.favorite FROM song, album, artist, genre, path WHERE song.idPath=path.idPath AND song.idAlbum=album.idAlbum AND song.idGenre=genre.idGenre AND song.idArtist=artist.idArtist AND song.idAlbum={0}", AlbumID); + + SQLite.NET.SQLiteResultSet results; + results = MediaPortal.Music.Database.MusicDatabase.m_db.Execute(strSQL); + + for (int i = 0; i < results.Rows.Count; ++i) + { + MediaPortal.Music.Database.Song song = new MediaPortal.Music.Database.Song(); + + song.songId = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.idSong"); + song.artistId = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.idArtist"); + song.Artist = MediaPortal.Database.DatabaseUtility.Get(results, i, "artist.strArtist"); + song.albumId = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.idAlbum"); + song.Album = MediaPortal.Database.DatabaseUtility.Get(results, i, "album.strAlbum"); + song.genreId = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.idGenre"); + song.Genre = MediaPortal.Database.DatabaseUtility.Get(results, i, "genre.strGenre"); + song.Title = MediaPortal.Database.DatabaseUtility.Get(results, i, "song.strTitle"); + song.Track = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.iTrack"); + song.Duration = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.iDuration"); + song.Year = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.iYear"); + + string strFileName = MediaPortal.Database.DatabaseUtility.Get(results, i, "path.strPath"); + strFileName += MediaPortal.Database.DatabaseUtility.Get(results, i, "song.strFileName"); + song.FileName = strFileName; + + song.TimesPlayed = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.iTimesPlayed"); + song.Rating = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.iRating"); + song.Favorite = (int)Math.Floor(0.5d + Double.Parse(MediaPortal.Database.DatabaseUtility.Get(results, i, "song.favorite"))) != 0; ; + + songList.Add(song); + } + + return songList; + } + + public List<MediaPortal.Music.Database.Song> GetSongsByArtist(int ArtistID) + { + List<MediaPortal.Music.Database.Song> songList = new List<MediaPortal.Music.Database.Song>(); + + string strSQL = string.Empty; + strSQL = String.Format("SELECT song.idSong, song.idArtist, artist.strArtist, song.idAlbum, album.strAlbum, song.idGenre, genre.strGenre, song.idPath, path.strPath, song.strTitle, song.iTrack, song.iDuration, song.iYear, song.strFileName, song.iTimesPlayed, song.iRating, song.favorite FROM song, album, artist, genre, path WHERE song.idPath=path.idPath AND song.idAlbum=album.idAlbum AND song.idGenre=genre.idGenre AND song.idArtist=artist.idArtist AND song.idArtist={0}", ArtistID); + + SQLite.NET.SQLiteResultSet results; + results = MediaPortal.Music.Database.MusicDatabase.m_db.Execute(strSQL); + + for (int i = 0; i < results.Rows.Count; ++i) + { + MediaPortal.Music.Database.Song song = new MediaPortal.Music.Database.Song(); + + song.songId = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.idSong"); + song.artistId = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.idArtist"); + song.Artist = MediaPortal.Database.DatabaseUtility.Get(results, i, "artist.strArtist"); + song.albumId = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.idAlbum"); + song.Album = MediaPortal.Database.DatabaseUtility.Get(results, i, "album.strAlbum"); + song.genreId = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.idGenre"); + song.Genre = MediaPortal.Database.DatabaseUtility.Get(results, i, "genre.strGenre"); + song.Title = MediaPortal.Database.DatabaseUtility.Get(results, i, "song.strTitle"); + song.Track = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.iTrack"); + song.Duration = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.iDuration"); + song.Year = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.iYear"); + + string strFileName = MediaPortal.Database.DatabaseUtility.Get(results, i, "path.strPath"); + strFileName += MediaPortal.Database.DatabaseUtility.Get(results, i, "song.strFileName"); + song.FileName = strFileName; + + song.TimesPlayed = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.iTimesPlayed"); + song.Rating = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.iRating"); + song.Favorite = (int)Math.Floor(0.5d + Double.Parse(MediaPortal.Database.DatabaseUtility.Get(results, i, "song.favorite"))) != 0; ; + + songList.Add(song); + } + + return songList; + } + + public List<MediaPortal.Music.Database.Song> GetSongsByGenre(int GenreID) + { + List<MediaPortal.Music.Database.Song> songList = new List<MediaPortal.Music.Database.Song>(); + + string strSQL = string.Empty; + strSQL = String.Format("SELECT song.idSong, song.idArtist, artist.strArtist, song.idAlbum, album.strAlbum, song.idGenre, genre.strGenre, song.idPath, path.strPath, song.strTitle, song.iTrack, song.iDuration, song.iYear, song.strFileName, song.iTimesPlayed, song.iRating, song.favorite FROM song, album, artist, genre, path WHERE song.idPath=path.idPath AND song.idAlbum=album.idAlbum AND song.idGenre=genre.idGenre AND song.idArtist=artist.idArtist AND song.idGenre={0}", GenreID); + + SQLite.NET.SQLiteResultSet results; + results = MediaPortal.Music.Database.MusicDatabase.m_db.Execute(strSQL); + + for (int i = 0; i < results.Rows.Count; ++i) + { + MediaPortal.Music.Database.Song song = new MediaPortal.Music.Database.Song(); + + song.songId = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.idSong"); + song.artistId = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.idArtist"); + song.Artist = MediaPortal.Database.DatabaseUtility.Get(results, i, "artist.strArtist"); + song.albumId = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.idAlbum"); + song.Album = MediaPortal.Database.DatabaseUtility.Get(results, i, "album.strAlbum"); + song.genreId = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.idGenre"); + song.Genre = MediaPortal.Database.DatabaseUtility.Get(results, i, "genre.strGenre"); + song.Title = MediaPortal.Database.DatabaseUtility.Get(results, i, "song.strTitle"); + song.Track = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.iTrack"); + song.Duration = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.iDuration"); + song.Year = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.iYear"); + + string strFileName = MediaPortal.Database.DatabaseUtility.Get(results, i, "path.strPath"); + strFileName += MediaPortal.Database.DatabaseUtility.Get(results, i, "song.strFileName"); + song.FileName = strFileName; + + song.TimesPlayed = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.iTimesPlayed"); + song.Rating = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.iRating"); + song.Favorite = (int)Math.Floor(0.5d + Double.Parse(MediaPortal.Database.DatabaseUtility.Get(results, i, "song.favorite"))) != 0; ; + + songList.Add(song); + } + + return songList; + } + + public List<MediaPortal.Music.Database.Song> GetSongsByYear(int Year) + { + List<MediaPortal.Music.Database.Song> songList = new List<MediaPortal.Music.Database.Song>(); + + string strSQL = string.Empty; + strSQL = String.Format("SELECT song.idSong, song.idArtist, artist.strArtist, song.idAlbum, album.strAlbum, song.idGenre, genre.strGenre, song.idPath, path.strPath, song.strTitle, song.iTrack, song.iDuration, song.iYear, song.strFileName, song.iTimesPlayed, song.iRating, song.favorite FROM song, album, artist, genre, path WHERE song.idPath=path.idPath AND song.idAlbum=album.idAlbum AND song.idGenre=genre.idGenre AND song.idArtist=artist.idArtist AND song.iYear={0}", Year); + + SQLite.NET.SQLiteResultSet results; + results = MediaPortal.Music.Database.MusicDatabase.m_db.Execute(strSQL); + + for (int i = 0; i < results.Rows.Count; ++i) + { + MediaPortal.Music.Database.Song song = new MediaPortal.Music.Database.Song(); + + song.songId = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.idSong"); + song.artistId = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.idArtist"); + song.Artist = MediaPortal.Database.DatabaseUtility.Get(results, i, "artist.strArtist"); + song.albumId = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.idAlbum"); + song.Album = MediaPortal.Database.DatabaseUtility.Get(results, i, "album.strAlbum"); + song.genreId = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.idGenre"); + song.Genre = MediaPortal.Database.DatabaseUtility.Get(results, i, "genre.strGenre"); + song.Title = MediaPortal.Database.DatabaseUtility.Get(results, i, "song.strTitle"); + song.Track = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.iTrack"); + song.Duration = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.iDuration"); + song.Year = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.iYear"); + + string strFileName = MediaPortal.Database.DatabaseUtility.Get(results, i, "path.strPath"); + strFileName += MediaPortal.Database.DatabaseUtility.Get(results, i, "song.strFileName"); + song.FileName = strFileName; + + song.TimesPlayed = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.iTimesPlayed"); + song.Rating = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "song.iRating"); + song.Favorite = (int)Math.Floor(0.5d + Double.Parse(MediaPortal.Database.DatabaseUtility.Get(results, i, "song.favorite"))) != 0; ; + + songList.Add(song); + } + + return songList; + } + + public List<ECP2Assembly.CustomMPObjects.MusicAlbum> GetAlbumsByArtist(int ArtistID) + { + List<ECP2Assembly.CustomMPObjects.MusicAlbum> albumList = new List<ECP2Assembly.CustomMPObjects.MusicAlbum>(); + + string strSQL = string.Empty; + strSQL = "SELECT DISTINCT idAlbum, strAlbum, idArtist, iNumArtists FROM album,song WHERE song.idAlbum=album.idAlbum AND song.idArtist=" + ArtistID.ToString() + " ORDER BY strAlbum ASC"; + + SQLite.NET.SQLiteResultSet results; + results = MediaPortal.Music.Database.MusicDatabase.m_db.Execute(strSQL); + + for (int i = 0; i < results.Rows.Count; ++i) + { + ECP2Assembly.CustomMPObjects.MusicAlbum album = new ECP2Assembly.CustomMPObjects.MusicAlbum(); + + album.AlbumID = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "album.idAlbum"); + album.AlbumName = MediaPortal.Database.DatabaseUtility.Get(results, i, "album.strAlbum"); + album.ArtistID = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "album.idArtist"); + album.NumOfArtists = MediaPortal.Database.DatabaseUtility.GetAsInt(results, i, "album.iNumArtists"); + + albumList.Add(album); + } + + return albumList; + } +#endregion + +#region Volume commands + public int GetVolumePercentage() + { + MediaPortal.Player.VolumeHandler volumeHandler = new MediaPortal.Player.VolumeHandler(); + + decimal tmpVolume; + decimal realVolume = volumeHandler.Volume; + tmpVolume = realVolume; + tmpVolume = tmpVolume / (volumeHandler.Maximum - volumeHandler.Minimum); + tmpVolume = tmpVolume * 100; + return (int)System.Math.Round(tmpVolume, 0); + } + + public bool SetVolumePercentage(int VolumePercent) + { + try + { + MediaPortal.Player.VolumeHandler volumeHandler = new MediaPortal.Player.VolumeHandler(); + + decimal tmpVolume; + tmpVolume = VolumePercent; + tmpVolume = tmpVolume / 100; + tmpVolume = tmpVolume * (volumeHandler.Maximum - volumeHandler.Minimum); + tmpVolume = tmpVolume + volumeHandler.Minimum; + + volumeHandler.Volume = (int)System.Math.Round(tmpVolume, 0); + + return true; + } + catch + { + return false; + } + } +#endregion + + #region ECP2 Version commands public string MPECP2Version { get Modified: trunk/source/ECP2WebService/App_Code/Service.cs =================================================================== --- trunk/source/ECP2WebService/App_Code/Service.cs 2006-08-13 12:40:07 UTC (rev 17) +++ trunk/source/ECP2WebService/App_Code/Service.cs 2006-08-19 17:27:28 UTC (rev 18) @@ -303,6 +303,30 @@ return GetEMPH().GetgPlayerProps(propName); } + + [WebMethod(Description = "This command tells the player to seek to a certain point in the item. This point must be expressed in seconds, and must be within the duration of the item. The duration can be checked by using the gPlayerProps method, with the parameter Duration.")] + public bool gPlayerSeekAbsolute(double TimePosition) + { + return GetEMPH().gPlayerSeekAbsolute(TimePosition); + } + + [WebMethod(Description = "This command tells the player to seek to a certain point in the item as a percentage. This point must be expressed as an integer between 0 and 100.")] + public bool gPlayerSeekAbsolutePercentage(int TimePositionPercentage) + { + return GetEMPH().gPlayerSeekAbsolutePercentage(TimePositionPercentage); + } + + [WebMethod(Description = "This command tells the player to seek to a certain point RELATIVE to the current position of the item. For example, if the value -10 was given, this would tell the player to go back 10 seconds. This point must be expressed in seconds, and must be within the duration of the item. The duration can be checked by using the gPlayerProps method, with the parameter Duration.")] + public bool gPlayerSeekRelative(double RelativeTimePosition) + { + return GetEMPH().gPlayerSeekRelative(RelativeTimePosition); + } + + [WebMethod(Description = "This command tells the player to seek to a RELATIVE certain point in the item as a percentage. Therefore if a value of 5 was given, the player would advance to a point 5% ahead of the current point. This point must be expressed as an integer between 0 and 100.")] + public bool gPlayerSeekRelativePercentage(int RelativeTimePositionPercentage) + { + return GetEMPH().gPlayerSeekRelativePercentage(RelativeTimePositionPercentage); + } #endregion #region scheduled recording commands @@ -1142,12 +1166,24 @@ playlistTypeResolve = (MediaPortal.Playlists.PlayListType)Enum.Parse(typeof(MediaPortal.Playlists.PlayListType),playlistType); - MediaPortal.Playlists.PlayList playlist; + ECP2Assembly.CustomMPObjects.PlayList playlist; playlist = GetEMPH().GetPlaylist(playlistTypeResolve); + ////maintain list of types that could exist in the MusicTag property + //System.Type[] musicTagTypes = new System.Type[1]; + //musicTagTypes[0] = typeof(MediaPortal.TagReader.MusicTag); + + // As MusicTag causes problems, set its XMLIgnore attribute to true + System.Xml.Serialization.XmlAttributeOverrides xmlOverrides = new System.Xml.Serialization.XmlAttributeOverrides(); + System.Xml.Serialization.XmlAttributes xmlAttributes; + + xmlAttributes = new System.Xml.Serialization.XmlAttributes(); + xmlAttributes.XmlIgnore = true; + xmlOverrides.Add(typeof(MediaPortal.Playlists.PlayListItem), "MusicTag", xmlAttributes); + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); - System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.Playlists.PlayListItem )); + System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.Playlists.PlayListItem), xmlOverrides); MediaPortal.Playlists.PlayListItem playlistItem; try @@ -1156,10 +1192,11 @@ xw.WriteStartElement("MPData"); xw.WriteStartElement("Playlist"); xw.WriteAttributeString("type", playlistType); + xw.WriteAttributeString("count", playlist.PlayListItems.Count.ToString()); - for (int i = 0; i <= playlist.Count - 1; i++) + for (int i = 0; i < playlist.PlayListItems.Count; i++) { - playlistItem = (MediaPortal.Playlists.PlayListItem)playlist[i]; + playlistItem = (MediaPortal.Playlists.PlayListItem)playlist.PlayListItems[i]; xs.Serialize(xw, playlistItem); } @@ -1313,6 +1350,593 @@ } #endregion + #region music commands + [WebMethod(Description = "This command returns a list of all the music albums in XML format.")] + public string GetAllAlbums() + { + List<ECP2Assembly.CustomMPObjects.MusicAlbum> albumList; + albumList = GetEMPH().GetAlbums(); + + if (albumList.Count == 0) return ""; + + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); + System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(ECP2Assembly.CustomMPObjects.MusicAlbum)); + ECP2Assembly.CustomMPObjects.MusicAlbum album; + + try + { + xw.WriteStartDocument(); + xw.WriteStartElement("MPData"); + xw.WriteStartElement("MusicAlbums"); + + for (int i = 0; i <= albumList.Count - 1; i++) + { + album = (ECP2Assembly.CustomMPObjects.MusicAlbum)albumList[i]; + xs.Serialize(xw, album); + } + + xw.WriteEndElement(); + xw.WriteEndElement(); + xw.WriteEndDocument(); + + xw.Flush(); + } + catch (Exception ex) + { + return ex.ToString(); + } + + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); + } + + [WebMethod(Description = "This command searches the album name field and returns a list of the matching music albums in XML format. The SearchType parameter can take: wildcardatend, wildcardatstartend, wildcardatstart, or exact.")] + public string GetAlbumsBySearch(string SearchType, string AlbumName) + { + List<ECP2Assembly.CustomMPObjects.MusicAlbum> albumList; + albumList = GetEMPH().GetAlbums(SearchType,AlbumName); + + if (albumList.Count == 0) return ""; + + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); + System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(ECP2Assembly.CustomMPObjects.MusicAlbum)); + ECP2Assembly.CustomMPObjects.MusicAlbum album; + + try + { + xw.WriteStartDocument(); + xw.WriteStartElement("MPData"); + xw.WriteStartElement("MusicAlbums"); + + for (int i = 0; i <= albumList.Count - 1; i++) + { + album = (ECP2Assembly.CustomMPObjects.MusicAlbum)albumList[i]; + xs.Serialize(xw, album); + } + + xw.WriteEndElement(); + xw.WriteEndElement(); + xw.WriteEndDocument(); + + xw.Flush(); + } + catch (Exception ex) + { + return ex.ToString(); + } + + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); + } + + [WebMethod(Description = "This command returns a list of all the music artists in XML format.")] + public string GetAllArtists() + { + List<ECP2Assembly.CustomMPObjects.MusicArtist> artistList; + artistList = GetEMPH().GetArtists(); + + if (artistList.Count == 0) return ""; + + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); + System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(ECP2Assembly.CustomMPObjects.MusicArtist)); + ECP2Assembly.CustomMPObjects.MusicArtist artist; + + try + { + xw.WriteStartDocument(); + xw.WriteStartElement("MPData"); + xw.WriteStartElement("MusicArtists"); + + for (int i = 0; i <= artistList.Count - 1; i++) + { + artist = (ECP2Assembly.CustomMPObjects.MusicArtist)artistList[i]; + xs.Serialize(xw, artist); + } + + xw.WriteEndElement(); + xw.WriteEndElement(); + xw.WriteEndDocument(); + + xw.Flush(); + } + catch (Exception ex) + { + return ex.ToString(); + } + + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); + } + + [WebMethod(Description = "This command searches the artist name field and returns a list of the matching music artists in XML format. The SearchType parameter can take: wildcardatend, wildcardatstartend, wildcardatstart, or exact.")] + public string GetArtistsBySearch(string SearchType, string ArtistName) + { + List<ECP2Assembly.CustomMPObjects.MusicArtist> artistList; + artistList = GetEMPH().GetArtists(SearchType, ArtistName); + + if (artistList.Count == 0) return ""; + + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); + System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(ECP2Assembly.CustomMPObjects.MusicArtist)); + ECP2Assembly.CustomMPObjects.MusicArtist artist; + + try + { + xw.WriteStartDocument(); + xw.WriteStartElement("MPData"); + xw.WriteStartElement("MusicArtists"); + + for (int i = 0; i <= artistList.Count - 1; i++) + { + artist = (ECP2Assembly.CustomMPObjects.MusicArtist)artistList[i]; + xs.Serialize(xw, artist); + } + + xw.WriteEndElement(); + xw.WriteEndElement(); + xw.WriteEndDocument(); + + xw.Flush(); + } + catch (Exception ex) + { + return ex.ToString(); + } + + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); + } + + [WebMethod(Description = "This command returns a list of all the music genres in XML format.")] + public string GetAllGenres() + { + List<ECP2Assembly.CustomMPObjects.MusicGenre> genreList; + genreList = GetEMPH().GetMusicGenres(); + + if (genreList.Count == 0) return ""; + + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); + System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(ECP2Assembly.CustomMPObjects.MusicGenre)); + ECP2Assembly.CustomMPObjects.MusicGenre genre; + + try + { + xw.WriteStartDocument(); + xw.WriteStartElement("MPData"); + xw.WriteStartElement("MusicGenres"); + + for (int i = 0; i <= genreList.Count - 1; i++) + { + genre = (ECP2Assembly.CustomMPObjects.MusicGenre)genreList[i]; + xs.Serialize(xw, genre); + } + + xw.WriteEndElement(); + xw.WriteEndElement(); + xw.WriteEndDocument(); + + xw.Flush(); + } + catch (Exception ex) + { + return ex.ToString(); + } + + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); + } + + [WebMethod(Description = "This command searches the genre name field and returns a list of the matching music genres in XML format. The SearchType parameter can take: wildcardatend, wildcardatstartend, wildcardatstart, or exact.")] + public string GetGenresBySearch(string SearchType, string GenreName) + { + List<ECP2Assembly.CustomMPObjects.MusicGenre> genreList; + genreList = GetEMPH().GetMusicGenres(SearchType, GenreName); + + if (genreList.Count == 0) return ""; + + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); + System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(ECP2Assembly.CustomMPObjects.MusicGenre)); + ECP2Assembly.CustomMPObjects.MusicGenre genre; + + try + { + xw.WriteStartDocument(); + xw.WriteStartElement("MPData"); + xw.WriteStartElement("MusicGenres"); + + for (int i = 0; i <= genreList.Count - 1; i++) + { + genre = (ECP2Assembly.CustomMPObjects.MusicGenre)genreList[i]; + xs.Serialize(xw, genre); + } + + xw.WriteEndElement(); + xw.WriteEndElement(); + xw.WriteEndDocument(); + + xw.Flush(); + } + catch (Exception ex) + { + return ex.ToString(); + } + + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); + } + + [WebMethod(Description = "This command returns the total number of songs in MP's database.")] + public int GetTotalNumberOfSongs() + { + return GetEMPH().GetNumOfSongs(); + } + + [WebMethod(Description = "This command returns a random song in XML format.")] + public string GetRandomSong() + { + MediaPortal.Music.Database.Song song; + song = GetEMPH().GetRandomSong(); + + if (song == null) return ""; + + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); + System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.Music.Database.Song)); + + try + { + xw.WriteStartDocument(); + xw.WriteStartElement("MPData"); + xw.WriteStartElement("MusicSongs"); + + xs.Serialize(xw, song); + + xw.WriteEndElement(); + xw.WriteEndElement(); + xw.WriteEndDocument(); + + xw.Flush(); + } + catch (Exception ex) + { + return ex.ToString(); + } + + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); + } + + [WebMethod(Description = "This command returns the song with the matching song ID in XML format.")] + public string GetSongByID(int SongID) + { + MediaPortal.Music.Database.Song song; + song = GetEMPH().GetSong(SongID ); + + if (song == null) return ""; + + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); + System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.Music.Database.Song)); + + try + { + xw.WriteStartDocument(); + xw.WriteStartElement("MPData"); + xw.WriteStartElement("MusicSongs"); + + xs.Serialize(xw, song); + + xw.WriteEndElement(); + xw.WriteEndElement(); + xw.WriteEndDocument(); + + xw.Flush(); + } + catch (Exception ex) + { + return ex.ToString(); + } + + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); + } + + [WebMethod(Description = "This command returns the song with the matching song title in XML format. Note if there is more than one song with the title, it will only return the first one.")] + public string GetSongByTitle(string SongTitle) + { + MediaPortal.Music.Database.Song song; + song = GetEMPH().GetSong(SongTitle); + + if (song == null) return ""; + + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); + System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.Music.Database.Song)); + + try + { + xw.WriteStartDocument(); + xw.WriteStartElement("MPData"); + xw.WriteStartElement("MusicSongs"); + + xs.Serialize(xw, song); + + xw.WriteEndElement(); + xw.WriteEndElement(); + xw.WriteEndDocument(); + + xw.Flush(); + } + catch (Exception ex) + { + return ex.ToString(); + } + + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); + } + + [WebMethod(Description = "This command returns the song with the matching song title in XML format. Note if there is more than one song with the title, it will only return the first one.")] + public string GetSongByFileName(string SongFileName) + { + MediaPortal.Music.Database.Song song; + song = GetEMPH().GetSongByFileName(SongFileName); + + if (song == null) return ""; + + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); + System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.Music.Database.Song)); + + try + { + xw.WriteStartDocument(); + xw.WriteStartElement("MPData"); + xw.WriteStartElement("MusicSongs"); + + xs.Serialize(xw, song); + + xw.WriteEndElement(); + xw.WriteEndElement(); + xw.WriteEndDocument(); + + xw.Flush(); + } + catch (Exception ex) + { + return ex.ToString(); + } + + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); + } + + [WebMethod(Description = "This command returns a list of the songs under the specified album ID in XML format.")] + public string GetSongsByAlbum(int AlbumID) + { + List<MediaPortal.Music.Database.Song> songList; + songList = GetEMPH().GetSongsByAlbum(AlbumID); + + ... [truncated message content] |
From: <sam...@us...> - 2006-08-13 12:40:33
|
Revision: 17 Author: samuel337 Date: 2006-08-13 05:40:07 -0700 (Sun, 13 Aug 2006) ViewCVS: http://svn.sourceforge.net/mp-webinterface/?rev=17&view=rev Log Message: ----------- Fixed minor bug in LaunchMP function in WS; updated setup scripts and files Modified Paths: -------------- trunk/MPWebControl Setup Project/compress MPWebControl.bat trunk/MPWebControl Setup Project/install generation checklist.txt trunk/MPWebControl Setup Project/readme.txt trunk/MPWebControl Setup Project/setup.iss trunk/source/ECP2Plugin/ECP2Plugin.csproj trunk/source/ECP2Plugin/Properties/AssemblyInfo.cs trunk/source/ECP2WebService/App_Code/Service.cs trunk/source/ECP2WebService/Web.config trunk/source/MPW.suo Modified: trunk/MPWebControl Setup Project/compress MPWebControl.bat =================================================================== --- trunk/MPWebControl Setup Project/compress MPWebControl.bat 2006-06-19 12:31:08 UTC (rev 16) +++ trunk/MPWebControl Setup Project/compress MPWebControl.bat 2006-08-13 12:40:07 UTC (rev 17) @@ -1 +1 @@ -"c:\Program Files\7-Zip\7z" a -t7z -mx=7 -sfx"C:\Program Files\7-Zip\7zCon.sfx" ".\MPWebControl.exe" ".\MPWebControl\*" \ No newline at end of file +"c:\Program Files\7-Zip\7z" a -t7z -mx=7 -sfx"C:\Program Files\7-Zip\7zCon.sfx" -i!"MPWebControl\*" -xr!*\.svn\* ".\MPWebControl.exe" \ No newline at end of file Modified: trunk/MPWebControl Setup Project/install generation checklist.txt =================================================================== --- trunk/MPWebControl Setup Project/install generation checklist.txt 2006-06-19 12:31:08 UTC (rev 16) +++ trunk/MPWebControl Setup Project/install generation checklist.txt 2006-08-13 12:40:07 UTC (rev 17) @@ -2,6 +2,7 @@ - remove all MP assemblies from MPECP2WS's bin folder except DirectShowLib.dll (for GetChannel functions) - ensure latest versions of webscheduler, MPECP2WS, MPWApplication and MPWPathFix are in the MPWebControl folder - ensure httpd,conf, ssl,conf, php.ini, ECP2Assembly.dll.config have the PathFix variables in them +- swap over web.config in MPExtControlWS for release version? - compress MPWebControl using batch file (requires 7-Zip) - update readme file - build setup using Inno Setup 5.1.5 (check version details) Modified: trunk/MPWebControl Setup Project/readme.txt =================================================================== --- trunk/MPWebControl Setup Project/readme.txt 2006-06-19 12:31:08 UTC (rev 16) +++ trunk/MPWebControl Setup Project/readme.txt 2006-08-13 12:40:07 UTC (rev 17) @@ -1,6 +1,10 @@ -MediaPortal Webinterface by Maschine and Sam - Release 4 -======================================================== +MediaPortal Webinterface by Maschine and Sam - Release 5 Beta +============================================================= +The readme file below has not been edited for this new version - please ignore. + +------------------------------------------------------------------------------- + PLEASE NOTE: This release only works with MP 0.1.0.10 or above as the TVDatabase has changed. ALSO PLEASE NOTE: The default port has changed from port 80 to port 81. Therefore, to access the web interface, you need to goto http://<MP computer name>:81/ , e.g. if the MP computer name was MPComputer, then you would go to http://MPComputer:81 for the web interface. Modified: trunk/MPWebControl Setup Project/setup.iss =================================================================== --- trunk/MPWebControl Setup Project/setup.iss 2006-06-19 12:31:08 UTC (rev 16) +++ trunk/MPWebControl Setup Project/setup.iss 2006-08-13 12:40:07 UTC (rev 17) @@ -10,7 +10,7 @@ [Dirs] Name: {app}\MPWebControl [Run] -Filename: {app}\MPWebControl\MPWebControl.exe; WorkingDir: {app}\MPWebControl; StatusMsg: Extracting MediaPortal Web Control Files...; Flags: runminimized +Filename: {app}\MPWebControl\MPWebControl.exe; WorkingDir: {app}; StatusMsg: Extracting MediaPortal Web Control Files...; Flags: runminimized Filename: {app}\MPWebControl\passwordconfig.bat; WorkingDir: {app}\MPWebControl; StatusMsg: Adding password security to web server config file...; Flags: runminimized; Tasks: usepassword Filename: {app}\MPWebControl\resetpwd.bat; WorkingDir: {app}\MPWebControl; StatusMsg: Setting MP web interface security...; Tasks: usepassword; Flags: runmaximized Filename: {app}\MPWebControl\MPWPathFix.exe; Parameters: 81; WorkingDir: {app}\MPWebControl; StatusMsg: Configuring web server configuration files...; Flags: runminimized @@ -25,7 +25,7 @@ ReadyMemoDir=MediaPortal location: ConfirmUninstall=Are you sure you want to completely remove %1 and all of its components? Note that all files in the MPWebControl folder will be removed - so any changes would be lost (e.g. any alternate tv logos). [Setup] -OutputDir=C:\Documents and Settings\Sam\Desktop\MediaPortal stuff\MPWebControl Setup Project\Final +OutputDir=C:\Documents and Settings\Sam\Desktop\MediaPortal stuff\MPW\trunk\MPWebControl Setup Project\Final VersionInfoVersion=1.5.0 VersionInfoCompany=Maschine & Sam VersionInfoDescription=MediaPortal Web-Interface R5 Beta Modified: trunk/source/ECP2Plugin/ECP2Plugin.csproj =================================================================== --- trunk/source/ECP2Plugin/ECP2Plugin.csproj 2006-06-19 12:31:08 UTC (rev 16) +++ trunk/source/ECP2Plugin/ECP2Plugin.csproj 2006-08-13 12:40:07 UTC (rev 17) @@ -32,10 +32,6 @@ <SpecificVersion>False</SpecificVersion> <HintPath>..\..\..\..\MediaPortal Source\mediaportal\Core\bin\Debug\Core.dll</HintPath> </Reference> - <Reference Include="ECP2Assembly, Version=1.1.2.43068, Culture=neutral, processorArchitecture=MSIL"> - <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\ECP2Assembly\ECP2Assembly\bin\Debug\ECP2Assembly.dll</HintPath> - </Reference> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Drawing" /> @@ -61,6 +57,12 @@ <DependentUpon>frmSetup.cs</DependentUpon> </EmbeddedResource> </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\ECP2Assembly\ECP2Assembly.csproj"> + <Project>{718EDE2B-7FB8-4C40-8D32-0EED5C289B0F}</Project> + <Name>ECP2Assembly</Name> + </ProjectReference> + </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. Modified: trunk/source/ECP2Plugin/Properties/AssemblyInfo.cs =================================================================== --- trunk/source/ECP2Plugin/Properties/AssemblyInfo.cs 2006-06-19 12:31:08 UTC (rev 16) +++ trunk/source/ECP2Plugin/Properties/AssemblyInfo.cs 2006-08-13 12:40:07 UTC (rev 17) @@ -31,5 +31,5 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.1.2.*")] -[assembly: AssemblyFileVersion("1.1.2.*")] +[assembly: AssemblyVersion("1.1.2.0")] +[assembly: AssemblyFileVersion("1.1.2.0")] Modified: trunk/source/ECP2WebService/App_Code/Service.cs =================================================================== --- trunk/source/ECP2WebService/App_Code/Service.cs 2006-06-19 12:31:08 UTC (rev 16) +++ trunk/source/ECP2WebService/App_Code/Service.cs 2006-08-13 12:40:07 UTC (rev 17) @@ -40,7 +40,7 @@ try { - xmlDoc.Load(ECP2Assembly.MPHandler.ConfigFileName); + xmlDoc.Load(Server.MapPath(@"config/ECP2Assembly.dll.config")); System.Xml.XmlNodeList xmlNodeList = xmlDoc.SelectNodes(@"configuration/appSettings/add[@key='MPDirectory']"); if (xmlNodeList.Count > 0) Modified: trunk/source/ECP2WebService/Web.config =================================================================== --- trunk/source/ECP2WebService/Web.config 2006-06-19 12:31:08 UTC (rev 16) +++ trunk/source/ECP2WebService/Web.config 2006-08-13 12:40:07 UTC (rev 17) @@ -27,7 +27,8 @@ <add assembly="System.Management, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> <add assembly="Microsoft.VisualC, Version=8.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> - <add assembly="System.ServiceProcess, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies></compilation> + <add assembly="System.ServiceProcess, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> + <add assembly="Microsoft.mshtml, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies></compilation> <!-- The <authentication> section enables configuration of the security authentication mode used by Modified: trunk/source/MPW.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sam...@us...> - 2006-06-19 12:31:24
|
Revision: 16 Author: samuel337 Date: 2006-06-19 05:31:08 -0700 (Mon, 19 Jun 2006) ViewCVS: http://svn.sourceforge.net/mp-webinterface/?rev=16&view=rev Log Message: ----------- implemented AddTVNotify, DeleteTVNotify, GetTVNotify, GetTVNotifies, GetTVGroups, GetTVGroup, GetProgramsByGenre, GetChannelsByGroupID, GetProgramsBySearch functions. TVNotify/TVGroup functions will not work until required MP changes are made and committed. LaunchMP has also been recoded. Modified Paths: -------------- trunk/source/ECP2Assembly/clsMPHandler.cs trunk/source/ECP2WebService/App_Code/Service.cs Modified: trunk/source/ECP2Assembly/clsMPHandler.cs =================================================================== --- trunk/source/ECP2Assembly/clsMPHandler.cs 2006-06-18 15:07:25 UTC (rev 15) +++ trunk/source/ECP2Assembly/clsMPHandler.cs 2006-06-19 12:31:08 UTC (rev 16) @@ -348,7 +348,7 @@ return MediaPortal.Player.g_Player.Playing; case "Speed": - return MediaPortal.Player.g_Player.Speed; + return MediaPortal.Player.g_Player.Speed; case "Stopped": return MediaPortal.Player.g_Player.Stopped; @@ -430,62 +430,17 @@ return recList; } - public bool AddRecording(string Title, string Channel, DateTime StartTime, DateTime EndTime, string RecType) - { - try - { - MediaPortal.TV.Database.TVRecording rec = new MediaPortal.TV.Database.TVRecording(); - string strRecType; - Array arrRecType; - bool recTypeFound = false; - - rec.Channel = Channel; - rec.Title = Title; - rec.Start = DateToLong(StartTime); - rec.End = DateToLong(EndTime); - - //resolve recording type string into the correct enum - arrRecType = Enum.GetValues(typeof(MediaPortal.TV.Database.TVRecording.RecordingType)); - - for (int i = arrRecType.GetLowerBound(0); i <= arrRecType.GetUpperBound(0); i++) - { - strRecType = Enum.GetName(typeof(MediaPortal.TV.Database.TVRecording.RecordingType), arrRecType.GetValue(i)); - if (strRecType == RecType) - { - rec.RecType = (MediaPortal.TV.Database.TVRecording.RecordingType)arrRecType.GetValue(i); - recTypeFound = true; - break; - } - } - - //if the specified rec-type string does not match one of the enum values, then set rectype to Once - if (recTypeFound == false) - { - rec.RecType = MediaPortal.TV.Database.TVRecording.RecordingType.Once; - } - - MediaPortal.TV.Database.TVDatabase.AddRecording(ref rec); - MediaPortal.GUI.Library.Log.Write("ECP2 - AddRecording: recording added."); - return true; - } - catch (Exception ex) - { - MediaPortal.GUI.Library.Log.Write("ECP2 Error: " + ex.ToString()); - return false; - } - } - public bool AddRecording(MediaPortal.TV.Database.TVRecording rec) { try { MediaPortal.TV.Database.TVDatabase.AddRecording(ref rec); - MediaPortal.GUI.Library.Log.Write("ECP2 - AddRecording: recording added."); + MediaPortal.GUI.Library.Log.Write("ECP2 - AddRecording: recording ({0}, {1}, {2}) added.", rec.Title, rec.Channel, rec.StartTime.ToString()); return true; } catch (Exception ex) { - MediaPortal.GUI.Library.Log.Write("ECP2 Error: " + ex.ToString()); + MediaPortal.GUI.Library.Log.Write("ECP2 - AddRecording: " + ex.ToString()); return false; } } @@ -495,12 +450,12 @@ try { MediaPortal.TV.Database.TVDatabase.UpdateRecording(rec, changeReason); - MediaPortal.GUI.Library.Log.Write("ECP2 - UpdateRecording: recording updated."); + MediaPortal.GUI.Library.Log.Write("ECP2 - UpdateRecording: recording ({0}, {1}, {2}) updated.", rec.Title, rec.Channel, rec.StartTime.ToString()); return true; } catch (Exception ex) { - MediaPortal.GUI.Library.Log.Write("ECP2 Error: " + ex.ToString()); + MediaPortal.GUI.Library.Log.Write("ECP2 - UpdateRecording: " + ex.ToString()); return false; } } @@ -529,12 +484,13 @@ if (ScheduleToDel ==true) { MediaPortal.TV.Database.TVDatabase.RemoveRecording(rec); + MediaPortal.GUI.Library.Log.Write("ECP2 - DelRecording: recording ({0}, {1}, {2}) deleted.", rec.Title, rec.Channel, rec.StartTime.ToString()); return true; } } catch (Exception ex) { - MediaPortal.GUI.Library.Log.WriteFile(Log.LogType.Log, "ECP2 - DelRecording: exception - " + ex.ToString()); + MediaPortal.GUI.Library.Log.WriteFile(Log.LogType.Log, "ECP2 - DelRecording: " + ex.ToString()); } return false; @@ -565,13 +521,14 @@ if (ScheduleToDel==true) { MediaPortal.TV.Database.TVDatabase.RemoveRecording(rec); + MediaPortal.GUI.Library.Log.Write("ECP2 - DelRecording: recording ({0}, {1}, {2}) deleted.", rec.Title, rec.Channel, rec.StartTime.ToString()); return true; } } catch (Exception ex) { - MediaPortal.GUI.Library.Log.WriteFile(Log.LogType.Log, "ECP2 - DelRecording: exception - " + ex.ToString()); + MediaPortal.GUI.Library.Log.WriteFile(Log.LogType.Log, "ECP2 - DelRecording: " + ex.ToString()); } return false; @@ -637,6 +594,14 @@ return chnList; } + public List<MediaPortal.TV.Database.TVChannel> GetChannels(int GroupID) + { + List<MediaPortal.TV.Database.TVChannel> chanList = new List<MediaPortal.TV.Database.TVChannel>(); + MediaPortal.TV.Database.TVDatabase.GetTVChannelsForGroup(GroupID, chanList); + + return chanList; + } + public MediaPortal.TV.Database.TVChannel GetChannel(int ChannelID) { return MediaPortal.TV.Database.TVDatabase.GetChannelById(ChannelID); @@ -658,6 +623,14 @@ return progList; } + public List<MediaPortal.TV.Database.TVProgram> GetPrograms(string GenreName) + { + List<MediaPortal.TV.Database.TVProgram> progList = new List<MediaPortal.TV.Database.TVProgram>(); + MediaPortal.TV.Database.TVDatabase.GetProgramsPerGenre(GenreName, progList); + + return progList; + } + public List<MediaPortal.TV.Database.TVProgram> GetPrograms(DateTime StartDateTime, DateTime EndDateTime) { List<MediaPortal.TV.Database.TVProgram> progList = new List<MediaPortal.TV.Database.TVProgram>(); @@ -666,6 +639,48 @@ return progList; } + public List<MediaPortal.TV.Database.TVProgram> GetPrograms(DateTime StartDateTime, DateTime EndDateTime, string SearchField, string SearchType, string SearchCriteria, string ChannelName) + { + int SearchKind; + + //convert SearchType to SearchKind + switch (SearchType.ToLower()) + { + case "wildcardatend": + SearchKind = 0; + break; + + case "wildcardatstartend": + SearchKind = 1; + break; + + case "wildcardatstart": + SearchKind = 2; + break; + + case "exact": + SearchKind = 3; + break; + + default: + SearchKind = 0; + break; + } + + List<MediaPortal.TV.Database.TVProgram> progList = new List<MediaPortal.TV.Database.TVProgram>(); + + if (SearchField.ToLower() == "description") + { + MediaPortal.TV.Database.TVDatabase.SearchProgramsByDescription(DateToLong(StartDateTime), DateToLong(EndDateTime), ref progList, SearchKind, SearchCriteria); + } + else //title + { + MediaPortal.TV.Database.TVDatabase.SearchPrograms(DateToLong(StartDateTime), DateToLong(EndDateTime), ref progList, SearchKind, SearchCriteria, ChannelName); + } + + return progList; + } + public List<MediaPortal.TV.Database.TVProgram> GetPrograms() { List<MediaPortal.TV.Database.TVProgram> progList = new List<MediaPortal.TV.Database.TVProgram>(); @@ -688,6 +703,216 @@ { return GetChannel(ChannelID).Name ; } + + public bool AddTVNotify(string ChannelName, DateTime StartDateTime) + { + try + { + MediaPortal.TV.Database.TVNotify notify = new MediaPortal.TV.Database.TVNotify(); + notify.Program = MediaPortal.TV.Database.TVDatabase.GetProgramByTime(ChannelName, StartDateTime); + + if (notify.Program == null) + { + throw new Exception("Could not locate a program matching the parameters given."); + } + + MediaPortal.TV.Database.TVDatabase.AddNotify(notify); + MediaPortal.GUI.Library.Log.Write("ECP2 - AddTVNotify: TVNotify ({0}, {1}) added.",notify.Program.Title,notify.Program.StartTime.ToString()); + return true; + } + catch (Exception ex) + { + MediaPortal.GUI.Library.Log.Write("ECP2 - AddTVNotify: " + ex.ToString()); + return false; + } + } + + public bool DeleteTVNotify(string ChannelName, DateTime StartDateTime) + { + try + { + MediaPortal.TV.Database.TVNotify notify = GetTVNotify(ChannelName, StartDateTime); + + if (notify == null) + { + return false; + } + + MediaPortal.TV.Database.TVDatabase.DeleteNotify(notify); + MediaPortal.GUI.Library.Log.Write("ECP2 - DeleteTVNotify: TVNotify ({0}, {1}) deleted.", notify.Program.Title, notify.Program.StartTime.ToString()); + return true; + } + catch (Exception ex) + { + MediaPortal.GUI.Library.Log.Write("ECP2 - DeleteTVNotify: " + ex.ToString()); + return false; + } + } + + public bool DeleteTVNotify(int TVNotifyID) + { + try + { + MediaPortal.TV.Database.TVNotify notify = GetTVNotify(TVNotifyID); + + if (notify == null) + { + return false; + } + + MediaPortal.TV.Database.TVDatabase.DeleteNotify(notify); + MediaPortal.GUI.Library.Log.Write("ECP2 - DeleteTVNotify: TVNotify ({0}, {1}) deleted.", notify.Program.Title, notify.Program.StartTime.ToString()); + return true; + } + catch (Exception ex) + { + MediaPortal.GUI.Library.Log.Write("ECP2 - DeleteTVNotify: " + ex.ToString()); + return false; + } + } + + public MediaPortal.TV.Database.TVNotify GetTVNotify(string ChannelName, DateTime StartDateTime) + { + try + { + MediaPortal.TV.Database.TVNotify notify = new MediaPortal.TV.Database.TVNotify(); + notify.Program = MediaPortal.TV.Database.TVDatabase.GetProgramByTime(ChannelName, StartDateTime); + + if (notify.Program == null) + { + throw new Exception("Could not locate a program matching the parameters given."); + } + + MediaPortal.TV.Database.TVDatabase.GetNotify(notify); + return notify; + } + catch (Exception ex) + { + MediaPortal.GUI.Library.Log.Write("ECP2 - GetNotify: " + ex.ToString()); + return null; + } + } + + public MediaPortal.TV.Database.TVNotify GetTVNotify(int TVNotifyID) + { + try + { + bool NotifyToDel = false; + + MediaPortal.TV.Database.TVNotify notify = new MediaPortal.TV.Database.TVNotify(); + List<MediaPortal.TV.Database.TVNotify> TVNotifyList = GetTVNotifies(); + + for (int i = 0; i < TVNotifyList.Count; i++) + { + notify = (MediaPortal.TV.Database.TVNotify)TVNotifyList[i]; + if (notify.ID == TVNotifyID) + { + NotifyToDel = true; + break; + } + } + + if (NotifyToDel == true) + { + return notify; + } + else + { + return null; + } + } + catch (Exception ex) + { + MediaPortal.GUI.Library.Log.WriteFile(Log.LogType.Log, "ECP2 - GetTVNotify: " + ex.ToString()); + return null; + } + } + + public List<MediaPortal.TV.Database.TVNotify> GetTVNotifies() + { + List<MediaPortal.TV.Database.TVNotify> TVNotifyList = new List<MediaPortal.TV.Database.TVNotify>(); + MediaPortal.TV.Database.TVDatabase.GetNotifies(TVNotifyList, true); + + return TVNotifyList; + } + + public List<MediaPortal.TV.Database.TVGroup> GetTVGroups() + { + List<MediaPortal.TV.Database.TVGroup> TVGroupList = new List<MediaPortal.TV.Database.TVGroup>(); + MediaPortal.TV.Database.TVDatabase.GetGroups(ref TVGroupList); + + return TVGroupList; + } + + public MediaPortal.TV.Database.TVGroup GetTVGroup(string GroupName) + { + try + { + bool foundTVGroup = false; + + MediaPortal.TV.Database.TVGroup group = new MediaPortal.TV.Database.TVGroup(); + List<MediaPortal.TV.Database.TVGroup> TVGroupList = GetTVGroups(); + + for (int i = 0; i < TVGroupList.Count; i++) + { + group = (MediaPortal.TV.Database.TVGroup)TVGroupList[i]; + if (group.GroupName == GroupName) + { + foundTVGroup = true; + break; + } + } + + if (foundTVGroup == true) + { + return group; + } + else + { + return null; + } + } + catch (Exception ex) + { + MediaPortal.GUI.Library.Log.WriteFile(Log.LogType.Log, "ECP2 - GetTVGroup: " + ex.ToString()); + return null; + } + } + + public MediaPortal.TV.Database.TVGroup GetTVGroup(int GroupID) + { + try + { + bool foundTVGroup=false; + + MediaPortal.TV.Database.TVGroup group = new MediaPortal.TV.Database.TVGroup(); + List<MediaPortal.TV.Database.TVGroup> TVGroupList = GetTVGroups(); + + for (int i = 0; i < TVGroupList.Count; i++) + { + group = (MediaPortal.TV.Database.TVGroup)TVGroupList[i]; + if (group.ID == GroupID) + { + foundTVGroup = true; + break; + } + } + + if (foundTVGroup == true) + { + return group; + } + else + { + return null; + } + } + catch (Exception ex) + { + MediaPortal.GUI.Library.Log.WriteFile(Log.LogType.Log, "ECP2 - GetTVGroup: " + ex.ToString()); + return null; + } + } #endregion #region Recorded TV commands @@ -828,6 +1053,8 @@ { return false; } + + break; } } Modified: trunk/source/ECP2WebService/App_Code/Service.cs =================================================================== --- trunk/source/ECP2WebService/App_Code/Service.cs 2006-06-18 15:07:25 UTC (rev 15) +++ trunk/source/ECP2WebService/App_Code/Service.cs 2006-06-19 12:31:08 UTC (rev 16) @@ -7,7 +7,7 @@ namespace ECP2WebService { - [WebService(Name = "MediaPortal External Control II Web Service", Description = "This web service allows you to communicate and control MediaPortal. You will need to have MediaPortal running, and the External Control II plugin needs to be loaded.", Namespace = "http://www.team-mediaportal.com/ECP2WebService/")] + [WebService(Name = "MediaPortal External Control II Web Service", Description = "This web service allows you to communicate and control MediaPortal. You will need to have MediaPortal running, and the External Control II plugin needs to be loaded.<br><br>For all fields requiring date/time entry, use this format: yyyy-mm-ddThh:mm:ss.sssssss+tz:tz, e.g. 2006-06-19T21:40:00.0000000+10:00 for 19th June 2006 9:40:00.0000000 PM +10:00.", Namespace = "http://www.team-mediaportal.com/ECP2WebService/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] public class Service : System.Web.Services.WebService @@ -31,10 +31,9 @@ { string appPath = ""; - if (!System.IO.File.Exists(ECP2Assembly.MPHandler.ConfigFileName)) + if (!System.IO.File.Exists(Server.MapPath(@"config/ECP2Assembly.dll.config"))) { - throw new Exception(@"Could not access ECP2Assembly's config file expected at (" + ECP2Assembly.MPHandler.ConfigFileName + @") to get MP path."); - return false; + throw new Exception(@"Could not access ECP2Assembly's config file expected at (" + Server.MapPath(@"config/ECP2Assembly.dll.config") + @") to get MP path."); } System.Xml.XmlDocument xmlDoc = new System.Xml.XmlDocument(); @@ -42,7 +41,7 @@ try { xmlDoc.Load(ECP2Assembly.MPHandler.ConfigFileName); - System.Xml.XmlNodeList xmlNodeList = xmlDoc.SelectNodes("configuration/appSettings/add[@key='MPPath']"); + System.Xml.XmlNodeList xmlNodeList = xmlDoc.SelectNodes(@"configuration/appSettings/add[@key='MPDirectory']"); if (xmlNodeList.Count > 0) { @@ -53,19 +52,16 @@ else { throw new Exception(@"MPPath could not be located in the ECP2Assembly config file located at: " + ECP2Assembly.MPHandler.ConfigFileName); - return false; } if (!System.IO.File.Exists(appPath)) { - throw new Exception(@"Could not located MediaPortal.exe based on MP path from ECP2Assembly's config file located at: " + ECP2Assembly.MPHandler.ConfigFileName); - return false; + throw new Exception(@"Could not locate MediaPortal.exe based on MP path from ECP2Assembly's config file located at: " + ECP2Assembly.MPHandler.ConfigFileName); } } catch (Exception ex) { throw new Exception(@"ECP2 Web Service error: could not locate MediaPortal.exe; inner exception: " + ex.ToString()); - return false; } string folder = appPath.Substring(0, appPath.LastIndexOf(@"\")); @@ -82,7 +78,6 @@ catch (Exception ex) { throw new Exception(@"ECP2 Web Service error: could not execute MediaPortal; inner exception: " + ex.ToString()); - return false; } } @@ -99,7 +94,7 @@ xwSettings.Indent = true; xwSettings.OmitXmlDeclaration = false; xwSettings.ConformanceLevel = System.Xml.ConformanceLevel.Auto; - + return xwSettings; } #endregion @@ -325,10 +320,10 @@ rec.Channel = channelName; rec.Start = DateToLong(startDateTime); rec.End = DateToLong(endDateTime); - rec.RecType = Enum.Parse(GetType(MediaPortal.TV.Database.TVRecording.RecordingType), recType, true); - rec.KeepRecordingMethod = Enum.Parse(GetType(MediaPortal.TV.Database.TVRecorded.KeepMethod), keepMethod, true); + rec.RecType = (MediaPortal.TV.Database.TVRecording.RecordingType)Enum.Parse(typeof(MediaPortal.TV.Database.TVRecording.RecordingType), recType, true); + rec.KeepRecordingMethod = (MediaPortal.TV.Database.TVRecorded.KeepMethod)Enum.Parse(typeof(MediaPortal.TV.Database.TVRecorded.KeepMethod), keepMethod, true); - return GetEMPH().AddRecording(ref rec); + return GetEMPH().AddRecording(rec); } [WebMethod(Description = "This command tells MediaPortal to delete a particular recording by ID.")] @@ -442,12 +437,62 @@ return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); } + [WebMethod(Description = "This command retrieves all the channels in the specified group ID in XML format.")] + public string GetChannelsByGroupID(int GroupID) + { + List<MediaPortal.TV.Database.TVChannel> chnList; + chnList = GetEMPH().GetChannels(GroupID); + + if (chnList.Count == 0) return ""; + + // As CurrentProgram is not necessary, set its XMLIgnore attribute to true + System.Xml.Serialization.XmlAttributeOverrides xmlOverrides = new System.Xml.Serialization.XmlAttributeOverrides(); + System.Xml.Serialization.XmlAttributes xmlAttributes; + + xmlAttributes = new System.Xml.Serialization.XmlAttributes(); + xmlAttributes.XmlIgnore = true; + xmlOverrides.Add(typeof(MediaPortal.TV.Database.TVChannel), "CurrentProgram", xmlAttributes); + + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); + System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVChannel), xmlOverrides); + MediaPortal.TV.Database.TVChannel chn; + + try + { + xw.WriteStartDocument(); + xw.WriteStartElement("MPData"); + xw.WriteStartElement("TVChannels"); + + for (int i = 0; i <= chnList.Count - 1; i++) + { + chn = (MediaPortal.TV.Database.TVChannel)chnList[i]; + + xs.Serialize(xw, chn); + } + + xw.WriteEndElement(); + xw.WriteEndElement(); + xw.WriteEndDocument(); + + xw.Flush(); + } + catch (Exception ex) + { + return ex.ToString(); + } + + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); + } + [WebMethod(Description = "This command retrieves the specified channel from MP in XML format.")] public string GetChannel(int channelID) { MediaPortal.TV.Database.TVChannel chn; chn = GetEMPH().GetChannel(channelID); + if (chn == null) return ""; + // As CurrentProgram is not necessary, set its XMLIgnore attribute to true System.Xml.Serialization.XmlAttributeOverrides xmlOverrides = new System.Xml.Serialization.XmlAttributeOverrides(); System.Xml.Serialization.XmlAttributes xmlAttributes; @@ -500,6 +545,8 @@ List<string> genresList; genresList = GetEMPH().GetGenres(); + if (genresList.Count == 0) return ""; + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); @@ -526,12 +573,14 @@ return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); } - [WebMethod(Description="This command returns the list of TV programs within the given date in XML format.")] + [WebMethod(Description="This command returns the list of TV programs within the given date boundaries in XML format.")] public string GetProgramsByDate(DateTime startDateTime, DateTime endDateTime) { List<MediaPortal.TV.Database.TVProgram> progList; progList = GetEMPH().GetPrograms(startDateTime,endDateTime); + if (progList.Count == 0) return ""; + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVProgram )); @@ -563,12 +612,53 @@ return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); } + [WebMethod(Description = "This command returns the list of TV programs matching the specified genre in XML format.")] + public string GetProgramsByGenre(string GenreName) + { + List<MediaPortal.TV.Database.TVProgram> progList; + progList = GetEMPH().GetPrograms(GenreName); + + if (progList.Count == 0) return ""; + + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); + System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVProgram)); + MediaPortal.TV.Database.TVProgram prog; + + try + { + xw.WriteStartDocument(); + xw.WriteStartElement("MPData"); + xw.WriteStartElement("TVPrograms"); + + for (int i = 0; i <= progList.Count - 1; i++) + { + prog = (MediaPortal.TV.Database.TVProgram)progList[i]; + xs.Serialize(xw, prog); + } + + xw.WriteEndElement(); + xw.WriteEndElement(); + xw.WriteEndDocument(); + + xw.Flush(); + } + catch (Exception ex) + { + return ex.ToString(); + } + + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); + } + [WebMethod(Description="This command returns a list of all the TV programs in XML format.")] public string GetAllPrograms() { List<MediaPortal.TV.Database.TVProgram> progList; progList = GetEMPH().GetPrograms(); + if (progList.Count == 0) return ""; + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVProgram )); @@ -600,12 +690,14 @@ return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); } - [WebMethod(Description="This command returns the list of TV program genres in XML format.")] + [WebMethod(Description="This command returns the list of TV programs on the specified channel and date/time boundaries in XML format.")] public string GetProgramsByChannel(int channelID, DateTime startDateTime, DateTime endDateTime) { List<MediaPortal.TV.Database.TVProgram> progList; progList = GetEMPH().GetPrograms(GetChannelName(channelID),startDateTime,endDateTime); + if (progList.Count == 0) return ""; + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVProgram )); @@ -636,6 +728,322 @@ return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); } + + [WebMethod(Description = "This command searches and returns the list of matching TV programs in XML format. The SearchField parameter can take: title, or description. The SearchType parameter can take: wildcardatend, wildcardatstartend, wildcardatstart, or exact. ChannelName can be left blank to search all channels.")] + public string GetProgramsBySearch(DateTime StartDateTime, DateTime EndDateTime, string SearchField, string SearchType, string SearchCriteria, string ChannelName) + { + List<MediaPortal.TV.Database.TVProgram> progList; + progList = GetEMPH().GetPrograms(StartDateTime, EndDateTime, SearchField, SearchType, SearchCriteria, ChannelName); + + if (progList.Count == 0) return ""; + + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); + System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVProgram)); + MediaPortal.TV.Database.TVProgram prog; + + try + { + xw.WriteStartDocument(); + xw.WriteStartElement("MPData"); + xw.WriteStartElement("TVPrograms"); + + for (int i = 0; i <= progList.Count - 1; i++) + { + prog = (MediaPortal.TV.Database.TVProgram)progList[i]; + xs.Serialize(xw, prog); + } + + xw.WriteEndElement(); + xw.WriteEndElement(); + xw.WriteEndDocument(); + + xw.Flush(); + } + catch (Exception ex) + { + return ex.ToString(); + } + + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); + } + + [WebMethod(Description = "This command adds a notification to the program matching the specified channel and start date/time.")] + public bool AddTVNotify(string ChannelName, DateTime StartDateTime) + { + if (ChannelName == null) + { + return false; + } + + if (ChannelName == "") + { + return false; + } + + return GetEMPH().AddTVNotify(ChannelName, StartDateTime); + } + + [WebMethod(Description = "This command deletes a notification to the program matching the specified channel and start date/time.")] + public bool DeleteTVNotifyByChannelNameAndStartDateTime(string ChannelName, DateTime StartDateTime) + { + if (ChannelName == null) + { + return false; + } + + if (ChannelName == "") + { + return false; + } + + return GetEMPH().DeleteTVNotify(ChannelName, StartDateTime); + } + + [WebMethod(Description = "This command deletes a notification to the program matching the specified notification ID.")] + public bool DeleteTVNotifyByID(int TVNotifyID) + { + return GetEMPH().DeleteTVNotify(TVNotifyID); + } + + [WebMethod(Description = "This command returns a list of all the program notifications in XML format.")] + public string GetAllTVNotifies() + { + List<MediaPortal.TV.Database.TVNotify> TVNotifyList; + TVNotifyList = GetEMPH().GetTVNotifies(); + + if (TVNotifyList.Count == 0) return ""; + + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); + System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVNotify)); + MediaPortal.TV.Database.TVNotify notify; + + try + { + xw.WriteStartDocument(); + xw.WriteStartElement("MPData"); + xw.WriteStartElement("TVNotifies"); + + for (int i = 0; i <= TVNotifyList.Count - 1; i++) + { + notify = (MediaPortal.TV.Database.TVNotify)TVNotifyList[i]; + xs.Serialize(xw, notify); + } + + xw.WriteEndElement(); + xw.WriteEndElement(); + xw.WriteEndDocument(); + + xw.Flush(); + } + catch (Exception ex) + { + return ex.ToString(); + } + + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); + } + + [WebMethod(Description = "This command retrieves the specified program notification by TVNotifyID in XML format.")] + public string GetTVNotifyByTVNotifyID(int TVNotifyID) + { + MediaPortal.TV.Database.TVNotify notify; + notify = GetEMPH().GetTVNotify(TVNotifyID); + + if (notify == null) return ""; + + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); + System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVNotify)); + + try + { + xw.WriteStartDocument(); + xw.WriteStartElement("MPData"); + xw.WriteStartElement("TVNotifies"); + + xs.Serialize(xw, notify); + + xw.WriteEndElement(); + xw.WriteEndElement(); + xw.WriteEndDocument(); + + xw.Flush(); + } + catch (Exception ex) + { + return ex.ToString(); + } + + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); + } + + [WebMethod(Description = "This command retrieves the specified program notification by channel name and start date/time in XML format.")] + public string GetTVNotifyByChannelNameAndStartDateTime(string ChannelName, DateTime StartDateTime) + { + MediaPortal.TV.Database.TVNotify notify; + notify = GetEMPH().GetTVNotify(ChannelName,StartDateTime); + + if (notify == null) return ""; + + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); + System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVNotify)); + + try + { + xw.WriteStartDocument(); + xw.WriteStartElement("MPData"); + xw.WriteStartElement("TVNotifies"); + + xs.Serialize(xw, notify); + + xw.WriteEndElement(); + xw.WriteEndElement(); + xw.WriteEndDocument(); + + xw.Flush(); + } + catch (Exception ex) + { + return ex.ToString(); + } + + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); + } + + [WebMethod(Description = "This command retrieves all the TV channel groups in XML format.")] + public string GetTVGroups() + { + List<MediaPortal.TV.Database.TVGroup> TVGroupList; + TVGroupList = GetEMPH().GetTVGroups(); + + if (TVGroupList.Count == 0) return ""; + + // As channels is not wanted (too much info - can use GetChannels function for channels), set its XMLIgnore attribute to true + System.Xml.Serialization.XmlAttributeOverrides xmlOverrides = new System.Xml.Serialization.XmlAttributeOverrides(); + System.Xml.Serialization.XmlAttributes xmlAttributes; + + xmlAttributes = new System.Xml.Serialization.XmlAttributes(); + xmlAttributes.XmlIgnore = true; + xmlOverrides.Add(typeof(MediaPortal.TV.Database.TVGroup), "TvChannels", xmlAttributes); + + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); + System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVGroup), xmlOverrides); + MediaPortal.TV.Database.TVGroup group; + + try + { + xw.WriteStartDocument(); + xw.WriteStartElement("MPData"); + xw.WriteStartElement("TVGroups"); + + for (int i = 0; i <= TVGroupList.Count - 1; i++) + { + group = (MediaPortal.TV.Database.TVGroup)TVGroupList[i]; + xs.Serialize(xw, group); + } + + xw.WriteEndElement(); + xw.WriteEndElement(); + xw.WriteEndDocument(); + + xw.Flush(); + } + catch (Exception ex) + { + return ex.ToString(); + } + + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); + } + + [WebMethod(Description = "This command retrieves the specified TV channel group by group ID in XML format.")] + public string GetTVGroupByGroupID(int GroupID) + { + MediaPortal.TV.Database.TVGroup group; + group = GetEMPH().GetTVGroup(GroupID); + + if (group == null) return ""; + + // As channels is not wanted (too much info - can use GetChannels function for channels), set its XMLIgnore attribute to true + System.Xml.Serialization.XmlAttributeOverrides xmlOverrides = new System.Xml.Serialization.XmlAttributeOverrides(); + System.Xml.Serialization.XmlAttributes xmlAttributes; + + xmlAttributes = new System.Xml.Serialization.XmlAttributes(); + xmlAttributes.XmlIgnore = true; + xmlOverrides.Add(typeof(MediaPortal.TV.Database.TVGroup), "TvChannels", xmlAttributes); + + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); + System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVGroup), xmlOverrides); + + try + { + xw.WriteStartDocument(); + xw.WriteStartElement("MPData"); + xw.WriteStartElement("TVGroups"); + + xs.Serialize(xw, group); + + xw.WriteEndElement(); + xw.WriteEndElement(); + xw.WriteEndDocument(); + + xw.Flush(); + } + catch (Exception ex) + { + return ex.ToString(); + } + + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); + } + + [WebMethod(Description = "This command retrieves the specified TV channel group by group name in XML format.")] + public string GetTVGroupByGroupName(string GroupName) + { + MediaPortal.TV.Database.TVGroup group; + group = GetEMPH().GetTVGroup(GroupName); + + if (group == null) return ""; + + // As channels is not wanted (too much info - can use GetChannels function for channels), set its XMLIgnore attribute to true + System.Xml.Serialization.XmlAttributeOverrides xmlOverrides = new System.Xml.Serialization.XmlAttributeOverrides(); + System.Xml.Serialization.XmlAttributes xmlAttributes; + + xmlAttributes = new System.Xml.Serialization.XmlAttributes(); + xmlAttributes.XmlIgnore = true; + xmlOverrides.Add(typeof(MediaPortal.TV.Database.TVGroup), "TvChannels", xmlAttributes); + + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); + System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVGroup), xmlOverrides); + + try + { + xw.WriteStartDocument(); + xw.WriteStartElement("MPData"); + xw.WriteStartElement("TVGroups"); + + xs.Serialize(xw, group); + + xw.WriteEndElement(); + xw.WriteEndElement(); + xw.WriteEndDocument(); + + xw.Flush(); + } + catch (Exception ex) + { + return ex.ToString(); + } + + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); + } + #endregion #region recorded TV commands This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sam...@us...> - 2006-06-18 15:07:33
|
Revision: 15 Author: samuel337 Date: 2006-06-18 08:07:25 -0700 (Sun, 18 Jun 2006) ViewCVS: http://svn.sourceforge.net/mp-webinterface/?rev=15&view=rev Log Message: ----------- moved some code groups around; no code changes Modified Paths: -------------- trunk/source/ECP2WebService/App_Code/Service.cs Modified: trunk/source/ECP2WebService/App_Code/Service.cs =================================================================== --- trunk/source/ECP2WebService/App_Code/Service.cs 2006-06-18 15:00:12 UTC (rev 14) +++ trunk/source/ECP2WebService/App_Code/Service.cs 2006-06-18 15:07:25 UTC (rev 15) @@ -86,83 +86,6 @@ } } - #region scheduled recording commands - [WebMethod(Description="This command tells MediaPortal to refresh its recordings list.")] - public bool RefreshRecordingsInMP() - { - return GetEMPH().RefreshRecordings(); - } - - [WebMethod(Description = "This command adds a recording to MP's recording list. No recordings refresh command is required after this action. Possible values for recType parameter are: Daily, EveryTimeOnEveryChannel, EveryTimeOnThisChannel, Once, WeekDays, WeekEnds, Weekly. Possible values for keepMethod parameters are: Always, UntilSpaceNeeded, UntilWatched.")] - public bool AddRecording(string title, string channelName, DateTime startDateTime, DateTime endDateTime, string recType, string keepMethod) - { - MediaPortal.TV.Database.TVRecording rec = new MediaPortal.TV.Database.TVRecording(); - rec.Title = title; - rec.Channel = channelName; - rec.Start = DateToLong(startDateTime); - rec.End = DateToLong(endDateTime); - rec.RecType = Enum.Parse(GetType(MediaPortal.TV.Database.TVRecording.RecordingType), recType, true); - rec.KeepRecordingMethod = Enum.Parse(GetType(MediaPortal.TV.Database.TVRecorded.KeepMethod), keepMethod, true); - - return GetEMPH().AddRecording(ref rec); - } - - [WebMethod(Description = "This command tells MediaPortal to delete a particular recording by ID.")] - public bool DeleteRecordingByID(int recordingID) - { - return GetEMPH().DelRecording(recordingID); - } - - [WebMethod(Description = "This command tells MediaPortal to delete a particular recording by starting time and channel name.")] - public bool DeleteRecordingByStartTimeAndChannelName(DateTime startDateTime, string channelName) - { - return GetEMPH().DelRecording(startDateTime, channelName); - } - - [WebMethod(Description = "This command tells MediaPortal to delete a particular recording by starting time and channel number.")] - public bool DeleteRecordingByStartTimeAndChannelLCN(DateTime startDateTime, int channelLCN) - { - return GetEMPH().DelRecording(startDateTime, channelLCN); - } - - [WebMethod(Description = "This command returns the list of TV recordings in XML format.")] - public string GetRecordings() - { - List<MediaPortal.TV.Database.TVRecording> recList; - recList = GetEMPH().GetRecordings(); - - System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); - System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); - System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVRecording)); - MediaPortal.TV.Database.TVRecording rec; - - try - { - xw.WriteStartDocument(); - xw.WriteStartElement("MPData"); - xw.WriteStartElement("TVRecordings"); - - for (int i = 0; i <= recList.Count - 1; i++) - { - rec = (MediaPortal.TV.Database.TVRecording)recList[i]; - xs.Serialize(xw, rec); - } - - xw.WriteEndElement(); - xw.WriteEndElement(); - xw.WriteEndDocument(); - - xw.Flush(); - } - catch (Exception ex) - { - return ex.ToString(); - } - - return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); - } - #endregion - #region private methods private long DateToLong(DateTime date) { @@ -387,6 +310,83 @@ } #endregion + #region scheduled recording commands + [WebMethod(Description = "This command tells MediaPortal to refresh its recordings list.")] + public bool RefreshRecordingsInMP() + { + return GetEMPH().RefreshRecordings(); + } + + [WebMethod(Description = "This command adds a recording to MP's recording list. No recordings refresh command is required after this action. Possible values for recType parameter are: Daily, EveryTimeOnEveryChannel, EveryTimeOnThisChannel, Once, WeekDays, WeekEnds, Weekly. Possible values for keepMethod parameters are: Always, UntilSpaceNeeded, UntilWatched.")] + public bool AddRecording(string title, string channelName, DateTime startDateTime, DateTime endDateTime, string recType, string keepMethod) + { + MediaPortal.TV.Database.TVRecording rec = new MediaPortal.TV.Database.TVRecording(); + rec.Title = title; + rec.Channel = channelName; + rec.Start = DateToLong(startDateTime); + rec.End = DateToLong(endDateTime); + rec.RecType = Enum.Parse(GetType(MediaPortal.TV.Database.TVRecording.RecordingType), recType, true); + rec.KeepRecordingMethod = Enum.Parse(GetType(MediaPortal.TV.Database.TVRecorded.KeepMethod), keepMethod, true); + + return GetEMPH().AddRecording(ref rec); + } + + [WebMethod(Description = "This command tells MediaPortal to delete a particular recording by ID.")] + public bool DeleteRecordingByID(int recordingID) + { + return GetEMPH().DelRecording(recordingID); + } + + [WebMethod(Description = "This command tells MediaPortal to delete a particular recording by starting time and channel name.")] + public bool DeleteRecordingByStartTimeAndChannelName(DateTime startDateTime, string channelName) + { + return GetEMPH().DelRecording(startDateTime, channelName); + } + + [WebMethod(Description = "This command tells MediaPortal to delete a particular recording by starting time and channel number.")] + public bool DeleteRecordingByStartTimeAndChannelLCN(DateTime startDateTime, int channelLCN) + { + return GetEMPH().DelRecording(startDateTime, channelLCN); + } + + [WebMethod(Description = "This command returns the list of TV recordings in XML format.")] + public string GetRecordings() + { + List<MediaPortal.TV.Database.TVRecording> recList; + recList = GetEMPH().GetRecordings(); + + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); + System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVRecording)); + MediaPortal.TV.Database.TVRecording rec; + + try + { + xw.WriteStartDocument(); + xw.WriteStartElement("MPData"); + xw.WriteStartElement("TVRecordings"); + + for (int i = 0; i <= recList.Count - 1; i++) + { + rec = (MediaPortal.TV.Database.TVRecording)recList[i]; + xs.Serialize(xw, rec); + } + + xw.WriteEndElement(); + xw.WriteEndElement(); + xw.WriteEndDocument(); + + xw.Flush(); + } + catch (Exception ex) + { + return ex.ToString(); + } + + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); + } + #endregion + #region TV Channel/Program commands [WebMethod(Description="This command tells MediaPortal to re-import the XMLTV data file.")] public bool ImportXMLTVGuide() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sam...@us...> - 2006-06-18 15:00:21
|
Revision: 14 Author: samuel337 Date: 2006-06-18 08:00:12 -0700 (Sun, 18 Jun 2006) ViewCVS: http://svn.sourceforge.net/mp-webinterface/?rev=14&view=rev Log Message: ----------- grouped methods together for easier reading Modified Paths: -------------- trunk/source/ECP2WebService/App_Code/Service.cs Modified: trunk/source/ECP2WebService/App_Code/Service.cs =================================================================== --- trunk/source/ECP2WebService/App_Code/Service.cs 2006-06-18 05:37:49 UTC (rev 13) +++ trunk/source/ECP2WebService/App_Code/Service.cs 2006-06-18 15:00:12 UTC (rev 14) @@ -26,13 +26,171 @@ return ECP2Assembly.MPHandler.Instance; } + [WebMethod(Description = @"This command launches MediaPortal.")] + public bool LaunchMP() + { + string appPath = ""; + + if (!System.IO.File.Exists(ECP2Assembly.MPHandler.ConfigFileName)) + { + throw new Exception(@"Could not access ECP2Assembly's config file expected at (" + ECP2Assembly.MPHandler.ConfigFileName + @") to get MP path."); + return false; + } + + System.Xml.XmlDocument xmlDoc = new System.Xml.XmlDocument(); + + try + { + xmlDoc.Load(ECP2Assembly.MPHandler.ConfigFileName); + System.Xml.XmlNodeList xmlNodeList = xmlDoc.SelectNodes("configuration/appSettings/add[@key='MPPath']"); + + if (xmlNodeList.Count > 0) + { + System.Xml.XmlNode xmlNode = xmlNodeList[0]; + appPath = xmlNode.Attributes["value"].Value; + appPath += "MediaPortal.exe"; + } + else + { + throw new Exception(@"MPPath could not be located in the ECP2Assembly config file located at: " + ECP2Assembly.MPHandler.ConfigFileName); + return false; + } + + if (!System.IO.File.Exists(appPath)) + { + throw new Exception(@"Could not located MediaPortal.exe based on MP path from ECP2Assembly's config file located at: " + ECP2Assembly.MPHandler.ConfigFileName); + return false; + } + } + catch (Exception ex) + { + throw new Exception(@"ECP2 Web Service error: could not locate MediaPortal.exe; inner exception: " + ex.ToString()); + return false; + } + + string folder = appPath.Substring(0, appPath.LastIndexOf(@"\")); + + try + { + System.Diagnostics.ProcessStartInfo si = new System.Diagnostics.ProcessStartInfo(); + si.FileName = appPath; + si.WorkingDirectory = folder; + System.Diagnostics.Process.Start(si); + + return true; + } + catch (Exception ex) + { + throw new Exception(@"ECP2 Web Service error: could not execute MediaPortal; inner exception: " + ex.ToString()); + return false; + } + } + + #region scheduled recording commands + [WebMethod(Description="This command tells MediaPortal to refresh its recordings list.")] + public bool RefreshRecordingsInMP() + { + return GetEMPH().RefreshRecordings(); + } + + [WebMethod(Description = "This command adds a recording to MP's recording list. No recordings refresh command is required after this action. Possible values for recType parameter are: Daily, EveryTimeOnEveryChannel, EveryTimeOnThisChannel, Once, WeekDays, WeekEnds, Weekly. Possible values for keepMethod parameters are: Always, UntilSpaceNeeded, UntilWatched.")] + public bool AddRecording(string title, string channelName, DateTime startDateTime, DateTime endDateTime, string recType, string keepMethod) + { + MediaPortal.TV.Database.TVRecording rec = new MediaPortal.TV.Database.TVRecording(); + rec.Title = title; + rec.Channel = channelName; + rec.Start = DateToLong(startDateTime); + rec.End = DateToLong(endDateTime); + rec.RecType = Enum.Parse(GetType(MediaPortal.TV.Database.TVRecording.RecordingType), recType, true); + rec.KeepRecordingMethod = Enum.Parse(GetType(MediaPortal.TV.Database.TVRecorded.KeepMethod), keepMethod, true); + + return GetEMPH().AddRecording(ref rec); + } + + [WebMethod(Description = "This command tells MediaPortal to delete a particular recording by ID.")] + public bool DeleteRecordingByID(int recordingID) + { + return GetEMPH().DelRecording(recordingID); + } + + [WebMethod(Description = "This command tells MediaPortal to delete a particular recording by starting time and channel name.")] + public bool DeleteRecordingByStartTimeAndChannelName(DateTime startDateTime, string channelName) + { + return GetEMPH().DelRecording(startDateTime, channelName); + } + + [WebMethod(Description = "This command tells MediaPortal to delete a particular recording by starting time and channel number.")] + public bool DeleteRecordingByStartTimeAndChannelLCN(DateTime startDateTime, int channelLCN) + { + return GetEMPH().DelRecording(startDateTime, channelLCN); + } + + [WebMethod(Description = "This command returns the list of TV recordings in XML format.")] + public string GetRecordings() + { + List<MediaPortal.TV.Database.TVRecording> recList; + recList = GetEMPH().GetRecordings(); + + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); + System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVRecording)); + MediaPortal.TV.Database.TVRecording rec; + + try + { + xw.WriteStartDocument(); + xw.WriteStartElement("MPData"); + xw.WriteStartElement("TVRecordings"); + + for (int i = 0; i <= recList.Count - 1; i++) + { + rec = (MediaPortal.TV.Database.TVRecording)recList[i]; + xs.Serialize(xw, rec); + } + + xw.WriteEndElement(); + xw.WriteEndElement(); + xw.WriteEndDocument(); + + xw.Flush(); + } + catch (Exception ex) + { + return ex.ToString(); + } + + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); + } + #endregion + + #region private methods + private long DateToLong(DateTime date) + { + return long.Parse(date.ToString("yyyyMMddHHmmss")); + } + + private System.Xml.XmlWriterSettings GetXMLDocWriterSettings() + { + System.Xml.XmlWriterSettings xwSettings = new System.Xml.XmlWriterSettings(); + xwSettings.Encoding = System.Text.Encoding.UTF8; + xwSettings.Indent = true; + xwSettings.OmitXmlDeclaration = false; + xwSettings.ConformanceLevel = System.Xml.ConformanceLevel.Auto; + + return xwSettings; + } + #endregion + + #region action commands [WebMethod(Description = "This command allows you to emulate key presses to the current window in MediaPortal. Enter in the ActionID. See <a href='ActionIDs.htm'>this page</a> for the action IDs of the various actions.")] public bool SendActionByID(int actionID) { //send action return GetEMPH().SendActionByID(actionID); } + #endregion + #region current state commands [WebMethod(Description="This command gets the current path to MediaPortal.")] public string GetMPPath() { @@ -132,737 +290,647 @@ return itemType + @"|" + description + @"|" + duration; } - [WebMethod(Description="This command gets the ID of the currently displayed window.")] - public int GetCurrentWindowID() - { - try + [WebMethod(Description="This command gets the ID of the currently displayed window.")] + public int GetCurrentWindowID() { - return GetEMPH().CurrentWindowID; + try + { + return GetEMPH().CurrentWindowID; + } + catch + { + return -2; + } } - catch + + [WebMethod(Description="This command gets the friendly name of the currently displayed window.")] + public string GetCurrentWindowName() { - return -2; + if (GetCurrentWindowID()!=-2) + { + return GetEMPH().CurrentWindowName; + } + else + { + return "MediaPortal is not running"; + } } - } - [WebMethod(Description="This command gets the friendly name of the currently displayed window.")] - public string GetCurrentWindowName() - { - if (GetCurrentWindowID()!=-2) + [WebMethod(Description="This command switches the current window to the specified window, using the WindowID.")] + public bool ActivateWindow(int windowID, bool replaceWindow) { - return GetEMPH().CurrentWindowName; + try + { + return GetEMPH().ActivateWindow(windowID,replaceWindow); + } + catch + { + return false; + } } - else + + [WebMethod(Description="This command switches the current window to previous window.")] + public bool ShowPreviousWindow() { - return "MediaPortal is not running"; + try + { + return GetEMPH().ShowPreviousWindow(); + } + catch + { + return false; + } } - } - [WebMethod(Description="This command switches the current window to the specified window, using the WindowID.")] - public bool ActivateWindow(int windowID, bool replaceWindow) - { - try + [WebMethod(Description="This command gets the property using the property tag given from MP's property manager.")] + public string get_MPPropertyManager(string propertyTag) { - return GetEMPH().ActivateWindow(windowID,replaceWindow); + return GetEMPH().get_GUIPropertyManager(propertyTag); } - catch + + [WebMethod(Description="This command sets the property using the property tag given from MP's property manager.")] + public bool set_MPPropertyManager(string propertyTag,string propertyValue) { - return false; + if (propertyTag=="") {return false;} + + try + { + GetEMPH().set_GUIPropertyManager(propertyTag,propertyValue); + return true; + } + catch + { + return false; + } } - } - [WebMethod(Description="This command switches the current window to previous window.")] - public bool ShowPreviousWindow() - { - try + [WebMethod(Description="This command gets the specified property from MP's recorder object.")] + public object GetRecorderProps(string propName) { - return GetEMPH().ShowPreviousWindow(); - } - catch - { - return false; - } - } + if (propName=="") + { + return false; + } - [WebMethod(Description="This command gets the property using the property tag given from MP's property manager.")] - public string get_MPPropertyManager(string propertyTag) - { - return GetEMPH().get_GUIPropertyManager(propertyTag); - } - - [WebMethod(Description="This command sets the property using the property tag given from MP's property manager.")] - public bool set_MPPropertyManager(string propertyTag,string propertyValue) - { - if (propertyTag=="") {return false;} - - try - { - GetEMPH().set_GUIPropertyManager(propertyTag,propertyValue); - return true; + return GetEMPH().GetRecorderProps(propName); } - catch - { - return false; - } - } - [WebMethod(Description=@"This command launches MediaPortal. The whole path to MediaPortal needs to be provided, e.g. C:\Program Files\Team MediaPortal\MediaPortal\MediaPortal.exe")] - public bool LaunchApplication(string appPath) - { - appPath = Server.UrlDecode(appPath); - - string folder = appPath.Substring(0,appPath.LastIndexOf(@"\")); - - try + [WebMethod(Description="This command gets the specified property from MP's g_Player object.")] + public object GetgPlayerProps(string propName) { - System.Diagnostics.ProcessStartInfo si = new System.Diagnostics.ProcessStartInfo(); - si.FileName = appPath; - si.WorkingDirectory = folder; - System.Diagnostics.Process.Start(si); + if (propName=="") + { + return false; + } - return true; + return GetEMPH().GetgPlayerProps(propName); } - catch - { - return false; - } - } + #endregion - [WebMethod(Description="This command gets the specified property from MP's recorder object.")] - public object GetRecorderProps(string propName) - { - if (propName=="") + #region TV Channel/Program commands + [WebMethod(Description="This command tells MediaPortal to re-import the XMLTV data file.")] + public bool ImportXMLTVGuide() { - return false; + return GetEMPH().ImportXMLTVGuide(); } - return GetEMPH().GetRecorderProps(propName); - } - - [WebMethod(Description="This command gets the specified property from MP's g_Player object.")] - public object GetgPlayerProps(string propName) - { - if (propName=="") + [WebMethod(Description="This command retrieves all the channels in MP in XML format.")] + public string GetChannels() { - return false; - } + List<MediaPortal.TV.Database.TVChannel> chnList; + chnList = GetEMPH().GetChannels(); - return GetEMPH().GetgPlayerProps(propName); - } + if (chnList.Count == 0) return ""; - [WebMethod(Description="This command tells MediaPortal to refresh its recordings list.")] - public bool RefreshRecordingsInMP() - { - return GetEMPH().RefreshRecordings(); - } + // As CurrentProgram is not necessary, set its XMLIgnore attribute to true + System.Xml.Serialization.XmlAttributeOverrides xmlOverrides = new System.Xml.Serialization.XmlAttributeOverrides(); + System.Xml.Serialization.XmlAttributes xmlAttributes; - [WebMethod(Description="This command tells MediaPortal to re-import the XMLTV data file.")] - public bool ImportXMLTVGuide() - { - return GetEMPH().ImportXMLTVGuide(); - } + xmlAttributes = new System.Xml.Serialization.XmlAttributes(); + xmlAttributes.XmlIgnore = true; + xmlOverrides.Add(typeof(MediaPortal.TV.Database.TVChannel), "CurrentProgram", xmlAttributes); - private System.Xml.XmlWriterSettings GetXMLDocWriterSettings() - { - System.Xml.XmlWriterSettings xwSettings = new System.Xml.XmlWriterSettings(); - xwSettings.Encoding = System.Text.Encoding.UTF8; - xwSettings.Indent = true; - xwSettings.OmitXmlDeclaration = false; - xwSettings.ConformanceLevel = System.Xml.ConformanceLevel.Auto; + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); + System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVChannel),xmlOverrides); + MediaPortal.TV.Database.TVChannel chn; - return xwSettings; - } + try + { + xw.WriteStartDocument(); + xw.WriteStartElement("MPData"); + xw.WriteStartElement("TVChannels"); - [WebMethod(Description="This command retrieves all the channels in MP in XML format.")] - public string GetChannels() - { - List<MediaPortal.TV.Database.TVChannel> chnList; - chnList = GetEMPH().GetChannels(); + for (int i = 0; i <= chnList.Count - 1; i++) + { + chn = (MediaPortal.TV.Database.TVChannel)chnList[i]; - if (chnList.Count == 0) return ""; + xs.Serialize(xw, chn); + } - // As CurrentProgram is not necessary, set its XMLIgnore attribute to true - System.Xml.Serialization.XmlAttributeOverrides xmlOverrides = new System.Xml.Serialization.XmlAttributeOverrides(); - System.Xml.Serialization.XmlAttributes xmlAttributes; + xw.WriteEndElement(); + xw.WriteEndElement(); + xw.WriteEndDocument(); - xmlAttributes = new System.Xml.Serialization.XmlAttributes(); - xmlAttributes.XmlIgnore = true; - xmlOverrides.Add(typeof(MediaPortal.TV.Database.TVChannel), "CurrentProgram", xmlAttributes); + xw.Flush(); + } + catch (Exception ex) + { + return ex.ToString(); + } - System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); - System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); - System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVChannel),xmlOverrides); - MediaPortal.TV.Database.TVChannel chn; + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); + } - try + [WebMethod(Description = "This command retrieves the specified channel from MP in XML format.")] + public string GetChannel(int channelID) { - xw.WriteStartDocument(); - xw.WriteStartElement("MPData"); - xw.WriteStartElement("TVChannels"); + MediaPortal.TV.Database.TVChannel chn; + chn = GetEMPH().GetChannel(channelID); - for (int i = 0; i <= chnList.Count - 1; i++) + // As CurrentProgram is not necessary, set its XMLIgnore attribute to true + System.Xml.Serialization.XmlAttributeOverrides xmlOverrides = new System.Xml.Serialization.XmlAttributeOverrides(); + System.Xml.Serialization.XmlAttributes xmlAttributes; + + xmlAttributes = new System.Xml.Serialization.XmlAttributes(); + xmlAttributes.XmlIgnore = true; + xmlOverrides.Add(typeof(MediaPortal.TV.Database.TVChannel), "CurrentProgram", xmlAttributes); + + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); + System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVChannel), xmlOverrides); + + try { - chn = (MediaPortal.TV.Database.TVChannel)chnList[i]; + xw.WriteStartDocument(); + xw.WriteStartElement("MPData"); + xw.WriteStartElement("TVChannels"); xs.Serialize(xw, chn); + + xw.WriteEndElement(); + xw.WriteEndElement(); + xw.WriteEndDocument(); + + xw.Flush(); } + catch (Exception ex) + { + return ex.ToString(); + } - xw.WriteEndElement(); - xw.WriteEndElement(); - xw.WriteEndDocument(); + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); + } - xw.Flush(); + [WebMethod(Description="This command converts a channelID into its corresponding channel name.")] + public string GetChannelName(int channelID) + { + return GetEMPH().GetChannelName(channelID); } - catch (Exception ex) + + [WebMethod(Description="This command converts a channel name to its corresponding channelID.")] + public int GetChannelID(string channelName) { - return ex.ToString(); + return GetEMPH().GetChannelID(channelName); } - return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); - } + [WebMethod(Description="This command returns the list of TV program genres in XML format.")] + public string GetGenres() + { + List<string> genresList; + genresList = GetEMPH().GetGenres(); - [WebMethod(Description = "This command retrieves the specified channel from MP in XML format.")] - public string GetChannel(int channelID) - { - MediaPortal.TV.Database.TVChannel chn; - chn = GetEMPH().GetChannel(channelID); + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); - // As CurrentProgram is not necessary, set its XMLIgnore attribute to true - System.Xml.Serialization.XmlAttributeOverrides xmlOverrides = new System.Xml.Serialization.XmlAttributeOverrides(); - System.Xml.Serialization.XmlAttributes xmlAttributes; - - xmlAttributes = new System.Xml.Serialization.XmlAttributes(); - xmlAttributes.XmlIgnore = true; - xmlOverrides.Add(typeof(MediaPortal.TV.Database.TVChannel), "CurrentProgram", xmlAttributes); - - System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); - System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); - System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVChannel), xmlOverrides); - - try - { xw.WriteStartDocument(); xw.WriteStartElement("MPData"); - xw.WriteStartElement("TVChannels"); + xw.WriteStartElement("Genres"); - xs.Serialize(xw, chn); + string s; + for (int i = 0; i <= genresList.Count - 1; i++) + { + xw.WriteStartElement("Genre"); + s = (string)genresList[i]; + xw.WriteElementString("GenreName", s); + xw.WriteEndElement(); + } + xw.WriteEndElement(); xw.WriteEndElement(); xw.WriteEndDocument(); xw.Flush(); + + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); } - catch (Exception ex) + + [WebMethod(Description="This command returns the list of TV programs within the given date in XML format.")] + public string GetProgramsByDate(DateTime startDateTime, DateTime endDateTime) { - return ex.ToString(); - } + List<MediaPortal.TV.Database.TVProgram> progList; + progList = GetEMPH().GetPrograms(startDateTime,endDateTime); - return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); - } + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); + System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVProgram )); + MediaPortal.TV.Database.TVProgram prog; - [WebMethod(Description="This command converts a channelID into its corresponding channel name.")] - public string GetChannelName(int channelID) - { - return GetEMPH().GetChannelName(channelID); - } - - [WebMethod(Description="This command converts a channel name to its corresponding channelID.")] - public int GetChannelID(string channelName) - { - return GetEMPH().GetChannelID(channelName); - } + try + { + xw.WriteStartDocument(); + xw.WriteStartElement("MPData"); + xw.WriteStartElement("TVPrograms"); - [WebMethod(Description="This command adds a recording to MP's recording list. No recordings refresh command is required after this action.")] - public bool AddRecording(string title, string channelName, DateTime startDateTime, DateTime endDateTime, string recType) - { - return GetEMPH().AddRecording(title, channelName,startDateTime,endDateTime,recType); - } + for (int i = 0; i <= progList.Count - 1; i++) + { + prog = (MediaPortal.TV.Database.TVProgram)progList[i]; + xs.Serialize(xw, prog); + } - [WebMethod(Description="This command tells MediaPortal to delete a particular recording by ID.")] - public bool DeleteRecordingByID(int recordingID) - { - return GetEMPH().DelRecording(recordingID); - } + xw.WriteEndElement(); + xw.WriteEndElement(); + xw.WriteEndDocument(); - [WebMethod(Description="This command tells MediaPortal to delete a particular recording by starting time and channel name.")] - public bool DeleteRecordingByStartTimeAndChannelName(DateTime startDateTime, string channelName) - { - return GetEMPH().DelRecording(startDateTime,channelName); - } + xw.Flush(); + } + catch (Exception ex) + { + return ex.ToString(); + } - [WebMethod(Description="This command tells MediaPortal to delete a particular recording by starting time and channel number.")] - public bool DeleteRecordingByStartTimeAndChannelLCN(DateTime startDateTime, int channelLCN) - { - return GetEMPH().DelRecording(startDateTime,channelLCN); - } + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); + } - [WebMethod(Description="This command returns the list of TV program genres in XML format.")] - public string GetGenres() - { - List<string> genresList; - genresList = GetEMPH().GetGenres(); - - System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); - System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); - - xw.WriteStartDocument(); - xw.WriteStartElement("MPData"); - xw.WriteStartElement("Genres"); - - string s; - - for (int i = 0; i <= genresList.Count - 1; i++) + [WebMethod(Description="This command returns a list of all the TV programs in XML format.")] + public string GetAllPrograms() { - xw.WriteStartElement("Genre"); - s = (string)genresList[i]; - xw.WriteElementString("GenreName", s); - xw.WriteEndElement(); - } + List<MediaPortal.TV.Database.TVProgram> progList; + progList = GetEMPH().GetPrograms(); - xw.WriteEndElement(); - xw.WriteEndElement(); - xw.WriteEndDocument(); + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); + System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVProgram )); + MediaPortal.TV.Database.TVProgram prog; - xw.Flush(); + try + { + xw.WriteStartDocument(); + xw.WriteStartElement("MPData"); + xw.WriteStartElement("TVPrograms"); - return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); - } + for (int i = 0; i <= progList.Count - 1; i++) + { + prog = (MediaPortal.TV.Database.TVProgram)progList[i]; + xs.Serialize(xw, prog); + } - [WebMethod(Description="This command returns the list of TV programs within the given date in XML format.")] - public string GetProgramsByDate(DateTime startDateTime, DateTime endDateTime) - { - List<MediaPortal.TV.Database.TVProgram> progList; - progList = GetEMPH().GetPrograms(startDateTime,endDateTime); + xw.WriteEndElement(); + xw.WriteEndElement(); + xw.WriteEndDocument(); - System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); - System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); - System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVProgram )); - MediaPortal.TV.Database.TVProgram prog; - - try - { - xw.WriteStartDocument(); - xw.WriteStartElement("MPData"); - xw.WriteStartElement("TVPrograms"); - - for (int i = 0; i <= progList.Count - 1; i++) + xw.Flush(); + } + catch (Exception ex) { - prog = (MediaPortal.TV.Database.TVProgram)progList[i]; - xs.Serialize(xw, prog); + return ex.ToString(); } - xw.WriteEndElement(); - xw.WriteEndElement(); - xw.WriteEndDocument(); + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); + } - xw.Flush(); - } - catch (Exception ex) + [WebMethod(Description="This command returns the list of TV program genres in XML format.")] + public string GetProgramsByChannel(int channelID, DateTime startDateTime, DateTime endDateTime) { - return ex.ToString(); - } + List<MediaPortal.TV.Database.TVProgram> progList; + progList = GetEMPH().GetPrograms(GetChannelName(channelID),startDateTime,endDateTime); - return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); - } + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); + System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVProgram )); + MediaPortal.TV.Database.TVProgram prog; - [WebMethod(Description="This command returns a list of all the TV programs in XML format.")] - public string GetAllPrograms() - { - List<MediaPortal.TV.Database.TVProgram> progList; - progList = GetEMPH().GetPrograms(); + try + { + xw.WriteStartDocument(); + xw.WriteStartElement("MPData"); + xw.WriteStartElement("TVPrograms"); - System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); - System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); - System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVProgram )); - MediaPortal.TV.Database.TVProgram prog; + for (int i = 0; i <= progList.Count - 1; i++) + { + prog = (MediaPortal.TV.Database.TVProgram)progList[i]; + xs.Serialize(xw, prog); + } - try - { - xw.WriteStartDocument(); - xw.WriteStartElement("MPData"); - xw.WriteStartElement("TVPrograms"); + xw.WriteEndElement(); + xw.WriteEndElement(); + xw.WriteEndDocument(); - for (int i = 0; i <= progList.Count - 1; i++) + xw.Flush(); + } + catch (Exception ex) { - prog = (MediaPortal.TV.Database.TVProgram)progList[i]; - xs.Serialize(xw, prog); + return ex.ToString(); } - xw.WriteEndElement(); - xw.WriteEndElement(); - xw.WriteEndDocument(); + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); + } + #endregion - xw.Flush(); - } - catch (Exception ex) + #region recorded TV commands + [WebMethod(Description="This command returns the list of all recorded TV items in XML format.")] + public string GetAllRecordedTV() { - return ex.ToString(); - } + List<MediaPortal.TV.Database.TVRecorded> recdTVList; + recdTVList = GetEMPH().GetAllRecordedTV(); - return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); - } + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); + System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVRecorded )); + MediaPortal.TV.Database.TVRecorded recdTV; - [WebMethod(Description="This command returns the list of TV program genres in XML format.")] - public string GetProgramsByChannel(int channelID, DateTime startDateTime, DateTime endDateTime) - { - List<MediaPortal.TV.Database.TVProgram> progList; - progList = GetEMPH().GetPrograms(GetChannelName(channelID),startDateTime,endDateTime); + try + { + xw.WriteStartDocument(); + xw.WriteStartElement("MPData"); + xw.WriteStartElement("TVRecorded"); - System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); - System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); - System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVProgram )); - MediaPortal.TV.Database.TVProgram prog; + for (int i = 0; i <= recdTVList.Count - 1; i++) + { + recdTV = (MediaPortal.TV.Database.TVRecorded)recdTVList[i]; + xs.Serialize(xw, recdTV); + } - try - { - xw.WriteStartDocument(); - xw.WriteStartElement("MPData"); - xw.WriteStartElement("TVPrograms"); + xw.WriteEndElement(); + xw.WriteEndElement(); + xw.WriteEndDocument(); - for (int i = 0; i <= progList.Count - 1; i++) + xw.Flush(); + } + catch (Exception ex) { - prog = (MediaPortal.TV.Database.TVProgram)progList[i]; - xs.Serialize(xw, prog); + return ex.ToString(); } - xw.WriteEndElement(); - xw.WriteEndElement(); - xw.WriteEndDocument(); + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); + } - xw.Flush(); - } - catch (Exception ex) + [WebMethod(Description = "This command returns the specified recorded TV item in XML format.")] + public string GetRecordedTV(string recordedTVFileName) { - return ex.ToString(); - } + MediaPortal.TV.Database.TVRecorded recdTV; + recdTV = GetEMPH().GetRecordedTV(recordedTVFileName); - return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); - } + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); + System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVRecorded)); - [WebMethod(Description="This command returns the list of TV recordings in XML format.")] - public string GetRecordings() - { - List<MediaPortal.TV.Database.TVRecording > recList; - recList = GetEMPH().GetRecordings(); + try + { + xw.WriteStartDocument(); + xw.WriteStartElement("MPData"); + xw.WriteStartElement("TVRecorded"); - System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); - System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); - System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVRecording )); - MediaPortal.TV.Database.TVRecording rec; + xs.Serialize(xw, recdTV); - try - { - xw.WriteStartDocument(); - xw.WriteStartElement("MPData"); - xw.WriteStartElement("TVRecordings"); + xw.WriteEndElement(); + xw.WriteEndElement(); + xw.WriteEndDocument(); - for (int i = 0; i <= recList.Count - 1; i++) + xw.Flush(); + } + catch (Exception ex) { - rec = (MediaPortal.TV.Database.TVRecording)recList[i]; - xs.Serialize(xw, rec); + return ex.ToString(); } - xw.WriteEndElement(); - xw.WriteEndElement(); - xw.WriteEndDocument(); + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); + } + #endregion - xw.Flush(); + #region playlist commands + [WebMethod(Description="This command returns the name of the current playlist.")] + public string GetCurrentPlaylistName() + { + return GetEMPH().CurrentPlaylistName; } - catch (Exception ex) + + [WebMethod(Description="This command returns song number that's currently playing in the current playlist.")] + public int GetCurrentSongNo() { - return ex.ToString(); + return GetEMPH().CurrentSongNo; } - return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); - } - - [WebMethod(Description="This command returns the list of all recorded TV items in XML format.")] - public string GetAllRecordedTV() - { - List<MediaPortal.TV.Database.TVRecorded> recdTVList; - recdTVList = GetEMPH().GetAllRecordedTV(); - - System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); - System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); - System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVRecorded )); - MediaPortal.TV.Database.TVRecorded recdTV; - - try + [WebMethod(Description="This command returns the items in a playlist given the playlist name (PLAYLIST_MUSIC, PLAYLIST_MUSIC_TEMP, PLAYLIST_VIDEO, PLAYLIST_VIDEO_TEMP) in XML format.")] + public string GetPlaylist(string playlistType) { - xw.WriteStartDocument(); - xw.WriteStartElement("MPData"); - xw.WriteStartElement("TVRecorded"); - - for (int i = 0; i <= recdTVList.Count - 1; i++) + //resolve playlistType + MediaPortal.Playlists.PlayListType playlistTypeResolve; + if (Enum.IsDefined(typeof(MediaPortal.Playlists.PlayListType),playlistType)==false) { - recdTV = (MediaPortal.TV.Database.TVRecorded)recdTVList[i]; - xs.Serialize(xw, recdTV); + return ""; } + + playlistTypeResolve = (MediaPortal.Playlists.PlayListType)Enum.Parse(typeof(MediaPortal.Playlists.PlayListType),playlistType); - xw.WriteEndElement(); - xw.WriteEndElement(); - xw.WriteEndDocument(); + MediaPortal.Playlists.PlayList playlist; + playlist = GetEMPH().GetPlaylist(playlistTypeResolve); - xw.Flush(); - } - catch (Exception ex) - { - return ex.ToString(); - } + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); + System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.Playlists.PlayListItem )); + MediaPortal.Playlists.PlayListItem playlistItem; - return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); - } + try + { + xw.WriteStartDocument(); + xw.WriteStartElement("MPData"); + xw.WriteStartElement("Playlist"); + xw.WriteAttributeString("type", playlistType); - [WebMethod(Description = "This command returns the specified recorded TV item in XML format.")] - public string GetRecordedTV(string recordedTVFileName) - { - MediaPortal.TV.Database.TVRecorded recdTV; - recdTV = GetEMPH().GetRecordedTV(recordedTVFileName); + for (int i = 0; i <= playlist.Count - 1; i++) + { + playlistItem = (MediaPortal.Playlists.PlayListItem)playlist[i]; + xs.Serialize(xw, playlistItem); + } - System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); - System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); - System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVRecorded)); + xw.WriteEndElement(); + xw.WriteEndElement(); + xw.WriteEndDocument(); - try - { - xw.WriteStartDocument(); - xw.WriteStartElement("MPData"); - xw.WriteStartElement("TVRecorded"); + xw.Flush(); + } + catch (Exception ex) + { + return ex.ToString(); + } - xs.Serialize(xw, recdTV); + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); + } - xw.WriteEndElement(); - xw.WriteEndElement(); - xw.WriteEndDocument(); - - xw.Flush(); - } - catch (Exception ex) + [WebMethod(Description="This command adds an item to the nominated playlist.")] + public bool AddPlaylistItem(string playlistType, string fileName, string description, int duration, string itemType) { - return ex.ToString(); - } + if (fileName=="") {return false;} - return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); - } - - [WebMethod(Description="This command returns the name of the current playlist.")] - public string GetCurrentPlaylistName() - { - return GetEMPH().CurrentPlaylistName; - } + //resolve playlistType + MediaPortal.Playlists.PlayListType playlistTypeResolve; + if (Enum.IsDefined(typeof(MediaPortal.Playlists.PlayListType),playlistType)==false) + { + return false; + } + + playlistTypeResolve = (MediaPortal.Playlists.PlayListType)Enum.Parse(typeof(MediaPortal.Playlists.PlayListType),playlistType); - [WebMethod(Description="This command returns song number that's currently playing in the current playlist.")] - public int GetCurrentSongNo() - { - return GetEMPH().CurrentSongNo; - } + //resolve itemType + MediaPortal.Playlists.PlayListItem.PlayListItemType itemTypeResolve; + if (Enum.IsDefined(typeof(MediaPortal.Playlists.PlayListItem.PlayListItemType),itemType )==false) + { + return false; + } - [WebMethod(Description="This command returns the items in a playlist given the playlist name (PLAYLIST_MUSIC, PLAYLIST_MUSIC_TEMP, PLAYLIST_VIDEO, PLAYLIST_VIDEO_TEMP) in XML format.")] - public string GetPlaylist(string playlistType) - { - //resolve playlistType - MediaPortal.Playlists.PlayListType playlistTypeResolve; - if (Enum.IsDefined(typeof(MediaPortal.Playlists.PlayListType),playlistType)==false) - { - return ""; - } - - playlistTypeResolve = (MediaPortal.Playlists.PlayListType)Enum.Parse(typeof(MediaPortal.Playlists.PlayListType),playlistType); + itemTypeResolve = (MediaPortal.Playlists.PlayListItem.PlayListItemType)Enum.Parse(typeof(MediaPortal.Playlists.PlayListItem.PlayListItemType), itemType); - MediaPortal.Playlists.PlayList playlist; - playlist = GetEMPH().GetPlaylist(playlistTypeResolve); - System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); - System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); - System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.Playlists.PlayListItem )); - MediaPortal.Playlists.PlayListItem playlistItem; + return GetEMPH().AddPlaylistItem(playlistTypeResolve,fileName,description,duration,itemTypeResolve); + } - try + [WebMethod(Description="This command adds an item to the nominated playlist.")] + public bool AddPlaylistItemUsingDB(string playlistType, string itemType, string fileName) { - xw.WriteStartDocument(); - xw.WriteStartElement("MPData"); - xw.WriteStartElement("Playlist"); - xw.WriteAttributeString("type", playlistType); + if (fileName=="") {return false;} - for (int i = 0; i <= playlist.Count - 1; i++) + //resolve playlistType + MediaPortal.Playlists.PlayListType playlistTypeResolve; + if (Enum.IsDefined(typeof(MediaPortal.Playlists.PlayListType),playlistType)==false) { - playlistItem = (MediaPortal.Playlists.PlayListItem)playlist[i]; - xs.Serialize(xw, playlistItem); + return false; } - xw.WriteEndElement(); - xw.WriteEndElement(); - xw.WriteEndDocument(); + playlistTypeResolve = (MediaPortal.Playlists.PlayListType)Enum.Parse(typeof(MediaPortal.Playlists.PlayListType), playlistType); - xw.Flush(); - } - catch (Exception ex) - { - return ex.ToString(); - } + //resolve itemType + MediaPortal.Playlists.PlayListItem.PlayListItemType itemTypeResolve; + if (Enum.IsDefined(typeof(MediaPortal.Playlists.PlayListItem.PlayListItemType),itemType )==false) + { + return false; + } - return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); - } + itemTypeResolve = (MediaPortal.Playlists.PlayListItem.PlayListItemType)Enum.Parse(typeof(MediaPortal.Playlists.PlayListItem.PlayListItemType), itemType); - [WebMethod(Description="This command adds an item to the nominated playlist.")] - public bool AddPlaylistItem(string playlistType, string fileName, string description, int duration, string itemType) - { - if (fileName=="") {return false;} - - //resolve playlistType - MediaPortal.Playlists.PlayListType playlistTypeResolve; - if (Enum.IsDefined(typeof(MediaPortal.Playlists.PlayListType),playlistType)==false) - { - return false; + return GetEMPH().AddPlaylistItem(playlistTypeResolve,itemTypeResolve,fileName ); } - - playlistTypeResolve = (MediaPortal.Playlists.PlayListType)Enum.Parse(typeof(MediaPortal.Playlists.PlayListType),playlistType); - //resolve itemType - MediaPortal.Playlists.PlayListItem.PlayListItemType itemTypeResolve; - if (Enum.IsDefined(typeof(MediaPortal.Playlists.PlayListItem.PlayListItemType),itemType )==false) + [WebMethod(Description="This command removes an item from the nominated playlist.")] + public bool RemovePlaylistItem(string playlistType, string fileName) { - return false; - } + if (fileName=="") {return false;} - itemTypeResolve = (MediaPortal.Playlists.PlayListItem.PlayListItemType)Enum.Parse(typeof(MediaPortal.Playlists.PlayListItem.PlayListItemType), itemType); + //resolve playlistType + MediaPortal.Playlists.PlayListType playlistTypeResolve; + if (Enum.IsDefined(typeof(MediaPortal.Playlists.PlayListType),playlistType)==false) + { + return false; + } + playlistTypeResolve = (MediaPortal.Playlists.PlayListType)Enum.Parse(typeof(MediaPortal.Playlists.PlayListType), playlistType); - return GetEMPH().AddPlaylistItem(playlistTypeResolve,fileName,description,duration,itemTypeResolve); - } + return GetEMPH().RemovePlaylistItem(playlistTypeResolve,fileName); + } - [WebMethod(Description="This command adds an item to the nominated playlist.")] - public bool AddPlaylistItemUsingDB(string playlistType, string itemType, string fileName) - { - if (fileName=="") {return false;} + [WebMethod(Description="This command plays an item from the nominated playlist.")] + public bool PlayPlaylistItem(string playlistType, int songNum) + { + //resolve playlistType + MediaPortal.Playlists.PlayListType playlistTypeResolve; + if (Enum.IsDefined(typeof(MediaPortal.Playlists.PlayListType),playlistType)==false) + { + return false; + } - //resolve playlistType - MediaPortal.Playlists.PlayListType playlistTypeResolve; - if (Enum.IsDefined(typeof(MediaPortal.Playlists.PlayListType),playlistType)==false) - { - return false; + playlistTypeResolve = (MediaPortal.Playlists.PlayListType)Enum.Parse(typeof(MediaPortal.Playlists.PlayListType), playlistType); + + return GetEMPH().PlayPlaylistItem(playlistTypeResolve,songNum); } - playlistTypeResolve = (MediaPortal.Playlists.PlayListType)Enum.Parse(typeof(MediaPortal.Playlists.PlayListType), playlistType); - - //resolve itemType - MediaPortal.Playlists.PlayListItem.PlayListItemType itemTypeResolve; - if (Enum.IsDefined(typeof(MediaPortal.Playlists.PlayListItem.PlayListItemType),itemType )==false) + [WebMethod(Description="This command clears a playlist.")] + public bool ClearPlaylistItem(string playlistType) { - return false; - } + //resolve playlistType + MediaPortal.Playlists.PlayListType playlistTypeResolve; + if (Enum.IsDefined(typeof(MediaPortal.Playlists.PlayListType),playlistType)==false) + { + return false; + } - itemTypeResolve = (MediaPortal.Playlists.PlayListItem.PlayListItemType)Enum.Parse(typeof(MediaPortal.Playlists.PlayListItem.PlayListItemType), itemType); + playlistTypeResolve = (MediaPortal.Playlists.PlayListType)Enum.Parse(typeof(MediaPortal.Playlists.PlayListType), playlistType); - return GetEMPH().AddPlaylistItem(playlistTypeResolve,itemTypeResolve,fileName ); - } + return GetEMPH().ClearPlaylist(playlistTypeResolve); + } + #endregion - [WebMethod(Description="This command removes an item from the nominated playlist.")] - public bool RemovePlaylistItem(string playlistType, string fileName) - { - if (fileName=="") {return false;} + #region settings commands + [WebMethod(Description="This command retrieves the relevant config setting from the MP XML Settings file.")] + public string GetMPSetting(string section, string entry) + { + if ((section=="") || (entry=="")) + { + return ""; + } - //resolve playlistType - MediaPortal.Playlists.PlayListType playlistTypeResolve; - if (Enum.IsDefined(typeof(MediaPortal.Playlists.PlayListType),playlistType)==false) - { - return false; + return GetEMPH().GetMPSettingAsString(section,entry); } - playlistTypeResolve = (MediaPortal.Playlists.PlayListType)Enum.Parse(typeof(MediaPortal.Playlists.PlayListType), playlistType); + [WebMethod(Description="This command sets the value into the relevant config setting from the MP XML Settings file.")] + public bool SetMPSetting(string section, string entry, string value) + { + if ((section=="") || (entry=="")) + { + return false; + } - return GetEMPH().RemovePlaylistItem(playlistTypeResolve,fileName); - } + return GetEMPH().SetMPSetting(section, entry, value); + } - [WebMethod(Description="This command plays an item from the nominated playlist.")] - public bool PlayPlaylistItem(string playlistType, int songNum) - { - //resolve playlistType - MediaPortal.Playlists.PlayListType playlistTypeResolve; - if (Enum.IsDefined(typeof(MediaPortal.Playlists.PlayListType),playlistType)==false) + [WebMethod(Description="This command removes a particular entry from the relevant section in the MP XML Settings file.")] + public bool MPSettingsRemoveEntry(string section, string entry) { - return false; + if ((section=="") || (entry=="")) + { + return false; + } + + return GetEMPH().RemoveMPSetting(section, entry); } + #endregion - playlistTypeResolve = (MediaPortal.Playlists.PlayListType)Enum.Parse(typeof(MediaPortal.Playlists.PlayListType), playlistType); - - return GetEMPH().PlayPlaylistItem(playlistTypeResolve,songNum); - } - - [WebMethod(Description="This command clears a playlist.")] - public bool ClearPlaylistItem(string playlistType) - { - //resolve playlistType - MediaPortal.Playlists.PlayListType playlistTypeResolve; - if (Enum.IsDefined(typeof(MediaPortal.Playlists.PlayListType),playlistType)==false) + #region version commands + [WebMethod(Description="This command returns the version of the ECP2Assembly.dll running within MediaPortal.")] + public string GetMPECP2AssemblyVersion() { - return false; + return GetEMPH().MPECP2Version; } - playlistTypeResolve = (MediaPortal.Playlists.PlayListType)Enum.Parse(typeof(MediaPortal.Playlists.PlayListType), playlistType); - - return GetEMPH().ClearPlaylist(playlistTypeResolve); - } - - [WebMethod(Description="This command retrieves the relevant config setting from the MP XML Settings file.")] - public string GetMPSetting(string section, string entry) - { - if ((section=="") || (entry=="")) + [WebMethod(Description="This command returns the version of the ECP2Assembly.dll running within this web service.")] + public string GetWSECP2AssemblyVersion() { - return ""; + return System.Reflection.Assembly.GetAssembly(GetEMPH().GetType()).GetName().Version.ToString(); } - return GetEMPH().GetMPSettingAsString(section,entry); - } - - [WebMethod(Description="This command sets the value into the relevant config setting from the MP XML Settings file.")] - public bool SetMPSetting(string section, string entry, string value) - { - if ((section=="") || (entry=="")) + [WebMethod(Description="This command returns the version of the web service.")] + public string GetWSVersion() { - return false; + return System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(); } - return GetEMPH().SetMPSetting(section, entry, value); - } - - [WebMethod(Description="This command removes a particular entry from the relevant section in the MP XML Settings file.")] - public bool MPSettingsRemoveEntry(string section, string entry) - { - if ((section=="") || (entry=="")) + [WebMethod(Description="This command returns the version of MediaPortal running.")] + public string GetMPVersion() { - return false; + return GetEMPH().MPVersion; } + #endregion +} - return GetEMPH().RemoveMPSetting(section, entry); - } - [WebMethod(Description="This command returns the version of the ECP2Assembly.dll running within MediaPortal.")] - public string GetMPECP2AssemblyVersion() - { - return GetEMPH().MPECP2Version; - } - - [WebMethod(Description="This command returns the version of the ECP2Assembly.dll running within this web service.")] - public string GetWSECP2AssemblyVersion() - { - return System.Reflection.Assembly.GetAssembly(GetEMPH().GetType()).GetName().Version.ToString(); - } - - [WebMethod(Description="This command returns the version of the web service.")] - public string GetWSVersion() - { - return System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(); - } - - [WebMethod(Description="This command returns the version of MediaPortal running.")] - public string GetMPVersion() - { - return GetEMPH().MPVersion; - } - - } - - } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sam...@us...> - 2006-06-18 05:37:58
|
Revision: 13 Author: samuel337 Date: 2006-06-17 22:37:49 -0700 (Sat, 17 Jun 2006) ViewCVS: http://svn.sourceforge.net/mp-webinterface/?rev=13&view=rev Log Message: ----------- Fixed path problems when starting on startup in MPWApplication Modified Paths: -------------- trunk/source/MPWApplication/frmMain.Designer.cs trunk/source/MPWApplication/frmMain.cs Modified: trunk/source/MPWApplication/frmMain.Designer.cs =================================================================== --- trunk/source/MPWApplication/frmMain.Designer.cs 2006-06-10 15:41:52 UTC (rev 12) +++ trunk/source/MPWApplication/frmMain.Designer.cs 2006-06-18 05:37:49 UTC (rev 13) @@ -76,9 +76,9 @@ this.LlblMPWWebsite = new System.Windows.Forms.LinkLabel(); this.LblCredits = new System.Windows.Forms.Label(); this.grpMPWOptions = new System.Windows.Forms.GroupBox(); + this.cmdChangePassword = new System.Windows.Forms.Button(); this.cmdChangeMPWPort = new System.Windows.Forms.Button(); this.cmdStartMPWOnStartup = new System.Windows.Forms.Button(); - this.cmdChangePassword = new System.Windows.Forms.Button(); this.grpCurrentStatus.SuspendLayout(); this.grpLogs.SuspendLayout(); this.grpMPStatus.SuspendLayout(); @@ -168,9 +168,9 @@ // // CmdRestartServer // - this.CmdRestartServer.Location = new System.Drawing.Point(346, 32); + this.CmdRestartServer.Location = new System.Drawing.Point(341, 32); this.CmdRestartServer.Name = "CmdRestartServer"; - this.CmdRestartServer.Size = new System.Drawing.Size(153, 23); + this.CmdRestartServer.Size = new System.Drawing.Size(158, 23); this.CmdRestartServer.TabIndex = 2; this.CmdRestartServer.Text = "&Restart Web Server"; this.CmdRestartServer.UseVisualStyleBackColor = true; @@ -178,9 +178,9 @@ // // CmdStopServer // - this.CmdStopServer.Location = new System.Drawing.Point(177, 32); + this.CmdStopServer.Location = new System.Drawing.Point(173, 32); this.CmdStopServer.Name = "CmdStopServer"; - this.CmdStopServer.Size = new System.Drawing.Size(153, 23); + this.CmdStopServer.Size = new System.Drawing.Size(160, 23); this.CmdStopServer.TabIndex = 1; this.CmdStopServer.Text = "S&top Web Server"; this.CmdStopServer.UseVisualStyleBackColor = true; @@ -190,7 +190,7 @@ // this.CmdStartServer.Location = new System.Drawing.Point(9, 32); this.CmdStartServer.Name = "CmdStartServer"; - this.CmdStartServer.Size = new System.Drawing.Size(153, 23); + this.CmdStartServer.Size = new System.Drawing.Size(158, 23); this.CmdStartServer.TabIndex = 0; this.CmdStartServer.Text = "&Start Web Server"; this.CmdStartServer.UseVisualStyleBackColor = true; @@ -527,6 +527,16 @@ this.grpMPWOptions.TabStop = false; this.grpMPWOptions.Text = "Options"; // + // cmdChangePassword + // + this.cmdChangePassword.Location = new System.Drawing.Point(341, 14); + this.cmdChangePassword.Name = "cmdChangePassword"; + this.cmdChangePassword.Size = new System.Drawing.Size(158, 23); + this.cmdChangePassword.TabIndex = 2; + this.cmdChangePassword.Text = "Change Password"; + this.cmdChangePassword.UseVisualStyleBackColor = true; + this.cmdChangePassword.Click += new System.EventHandler(this.cmdChangePassword_Click); + // // cmdChangeMPWPort // this.cmdChangeMPWPort.Location = new System.Drawing.Point(175, 14); @@ -547,16 +557,6 @@ this.cmdStartMPWOnStartup.UseVisualStyleBackColor = true; this.cmdStartMPWOnStartup.Click += new System.EventHandler(this.cmdStartMPWOnStartup_Click); // - // cmdChangePassword - // - this.cmdChangePassword.Location = new System.Drawing.Point(341, 14); - this.cmdChangePassword.Name = "cmdChangePassword"; - this.cmdChangePassword.Size = new System.Drawing.Size(158, 23); - this.cmdChangePassword.TabIndex = 2; - this.cmdChangePassword.Text = "Change Password"; - this.cmdChangePassword.UseVisualStyleBackColor = true; - this.cmdChangePassword.Click += new System.EventHandler(this.cmdChangePassword_Click); - // // frmMain // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); Modified: trunk/source/MPWApplication/frmMain.cs =================================================================== --- trunk/source/MPWApplication/frmMain.cs 2006-06-10 15:41:52 UTC (rev 12) +++ trunk/source/MPWApplication/frmMain.cs 2006-06-18 05:37:49 UTC (rev 13) @@ -163,7 +163,7 @@ private string GetMPVersion() { string MPAppConfigPath; - MPAppConfigPath = Environment.CurrentDirectory; + MPAppConfigPath = System.IO.Path.GetDirectoryName(Application.ExecutablePath); MPAppConfigPath = MPAppConfigPath.Remove(MPAppConfigPath.LastIndexOf(System.IO.Path.DirectorySeparatorChar)); MPAppConfigPath += @"\MediaPortal.exe.config"; @@ -193,7 +193,7 @@ private string GetMPECP2LoaderVersion() { string MPECP2LoaderPath; - MPECP2LoaderPath = Environment.CurrentDirectory; + MPECP2LoaderPath = System.IO.Path.GetDirectoryName(Application.ExecutablePath); MPECP2LoaderPath = MPECP2LoaderPath.Remove(MPECP2LoaderPath.LastIndexOf(System.IO.Path.DirectorySeparatorChar)); MPECP2LoaderPath += @"\plugins\process\ECP2Plugin.dll"; @@ -208,7 +208,7 @@ private string GetMPECP2Version() { string MPECP2Path; - MPECP2Path = Environment.CurrentDirectory; + MPECP2Path = System.IO.Path.GetDirectoryName(Application.ExecutablePath); MPECP2Path = MPECP2Path.Remove(MPECP2Path.LastIndexOf(System.IO.Path.DirectorySeparatorChar)); MPECP2Path += @"\ECP2Assembly.dll"; @@ -223,7 +223,7 @@ private string GetMPWECP2Version() { string MPWECP2Path; - MPWECP2Path = Environment.CurrentDirectory; + MPWECP2Path = System.IO.Path.GetDirectoryName(Application.ExecutablePath); MPWECP2Path += @"\htdocs\MPExtControlWS\bin\ECP2Assembly.dll"; if (System.IO.File.Exists(MPWECP2Path) == false) @@ -237,7 +237,7 @@ private string GetMPWVersion() { string MPWVersionInfoPath; - MPWVersionInfoPath = Environment.CurrentDirectory; + MPWVersionInfoPath = System.IO.Path.GetDirectoryName(Application.ExecutablePath); MPWVersionInfoPath += @"\htdocs\webscheduler\functions\version.php"; if (System.IO.File.Exists(MPWVersionInfoPath) == false) @@ -287,7 +287,7 @@ psi.RedirectStandardOutput = true; psi.UseShellExecute = false; - psi.FileName = Environment.CurrentDirectory + @"\apache\bin\apache.exe"; + psi.FileName = System.IO.Path.GetDirectoryName(Application.ExecutablePath) + @"\apache\bin\apache.exe"; if (System.IO.File.Exists(psi.FileName) == false) { @@ -536,7 +536,7 @@ { System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo(); psi.UseShellExecute = true; - psi.FileName = Environment.CurrentDirectory + @"\apache\logs\error.log"; + psi.FileName = System.IO.Path.GetDirectoryName(Application.ExecutablePath) + @"\apache\logs\error.log"; if (System.IO.File.Exists(psi.FileName) == false) { MessageBox.Show("The Apache log file could not be found.", "MPW Error", MessageBoxButtons.OK, MessageBoxIcon.Error); @@ -550,7 +550,7 @@ { System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo(); psi.UseShellExecute = true; - psi.FileName = Environment.CurrentDirectory + @"\php\log\phperror.log"; + psi.FileName = System.IO.Path.GetDirectoryName(Application.ExecutablePath) + @"\php\log\phperror.log"; if (System.IO.File.Exists(psi.FileName) == false) { MessageBox.Show("The PHP log file could not be found.", "MPW Error", MessageBoxButtons.OK, MessageBoxIcon.Error); @@ -566,7 +566,7 @@ psi.UseShellExecute = true; string MPLogPath; - MPLogPath = Environment.CurrentDirectory; + MPLogPath = System.IO.Path.GetDirectoryName(Application.ExecutablePath); MPLogPath = MPLogPath.Remove(MPLogPath.LastIndexOf(System.IO.Path.DirectorySeparatorChar)); MPLogPath += @"\log\MediaPortal.log"; psi.FileName = MPLogPath; @@ -748,7 +748,7 @@ { if (CheckMPWOnStartupStatus() == true) { - cmdStartMPWOnStartup.Text = "Stop MPW Starting On Startup"; + cmdStartMPWOnStartup.Text = "Remove MPW From Startup"; cmdStartMPWOnStartup.Tag = "remove"; } else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sam...@us...> - 2006-06-10 15:42:04
|
Revision: 12 Author: samuel337 Date: 2006-06-10 08:41:52 -0700 (Sat, 10 Jun 2006) ViewCVS: http://svn.sourceforge.net/mp-webinterface/?rev=12&view=rev Log Message: ----------- updated code on all XML-returning functions to return UTF8 encoded data (now more efficient too). Modified Paths: -------------- trunk/source/ECP2WebService/App_Code/Service.cs Modified: trunk/source/ECP2WebService/App_Code/Service.cs =================================================================== --- trunk/source/ECP2WebService/App_Code/Service.cs 2006-06-01 07:03:28 UTC (rev 11) +++ trunk/source/ECP2WebService/App_Code/Service.cs 2006-06-10 15:41:52 UTC (rev 12) @@ -33,7 +33,6 @@ return GetEMPH().SendActionByID(actionID); } - [WebMethod(Description="This command gets the current path to MediaPortal.")] public string GetMPPath() { @@ -263,6 +262,17 @@ return GetEMPH().ImportXMLTVGuide(); } + private System.Xml.XmlWriterSettings GetXMLDocWriterSettings() + { + System.Xml.XmlWriterSettings xwSettings = new System.Xml.XmlWriterSettings(); + xwSettings.Encoding = System.Text.Encoding.UTF8; + xwSettings.Indent = true; + xwSettings.OmitXmlDeclaration = false; + xwSettings.ConformanceLevel = System.Xml.ConformanceLevel.Auto; + + return xwSettings; + } + [WebMethod(Description="This command retrieves all the channels in MP in XML format.")] public string GetChannels() { @@ -279,31 +289,36 @@ xmlAttributes.XmlIgnore = true; xmlOverrides.Add(typeof(MediaPortal.TV.Database.TVChannel), "CurrentProgram", xmlAttributes); - System.Text.StringBuilder sb = new System.Text.StringBuilder(); - System.IO.StringWriter sw = new System.IO.StringWriter(sb); - System.Text.StringBuilder sbXML = new System.Text.StringBuilder(); - System.IO.StringWriter swXML = new System.IO.StringWriter(sbXML); - System.Xml.XmlTextWriter xw = new System.Xml.XmlTextWriter(swXML); + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVChannel),xmlOverrides); MediaPortal.TV.Database.TVChannel chn; - xw.WriteStartDocument(); - xw.WriteStartElement("MPData"); - xw.WriteStartElement("TVChannels"); + try + { + xw.WriteStartDocument(); + xw.WriteStartElement("MPData"); + xw.WriteStartElement("TVChannels"); - for (int i = 0; i <= chnList.Count - 1; i++) + for (int i = 0; i <= chnList.Count - 1; i++) + { + chn = (MediaPortal.TV.Database.TVChannel)chnList[i]; + + xs.Serialize(xw, chn); + } + + xw.WriteEndElement(); + xw.WriteEndElement(); + xw.WriteEndDocument(); + + xw.Flush(); + } + catch (Exception ex) { - chn = (MediaPortal.TV.Database.TVChannel)chnList[i]; - xs.Serialize(sw, chn); - xw.WriteRaw(sb.ToString().Substring(sb.ToString().IndexOf("?>") + 2)); - sb.Remove(0, sb.Length - 1); + return ex.ToString(); } - xw.WriteEndElement(); - xw.WriteEndElement(); - xw.WriteEndDocument(); - - return sbXML.ToString(); + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); } [WebMethod(Description = "This command retrieves the specified channel from MP in XML format.")] @@ -320,27 +335,30 @@ xmlAttributes.XmlIgnore = true; xmlOverrides.Add(typeof(MediaPortal.TV.Database.TVChannel), "CurrentProgram", xmlAttributes); - System.Text.StringBuilder sb = new System.Text.StringBuilder(); - System.IO.StringWriter sw = new System.IO.StringWriter(sb); - System.Text.StringBuilder sbXML = new System.Text.StringBuilder(); - System.IO.StringWriter swXML = new System.IO.StringWriter(sbXML); - System.Xml.XmlTextWriter xw = new System.Xml.XmlTextWriter(swXML); + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVChannel), xmlOverrides); - xw.WriteStartDocument(); - xw.WriteStartElement("MPData"); - xw.WriteStartElement("TVChannels"); + try + { + xw.WriteStartDocument(); + xw.WriteStartElement("MPData"); + xw.WriteStartElement("TVChannels"); - xs.Serialize(sw, chn); + xs.Serialize(xw, chn); - xw.WriteRaw(sb.ToString().Substring(sb.ToString().IndexOf("?>") + 2)); - sb.Remove(0, sb.Length - 1); + xw.WriteEndElement(); + xw.WriteEndElement(); + xw.WriteEndDocument(); - xw.WriteEndElement(); - xw.WriteEndElement(); - xw.WriteEndDocument(); - - return sbXML.ToString(); + xw.Flush(); + } + catch (Exception ex) + { + return ex.ToString(); + } + + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); } [WebMethod(Description="This command converts a channelID into its corresponding channel name.")] @@ -385,9 +403,8 @@ List<string> genresList; genresList = GetEMPH().GetGenres(); - System.Text.StringBuilder sbXML = new System.Text.StringBuilder(); - System.IO.StringWriter swXML = new System.IO.StringWriter(sbXML); - System.Xml.XmlTextWriter xw = new System.Xml.XmlTextWriter(swXML); + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); xw.WriteStartDocument(); xw.WriteStartElement("MPData"); @@ -406,8 +423,10 @@ xw.WriteEndElement(); xw.WriteEndElement(); xw.WriteEndDocument(); - - return sbXML.ToString(); + + xw.Flush(); + + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); } [WebMethod(Description="This command returns the list of TV programs within the given date in XML format.")] @@ -416,35 +435,35 @@ List<MediaPortal.TV.Database.TVProgram> progList; progList = GetEMPH().GetPrograms(startDateTime,endDateTime); - System.Text.StringBuilder sb = new System.Text.StringBuilder(); - System.IO.StringWriter sw = new System.IO.StringWriter(sb); - System.Text.StringBuilder sbXML = new System.Text.StringBuilder(); - System.IO.StringWriter swXML = new System.IO.StringWriter(sbXML); - System.Xml.XmlTextWriter xw = new System.Xml.XmlTextWriter(swXML); + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVProgram )); MediaPortal.TV.Database.TVProgram prog; - xw.WriteStartDocument(); - xw.WriteStartElement("MPData"); - xw.WriteStartElement("TVPrograms"); - - for (int i = 0; i <= progList.Count - 1; i++) + try { - prog = (MediaPortal.TV.Database.TVProgram)progList[i]; - xs.Serialize(sw, prog); + xw.WriteStartDocument(); + xw.WriteStartElement("MPData"); + xw.WriteStartElement("TVPrograms"); - //write serialisation to xmltextwriter, without XML declaration line - xw.WriteRaw(sb.ToString().Substring(sb.ToString().IndexOf("?>") + 2)); + for (int i = 0; i <= progList.Count - 1; i++) + { + prog = (MediaPortal.TV.Database.TVProgram)progList[i]; + xs.Serialize(xw, prog); + } - //clear serialisation stringbuilder - sb.Remove(0, sb.Length - 1); + xw.WriteEndElement(); + xw.WriteEndElement(); + xw.WriteEndDocument(); + + xw.Flush(); } + catch (Exception ex) + { + return ex.ToString(); + } - xw.WriteEndElement(); - xw.WriteEndElement(); - xw.WriteEndDocument(); - - return sbXML.ToString(); + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); } [WebMethod(Description="This command returns a list of all the TV programs in XML format.")] @@ -453,35 +472,35 @@ List<MediaPortal.TV.Database.TVProgram> progList; progList = GetEMPH().GetPrograms(); - System.Text.StringBuilder sb = new System.Text.StringBuilder(); - System.IO.StringWriter sw = new System.IO.StringWriter(sb); - System.Text.StringBuilder sbXML = new System.Text.StringBuilder(); - System.IO.StringWriter swXML = new System.IO.StringWriter(sbXML); - System.Xml.XmlTextWriter xw = new System.Xml.XmlTextWriter(swXML); + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVProgram )); MediaPortal.TV.Database.TVProgram prog; - xw.WriteStartDocument(); - xw.WriteStartElement("MPData"); - xw.WriteStartElement("TVPrograms"); - - for (int i = 0; i <= progList.Count - 1; i++) + try { - prog = (MediaPortal.TV.Database.TVProgram)progList[i]; - xs.Serialize(sw, prog); + xw.WriteStartDocument(); + xw.WriteStartElement("MPData"); + xw.WriteStartElement("TVPrograms"); - //write serialisation to xmltextwriter, without XML declaration line - xw.WriteRaw(sb.ToString().Substring(sb.ToString().IndexOf("?>") + 2)); + for (int i = 0; i <= progList.Count - 1; i++) + { + prog = (MediaPortal.TV.Database.TVProgram)progList[i]; + xs.Serialize(xw, prog); + } - //clear serialisation stringbuilder - sb.Remove(0, sb.Length - 1); + xw.WriteEndElement(); + xw.WriteEndElement(); + xw.WriteEndDocument(); + + xw.Flush(); } + catch (Exception ex) + { + return ex.ToString(); + } - xw.WriteEndElement(); - xw.WriteEndElement(); - xw.WriteEndDocument(); - - return sbXML.ToString(); + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); } [WebMethod(Description="This command returns the list of TV program genres in XML format.")] @@ -490,35 +509,35 @@ List<MediaPortal.TV.Database.TVProgram> progList; progList = GetEMPH().GetPrograms(GetChannelName(channelID),startDateTime,endDateTime); - System.Text.StringBuilder sb = new System.Text.StringBuilder(); - System.IO.StringWriter sw = new System.IO.StringWriter(sb); - System.Text.StringBuilder sbXML = new System.Text.StringBuilder(); - System.IO.StringWriter swXML = new System.IO.StringWriter(sbXML); - System.Xml.XmlTextWriter xw = new System.Xml.XmlTextWriter(swXML); + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVProgram )); MediaPortal.TV.Database.TVProgram prog; - xw.WriteStartDocument(); - xw.WriteStartElement("MPData"); - xw.WriteStartElement("TVPrograms"); - - for (int i = 0; i <= progList.Count - 1; i++) + try { - prog = (MediaPortal.TV.Database.TVProgram)progList[i]; - xs.Serialize(sw, prog); + xw.WriteStartDocument(); + xw.WriteStartElement("MPData"); + xw.WriteStartElement("TVPrograms"); - //write serialisation to xmltextwriter, without XML declaration line - xw.WriteRaw(sb.ToString().Substring(sb.ToString().IndexOf("?>") + 2)); + for (int i = 0; i <= progList.Count - 1; i++) + { + prog = (MediaPortal.TV.Database.TVProgram)progList[i]; + xs.Serialize(xw, prog); + } - //clear serialisation stringbuilder - sb.Remove(0, sb.Length - 1); + xw.WriteEndElement(); + xw.WriteEndElement(); + xw.WriteEndDocument(); + + xw.Flush(); } + catch (Exception ex) + { + return ex.ToString(); + } - xw.WriteEndElement(); - xw.WriteEndElement(); - xw.WriteEndDocument(); - - return sbXML.ToString(); + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); } [WebMethod(Description="This command returns the list of TV recordings in XML format.")] @@ -527,35 +546,35 @@ List<MediaPortal.TV.Database.TVRecording > recList; recList = GetEMPH().GetRecordings(); - System.Text.StringBuilder sb = new System.Text.StringBuilder(); - System.IO.StringWriter sw = new System.IO.StringWriter(sb); - System.Text.StringBuilder sbXML = new System.Text.StringBuilder(); - System.IO.StringWriter swXML = new System.IO.StringWriter(sbXML); - System.Xml.XmlTextWriter xw = new System.Xml.XmlTextWriter(swXML); + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVRecording )); MediaPortal.TV.Database.TVRecording rec; - xw.WriteStartDocument(); - xw.WriteStartElement("MPData"); - xw.WriteStartElement("TVRecordings"); - - for (int i = 0; i <= recList.Count - 1; i++) + try { - rec = (MediaPortal.TV.Database.TVRecording)recList[i]; - xs.Serialize(sw, rec); + xw.WriteStartDocument(); + xw.WriteStartElement("MPData"); + xw.WriteStartElement("TVRecordings"); - //write serialisation to xmltextwriter, without XML declaration line - xw.WriteRaw(sb.ToString().Substring(sb.ToString().IndexOf("?>") + 2)); + for (int i = 0; i <= recList.Count - 1; i++) + { + rec = (MediaPortal.TV.Database.TVRecording)recList[i]; + xs.Serialize(xw, rec); + } - //clear serialisation stringbuilder - sb.Remove(0, sb.Length - 1); + xw.WriteEndElement(); + xw.WriteEndElement(); + xw.WriteEndDocument(); + + xw.Flush(); } + catch (Exception ex) + { + return ex.ToString(); + } - xw.WriteEndElement(); - xw.WriteEndElement(); - xw.WriteEndDocument(); - - return sbXML.ToString(); + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); } [WebMethod(Description="This command returns the list of all recorded TV items in XML format.")] @@ -564,35 +583,35 @@ List<MediaPortal.TV.Database.TVRecorded> recdTVList; recdTVList = GetEMPH().GetAllRecordedTV(); - System.Text.StringBuilder sb = new System.Text.StringBuilder(); - System.IO.StringWriter sw = new System.IO.StringWriter(sb); - System.Text.StringBuilder sbXML = new System.Text.StringBuilder(); - System.IO.StringWriter swXML = new System.IO.StringWriter(sbXML); - System.Xml.XmlTextWriter xw = new System.Xml.XmlTextWriter(swXML); + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVRecorded )); MediaPortal.TV.Database.TVRecorded recdTV; - xw.WriteStartDocument(); - xw.WriteStartElement("MPData"); - xw.WriteStartElement("TVRecorded"); - - for (int i = 0; i <= recdTVList.Count - 1; i++) + try { - recdTV = (MediaPortal.TV.Database.TVRecorded)recdTVList[i]; - xs.Serialize(sw, recdTV); + xw.WriteStartDocument(); + xw.WriteStartElement("MPData"); + xw.WriteStartElement("TVRecorded"); - //write serialisation to xmltextwriter, without XML declaration line - xw.WriteRaw(sb.ToString().Substring(sb.ToString().IndexOf("?>") + 2)); + for (int i = 0; i <= recdTVList.Count - 1; i++) + { + recdTV = (MediaPortal.TV.Database.TVRecorded)recdTVList[i]; + xs.Serialize(xw, recdTV); + } - //clear serialisation stringbuilder - sb.Remove(0, sb.Length - 1); + xw.WriteEndElement(); + xw.WriteEndElement(); + xw.WriteEndDocument(); + + xw.Flush(); } + catch (Exception ex) + { + return ex.ToString(); + } - xw.WriteEndElement(); - xw.WriteEndElement(); - xw.WriteEndDocument(); - - return sbXML.ToString(); + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); } [WebMethod(Description = "This command returns the specified recorded TV item in XML format.")] @@ -601,30 +620,30 @@ MediaPortal.TV.Database.TVRecorded recdTV; recdTV = GetEMPH().GetRecordedTV(recordedTVFileName); - System.Text.StringBuilder sb = new System.Text.StringBuilder(); - System.IO.StringWriter sw = new System.IO.StringWriter(sb); - System.Text.StringBuilder sbXML = new System.Text.StringBuilder(); - System.IO.StringWriter swXML = new System.IO.StringWriter(sbXML); - System.Xml.XmlTextWriter xw = new System.Xml.XmlTextWriter(swXML); + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVRecorded)); - - xw.WriteStartDocument(); - xw.WriteStartElement("MPData"); - xw.WriteStartElement("TVRecorded"); - xs.Serialize(sw, recdTV); + try + { + xw.WriteStartDocument(); + xw.WriteStartElement("MPData"); + xw.WriteStartElement("TVRecorded"); - //write serialisation to xmltextwriter, without XML declaration line - xw.WriteRaw(sb.ToString().Substring(sb.ToString().IndexOf("?>") + 2)); + xs.Serialize(xw, recdTV); - //clear serialisation stringbuilder - sb.Remove(0, sb.Length - 1); + xw.WriteEndElement(); + xw.WriteEndElement(); + xw.WriteEndDocument(); - xw.WriteEndElement(); - xw.WriteEndElement(); - xw.WriteEndDocument(); + xw.Flush(); + } + catch (Exception ex) + { + return ex.ToString(); + } - return sbXML.ToString(); + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); } [WebMethod(Description="This command returns the name of the current playlist.")] @@ -654,36 +673,36 @@ MediaPortal.Playlists.PlayList playlist; playlist = GetEMPH().GetPlaylist(playlistTypeResolve); - System.Text.StringBuilder sb = new System.Text.StringBuilder(); - System.IO.StringWriter sw = new System.IO.StringWriter(sb); - System.Text.StringBuilder sbXML = new System.Text.StringBuilder(); - System.IO.StringWriter swXML = new System.IO.StringWriter(sbXML); - System.Xml.XmlTextWriter xw = new System.Xml.XmlTextWriter(swXML); + System.IO.MemoryStream xwMem = new System.IO.MemoryStream(); + System.Xml.XmlWriter xw = System.Xml.XmlWriter.Create(xwMem, GetXMLDocWriterSettings()); System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.Playlists.PlayListItem )); MediaPortal.Playlists.PlayListItem playlistItem; - xw.WriteStartDocument(); - xw.WriteStartElement("MPData"); - xw.WriteStartElement("Playlist"); - xw.WriteAttributeString("type", playlistType ); - - for (int i = 0; i <= playlist.Count - 1; i++) + try { - playlistItem = (MediaPortal.Playlists.PlayListItem )playlist[i]; - xs.Serialize(sw, playlistItem); + xw.WriteStartDocument(); + xw.WriteStartElement("MPData"); + xw.WriteStartElement("Playlist"); + xw.WriteAttributeString("type", playlistType); - //write serialisation to xmltextwriter, without XML declaration line - xw.WriteRaw(sb.ToString().Substring(sb.ToString().IndexOf("?>") + 2)); + for (int i = 0; i <= playlist.Count - 1; i++) + { + playlistItem = (MediaPortal.Playlists.PlayListItem)playlist[i]; + xs.Serialize(xw, playlistItem); + } - //clear serialisation stringbuilder - sb.Remove(0, sb.Length - 1); + xw.WriteEndElement(); + xw.WriteEndElement(); + xw.WriteEndDocument(); + + xw.Flush(); } + catch (Exception ex) + { + return ex.ToString(); + } - xw.WriteEndElement(); - xw.WriteEndElement(); - xw.WriteEndDocument(); - - return sbXML.ToString(); + return System.Text.Encoding.UTF8.GetString(xwMem.ToArray()); } [WebMethod(Description="This command adds an item to the nominated playlist.")] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sam...@us...> - 2006-06-01 07:03:34
|
Revision: 11 Author: samuel337 Date: 2006-06-01 00:03:28 -0700 (Thu, 01 Jun 2006) ViewCVS: http://svn.sourceforge.net/mp-webinterface/?rev=11&view=rev Log Message: ----------- Reduced need for MP assemblies in MPW folder - now automatically returns assemblies in MP folder Modified Paths: -------------- trunk/source/ECP2WebService/Global.asax Modified: trunk/source/ECP2WebService/Global.asax =================================================================== --- trunk/source/ECP2WebService/Global.asax 2006-06-01 07:02:01 UTC (rev 10) +++ trunk/source/ECP2WebService/Global.asax 2006-06-01 07:03:28 UTC (rev 11) @@ -9,6 +9,8 @@ //setup remoting communication System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel(new System.Runtime.Remoting.Channels.Tcp.TcpClientChannel(),false); + //attach to ResolveEventHandler in ECP2Assembly to resolve MP assembly issues + AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(ECP2Assembly.AssemblyResolve.MyResolveEventHandler); } void Application_End(object sender, EventArgs e) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sam...@us...> - 2006-06-01 07:02:09
|
Revision: 10 Author: samuel337 Date: 2006-06-01 00:02:01 -0700 (Thu, 01 Jun 2006) ViewCVS: http://svn.sourceforge.net/mp-webinterface/?rev=10&view=rev Log Message: ----------- Fixed problems with methods returning TV Channel related information Modified Paths: -------------- trunk/source/ECP2WebService/App_Code/Service.cs Modified: trunk/source/ECP2WebService/App_Code/Service.cs =================================================================== --- trunk/source/ECP2WebService/App_Code/Service.cs 2006-05-29 07:36:04 UTC (rev 9) +++ trunk/source/ECP2WebService/App_Code/Service.cs 2006-06-01 07:02:01 UTC (rev 10) @@ -269,12 +269,22 @@ List<MediaPortal.TV.Database.TVChannel> chnList; chnList = GetEMPH().GetChannels(); + if (chnList.Count == 0) return ""; + + // As CurrentProgram is not necessary, set its XMLIgnore attribute to true + System.Xml.Serialization.XmlAttributeOverrides xmlOverrides = new System.Xml.Serialization.XmlAttributeOverrides(); + System.Xml.Serialization.XmlAttributes xmlAttributes; + + xmlAttributes = new System.Xml.Serialization.XmlAttributes(); + xmlAttributes.XmlIgnore = true; + xmlOverrides.Add(typeof(MediaPortal.TV.Database.TVChannel), "CurrentProgram", xmlAttributes); + System.Text.StringBuilder sb = new System.Text.StringBuilder(); System.IO.StringWriter sw = new System.IO.StringWriter(sb); System.Text.StringBuilder sbXML = new System.Text.StringBuilder(); System.IO.StringWriter swXML = new System.IO.StringWriter(sbXML); System.Xml.XmlTextWriter xw = new System.Xml.XmlTextWriter(swXML); - System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVChannel)); + System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVChannel),xmlOverrides); MediaPortal.TV.Database.TVChannel chn; xw.WriteStartDocument(); @@ -283,7 +293,7 @@ for (int i = 0; i <= chnList.Count - 1; i++) { - chn = (MediaPortal.TV.Database.TVChannel)(chnList[i]); + chn = (MediaPortal.TV.Database.TVChannel)chnList[i]; xs.Serialize(sw, chn); xw.WriteRaw(sb.ToString().Substring(sb.ToString().IndexOf("?>") + 2)); sb.Remove(0, sb.Length - 1); @@ -292,7 +302,7 @@ xw.WriteEndElement(); xw.WriteEndElement(); xw.WriteEndDocument(); - + return sbXML.ToString(); } @@ -302,25 +312,34 @@ MediaPortal.TV.Database.TVChannel chn; chn = GetEMPH().GetChannel(channelID); + // As CurrentProgram is not necessary, set its XMLIgnore attribute to true + System.Xml.Serialization.XmlAttributeOverrides xmlOverrides = new System.Xml.Serialization.XmlAttributeOverrides(); + System.Xml.Serialization.XmlAttributes xmlAttributes; + + xmlAttributes = new System.Xml.Serialization.XmlAttributes(); + xmlAttributes.XmlIgnore = true; + xmlOverrides.Add(typeof(MediaPortal.TV.Database.TVChannel), "CurrentProgram", xmlAttributes); + System.Text.StringBuilder sb = new System.Text.StringBuilder(); System.IO.StringWriter sw = new System.IO.StringWriter(sb); System.Text.StringBuilder sbXML = new System.Text.StringBuilder(); System.IO.StringWriter swXML = new System.IO.StringWriter(sbXML); System.Xml.XmlTextWriter xw = new System.Xml.XmlTextWriter(swXML); - System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVChannel)); + System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(MediaPortal.TV.Database.TVChannel), xmlOverrides); xw.WriteStartDocument(); xw.WriteStartElement("MPData"); xw.WriteStartElement("TVChannels"); xs.Serialize(sw, chn); + xw.WriteRaw(sb.ToString().Substring(sb.ToString().IndexOf("?>") + 2)); sb.Remove(0, sb.Length - 1); xw.WriteEndElement(); xw.WriteEndElement(); xw.WriteEndDocument(); - + return sbXML.ToString(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sam...@us...> - 2006-05-29 07:36:12
|
Revision: 9 Author: samuel337 Date: 2006-05-29 00:36:04 -0700 (Mon, 29 May 2006) ViewCVS: http://svn.sourceforge.net/mp-webinterface/?rev=9&view=rev Log Message: ----------- Modified Paths: -------------- trunk/MPWebControl Setup Project/install generation checklist.txt Modified: trunk/MPWebControl Setup Project/install generation checklist.txt =================================================================== --- trunk/MPWebControl Setup Project/install generation checklist.txt 2006-05-24 14:33:41 UTC (rev 8) +++ trunk/MPWebControl Setup Project/install generation checklist.txt 2006-05-29 07:36:04 UTC (rev 9) @@ -1,5 +1,5 @@ -- pre-compile MPECP2WS using utility in setup project folder -- remove all MP assemblies from MPECP2WS's bin folder except Databases.dll +- pre-compile MPECP2WS using utility in setup project folder - remember to set ASPX are updatable option +- remove all MP assemblies from MPECP2WS's bin folder except DirectShowLib.dll (for GetChannel functions) - ensure latest versions of webscheduler, MPECP2WS, MPWApplication and MPWPathFix are in the MPWebControl folder - ensure httpd,conf, ssl,conf, php.ini, ECP2Assembly.dll.config have the PathFix variables in them - compress MPWebControl using batch file (requires 7-Zip) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mas...@us...> - 2006-05-24 14:33:50
|
Revision: 8 Author: maschine Date: 2006-05-24 07:33:41 -0700 (Wed, 24 May 2006) ViewCVS: http://svn.sourceforge.net/mp-webinterface/?rev=8&view=rev Log Message: ----------- In C# you don't need a break after you return something from a case-statement. Gives a compiler warning ("Unreachable code") so I removed it. Modified Paths: -------------- trunk/source/ECP2Assembly/clsMPHandler.cs Modified: trunk/source/ECP2Assembly/clsMPHandler.cs =================================================================== --- trunk/source/ECP2Assembly/clsMPHandler.cs 2006-05-24 09:28:12 UTC (rev 7) +++ trunk/source/ECP2Assembly/clsMPHandler.cs 2006-05-24 14:33:41 UTC (rev 8) @@ -316,59 +316,45 @@ { case "CurrentFile": return MediaPortal.Player.g_Player.CurrentFile; - break; case "CurrentPosition": return MediaPortal.Player.g_Player.CurrentPosition; - break; case "Duration": return MediaPortal.Player.g_Player.Duration; - break; case "FullScreen": return MediaPortal.Player.g_Player.FullScreen; - break; case "HasVideo": return MediaPortal.Player.g_Player.HasVideo; - break; case "IsDVD": return MediaPortal.Player.g_Player.IsDVD; - break; case "IsRadio": return MediaPortal.Player.g_Player.IsRadio; - break; case "IsTV": return MediaPortal.Player.g_Player.IsTV; - break; case "IsVideo": return MediaPortal.Player.g_Player.IsVideo; - break; case "Paused": return MediaPortal.Player.g_Player.Paused; - break; case "Playing": return MediaPortal.Player.g_Player.Playing; - break; case "Speed": return MediaPortal.Player.g_Player.Speed; - break; case "Stopped": return MediaPortal.Player.g_Player.Stopped; - break; case "Volume": return MediaPortal.Player.g_Player.Volume; - break; //if not one of the currently defined ones, use reflection to find it default: @@ -842,8 +828,6 @@ { return false; } - - break; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sam...@us...> - 2006-05-24 09:28:23
|
Revision: 7 Author: samuel337 Date: 2006-05-24 02:28:12 -0700 (Wed, 24 May 2006) ViewCVS: http://svn.sourceforge.net/mp-webinterface/?rev=7&view=rev Log Message: ----------- updated text: ensures databases.dll is included in setup Modified Paths: -------------- trunk/MPWebControl Setup Project/install generation checklist.txt Modified: trunk/MPWebControl Setup Project/install generation checklist.txt =================================================================== --- trunk/MPWebControl Setup Project/install generation checklist.txt 2006-05-24 09:27:12 UTC (rev 6) +++ trunk/MPWebControl Setup Project/install generation checklist.txt 2006-05-24 09:28:12 UTC (rev 7) @@ -1,5 +1,5 @@ - pre-compile MPECP2WS using utility in setup project folder -- remove all MP assemblies from MPECP2WS's bin folder +- remove all MP assemblies from MPECP2WS's bin folder except Databases.dll - ensure latest versions of webscheduler, MPECP2WS, MPWApplication and MPWPathFix are in the MPWebControl folder - ensure httpd,conf, ssl,conf, php.ini, ECP2Assembly.dll.config have the PathFix variables in them - compress MPWebControl using batch file (requires 7-Zip) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sam...@us...> - 2006-05-24 09:27:28
|
Revision: 6 Author: samuel337 Date: 2006-05-24 02:27:12 -0700 (Wed, 24 May 2006) ViewCVS: http://svn.sourceforge.net/mp-webinterface/?rev=6&view=rev Log Message: ----------- Modified Paths: -------------- trunk/source/ECP2WebService/Web.config Modified: trunk/source/ECP2WebService/Web.config =================================================================== --- trunk/source/ECP2WebService/Web.config 2006-05-24 09:25:46 UTC (rev 5) +++ trunk/source/ECP2WebService/Web.config 2006-05-24 09:27:12 UTC (rev 6) @@ -19,7 +19,15 @@ <compilation debug="true"> <assemblies> <add assembly="System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> - <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies></compilation> + <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> + <add assembly="Microsoft.DirectX.Direct3DX, Version=1.0.2906.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> + <add assembly="System.Runtime.Serialization.Formatters.Soap, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> + <add assembly="Microsoft.DirectX, Version=1.0.2902.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> + <add assembly="Microsoft.DirectX.Direct3D, Version=1.0.2902.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> + <add assembly="System.Management, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> + <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> + <add assembly="Microsoft.VisualC, Version=8.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> + <add assembly="System.ServiceProcess, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies></compilation> <!-- The <authentication> section enables configuration of the security authentication mode used by @@ -38,7 +46,6 @@ <error statusCode="404" redirect="FileNotFound.htm" /> </customErrors> --> - <!-- enable web service testing from remote machines --> <webServices> <protocols> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |