|
From: <an...@us...> - 2007-05-22 06:26:06
|
Revision: 412
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=412&view=rev
Author: and-81
Date: 2007-05-21 23:26:03 -0700 (Mon, 21 May 2007)
Log Message:
-----------
Adds a status icon for TV Server to the system tray (shows TV Cards status)
Added Paths:
-----------
trunk/plugins/TVServerStatus/
trunk/plugins/TVServerStatus/Graphics/
trunk/plugins/TVServerStatus/Graphics/Blue.png
trunk/plugins/TVServerStatus/Graphics/Green.png
trunk/plugins/TVServerStatus/Graphics/Red.png
trunk/plugins/TVServerStatus/Graphics/Yellow.png
trunk/plugins/TVServerStatus/PluginSetup.Designer.cs
trunk/plugins/TVServerStatus/PluginSetup.cs
trunk/plugins/TVServerStatus/PluginSetup.resx
trunk/plugins/TVServerStatus/Properties/
trunk/plugins/TVServerStatus/Properties/AssemblyInfo.cs
trunk/plugins/TVServerStatus/Properties/Resources.Designer.cs
trunk/plugins/TVServerStatus/Properties/Resources.resx
trunk/plugins/TVServerStatus/TVServerStatus.cs
trunk/plugins/TVServerStatus/TVServerStatus.csproj
Added: trunk/plugins/TVServerStatus/Graphics/Blue.png
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/TVServerStatus/Graphics/Blue.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/TVServerStatus/Graphics/Green.png
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/TVServerStatus/Graphics/Green.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/TVServerStatus/Graphics/Red.png
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/TVServerStatus/Graphics/Red.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/TVServerStatus/Graphics/Yellow.png
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/TVServerStatus/Graphics/Yellow.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/TVServerStatus/PluginSetup.Designer.cs
===================================================================
--- trunk/plugins/TVServerStatus/PluginSetup.Designer.cs (rev 0)
+++ trunk/plugins/TVServerStatus/PluginSetup.Designer.cs 2007-05-22 06:26:03 UTC (rev 412)
@@ -0,0 +1,143 @@
+namespace SetupTv.Sections
+{
+
+ [System.CLSCompliant(false)]
+ partial class PluginSetup
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private new 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.labelIdleIcon = new System.Windows.Forms.Label();
+ this.labelEPGIcon = new System.Windows.Forms.Label();
+ this.labelTSIcon = new System.Windows.Forms.Label();
+ this.labelRecIcon = new System.Windows.Forms.Label();
+ this.labelIdleText = new System.Windows.Forms.Label();
+ this.labelEPGText = new System.Windows.Forms.Label();
+ this.labelTSText = new System.Windows.Forms.Label();
+ this.labelRecText = new System.Windows.Forms.Label();
+ this.SuspendLayout();
+ //
+ // labelIdleIcon
+ //
+ this.labelIdleIcon.Image = global::TvEngine.Properties.Resources.Blue;
+ this.labelIdleIcon.Location = new System.Drawing.Point(8, 8);
+ this.labelIdleIcon.Name = "labelIdleIcon";
+ this.labelIdleIcon.Size = new System.Drawing.Size(24, 24);
+ this.labelIdleIcon.TabIndex = 0;
+ //
+ // labelEPGIcon
+ //
+ this.labelEPGIcon.Image = global::TvEngine.Properties.Resources.Yellow;
+ this.labelEPGIcon.Location = new System.Drawing.Point(8, 40);
+ this.labelEPGIcon.Name = "labelEPGIcon";
+ this.labelEPGIcon.Size = new System.Drawing.Size(24, 24);
+ this.labelEPGIcon.TabIndex = 2;
+ //
+ // labelTSIcon
+ //
+ this.labelTSIcon.Image = global::TvEngine.Properties.Resources.Green;
+ this.labelTSIcon.Location = new System.Drawing.Point(8, 72);
+ this.labelTSIcon.Name = "labelTSIcon";
+ this.labelTSIcon.Size = new System.Drawing.Size(24, 24);
+ this.labelTSIcon.TabIndex = 4;
+ //
+ // labelRecIcon
+ //
+ this.labelRecIcon.Image = global::TvEngine.Properties.Resources.Red;
+ this.labelRecIcon.Location = new System.Drawing.Point(8, 104);
+ this.labelRecIcon.Name = "labelRecIcon";
+ this.labelRecIcon.Size = new System.Drawing.Size(24, 24);
+ this.labelRecIcon.TabIndex = 6;
+ //
+ // labelIdleText
+ //
+ this.labelIdleText.Location = new System.Drawing.Point(40, 8);
+ this.labelIdleText.Name = "labelIdleText";
+ this.labelIdleText.Size = new System.Drawing.Size(88, 24);
+ this.labelIdleText.TabIndex = 1;
+ this.labelIdleText.Text = "Idle";
+ this.labelIdleText.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // labelEPGText
+ //
+ this.labelEPGText.Location = new System.Drawing.Point(40, 40);
+ this.labelEPGText.Name = "labelEPGText";
+ this.labelEPGText.Size = new System.Drawing.Size(88, 24);
+ this.labelEPGText.TabIndex = 3;
+ this.labelEPGText.Text = "Grabbing EPG";
+ this.labelEPGText.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // labelTSText
+ //
+ this.labelTSText.Location = new System.Drawing.Point(40, 72);
+ this.labelTSText.Name = "labelTSText";
+ this.labelTSText.Size = new System.Drawing.Size(88, 24);
+ this.labelTSText.TabIndex = 5;
+ this.labelTSText.Text = "Timeshifting";
+ this.labelTSText.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // labelRecText
+ //
+ this.labelRecText.Location = new System.Drawing.Point(40, 104);
+ this.labelRecText.Name = "labelRecText";
+ this.labelRecText.Size = new System.Drawing.Size(88, 24);
+ this.labelRecText.TabIndex = 7;
+ this.labelRecText.Text = "Recording";
+ this.labelRecText.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // PluginSetup
+ //
+ this.Controls.Add(this.labelRecText);
+ this.Controls.Add(this.labelTSText);
+ this.Controls.Add(this.labelEPGText);
+ this.Controls.Add(this.labelIdleText);
+ this.Controls.Add(this.labelRecIcon);
+ this.Controls.Add(this.labelTSIcon);
+ this.Controls.Add(this.labelEPGIcon);
+ this.Controls.Add(this.labelIdleIcon);
+ this.Name = "PluginSetup";
+ this.Size = new System.Drawing.Size(138, 138);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Label labelIdleIcon;
+ private System.Windows.Forms.Label labelEPGIcon;
+ private System.Windows.Forms.Label labelTSIcon;
+ private System.Windows.Forms.Label labelRecIcon;
+ private System.Windows.Forms.Label labelIdleText;
+ private System.Windows.Forms.Label labelEPGText;
+ private System.Windows.Forms.Label labelTSText;
+ private System.Windows.Forms.Label labelRecText;
+
+
+
+
+ }
+
+}
Added: trunk/plugins/TVServerStatus/PluginSetup.cs
===================================================================
--- trunk/plugins/TVServerStatus/PluginSetup.cs (rev 0)
+++ trunk/plugins/TVServerStatus/PluginSetup.cs 2007-05-22 06:26:03 UTC (rev 412)
@@ -0,0 +1,48 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+
+using TvLibrary.Log;
+using TvEngine;
+using TvControl;
+using TvDatabase;
+
+namespace SetupTv.Sections
+{
+
+ public partial class PluginSetup : SetupTv.SectionSettings
+ {
+
+ #region Constructor
+
+ public PluginSetup()
+ {
+ InitializeComponent();
+ }
+
+ #endregion Constructor
+
+ #region SetupTv.SectionSettings
+
+ public override void OnSectionDeActivated()
+ {
+ Log.Info("TVServerStatus: Configuration deactivated");
+
+ base.OnSectionDeActivated();
+ }
+ public override void OnSectionActivated()
+ {
+ Log.Info("TVServerStatus: Configuration activated");
+
+ base.OnSectionActivated();
+ }
+
+ #endregion SetupTv.SectionSettings
+
+ }
+
+}
Added: trunk/plugins/TVServerStatus/PluginSetup.resx
===================================================================
--- trunk/plugins/TVServerStatus/PluginSetup.resx (rev 0)
+++ trunk/plugins/TVServerStatus/PluginSetup.resx 2007-05-22 06:26:03 UTC (rev 412)
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root>
\ No newline at end of file
Added: trunk/plugins/TVServerStatus/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/TVServerStatus/Properties/AssemblyInfo.cs (rev 0)
+++ trunk/plugins/TVServerStatus/Properties/AssemblyInfo.cs 2007-05-22 06:26:03 UTC (rev 412)
@@ -0,0 +1,71 @@
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Security.Permissions;
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTitle("TV Server Status Plugin")]
+[assembly: AssemblyDescription("Creates a system tray status icon for the TV Server")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("and-81")]
+[assembly: AssemblyProduct("MediaPortal TV Server")]
+[assembly: AssemblyCopyright("Aaron Dinnage")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+//
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+
+[assembly: AssemblyVersion("1.0.3.0")]
+[assembly: AssemblyFileVersionAttribute("1.0.3.0")]
+
+//
+// In order to sign your assembly you must specify a key to use. Refer to the
+// Microsoft .NET Framework documentation for more information on assembly signing.
+//
+// Use the attributes below to control which key is used for signing.
+//
+// Notes:
+// (*) If no key is specified, the assembly is not signed.
+// (*) KeyName refers to a key that has been installed in the Crypto Service
+// Provider (CSP) on your machine. KeyFile refers to a file which contains
+// a key.
+// (*) If the KeyFile and the KeyName values are both specified, the
+// following processing occurs:
+// (1) If the KeyName can be found in the CSP, that key is used.
+// (2) If the KeyName does not exist and the KeyFile does exist, the key
+// in the KeyFile is installed into the CSP and used.
+// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
+// When specifying the KeyFile, the location of the KeyFile should be
+// relative to the project output directory which is
+// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
+// located in the project directory, you would specify the AssemblyKeyFile
+// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
+// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
+// documentation for more information on this.
+//
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("")]
+[assembly: AssemblyKeyName("")]
+
+[assembly: CLSCompliant(true)]
+
+//[assembly: SecurityPermission(SecurityAction.RequestMinimum, UnmanagedCode = true)]
Added: trunk/plugins/TVServerStatus/Properties/Resources.Designer.cs
===================================================================
--- trunk/plugins/TVServerStatus/Properties/Resources.Designer.cs (rev 0)
+++ trunk/plugins/TVServerStatus/Properties/Resources.Designer.cs 2007-05-22 06:26:03 UTC (rev 412)
@@ -0,0 +1,91 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:2.0.50727.42
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace TvEngine.Properties {
+ using System;
+
+
+ /// <summary>
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ /// </summary>
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ /// <summary>
+ /// Returns the cached ResourceManager instance used by this class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TvEngine.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ /// <summary>
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ internal static System.Drawing.Bitmap Blue {
+ get {
+ object obj = ResourceManager.GetObject("Blue", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ internal static System.Drawing.Bitmap Green {
+ get {
+ object obj = ResourceManager.GetObject("Green", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ internal static System.Drawing.Bitmap Red {
+ get {
+ object obj = ResourceManager.GetObject("Red", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ internal static System.Drawing.Bitmap Yellow {
+ get {
+ object obj = ResourceManager.GetObject("Yellow", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+ }
+}
Added: trunk/plugins/TVServerStatus/Properties/Resources.resx
===================================================================
--- trunk/plugins/TVServerStatus/Properties/Resources.resx (rev 0)
+++ trunk/plugins/TVServerStatus/Properties/Resources.resx 2007-05-22 06:26:03 UTC (rev 412)
@@ -0,0 +1,133 @@
+<?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>
+ <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <data name="Red" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\Graphics\Red.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="Yellow" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\Graphics\Yellow.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="Blue" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\Graphics\Blue.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+ <data name="Green" type="System.Resources.ResXFileRef, System.Windows.Forms">
+ <value>..\Graphics\Green.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+ </data>
+</root>
\ No newline at end of file
Added: trunk/plugins/TVServerStatus/TVServerStatus.cs
===================================================================
--- trunk/plugins/TVServerStatus/TVServerStatus.cs (rev 0)
+++ trunk/plugins/TVServerStatus/TVServerStatus.cs 2007-05-22 06:26:03 UTC (rev 412)
@@ -0,0 +1,201 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Text;
+using System.Threading;
+using System.Windows.Forms;
+
+using TvLibrary.Log;
+using TvControl;
+using SetupTv;
+using TvEngine.Events;
+using TvLibrary.Streaming;
+using TvLibrary.Helper;
+using TvLibrary.Interfaces;
+using TvLibrary.Implementations;
+using TvDatabase;
+
+namespace TvEngine
+{
+
+ public class TVServerStatus : ITvServerPlugin
+ {
+
+ #region Variables
+
+ IController _controller;
+
+ NotifyIcon _notifyIcon;
+ Thread _updateThread;
+
+ int _cards;
+ int[] _cardIDs;
+
+ #endregion Variables
+
+ #region Properties
+
+ /// <summary>
+ /// returns the name of the plugin
+ /// </summary>
+ public string Name { get { return "TVServerStatus"; } }
+ /// <summary>
+ /// returns the version of the plugin
+ /// </summary>
+ public string Version { get { return "1.0.3.0"; } }
+ /// <summary>
+ /// returns the author of the plugin
+ /// </summary>
+ public string Author { get { return "and-81"; } }
+ /// <summary>
+ /// returns if the plugin should only run on the master server
+ /// or also on slave servers
+ /// </summary>
+ public bool MasterOnly { get { return false; } }
+
+ #endregion Properties
+
+ #region Plugin methods
+
+ [CLSCompliant(false)]
+ public void Start(IController controller)
+ {
+ //TvBusinessLayer layer = new TvBusinessLayer();
+ //LogVerbose = Convert.ToBoolean(layer.GetSetting("TVServerStatus_Setting", "False").Value);
+
+ _controller = controller;
+
+ _cards = _controller.Cards;
+ _cardIDs = new int[_cards];
+ for (int index = 0; index < _cards; index++)
+ _cardIDs[index] = _controller.CardId(index);
+
+ CreateIcon();
+ UpdateIcon();
+ ShowIcon();
+
+ _updateThread = new Thread(new ThreadStart(UpdateThread));
+ _updateThread.Start();
+ }
+
+ public void Stop()
+ {
+ try
+ {
+ _updateThread.Abort();
+ }
+ catch { }
+
+ HideIcon();
+ }
+
+ [CLSCompliant(false)]
+ public SetupTv.SectionSettings Setup
+ {
+ get { return new SetupTv.Sections.PluginSetup(); }
+ }
+
+ #endregion Plugin methods
+
+ #region Private Methods
+
+ void UpdateThread()
+ {
+ while (true)
+ {
+ Thread.Sleep(5000);
+ UpdateIcon();
+ }
+ }
+
+ void CreateIcon()
+ {
+ _notifyIcon = new NotifyIcon();
+ _notifyIcon.Text = "TV Server";
+ }
+ void UpdateIcon()
+ {
+ List<int> recordingChannels = new List<int>();
+ List<int> timeshiftingChannels = new List<int>();
+ _controller.GetAllRecordingChannels(out recordingChannels, out timeshiftingChannels);
+
+ if (recordingChannels.Count > 0)
+ {
+ _notifyIcon.Icon = Icon.FromHandle(Properties.Resources.Red.GetHicon());
+ }
+ else if (timeshiftingChannels.Count > 0)
+ {
+ _notifyIcon.Icon = Icon.FromHandle(Properties.Resources.Green.GetHicon());
+ }
+ else
+ {
+ foreach (int cardID in _cardIDs)
+ {
+ if (!_controller.Enabled(cardID))
+ continue;
+
+ if (_controller.IsGrabbingEpg(cardID))
+ {
+ _notifyIcon.Icon = Icon.FromHandle(Properties.Resources.Yellow.GetHicon());
+ return;
+ }
+ }
+
+ _notifyIcon.Icon = Icon.FromHandle(Properties.Resources.Blue.GetHicon());
+ }
+
+ string status = "TV Server" + StatusText();
+ if (status.Length > 64)
+ status = status.Substring(0, 60) + " ...";
+
+ _notifyIcon.Text = status;
+ }
+ void ShowIcon()
+ {
+ _notifyIcon.Visible = true;
+ }
+ void HideIcon()
+ {
+ _notifyIcon.Visible = false;
+ }
+
+ string StatusText()
+ {
+ StringBuilder outputString = new StringBuilder();
+ string overallStatus = String.Empty;
+
+ foreach (int cardID in _cardIDs)
+ {
+ if (!_controller.Enabled(cardID))
+ continue;
+
+ outputString.Append("\r\n");
+ outputString.Append(cardID.ToString());
+ outputString.Append(" - ");
+
+ User user;
+
+ if (_controller.IsScanning(cardID))
+ outputString.Append("Scanning");
+ else if (_controller.IsGrabbingEpg(cardID))
+ outputString.Append("Grabbing EPG");
+ else if (_controller.IsCardInUse(cardID, out user))
+ {
+ if (_controller.IsRecording(ref user))
+ outputString.Append(String.Format("Recording"));
+ else if (_controller.IsTimeShifting(ref user))
+ outputString.Append(String.Format("Timeshifting"));
+ }
+ else
+ outputString.Append("Idle");
+ }
+
+ return outputString.ToString();
+ }
+
+ #endregion Private Methods
+
+ }
+
+}
Added: trunk/plugins/TVServerStatus/TVServerStatus.csproj
===================================================================
--- trunk/plugins/TVServerStatus/TVServerStatus.csproj (rev 0)
+++ trunk/plugins/TVServerStatus/TVServerStatus.csproj 2007-05-22 06:26:03 UTC (rev 412)
@@ -0,0 +1,186 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectType>Local</ProjectType>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{C17FD89A-D510-4395-A292-54A17E31AB93}</ProjectGuid>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ApplicationIcon>
+ </ApplicationIcon>
+ <AssemblyKeyContainerName>
+ </AssemblyKeyContainerName>
+ <AssemblyName>TVServerStatus</AssemblyName>
+ <AssemblyOriginatorKeyFile>
+ </AssemblyOriginatorKeyFile>
+ <DefaultClientScript>JScript</DefaultClientScript>
+ <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
+ <DefaultTargetSchema>IE50</DefaultTargetSchema>
+ <DelaySign>false</DelaySign>
+ <OutputType>Library</OutputType>
+ <RootNamespace>TvEngine</RootNamespace>
+ <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
+ <StartupObject>
+ </StartupObject>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <OutputPath>bin\Debug\</OutputPath>
+ <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
+ <BaseAddress>285212672</BaseAddress>
+ <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
+ <ConfigurationOverrideFile>
+ </ConfigurationOverrideFile>
+ <DefineConstants>DEBUG</DefineConstants>
+ <DocumentationFile>
+ </DocumentationFile>
+ <DebugSymbols>true</DebugSymbols>
+ <FileAlignment>4096</FileAlignment>
+ <NoStdLib>false</NoStdLib>
+ <NoWarn>
+ </NoWarn>
+ <Optimize>false</Optimize>
+ <RegisterForComInterop>false</RegisterForComInterop>
+ <RemoveIntegerChecks>false</RemoveIntegerChecks>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <WarningLevel>4</WarningLevel>
+ <DebugType>full</DebugType>
+ <ErrorReport>prompt</ErrorReport>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <OutputPath>bin\Release\</OutputPath>
+ <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
+ <BaseAddress>285212672</BaseAddress>
+ <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
+ <ConfigurationOverrideFile>
+ </ConfigurationOverrideFile>
+ <DefineConstants>
+ </DefineConstants>
+ <DocumentationFile>
+ </DocumentationFile>
+ <DebugSymbols>false</DebugSymbols>
+ <FileAlignment>4096</FileAlignment>
+ <NoStdLib>false</NoStdLib>
+ <NoWarn>
+ </NoWarn>
+ <Optimize>true</Optimize>
+ <RegisterForComInterop>false</RegisterForComInterop>
+ <RemoveIntegerChecks>false</RemoveIntegerChecks>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <WarningLevel>4</WarningLevel>
+ <DebugType>none</DebugType>
+ <ErrorReport>prompt</ErrorReport>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Gentle.Common, Version=1.2.9.1285, Culture=neutral, PublicKeyToken=80b5de62e27be49b">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\TV Engine\TVLibrary\TVDatabase\references\Gentle.Common.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="Gentle.Framework, Version=1.2.9.1286, Culture=neutral, PublicKeyToken=80b5de62e27be49b">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\TV Engine\TVLibrary\TVDatabase\references\Gentle.Framework.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="PluginBase, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\TV Engine\TVLibrary\Plugins\PluginBase\bin\Release\PluginBase.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="SetupControls, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\TV Engine\TVLibrary\SetupControls\bin\Release\SetupControls.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="System">
+ <Name>System</Name>
+ </Reference>
+ <Reference Include="System.Data">
+ <Name>System.Data</Name>
+ </Reference>
+ <Reference Include="System.Drawing">
+ <Name>System.Drawing</Name>
+ </Reference>
+ <Reference Include="System.ServiceProcess" />
+ <Reference Include="System.Windows.Forms">
+ <Name>System.Windows.Forms</Name>
+ </Reference>
+ <Reference Include="System.Xml" />
+ <Reference Include="TvBusinessLayer, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\TV Engine\TVLibrary\TvService\bin\Release\TvBusinessLayer.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="TvControl, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\TV Engine\TVLibrary\TvControl\bin\Release\TvControl.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="TVDatabase, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\TV Engine\TVLibrary\TVDatabase\bin\Release\TVDatabase.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="TVLibrary, Version=1.0.0.1, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\TV Engine\TVLibrary\TVLibrary\bin\Release\TVLibrary.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="TvLibrary.Interfaces, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\TV Engine\TVLibrary\TvLibrary.Interfaces\bin\Release\TvLibrary.Interfaces.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="PluginSetup.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
+ <Compile Include="PluginSetup.designer.cs">
+ <DependentUpon>PluginSetup.cs</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Properties\Resources.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
+ <DependentUpon>Resources.resx</DependentUpon>
+ </Compile>
+ <Compile Include="TVServerStatus.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="PluginSetup.resx">
+ <DependentUpon>PluginSetup.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Properties\Resources.resx">
+ <SubType>Designer</SubType>
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Graphics\Red.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Graphics\Yellow.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Graphics\Blue.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Graphics\Green.png" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <PropertyGroup>
+ <PreBuildEvent>
+ </PreBuildEvent>
+ <PostBuildEvent>copy "$(TargetPath)" "\MediaPortal Development\Plugin Releases\TVServerStatus\"</PostBuildEvent>
+ </PropertyGroup>
+</Project>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|