|
From: <moi...@us...> - 2007-01-29 21:35:59
|
Revision: 47
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=47&view=rev
Author: moiristo
Date: 2007-01-29 13:35:54 -0800 (Mon, 29 Jan 2007)
Log Message:
-----------
Add IPTV@UT plugin and VideoLAN plugin
Added Paths:
-----------
trunk/plugins/IPTV@UT/
trunk/plugins/IPTV@UT/IPTV@UT/
trunk/plugins/IPTV@UT/IPTV@UT/ConfigurationForm.Designer.cs
trunk/plugins/IPTV@UT/IPTV@UT/ConfigurationForm.cs
trunk/plugins/IPTV@UT/IPTV@UT/ConfigurationForm.resx
trunk/plugins/IPTV@UT/IPTV@UT/IPTV.cs
trunk/plugins/IPTV@UT/IPTV@UT/IP...@UT...
trunk/plugins/IPTV@UT/IPTV@UT/IPTVPlugin.cs
trunk/plugins/IPTV@UT/IPTV@UT/PlayListVLCIO.cs
trunk/plugins/IPTV@UT/IPTV@UT/PlayListVLCItem.cs
trunk/plugins/IPTV@UT/IPTV@UT/Properties/
trunk/plugins/IPTV@UT/IPTV@UT/Properties/AssemblyInfo.cs
trunk/plugins/IPTV@UT/IPTV@UT/ShowWaitCursor.cs
trunk/plugins/IPTV@UT/IP...@UT...
trunk/plugins/IPTV@UT/IP...@UT...
trunk/plugins/IPTV@UT/[ Default Skin ]/
trunk/plugins/IPTV@UT/[ Default Skin ]/MP_0.2.1/
trunk/plugins/IPTV@UT/[ Default Skin ]/MP_0.2.1/MyIPTV.xml
trunk/plugins/IPTV@UT/[ Default Skin ]/MP_0.2.1_SVN/
trunk/plugins/IPTV@UT/[ Default Skin ]/MP_0.2.1_SVN/MyIPTV.xml
trunk/plugins/IPTV@UT/[ Project Mayhem 3 ]/
trunk/plugins/IPTV@UT/[ Project Mayhem 3 ]/MyIPTV.xml
trunk/plugins/VideoLAN/
trunk/plugins/VideoLAN/ConfigurationForm.cs
trunk/plugins/VideoLAN/ConfigurationForm.resx
trunk/plugins/VideoLAN/IPlayer.cs
trunk/plugins/VideoLAN/InnerVlcWindow.cs
trunk/plugins/VideoLAN/InnerVlcWindow.designer.cs
trunk/plugins/VideoLAN/InnerVlcWindow.resx
trunk/plugins/VideoLAN/NativeLibVlc.cs
trunk/plugins/VideoLAN/VideoLanControl.cs
trunk/plugins/VideoLAN/VideoLanControl.designer.cs
trunk/plugins/VideoLAN/VideoLanControl.resx
trunk/plugins/VideoLAN/VideoLanPlugin.cs
trunk/plugins/VideoLAN/VideoLanPlugin.cs.bak
trunk/plugins/VideoLAN/VlcControl/
trunk/plugins/VideoLAN/VlcControl/IPlayer.cs
trunk/plugins/VideoLAN/VlcControl/InnerVlcWindow.Designer.cs
trunk/plugins/VideoLAN/VlcControl/InnerVlcWindow.cs
trunk/plugins/VideoLAN/VlcControl/NativeLibVlc.cs
trunk/plugins/VideoLAN/VlcControl/VLanControl.csproj
trunk/plugins/VideoLAN/VlcControl/VlcUserControl.Designer.cs
trunk/plugins/VideoLAN/VlcControl/VlcUserControl.cs
trunk/plugins/VideoLAN/VlcControl/VlcUserControl.resx
trunk/plugins/VideoLAN/VlcUserControl.cs
trunk/plugins/VideoLAN/VlcUserControl.designer.cs
trunk/plugins/VideoLAN/VlcUserControl.resx
Added: trunk/plugins/IPTV@UT/IPTV@UT/ConfigurationForm.Designer.cs
===================================================================
--- trunk/plugins/IPTV@UT/IPTV@UT/ConfigurationForm.Designer.cs (rev 0)
+++ trunk/plugins/IPTV@UT/IPTV@UT/ConfigurationForm.Designer.cs 2007-01-29 21:35:54 UTC (rev 47)
@@ -0,0 +1,152 @@
+namespace MediaPortal.GUI.IPTV
+{
+ partial class ConfigurationForm
+ {
+ /// <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.textBox1 = new System.Windows.Forms.TextBox();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.button1 = new System.Windows.Forms.Button();
+ this.groupBox2 = new System.Windows.Forms.GroupBox();
+ this.button2 = new System.Windows.Forms.Button();
+ this.textBox2 = new System.Windows.Forms.TextBox();
+ this.button3 = new System.Windows.Forms.Button();
+ this.button4 = new System.Windows.Forms.Button();
+ this.groupBox1.SuspendLayout();
+ this.groupBox2.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // textBox1
+ //
+ this.textBox1.Location = new System.Drawing.Point(6, 19);
+ this.textBox1.Name = "textBox1";
+ this.textBox1.Size = new System.Drawing.Size(238, 20);
+ this.textBox1.TabIndex = 0;
+ //
+ // groupBox1
+ //
+ this.groupBox1.Controls.Add(this.button1);
+ this.groupBox1.Controls.Add(this.textBox1);
+ this.groupBox1.Location = new System.Drawing.Point(12, 12);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(302, 47);
+ this.groupBox1.TabIndex = 1;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "Playlists Folder";
+ //
+ // button1
+ //
+ this.button1.Location = new System.Drawing.Point(250, 19);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(25, 20);
+ this.button1.TabIndex = 1;
+ this.button1.Text = "...";
+ this.button1.UseVisualStyleBackColor = true;
+ this.button1.Click += new System.EventHandler(this.button1_Click);
+ //
+ // groupBox2
+ //
+ this.groupBox2.Controls.Add(this.button2);
+ this.groupBox2.Controls.Add(this.textBox2);
+ this.groupBox2.Location = new System.Drawing.Point(12, 65);
+ this.groupBox2.Name = "groupBox2";
+ this.groupBox2.Size = new System.Drawing.Size(302, 47);
+ this.groupBox2.TabIndex = 2;
+ this.groupBox2.TabStop = false;
+ this.groupBox2.Text = "Default Playlist";
+ //
+ // button2
+ //
+ this.button2.Location = new System.Drawing.Point(250, 18);
+ this.button2.Name = "button2";
+ this.button2.Size = new System.Drawing.Size(25, 20);
+ this.button2.TabIndex = 2;
+ this.button2.Text = "...";
+ this.button2.UseVisualStyleBackColor = true;
+ this.button2.Click += new System.EventHandler(this.button2_Click);
+ //
+ // textBox2
+ //
+ this.textBox2.Location = new System.Drawing.Point(6, 19);
+ this.textBox2.Name = "textBox2";
+ this.textBox2.Size = new System.Drawing.Size(238, 20);
+ this.textBox2.TabIndex = 0;
+ //
+ // button3
+ //
+ this.button3.Location = new System.Drawing.Point(18, 134);
+ this.button3.Name = "button3";
+ this.button3.Size = new System.Drawing.Size(75, 23);
+ this.button3.TabIndex = 3;
+ this.button3.Text = "OK";
+ this.button3.UseVisualStyleBackColor = true;
+ this.button3.Click += new System.EventHandler(this.button3_Click);
+ //
+ // button4
+ //
+ this.button4.Location = new System.Drawing.Point(100, 133);
+ this.button4.Name = "button4";
+ this.button4.Size = new System.Drawing.Size(75, 23);
+ this.button4.TabIndex = 4;
+ this.button4.Text = "Cancel";
+ this.button4.UseVisualStyleBackColor = true;
+ this.button4.Click += new System.EventHandler(this.button4_Click);
+ //
+ // ConfigurationForm
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(364, 169);
+ this.Controls.Add(this.button4);
+ this.Controls.Add(this.button3);
+ this.Controls.Add(this.groupBox2);
+ this.Controls.Add(this.groupBox1);
+ this.Name = "ConfigurationForm";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+ this.Text = "IPTV@UT Configuration";
+ this.groupBox1.ResumeLayout(false);
+ this.groupBox1.PerformLayout();
+ this.groupBox2.ResumeLayout(false);
+ this.groupBox2.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.TextBox textBox1;
+ private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.Button button1;
+ private System.Windows.Forms.GroupBox groupBox2;
+ private System.Windows.Forms.Button button2;
+ private System.Windows.Forms.TextBox textBox2;
+ private System.Windows.Forms.OpenFileDialog openFileDialog1;
+ private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
+ private System.Windows.Forms.Button button3;
+ private System.Windows.Forms.Button button4;
+ }
+}
\ No newline at end of file
Property changes on: trunk/plugins/IPTV@UT/IPTV@UT/ConfigurationForm.Designer.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/plugins/IPTV@UT/IPTV@UT/ConfigurationForm.cs
===================================================================
--- trunk/plugins/IPTV@UT/IPTV@UT/ConfigurationForm.cs (rev 0)
+++ trunk/plugins/IPTV@UT/IPTV@UT/ConfigurationForm.cs 2007-01-29 21:35:54 UTC (rev 47)
@@ -0,0 +1,67 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.IO;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+using MediaPortal.GUI.Library;
+using MediaPortal.Util;
+
+namespace MediaPortal.GUI.IPTV
+{
+ public partial class ConfigurationForm : Form
+ {
+ public ConfigurationForm()
+ {
+ InitializeComponent();
+ textBox1.Text = IPTV.GetPlayListDir();
+ textBox2.Text = IPTV.GetDefaultPlayList();
+ }
+
+ // Path
+ private void button1_Click(object sender, EventArgs e)
+ {
+ folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
+ folderBrowserDialog1.SelectedPath = textBox1.Text;
+ if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
+ {
+ //folderBrowserDialog1.SelectedPath
+ textBox1.Text = folderBrowserDialog1.SelectedPath;
+ }
+ }
+
+ // File
+ private void button2_Click(object sender, EventArgs e)
+ {
+ openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
+ openFileDialog1.Filter = "VLC Playlists (*.vlc)|*.vlc|M3U Playlists (*.m3u)|*.m3u";
+ openFileDialog1.FileName = textBox2.Text;
+ if (!textBox1.Text.Equals("")) openFileDialog1.InitialDirectory = textBox1.Text;
+ if (openFileDialog1.ShowDialog() == DialogResult.OK)
+ {
+ //openFileDialog1.FileName
+ textBox2.Text = openFileDialog1.FileName;
+ }
+ }
+
+ private void button4_Click(object sender, EventArgs e)
+ {
+ //Cancel Button
+ this.Dispose(true);
+ }
+
+ private void button3_Click(object sender, EventArgs e)
+ {
+ //OK Button
+ string dir = Directory.GetCurrentDirectory();
+ using (MediaPortal.Profile.Settings writer = new MediaPortal.Profile.Settings(dir + @"\MyIPTV.xml"))
+ {
+ writer.SetValue("settings", "PlayListDir", textBox1.Text.Trim());
+ writer.SetValue("settings", "DefaultPlayList", textBox2.Text.Trim());
+ }
+ this.Dispose(true);
+ }
+ }
+}
\ No newline at end of file
Property changes on: trunk/plugins/IPTV@UT/IPTV@UT/ConfigurationForm.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/plugins/IPTV@UT/IPTV@UT/ConfigurationForm.resx
===================================================================
--- trunk/plugins/IPTV@UT/IPTV@UT/ConfigurationForm.resx (rev 0)
+++ trunk/plugins/IPTV@UT/IPTV@UT/ConfigurationForm.resx 2007-01-29 21:35:54 UTC (rev 47)
@@ -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
Property changes on: trunk/plugins/IPTV@UT/IPTV@UT/ConfigurationForm.resx
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/plugins/IPTV@UT/IPTV@UT/IPTV.cs
===================================================================
--- trunk/plugins/IPTV@UT/IPTV@UT/IPTV.cs (rev 0)
+++ trunk/plugins/IPTV@UT/IPTV@UT/IPTV.cs 2007-01-29 21:35:54 UTC (rev 47)
@@ -0,0 +1,273 @@
+using MediaPortal.GUI.Library;
+using MediaPortal.Player;
+using MediaPortal.Util;
+using MediaPortal.Dialogs;
+using MediaPortal.Playlists;
+using MediaPortal.VideoLanPlugin;
+using System.Drawing;
+using System.IO;
+
+namespace MediaPortal.GUI.IPTV
+{
+ public class IPTV : GUIWindow
+ {
+ #region SkinControlAttributes
+ [SkinControlAttribute(2)]
+ protected GUIButtonControl btnLoad = null;
+ [SkinControlAttribute(99)]
+ protected GUIVideoControl videoWindow = null;
+ #endregion
+
+ private static PlayList playlist = new PlayList();
+ private static int currentChannel = 0;
+ private static PlayListVLCIO plvi = new PlayListVLCIO();
+ private static VirtualDirectory plDirectory = new VirtualDirectory();
+ private static string playListPath;
+ private static OnActionHandler ah;
+ private static bool inited = false;
+
+ public override int GetID
+ {
+ get
+ {
+ return 7500;
+ }
+ set
+ {
+ base.GetID = value;
+ }
+ }
+
+ public override bool Init()
+ {
+ bool result = Load(GUIGraphicsContext.Skin + @"\MyIPTV.xml");
+
+ playListPath = GetPlayListDir();
+ if (playListPath.Equals("")) playListPath = Directory.GetCurrentDirectory();
+
+ plDirectory.AddExtension(".vlc");
+ plDirectory.AddExtension(".m3u");
+ plDirectory.ShowFilesWithoutExtension = false;
+
+ Share share = new Share();
+ share.Name = "Playlists";
+ share.Path = playListPath;
+ plDirectory.IsRootShare(playListPath);
+
+ if(ah == null) ah = new OnActionHandler(OnAction2);
+
+ return result;
+ }
+
+ public void OnAction2(Action action)
+ {
+ if (GUIWindowManager.ActiveWindowEx == (int) GUIWindow.Window.WINDOW_DIALOG_MENU) return;
+
+ switch (action.wID)
+ {
+ case Action.ActionType.ACTION_PREV_CHANNEL:
+ IPTV.OnPreviousChannel();
+ break;
+ case Action.ActionType.ACTION_PAGE_DOWN:
+ IPTV.OnPreviousChannel();
+ break;
+
+ case Action.ActionType.ACTION_NEXT_CHANNEL:
+ IPTV.OnNextChannel();
+ break;
+ case Action.ActionType.ACTION_PAGE_UP:
+ IPTV.OnNextChannel();
+ break;
+ case Action.ActionType.ACTION_PLAY:
+ Play(currentChannel);
+ break;
+ case Action.ActionType.ACTION_KEY_PRESSED:
+ switch (action.m_key.KeyChar)
+ {
+ case '1':
+ if (playlist.Count > 0) currentChannel = 0;
+ Play(currentChannel);
+ break;
+ case '2':
+ if (playlist.Count > 1) currentChannel = 1;
+ Play(currentChannel);
+ break;
+ case '3':
+ if (playlist.Count > 2) currentChannel = 2;
+ Play(currentChannel);
+ break;
+ case '4':
+ if (playlist.Count > 3) currentChannel = 3;
+ Play(currentChannel);
+ break;
+ case '5':
+ if (playlist.Count > 4) currentChannel = 4;
+ Play(currentChannel);
+ break;
+ case '6':
+ if (playlist.Count > 5) currentChannel = 5;
+ Play(currentChannel);
+ break;
+ case '7':
+ if (playlist.Count > 6) currentChannel = 6;
+ Play(currentChannel);
+ break;
+ case '8':
+ if (playlist.Count > 7) currentChannel = 7;
+ Play(currentChannel);
+ break;
+ case '9':
+ if (playlist.Count > 8) currentChannel = 8;
+ Play(currentChannel);
+ break;
+ }
+ break;
+ }
+ }
+
+ public override void OnAction(Action action)
+ {
+ base.OnAction(action);
+ }
+
+ private static void OnNextChannel()
+ {
+ if (currentChannel + 1 < playlist.Count) Play(++currentChannel);
+ }
+
+ private static void OnPreviousChannel()
+ {
+ if (currentChannel > 0 && currentChannel - 1 < playlist.Count) Play(--currentChannel);
+ }
+
+ protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType)
+ {
+ if (control == btnLoad)
+ {
+ if (g_Player.Playing) g_Player.Stop();
+ GUIDialogSelect diag = (GUIDialogSelect)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_SELECT);
+ diag.SetHeading("Choose Playlist");
+ diag.Reset();
+ foreach (GUIListItem item in plDirectory.GetDirectory(playListPath))
+ {
+ if(!item.IsFolder) diag.Add(item.Label);
+ }
+ diag.EnableButton(true);
+ diag.SetButtonLabel("Load Playlist");
+ diag.DoModal(GUIWindowManager.ActiveWindow);
+
+ // and wait till user selects one, then load it immediately
+ string selected = diag.SelectedLabelText;
+
+ if(File.Exists(playListPath + @"\" + selected + ".vlc"))
+ LoadAndPlay(playListPath + @"\" + selected + ".vlc");
+ else LoadAndPlay(playListPath + @"\" + selected + ".m3u");
+ }
+
+ base.OnClicked(controlId, control, actionType);
+ }
+
+ public override bool OnMessage(GUIMessage message)
+ {
+ return base.OnMessage(message);
+ }
+
+
+ protected override void OnPageLoad()
+ {
+ base.OnPageLoad();
+
+ GUIGraphicsContext.OnNewAction -= ah;
+ GUIGraphicsContext.OnNewAction += ah;
+
+ //set video window position
+ if (videoWindow != null)
+ {
+ GUIGraphicsContext.VideoWindow = new Rectangle(videoWindow.XPosition, videoWindow.YPosition, videoWindow.Width, videoWindow.Height);
+ }
+
+ if (!inited)
+ {
+ GUIPropertyManager.SetProperty("#IPTV.View.channel", "");
+ // Read a playlist, if configured, and start playing it
+ LoadAndPlay(GetDefaultPlayList());
+
+ inited = true;
+ }
+
+ }
+
+ protected override void OnPageDestroy(int new_windowId)
+ {
+ if (new_windowId != (int)GUIWindow.Window.WINDOW_FULLSCREEN_VIDEO) GUIGraphicsContext.OnNewAction -= ah;
+ base.OnPageDestroy(new_windowId);
+ }
+
+ protected override void OnShowContextMenu()
+ {
+ if (playlist.Count == 0) return;
+
+ GUIDialogMenu menu = (GUIDialogMenu)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_MENU);
+ menu.Reset();
+
+ menu.SetHeading("Channel List");
+ foreach (PlayListItem item in playlist)
+ menu.Add(item.Description);
+ if (menu.SelectedId == -1) return;
+ else
+ {
+ currentChannel = menu.SelectedId - 1;
+ Play(currentChannel);
+ }
+
+ base.OnShowContextMenu();
+ }
+
+ protected void LoadAndPlay(string plFile)
+ {
+ GUIPropertyManager.SetProperty("#IPTV.View.channel", "");
+ if(plFile.Equals("")) return;
+
+ playlist.Clear();
+ bool result = plvi.Load(playlist, plFile);
+ if (result)
+ {
+ if (currentChannel < playlist.Count) Play(currentChannel);
+ else if (playlist.Count > 0) Play(0);
+ }
+ }
+
+ public static string GetDefaultPlayList()
+ {
+ string plFile;
+ string dir = Directory.GetCurrentDirectory();
+ using (MediaPortal.Profile.Settings reader = new MediaPortal.Profile.Settings(dir + @"\MyIPTV.xml"))
+ {
+ plFile = reader.GetValueAsString("settings", "DefaultPlayList", "");
+ }
+ return plFile;
+ }
+
+ public static string GetPlayListDir()
+ {
+ string plDir;
+ string dir = Directory.GetCurrentDirectory();
+ using (MediaPortal.Profile.Settings reader = new MediaPortal.Profile.Settings(dir + @"\MyIPTV.xml"))
+ {
+ plDir = reader.GetValueAsString("settings", "PlayListDir", "");
+ }
+ return plDir;
+ }
+
+ public static void Play(int plIndex)
+ {
+ if (plIndex > playlist.Count) return;
+
+ PlayListItem item = playlist[plIndex];
+ Log.Info("MyIPTV: Trying to play channel '" + item.Description + "' (" + item.FileName + ").");
+ GUIGraphicsContext.IsFullScreenVideo = false;
+ g_Player.Play(item.FileName);
+ GUIPropertyManager.SetProperty("#IPTV.View.channel", item.Description);
+ }
+ }
+}
\ No newline at end of file
Property changes on: trunk/plugins/IPTV@UT/IPTV@UT/IPTV.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/plugins/IPTV@UT/IPTV@UT/IP...@UT...
===================================================================
--- trunk/plugins/IPTV@UT/IPTV@UT/IP...@UT... (rev 0)
+++ trunk/plugins/IPTV@UT/IPTV@UT/IP...@UT... 2007-01-29 21:35:54 UTC (rev 47)
@@ -0,0 +1,78 @@
+<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>{FB58017D-6946-49EB-A0B7-F446BCA01A72}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>MediaPortal.GUI.IPTV</RootNamespace>...
[truncated message content] |
|
From: <an...@us...> - 2007-01-30 02:58:32
|
Revision: 52
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=52&view=rev
Author: and-81
Date: 2007-01-29 18:58:31 -0800 (Mon, 29 Jan 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/TV3ExtChannelChanger/TV3ExtChannelChanger.cs
trunk/plugins/TV3ExtChannelChanger/TV3ExtChannelChanger.csproj
trunk/plugins/TV3MceBlaster/MceIrApi.cs
trunk/plugins/TV3MceBlaster/TV3MceBlaster.cs
trunk/plugins/TV3MceBlaster/TV3MceBlaster.csproj
Added Paths:
-----------
trunk/plugins/TV3ExtChannelChanger/Forms/
trunk/plugins/TV3ExtChannelChanger/Forms/ExternalChannels.cs
trunk/plugins/TV3ExtChannelChanger/Forms/ExternalChannels.designer.cs
trunk/plugins/TV3ExtChannelChanger/Forms/ExternalChannels.resx
trunk/plugins/TV3ExtChannelChanger/Forms/ExternalProgram.Designer.cs
trunk/plugins/TV3ExtChannelChanger/Forms/ExternalProgram.cs
trunk/plugins/TV3ExtChannelChanger/Forms/ExternalProgram.resx
trunk/plugins/TV3ExtChannelChanger/Forms/KeysCommand.Designer.cs
trunk/plugins/TV3ExtChannelChanger/Forms/KeysCommand.cs
trunk/plugins/TV3ExtChannelChanger/Forms/KeysCommand.resx
trunk/plugins/TV3ExtChannelChanger/Forms/MessageCommand.Designer.cs
trunk/plugins/TV3ExtChannelChanger/Forms/MessageCommand.cs
trunk/plugins/TV3ExtChannelChanger/Forms/MessageCommand.resx
trunk/plugins/TV3ExtChannelChanger/Forms/PluginSetup.Designer.cs
trunk/plugins/TV3ExtChannelChanger/Forms/PluginSetup.cs
trunk/plugins/TV3ExtChannelChanger/Forms/PluginSetup.resx
trunk/plugins/TV3ExtChannelChanger/Forms/SerialCommand.Designer.cs
trunk/plugins/TV3ExtChannelChanger/Forms/SerialCommand.cs
trunk/plugins/TV3ExtChannelChanger/Forms/SerialCommand.resx
trunk/plugins/TV3ExtChannelChanger/Forms/StbSetup.Designer.cs
trunk/plugins/TV3ExtChannelChanger/Forms/StbSetup.cs
trunk/plugins/TV3ExtChannelChanger/Forms/StbSetup.resx
trunk/plugins/TV3ExtChannelChanger/Win32.cs
trunk/plugins/TV3MceBlaster/Forms/
trunk/plugins/TV3MceBlaster/Forms/ExternalChannels.cs
trunk/plugins/TV3MceBlaster/Forms/ExternalChannels.designer.cs
trunk/plugins/TV3MceBlaster/Forms/ExternalChannels.resx
trunk/plugins/TV3MceBlaster/Forms/ExternalProgram.Designer.cs
trunk/plugins/TV3MceBlaster/Forms/ExternalProgram.cs
trunk/plugins/TV3MceBlaster/Forms/ExternalProgram.resx
trunk/plugins/TV3MceBlaster/Forms/KeysCommand.Designer.cs
trunk/plugins/TV3MceBlaster/Forms/KeysCommand.cs
trunk/plugins/TV3MceBlaster/Forms/KeysCommand.resx
trunk/plugins/TV3MceBlaster/Forms/LearnIR.Designer.cs
trunk/plugins/TV3MceBlaster/Forms/LearnIR.cs
trunk/plugins/TV3MceBlaster/Forms/LearnIR.resx
trunk/plugins/TV3MceBlaster/Forms/MacroEditor.Designer.cs
trunk/plugins/TV3MceBlaster/Forms/MacroEditor.cs
trunk/plugins/TV3MceBlaster/Forms/MacroEditor.resx
trunk/plugins/TV3MceBlaster/Forms/MessageCommand.Designer.cs
trunk/plugins/TV3MceBlaster/Forms/MessageCommand.cs
trunk/plugins/TV3MceBlaster/Forms/MessageCommand.resx
trunk/plugins/TV3MceBlaster/Forms/PauseTime.Designer.cs
trunk/plugins/TV3MceBlaster/Forms/PauseTime.cs
trunk/plugins/TV3MceBlaster/Forms/PauseTime.resx
trunk/plugins/TV3MceBlaster/Forms/PluginSetup.Designer.cs
trunk/plugins/TV3MceBlaster/Forms/PluginSetup.cs
trunk/plugins/TV3MceBlaster/Forms/PluginSetup.resx
trunk/plugins/TV3MceBlaster/Forms/SelectBlasterPort.Designer.cs
trunk/plugins/TV3MceBlaster/Forms/SelectBlasterPort.cs
trunk/plugins/TV3MceBlaster/Forms/SelectBlasterPort.resx
trunk/plugins/TV3MceBlaster/Forms/SelectBlasterSpeed.Designer.cs
trunk/plugins/TV3MceBlaster/Forms/SelectBlasterSpeed.cs
trunk/plugins/TV3MceBlaster/Forms/SelectBlasterSpeed.resx
trunk/plugins/TV3MceBlaster/Forms/SerialCommand.Designer.cs
trunk/plugins/TV3MceBlaster/Forms/SerialCommand.cs
trunk/plugins/TV3MceBlaster/Forms/SerialCommand.resx
trunk/plugins/TV3MceBlaster/Forms/StbSetup.Designer.cs
trunk/plugins/TV3MceBlaster/Forms/StbSetup.cs
trunk/plugins/TV3MceBlaster/Forms/StbSetup.resx
trunk/plugins/TV3MceBlaster/Win32.cs
Removed Paths:
-------------
trunk/plugins/TV3ExtChannelChanger/ExternalChannels.cs
trunk/plugins/TV3ExtChannelChanger/ExternalChannels.designer.cs
trunk/plugins/TV3ExtChannelChanger/ExternalChannels.resx
trunk/plugins/TV3ExtChannelChanger/ExternalProgram.Designer.cs
trunk/plugins/TV3ExtChannelChanger/ExternalProgram.cs
trunk/plugins/TV3ExtChannelChanger/ExternalProgram.resx
trunk/plugins/TV3ExtChannelChanger/PluginSetup.Designer.cs
trunk/plugins/TV3ExtChannelChanger/PluginSetup.cs
trunk/plugins/TV3ExtChannelChanger/PluginSetup.resx
trunk/plugins/TV3ExtChannelChanger/SerialCommand.Designer.cs
trunk/plugins/TV3ExtChannelChanger/SerialCommand.cs
trunk/plugins/TV3ExtChannelChanger/SerialCommand.resx
trunk/plugins/TV3ExtChannelChanger/StbSetup.Designer.cs
trunk/plugins/TV3ExtChannelChanger/StbSetup.cs
trunk/plugins/TV3ExtChannelChanger/StbSetup.resx
trunk/plugins/TV3MceBlaster/ExternalChannels.cs
trunk/plugins/TV3MceBlaster/ExternalChannels.designer.cs
trunk/plugins/TV3MceBlaster/ExternalChannels.resx
trunk/plugins/TV3MceBlaster/ExternalProgram.Designer.cs
trunk/plugins/TV3MceBlaster/ExternalProgram.cs
trunk/plugins/TV3MceBlaster/ExternalProgram.resx
trunk/plugins/TV3MceBlaster/LearnIR.Designer.cs
trunk/plugins/TV3MceBlaster/LearnIR.cs
trunk/plugins/TV3MceBlaster/LearnIR.resx
trunk/plugins/TV3MceBlaster/MacroEditor.Designer.cs
trunk/plugins/TV3MceBlaster/MacroEditor.cs
trunk/plugins/TV3MceBlaster/MacroEditor.resx
trunk/plugins/TV3MceBlaster/PauseTime.Designer.cs
trunk/plugins/TV3MceBlaster/PauseTime.cs
trunk/plugins/TV3MceBlaster/PauseTime.resx
trunk/plugins/TV3MceBlaster/PluginSetup.Designer.cs
trunk/plugins/TV3MceBlaster/PluginSetup.cs
trunk/plugins/TV3MceBlaster/PluginSetup.resx
trunk/plugins/TV3MceBlaster/SelectBlasterPort.Designer.cs
trunk/plugins/TV3MceBlaster/SelectBlasterPort.cs
trunk/plugins/TV3MceBlaster/SelectBlasterPort.resx
trunk/plugins/TV3MceBlaster/SelectBlasterSpeed.Designer.cs
trunk/plugins/TV3MceBlaster/SelectBlasterSpeed.cs
trunk/plugins/TV3MceBlaster/SelectBlasterSpeed.resx
trunk/plugins/TV3MceBlaster/SerialCommand.Designer.cs
trunk/plugins/TV3MceBlaster/SerialCommand.cs
trunk/plugins/TV3MceBlaster/SerialCommand.resx
trunk/plugins/TV3MceBlaster/StbSetup.Designer.cs
trunk/plugins/TV3MceBlaster/StbSetup.cs
trunk/plugins/TV3MceBlaster/StbSetup.resx
Deleted: trunk/plugins/TV3ExtChannelChanger/ExternalChannels.cs
===================================================================
--- trunk/plugins/TV3ExtChannelChanger/ExternalChannels.cs 2007-01-30 02:53:54 UTC (rev 51)
+++ trunk/plugins/TV3ExtChannelChanger/ExternalChannels.cs 2007-01-30 02:58:31 UTC (rev 52)
@@ -1,229 +0,0 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Diagnostics;
-using System.Drawing;
-using System.IO;
-using System.Text;
-using System.Threading;
-using System.Windows.Forms;
-using System.Xml;
-
-namespace TvEngine
-{
-
- public partial class ExternalChannels : Form
- {
-
- #region Variables
-
- TabPage[] _tvCardTabs;
- StbSetup[] _tvCardStbSetups;
-
- #endregion Variables
-
- #region Constructor
-
- public ExternalChannels()
- {
- InitializeComponent();
- }
-
- #endregion Constructor
-
- private void ExternalChannels_Load(object sender, EventArgs e)
- {
- int cards = TV3ExtChannelChanger.ExternalChannelConfigs.Length;
- string cardName;
- string cardNumber;
-
- _tvCardTabs = new TabPage[cards];
- _tvCardStbSetups = new StbSetup[cards];
-
- comboBoxCopyFrom.Items.Clear();
-
- for (int index = 0; index < cards; index++)
- {
- cardNumber = (index + 1).ToString();
- cardName = "TV Card " + cardNumber;
-
- comboBoxCopyFrom.Items.Add(cardName);
-
- _tvCardStbSetups[index] = new StbSetup(index);
- _tvCardStbSetups[index].Name = "StbSetup" + cardNumber;
- _tvCardStbSetups[index].Dock = DockStyle.Fill;
- _tvCardStbSetups[index].TabIndex = 0;
-
- _tvCardTabs[index] = new TabPage(cardName);
- _tvCardTabs[index].Controls.Add(_tvCardStbSetups[index]);
-
- this.tabControlTVCards.TabPages.Add(_tvCardTabs[index]);
- }
-
- comboBoxCopyFrom.SelectedIndex = 0;
-
- // Setup quick setup combo box
- string[] quickSetupFiles = Directory.GetFiles(TV3ExtChannelChanger.AppDataFolder + TV3ExtChannelChanger.STBFolder, "*.xml", SearchOption.TopDirectoryOnly);
- foreach (string file in quickSetupFiles)
- comboBoxQuickSetup.Items.Add(Path.GetFileNameWithoutExtension(file));
-
- comboBoxQuickSetup.Items.Add("Clear all");
- }
-
- static bool ProcessExternalChannelProgram(string runCommand, int currentChannelDigit, string fullChannelString)
- {
- string[] commands = TV3ExtChannelChanger.SplitRunCommand(runCommand);
-
- if (commands == null)
- return false;
-
- commands[2] = commands[2].Replace("%1", currentChannelDigit.ToString());
- commands[2] = commands[2].Replace("%2", fullChannelString);
-
- return TV3ExtChannelChanger.ProcessRunCommand(commands);
- }
-
- static bool ProcessSerialCommand(string serialCommand, int currentChannelDigit, string fullChannelString)
- {
- string[] commands = TV3ExtChannelChanger.SplitSerialCommand(serialCommand);
-
- if (commands == null)
- return false;
-
- commands[0] = commands[0].Replace("%1", currentChannelDigit.ToString());
- commands[0] = commands[0].Replace("%2", fullChannelString);
-
- return TV3ExtChannelChanger.ProcessSerialCommand(commands);
-
- }
-
- #region Buttons
-
- private void buttonOK_Click(object sender, EventArgs e)
- {
- foreach (StbSetup setup in _tvCardStbSetups)
- setup.Save();
-
- foreach (ExternalChannelConfig config in TV3ExtChannelChanger.ExternalChannelConfigs)
- config.SaveExternalChannelConfig();
-
- this.DialogResult = DialogResult.OK;
- this.Close();
- }
-
- private void buttonTest_Click(object sender, EventArgs e)
- {
- StbSetup setup = _tvCardStbSetups[tabControlTVCards.SelectedIndex];
-
- int channelTest = Decimal.ToInt32(numericUpDownTest.Value);
- string channel;
- switch (setup.ChannelDigits)
- {
- case 2:
- channel = channelTest.ToString("00");
- break;
-
- case 3:
- channel = channelTest.ToString("000");
- break;
-
- case 4:
- channel = channelTest.ToString("0000");
- break;
-
- default:
- channel = channelTest.ToString();
- break;
- }
-
- try
- {
- int charVal;
- string command;
-
- for (int repeatCount = 0; repeatCount <= setup.RepeatChannelCommands; repeatCount++)
- {
- if (repeatCount > 0 && setup.RepeatPauseTime > 0)
- Thread.Sleep(setup.RepeatPauseTime);
-
- if (setup.UsePreChangeCommand)
- {
- if (setup.PreChangeCommand != "")
- {
- if (setup.PreChangeCommand.StartsWith(TV3ExtChannelChanger.RunCommandPrefix))
- ProcessExternalChannelProgram(setup.PreChangeCommand.Substring(TV3ExtChannelChanger.RunCommandPrefix.Length), -1, channel);
- else if (setup.PreChangeCommand.StartsWith(TV3ExtChannelChanger.SerialCommandPrefix))
- ProcessSerialCommand(setup.PreChangeCommand.Substring(TV3ExtChannelChanger.SerialCommandPrefix.Length), -1, channel);
-
- if (setup.PauseTime > 0)
- Thread.Sleep(setup.PauseTime);
- }
- }
-
- foreach (char digit in channel)
- {
- charVal = digit - 48;
-
- command = setup.Digits[charVal];
- if (command.StartsWith(TV3ExtChannelChanger.RunCommandPrefix))
- ProcessExternalChannelProgram(command.Substring(TV3ExtChannelChanger.RunCommandPrefix.Length), charVal, channel);
- else if (command.StartsWith(TV3ExtChannelChanger.SerialCommandPrefix))
- ProcessSerialCommand(command.Substring(TV3ExtChannelChanger.SerialCommandPrefix.Length), charVal, channel);
-
- if (setup.PauseTime > 0)
- Thread.Sleep(setup.PauseTime);
- }
-
- if (setup.SendSelect)
- {
- if (setup.SelectCommand.StartsWith(TV3ExtChannelChanger.RunCommandPrefix))
- {
- ProcessExternalChannelProgram(setup.SelectCommand.Substring(TV3ExtChannelChanger.RunCommandPrefix.Length), -1, channel);
-
- if (setup.DoubleChannelSelect)
- ProcessExternalChannelProgram(setup.SelectCommand.Substring(TV3ExtChannelChanger.RunCommandPrefix.Length), -1, channel);
- }
- else if (setup.SelectCommand.StartsWith(TV3ExtChannelChanger.SerialCommandPrefix))
- {
- ProcessSerialCommand(setup.SelectCommand.Substring(TV3ExtChannelChanger.SerialCommandPrefix.Length), -1, channel);
-
- if (setup.DoubleChannelSelect)
- ProcessSerialCommand(setup.SelectCommand.Substring(TV3ExtChannelChanger.SerialCommandPrefix.Length), -1, channel);
- }
- }
- }
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message, "Failed to test external channel", MessageBoxButtons.OK, MessageBoxIcon.Error);
- }
- }
-
- private void buttonQuickSet_Click(object sender, EventArgs e)
- {
- string quickSetup = comboBoxQuickSetup.Text;
-
- if (quickSetup == "")
- return;
-
- _tvCardStbSetups[tabControlTVCards.SelectedIndex].SetToXml(quickSetup);
- }
-
- private void buttonCopyFrom_Click(object sender, EventArgs e)
- {
- _tvCardStbSetups[tabControlTVCards.SelectedIndex].SetToCard(comboBoxCopyFrom.SelectedIndex);
- }
-
- private void buttonCancel_Click(object sender, EventArgs e)
- {
- this.DialogResult = DialogResult.Cancel;
- this.Close();
- }
-
- #endregion Buttons
-
- }
-
-}
Deleted: trunk/plugins/TV3ExtChannelChanger/ExternalChannels.designer.cs
===================================================================
--- trunk/plugins/TV3ExtChannelChanger/ExternalChannels.designer.cs 2007-01-30 02:53:54 UTC (rev 51)
+++ trunk/plugins/TV3ExtChannelChanger/ExternalChannels.designer.cs 2007-01-30 02:58:31 UTC (rev 52)
@@ -1,232 +0,0 @@
-namespace TvEngine
-{
- partial class ExternalChannels
- {
- /// <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.buttonOK = new System.Windows.Forms.Button();
- this.groupBoxQuickSetup = new System.Windows.Forms.GroupBox();
- this.buttonQuickSet = new System.Windows.Forms.Button();
- this.comboBoxQuickSetup = new System.Windows.Forms.ComboBox();
- this.groupBoxTest = new System.Windows.Forms.GroupBox();
- this.labelCh = new System.Windows.Forms.Label();
- this.buttonTest = new System.Windows.Forms.Button();
- this.numericUpDownTest = new System.Windows.Forms.NumericUpDown();
- this.buttonCopyFrom = new System.Windows.Forms.Button();
- this.comboBoxCopyFrom = new System.Windows.Forms.ComboBox();
- this.tabControlTVCards = new System.Windows.Forms.TabControl();
- this.buttonCancel = new System.Windows.Forms.Button();
- this.groupBoxQuickSetup.SuspendLayout();
- this.groupBoxTest.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.numericUpDownTest)).BeginInit();
- this.SuspendLayout();
- //
- // buttonOK
- //
- this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonOK.Location = new System.Drawing.Point(400, 352);
- this.buttonOK.Name = "buttonOK";
- this.buttonOK.Size = new System.Drawing.Size(56, 24);
- this.buttonOK.TabIndex = 5;
- this.buttonOK.Text = "OK";
- this.buttonOK.UseVisualStyleBackColor = true;
- this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
- //
- // groupBoxQuickSetup
- //
- this.groupBoxQuickSetup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.groupBoxQuickSetup.Controls.Add(this.buttonQuickSet);
- this.groupBoxQuickSetup.Controls.Add(this.comboBoxQuickSetup);
- this.groupBoxQuickSetup.Location = new System.Drawing.Point(8, 296);
- this.groupBoxQuickSetup.Name = "groupBoxQuickSetup";
- this.groupBoxQuickSetup.Size = new System.Drawing.Size(288, 48);
- this.groupBoxQuickSetup.TabIndex = 1;
- this.groupBoxQuickSetup.TabStop = false;
- this.groupBoxQuickSetup.Text = "Quick Setup";
- //
- // buttonQuickSet
- //
- this.buttonQuickSet.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonQuickSet.Location = new System.Drawing.Point(232, 16);
- this.buttonQuickSet.Name = "buttonQuickSet";
- this.buttonQuickSet.Size = new System.Drawing.Size(48, 21);
- this.buttonQuickSet.TabIndex = 1;
- this.buttonQuickSet.Text = "Set";
- this.buttonQuickSet.UseVisualStyleBackColor = true;
- this.buttonQuickSet.Click += new System.EventHandler(this.buttonQuickSet_Click);
- //
- // comboBoxQuickSetup
- //
- this.comboBoxQuickSetup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.comboBoxQuickSetup.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.comboBoxQuickSetup.FormattingEnabled = true;
- this.comboBoxQuickSetup.Location = new System.Drawing.Point(8, 16);
- this.comboBoxQuickSetup.Name = "comboBoxQuickSetup";
- this.comboBoxQuickSetup.Size = new System.Drawing.Size(216, 21);
- this.comboBoxQuickSetup.TabIndex = 0;
- //
- // groupBoxTest
- //
- this.groupBoxTest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.groupBoxTest.Controls.Add(this.labelCh);
- this.groupBoxTest.Controls.Add(this.buttonTest);
- this.groupBoxTest.Controls.Add(this.numericUpDownTest);
- this.groupBoxTest.Location = new System.Drawing.Point(304, 296);
- this.groupBoxTest.Name = "groupBoxTest";
- this.groupBoxTest.Size = new System.Drawing.Size(216, 48);
- this.groupBoxTest.TabIndex = 2;
- this.groupBoxTest.TabStop = false;
- this.groupBoxTest.Text = "Test";
- //
- // labelCh
- //
- this.labelCh.Location = new System.Drawing.Point(8, 16);
- this.labelCh.Name = "labelCh";
- this.labelCh.Size = new System.Drawing.Size(64, 20);
- this.labelCh.TabIndex = 0;
- this.labelCh.Text = "Channel:";
- this.labelCh.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
- // buttonTest
- //
- this.buttonTest.Location = new System.Drawing.Point(152, 16);
- this.buttonTest.Name = "buttonTest";
- this.buttonTest.Size = new System.Drawing.Size(56, 20);
- this.buttonTest.TabIndex = 2;
- this.buttonTest.Text = "Test";
- this.buttonTest.UseVisualStyleBackColor = true;
- this.buttonTest.Click += new System.EventHandler(this.buttonTest_Click);
- //
- // numericUpDownTest
- //
- this.numericUpDownTest.Location = new System.Drawing.Point(72, 16);
- this.numericUpDownTest.Maximum = new decimal(new int[] {
- 9999,
- 0,
- 0,
- 0});
- this.numericUpDownTest.Name = "numericUpDownTest";
- this.numericUpDownTest.Size = new System.Drawing.Size(72, 20);
- this.numericUpDownTest.TabIndex = 1;
- this.numericUpDownTest.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
- this.numericUpDownTest.Value = new decimal(new int[] {
- 1,
- 0,
- 0,
- 0});
- //
- // buttonCopyFrom
- //
- this.buttonCopyFrom.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.buttonCopyFrom.Location = new System.Drawing.Point(8, 352);
- this.buttonCopyFrom.Name = "buttonCopyFrom";
- this.buttonCopyFrom.Size = new System.Drawing.Size(144, 21);
- this.buttonCopyFrom.TabIndex = 3;
- this.buttonCopyFrom.Text = "Copy from saved config:";
- this.buttonCopyFrom.UseVisualStyleBackColor = true;
- this.buttonCopyFrom.Click += new System.EventHandler(this.buttonCopyFrom_Click);
- //
- // comboBoxCopyFrom
- //
- this.comboBoxCopyFrom.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.comboBoxCopyFrom.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.comboBoxCopyFrom.FormattingEnabled = true;
- this.comboBoxCopyFrom.Location = new System.Drawing.Point(160, 352);
- this.comboBoxCopyFrom.Name = "comboBoxCopyFrom";
- this.comboBoxCopyFrom.Size = new System.Drawing.Size(120, 21);
- this.comboBoxCopyFrom.TabIndex = 4;
- //
- // tabControlTVCards
- //
- this.tabControlTVCards.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.tabControlTVCards.Location = new System.Drawing.Point(8, 8);
- this.tabControlTVCards.Name = "tabControlTVCards";
- this.tabControlTVCards.SelectedIndex = 0;
- this.tabControlTVCards.Size = new System.Drawing.Size(512, 280);
- this.tabControlTVCards.TabIndex = 0;
- //
- // buttonCancel
- //
- this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
- this.buttonCancel.Location = new System.Drawing.Point(464, 352);
- this.buttonCancel.Name = "buttonCancel";
- this.buttonCancel.Size = new System.Drawing.Size(56, 24);
- this.buttonCancel.TabIndex = 6;
- this.buttonCancel.Text = "Cancel";
- this.buttonCancel.UseVisualStyleBackColor = true;
- this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
- //
- // ExternalChannels
- //
- this.AcceptButton = this.buttonOK;
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.CancelButton = this.buttonCancel;
- this.ClientSize = new System.Drawing.Size(528, 383);
- this.Controls.Add(this.buttonCancel);
- this.Controls.Add(this.tabControlTVCards);
- this.Controls.Add(this.comboBoxCopyFrom);
- this.Controls.Add(this.buttonCopyFrom);
- this.Controls.Add(this.groupBoxTest);
- this.Controls.Add(this.groupBoxQuickSetup);
- this.Controls.Add(this.buttonOK);
- this.MinimizeBox = false;
- this.Name = "ExternalChannels";
- this.ShowIcon = false;
- this.ShowInTaskbar = false;
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
- this.Text = "External Channel Changing";
- this.Load += new System.EventHandler(this.ExternalChannels_Load);
- this.groupBoxQuickSetup.ResumeLayout(false);
- this.groupBoxTest.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.numericUpDownTest)).EndInit();
- this.ResumeLayout(false);
-
- }
-
- #endregion
-
- private System.Windows.Forms.Button buttonOK;
- private System.Windows.Forms.GroupBox groupBoxQuickSetup;
- private System.Windows.Forms.ComboBox comboBoxQuickSetup;
- private System.Windows.Forms.GroupBox groupBoxTest;
- private System.Windows.Forms.NumericUpDown numericUpDownTest;
- private System.Windows.Forms.Button buttonTest;
- private System.Windows.Forms.Button buttonQuickSet;
- private System.Windows.Forms.Label labelCh;
- private System.Windows.Forms.Button buttonCopyFrom;
- private System.Windows.Forms.ComboBox comboBoxCopyFrom;
- private System.Windows.Forms.TabControl tabControlTVCards;
- private System.Windows.Forms.Button buttonCancel;
-
- }
-}
\ No newline at end of file
Deleted: trunk/plugins/TV3ExtChannelChanger/ExternalChannels.resx
===================================================================
--- trunk/plugins/TV3ExtChannelChanger/ExternalChannels.resx 2007-01-30 02:53:54 UTC (rev 51)
+++ trunk/plugins/TV3ExtChannelChanger/ExternalChannels.resx 2007-01-30 02:58:31 UTC (rev 52)
@@ -1,120 +0,0 @@
-<?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>
-...
[truncated message content] |
|
From: <ze...@us...> - 2007-01-30 23:25:44
|
Revision: 56
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=56&view=rev
Author: zebons
Date: 2007-01-30 15:25:07 -0800 (Tue, 30 Jan 2007)
Log Message:
-----------
Added Paths:
-----------
trunk/plugins/MyFilms/
trunk/plugins/MyFilms/AntMovieCatalog.Designer.cs
trunk/plugins/MyFilms/AntMovieCatalog.cs
trunk/plugins/MyFilms/AntMovieCatalog.xsc
trunk/plugins/MyFilms/AntMovieCatalog.xsd
trunk/plugins/MyFilms/AntMovieCatalog.xss
trunk/plugins/MyFilms/MesFilms.cs
trunk/plugins/MyFilms/MesFilms.csproj
trunk/plugins/MyFilms/MesFilms.sln
trunk/plugins/MyFilms/MesFilms.suo
trunk/plugins/MyFilms/MesFilms.xml
trunk/plugins/MyFilms/MesFilmsDetail.cs
trunk/plugins/MyFilms/MesFilmsSetup.Designer.cs
trunk/plugins/MyFilms/MesFilmsSetup.cs
trunk/plugins/MyFilms/MesFilmsSetup.resx
trunk/plugins/MyFilms/Properties/
trunk/plugins/MyFilms/Properties/AssemblyInfo.cs
trunk/plugins/MyFilms/skin/
trunk/plugins/MyFilms/skin/BlackMyst/
trunk/plugins/MyFilms/skin/BlackMyst/Media/
trunk/plugins/MyFilms/skin/BlackMyst/Media/Films_DD.png
trunk/plugins/MyFilms/skin/BlackMyst/Media/Films_first_focus.png
trunk/plugins/MyFilms/skin/BlackMyst/Media/Films_first_nofocus.png
trunk/plugins/MyFilms/skin/BlackMyst/Media/Films_last_focus.png
trunk/plugins/MyFilms/skin/BlackMyst/Media/Films_last_nofocus.png
trunk/plugins/MyFilms/skin/BlackMyst/Media/Films_next_focus.PNG
trunk/plugins/MyFilms/skin/BlackMyst/Media/Films_next_nofocus.PNG
trunk/plugins/MyFilms/skin/BlackMyst/Media/Films_prior_focus.PNG
trunk/plugins/MyFilms/skin/BlackMyst/Media/Films_prior_nofocus.PNG
trunk/plugins/MyFilms/skin/BlackMyst/Media/Thumbs.db
trunk/plugins/MyFilms/skin/BlackMyst/Media/amclogo.png
trunk/plugins/MyFilms/skin/BlackMyst/Media/hover_my Films.png
trunk/plugins/MyFilms/skin/BlackMyst/MesFilms.xml
trunk/plugins/MyFilms/skin/BlackMyst/MesFilmsDetail.xml
trunk/plugins/MyFilms/skin/BlueTwo/
trunk/plugins/MyFilms/skin/BlueTwo/Media/
trunk/plugins/MyFilms/skin/BlueTwo/Media/Films_DD.png
trunk/plugins/MyFilms/skin/BlueTwo/Media/Films_first_focus.png
trunk/plugins/MyFilms/skin/BlueTwo/Media/Films_first_nofocus.png
trunk/plugins/MyFilms/skin/BlueTwo/Media/Films_last_focus.png
trunk/plugins/MyFilms/skin/BlueTwo/Media/Films_last_nofocus.png
trunk/plugins/MyFilms/skin/BlueTwo/Media/Films_next_focus.PNG
trunk/plugins/MyFilms/skin/BlueTwo/Media/Films_next_nofocus.PNG
trunk/plugins/MyFilms/skin/BlueTwo/Media/Films_prior_focus.PNG
trunk/plugins/MyFilms/skin/BlueTwo/Media/Films_prior_nofocus.PNG
trunk/plugins/MyFilms/skin/BlueTwo/Media/Thumbs.db
trunk/plugins/MyFilms/skin/BlueTwo/Media/amclogo.png
trunk/plugins/MyFilms/skin/BlueTwo/Media/hover_my films.png
trunk/plugins/MyFilms/skin/BlueTwo/MesFilms.xml
trunk/plugins/MyFilms/skin/BlueTwo/MesFilmsDetail.xml
trunk/plugins/MyFilms/skin/BlueTwo wide/
trunk/plugins/MyFilms/skin/BlueTwo wide/Media/
trunk/plugins/MyFilms/skin/BlueTwo wide/Media/Films_DD.png
trunk/plugins/MyFilms/skin/BlueTwo wide/Media/Films_first_focus.png
trunk/plugins/MyFilms/skin/BlueTwo wide/Media/Films_first_nofocus.png
trunk/plugins/MyFilms/skin/BlueTwo wide/Media/Films_last_focus.png
trunk/plugins/MyFilms/skin/BlueTwo wide/Media/Films_last_nofocus.png
trunk/plugins/MyFilms/skin/BlueTwo wide/Media/Films_next_focus.PNG
trunk/plugins/MyFilms/skin/BlueTwo wide/Media/Films_next_nofocus.PNG
trunk/plugins/MyFilms/skin/BlueTwo wide/Media/Films_prior_focus.PNG
trunk/plugins/MyFilms/skin/BlueTwo wide/Media/Films_prior_nofocus.PNG
trunk/plugins/MyFilms/skin/BlueTwo wide/Media/amclogo.png
trunk/plugins/MyFilms/skin/BlueTwo wide/Media/hover_my films.png
trunk/plugins/MyFilms/skin/BlueTwo wide/MesFilms.xml
trunk/plugins/MyFilms/skin/BlueTwo wide/MesFilmsDetail.xml
trunk/plugins/MyFilms/skin/MePo Green Wide/
trunk/plugins/MyFilms/skin/MePo Green Wide/Media/
trunk/plugins/MyFilms/skin/MePo Green Wide/Media/FilmsVideo.png
trunk/plugins/MyFilms/skin/MePo Green Wide/Media/Films_DD.png
trunk/plugins/MyFilms/skin/MePo Green Wide/Media/Films_first_focus.png
trunk/plugins/MyFilms/skin/MePo Green Wide/Media/Films_first_nofocus.png
trunk/plugins/MyFilms/skin/MePo Green Wide/Media/Films_last_focus.png
trunk/plugins/MyFilms/skin/MePo Green Wide/Media/Films_last_nofocus.png
trunk/plugins/MyFilms/skin/MePo Green Wide/Media/Films_next_focus.png
trunk/plugins/MyFilms/skin/MePo Green Wide/Media/Films_next_nofocus.png
trunk/plugins/MyFilms/skin/MePo Green Wide/Media/Films_prior_focus.png
trunk/plugins/MyFilms/skin/MePo Green Wide/Media/Films_prior_nofocus.png
trunk/plugins/MyFilms/skin/MePo Green Wide/Media/Thumbs.db
trunk/plugins/MyFilms/skin/MePo Green Wide/Media/amclogo.png
trunk/plugins/MyFilms/skin/MePo Green Wide/Media/hover_Films.xml
trunk/plugins/MyFilms/skin/MePo Green Wide/MesFilms.xml
trunk/plugins/MyFilms/skin/MePo Green Wide/MesFilmsDetail.xml
trunk/plugins/MyFilms/skin/MePo Green Wide/Thumbs.db
trunk/plugins/MyFilms/skin/Project Mayhem 3/
trunk/plugins/MyFilms/skin/Project Mayhem 3/Media/
trunk/plugins/MyFilms/skin/Project Mayhem 3/Media/Back_films.png
trunk/plugins/MyFilms/skin/Project Mayhem 3/Media/Films_DD.png
trunk/plugins/MyFilms/skin/Project Mayhem 3/Media/Films_first_focus.png
trunk/plugins/MyFilms/skin/Project Mayhem 3/Media/Films_first_nofocus.png
trunk/plugins/MyFilms/skin/Project Mayhem 3/Media/Films_last_focus.png
trunk/plugins/MyFilms/skin/Project Mayhem 3/Media/Films_last_nofocus.png
trunk/plugins/MyFilms/skin/Project Mayhem 3/Media/Films_next_focus.PNG
trunk/plugins/MyFilms/skin/Project Mayhem 3/Media/Films_next_nofocus.PNG
trunk/plugins/MyFilms/skin/Project Mayhem 3/Media/Films_prior_focus.PNG
trunk/plugins/MyFilms/skin/Project Mayhem 3/Media/Films_prior_nofocus.PNG
trunk/plugins/MyFilms/skin/Project Mayhem 3/Media/amclogo.png
trunk/plugins/MyFilms/skin/Project Mayhem 3/Media/hover_my films.png
trunk/plugins/MyFilms/skin/Project Mayhem 3/MesFilms.xml
trunk/plugins/MyFilms/skin/Project Mayhem 3/MesFilmsDetail.xml
Added: trunk/plugins/MyFilms/AntMovieCatalog.Designer.cs
===================================================================
--- trunk/plugins/MyFilms/AntMovieCatalog.Designer.cs (rev 0)
+++ trunk/plugins/MyFilms/AntMovieCatalog.Designer.cs 2007-01-30 23:25:07 UTC (rev 56)
@@ -0,0 +1,2558 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// Ce code a été généré par un outil.
+// Version du runtime :2.0.50727.42
+//
+// Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si
+// le code est régénéré.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+#pragma warning disable 1591
+
+namespace MesFilms {
+ using System;
+
+
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
+ [Serializable()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ [System.ComponentModel.ToolboxItem(true)]
+ [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema")]
+ [System.Xml.Serialization.XmlRootAttribute("AntMovieCatalog")]
+ [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")]
+ public partial class AntMovieCatalog : System.Data.DataSet {
+
+ private CatalogDataTable tableCatalog;
+
+ private ContentsDataTable tableContents;
+
+ private MovieDataTable tableMovie;
+
+ private System.Data.DataRelation relationCatalog_Contents;
+
+ private System.Data.DataRelation relationContents_Movie;
+
+ private System.Data.SchemaSerializationMode _schemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public AntMovieCatalog() {
+ this.BeginInit();
+ this.InitClass();
+ System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
+ base.Tables.CollectionChanged += schemaChangedHandler;
+ base.Relations.CollectionChanged += schemaChangedHandler;
+ this.EndInit();
+ this.InitExpressions();
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ protected AntMovieCatalog(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) :
+ base(info, context, false) {
+ if ((this.IsBinarySerialized(info, context) == true)) {
+ this.InitVars(false);
+ System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
+ this.Tables.CollectionChanged += schemaChangedHandler1;
+ this.Relations.CollectionChanged += schemaChangedHandler1;
+ return;
+ }
+ string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string))));
+ if ((this.DetermineSchemaSerializationMode(info, context) == System.Data.SchemaSerializationMode.IncludeSchema)) {
+ System.Data.DataSet ds = new System.Data.DataSet();
+ ds.ReadXmlSchema(new System.Xml.XmlTextReader(new System.IO.StringReader(strSchema)));
+ if ((ds.Tables["Catalog"] != null)) {
+ base.Tables.Add(new CatalogDataTable(ds.Tables["Catalog"]));
+ }
+ if ((ds.Tables["Contents"] != null)) {
+ base.Tables.Add(new ContentsDataTable(ds.Tables["Contents"]));
+ }
+ if ((ds.Tables["Movie"] != null)) {
+ base.Tables.Add(new MovieDataTable(ds.Tables["Movie"]));
+ }
+ this.DataSetName = ds.DataSetName;
+ this.Prefix = ds.Prefix;
+ this.Namespace = ds.Namespace;
+ this.Locale = ds.Locale;
+ this.CaseSensitive = ds.CaseSensitive;
+ this.EnforceConstraints = ds.EnforceConstraints;
+ this.Merge(ds, false, System.Data.MissingSchemaAction.Add);
+ this.InitVars();
+ }
+ else {
+ this.ReadXmlSchema(new System.Xml.XmlTextReader(new System.IO.StringReader(strSchema)));
+ this.InitExpressions();
+ }
+ this.GetSerializationData(info, context);
+ System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
+ base.Tables.CollectionChanged += schemaChangedHandler;
+ this.Relations.CollectionChanged += schemaChangedHandler;
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [System.ComponentModel.Browsable(false)]
+ [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
+ public CatalogDataTable Catalog {
+ get {
+ return this.tableCatalog;
+ }
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [System.ComponentModel.Browsable(false)]
+ [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
+ public ContentsDataTable Contents {
+ get {
+ return this.tableContents;
+ }
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [System.ComponentModel.Browsable(false)]
+ [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
+ public MovieDataTable Movie {
+ get {
+ return this.tableMovie;
+ }
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [System.ComponentModel.BrowsableAttribute(true)]
+ [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Visible)]
+ public override System.Data.SchemaSerializationMode SchemaSerializationMode {
+ get {
+ return this._schemaSerializationMode;
+ }
+ set {
+ this._schemaSerializationMode = value;
+ }
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
+ public new System.Data.DataTableCollection Tables {
+ get {
+ return base.Tables;
+ }
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
+ public new System.Data.DataRelationCollection Relations {
+ get {
+ return base.Relations;
+ }
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ protected override void InitializeDerivedDataSet() {
+ this.BeginInit();
+ this.InitClass();
+ this.EndInit();
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public override System.Data.DataSet Clone() {
+ AntMovieCatalog cln = ((AntMovieCatalog)(base.Clone()));
+ cln.InitVars();
+ cln.InitExpressions();
+ cln.SchemaSerializationMode = this.SchemaSerializationMode;
+ return cln;
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ protected override bool ShouldSerializeTables() {
+ return false;
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ protected override bool ShouldSerializeRelations() {
+ return false;
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ protected override void ReadXmlSerializable(System.Xml.XmlReader reader) {
+ if ((this.DetermineSchemaSerializationMode(reader) == System.Data.SchemaSerializationMode.IncludeSchema)) {
+ this.Reset();
+ System.Data.DataSet ds = new System.Data.DataSet();
+ ds.ReadXml(reader);
+ if ((ds.Tables["Catalog"] != null)) {
+ base.Tables.Add(new CatalogDataTable(ds.Tables["Catalog"]));
+ }
+ if ((ds.Tables["Contents"] != null)) {
+ base.Tables.Add(new ContentsDataTable(ds.Tables["Contents"]));
+ }
+ if ((ds.Tables["Movie"] != null)) {
+ base.Tables.Add(new MovieDataTable(ds.Tables["Movie"]));
+ }
+ this.DataSetName = ds.DataSetName;
+ this.Prefix = ds.Prefix;
+ this.Namespace = ds.Namespace;
+ this.Locale = ds.Locale;
+ this.CaseSensitive = ds.CaseSensitive;
+ this.EnforceConstraints = ds.EnforceConstraints;
+ this.Merge(ds, false, System.Data.MissingSchemaAction.Add);
+ this.InitVars();
+ }
+ else {
+ this.ReadXml(reader);
+ this.InitVars();
+ }
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ protected override System.Xml.Schema.XmlSchema GetSchemaSerializable() {
+ System.IO.MemoryStream stream = new System.IO.MemoryStream();
+ this.WriteXmlSchema(new System.Xml.XmlTextWriter(stream, null));
+ stream.Position = 0;
+ return System.Xml.Schema.XmlSchema.Read(new System.Xml.XmlTextReader(stream), null);
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ internal void InitVars() {
+ this.InitVars(true);
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ internal void InitVars(bool initTable) {
+ this.tableCatalog = ((CatalogDataTable)(base.Tables["Catalog"]));
+ if ((initTable == true)) {
+ if ((this.tableCatalog != null)) {
+ this.tableCatalog.InitVars();
+ }
+ }
+ this.tableContents = ((ContentsDataTable)(base.Tables["Contents"]));
+ if ((initTable == true)) {
+ if ((this.tableContents != null)) {
+ this.tableContents.InitVars();
+ }
+ }
+ this.tableMovie = ((MovieDataTable)(base.Tables["Movie"]));
+ if ((initTable == true)) {
+ if ((this.tableMovie != null)) {
+ this.tableMovie.InitVars();
+ }
+ }
+ this.relationCatalog_Contents = this.Relations["Catalog_Contents"];
+ this.relationContents_Movie = this.Relations["Contents_Movie"];
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ private void InitClass() {
+ this.DataSetName = "AntMovieCatalog";
+ this.Prefix = "";
+ this.EnforceConstraints = true;
+ this.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
+ this.tableCatalog = new CatalogDataTable();
+ base.Tables.Add(this.tableCatalog);
+ this.tableContents = new ContentsDataTable();
+ base.Tables.Add(this.tableContents);
+ this.tableMovie = new MovieDataTable(false);
+ base.Tables.Add(this.tableMovie);
+ System.Data.ForeignKeyConstraint fkc;
+ fkc = new System.Data.ForeignKeyConstraint("Catalog_Contents", new System.Data.DataColumn[] {
+ this.tableCatalog.Catalog_IdColumn}, new System.Data.DataColumn[] {
+ this.tableContents.Catalog_IdColumn});
+ this.tableContents.Constraints.Add(fkc);
+ fkc.AcceptRejectRule = System.Data.AcceptRejectRule.None;
+ fkc.DeleteRule = System.Data.Rule.Cascade;
+ fkc.UpdateRule = System.Data.Rule.Cascade;
+ fkc = new System.Data.ForeignKeyConstraint("Contents_Movie", new System.Data.DataColumn[] {
+ this.tableContents.Contents_IdColumn}, new System.Data.DataColumn[] {
+ this.tableMovie.Contents_IdColumn});
+ this.tableMovie.Constraints.Add(fkc);
+ fkc.AcceptRejectRule = System.Data.AcceptRejectRule.None;
+ fkc.DeleteRule = System.Data.Rule.Cascade;
+ fkc.UpdateRule = System.Data.Rule.Cascade;
+ this.relationCatalog_Contents = new System.Data.DataRelation("Catalog_Contents", new System.Data.DataColumn[] {
+ this.tableCatalog.Catalog_IdColumn}, new System.Data.DataColumn[] {
+ this.tableContents.Catalog_IdColumn}, false);
+ this.relationCatalog_Contents.Nested = true;
+ this.Relations.Add(this.relationCatalog_Contents);
+ this.relationContents_Movie = new System.Data.DataRelation("Contents_Movie", new System.Data.DataColumn[] {
+ this.tableContents.Contents_IdColumn}, new System.Data.DataColumn[] {
+ this.tableMovie.Contents_IdColumn}, false);
+ this.relationContents_Movie.Nested = true;
+ this.Relations.Add(this.relationContents_Movie);
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ private bool ShouldSerializeCatalog() {
+ return false;
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ private bool ShouldSerializeContents() {
+ return false;
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ private bool ShouldSerializeMovie() {
+ return false;
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ private void SchemaChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) {
+ if ((e.Action == System.ComponentModel.CollectionChangeAction.Remove)) {
+ this.InitVars();
+ }
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public static System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(System.Xml.Schema.XmlSchemaSet xs) {
+ AntMovieCatalog ds = new AntMovieCatalog();
+ System.Xml.Schema.XmlSchemaComplexType type = new System.Xml.Schema.XmlSchemaComplexType();
+ System.Xml.Schema.XmlSchemaSequence sequence = new System.Xml.Schema.XmlSchemaSequence();
+ xs.Add(ds.GetSchemaSerializable());
+ System.Xml.Schema.XmlSchemaAny any = new System.Xml.Schema.XmlSchemaAny();
+ any.Namespace = ds.Namespace;
+ sequence.Items.Add(any);
+ type.Particle = sequence;
+ return type;
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ private void InitExpressions() {
+ this.Movie.DateAddedColumn.Expression = "Convert(Date,\'System.DateTime\')";
+ }
+
+ public delegate void CatalogRowChangeEventHandler(object sender, CatalogRowChangeEvent e);
+
+ public delegate void ContentsRowChangeEventHandler(object sender, ContentsRowChangeEvent e);
+
+ public delegate void MovieRowChangeEventHandler(object sender, MovieRowChangeEvent e);
+
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
+ [System.Serializable()]
+ [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
+ public partial class CatalogDataTable : System.Data.DataTable, System.Collections.IEnumerable {
+
+ private System.Data.DataColumn columnAntMovieCatalog_Id;
+
+ private System.Data.DataColumn columnProperties;
+
+ private System.Data.DataColumn columnCatalog_Id;
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public CatalogDataTable() {
+ this.TableName = "Catalog";
+ this.BeginInit();
+ this.InitClass();
+ this.EndInit();
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ internal CatalogDataTable(System.Data.DataTable table) {
+ this.TableName = table.TableName;
+ if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
+ this.CaseSensitive = table.CaseSensitive;
+ }
+ if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
+ this.Locale = table.Locale;
+ }
+ if ((table.Namespace != table.DataSet.Namespace)) {
+ this.Namespace = table.Namespace;
+ }
+ this.Prefix = table.Prefix;
+ this.MinimumCapacity = table.MinimumCapacity;
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ protected CatalogDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) :
+ base(info, context) {
+ this.InitVars();
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public System.Data.DataColumn AntMovieCatalog_IdColumn {
+ get {
+ return this.columnAntMovieCatalog_Id;
+ }
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public System.Data.DataColumn PropertiesColumn {
+ get {
+ return this.columnProperties;
+ }
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public System.Data.DataColumn Catalog_IdColumn {
+ get {
+ return this.columnCatalog_Id;
+ }
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [System.ComponentModel.Browsable(false)]
+ public int Count {
+ get {
+ return this.Rows.Count;
+ }
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public CatalogRow this[int index] {
+ get {
+ return ((CatalogRow)(this.Rows[index]));
+ }
+ }
+
+ public event CatalogRowChangeEventHandler CatalogRowChanging;
+
+ public event CatalogRowChangeEventHandler CatalogRowChanged;
+
+ public event CatalogRowChangeEventHandler CatalogRowDeleting;
+
+ public event CatalogRowChangeEventHandler CatalogRowDeleted;
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public void AddCatalogRow(CatalogRow row) {
+ this.Rows.Add(row);
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public CatalogRow AddCatalogRow(int AntMovieCatalog_Id, string Properties) {
+ CatalogRow rowCatalogRow = ((CatalogRow)(this.NewRow()));
+ rowCatalogRow.ItemArray = new object[] {
+ AntMovieCatalog_Id,
+ Properties,
+ null};
+ this.Rows.Add(rowCatalogRow);
+ return rowCatalogRow;
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public virtual System.Collections.IEnumerator GetEnumerator() {
+ return this.Rows.GetEnumerator();
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public override System.Data.DataTable Clone() {
+ CatalogDataTable cln = ((CatalogDataTable)(base.Clone()));
+ cln.InitVars();
+ return cln;
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ protected override System.Data.DataTable CreateInstance() {
+ return new CatalogDataTable();
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ internal void InitVars() {
+ this.columnAntMovieCatalog_Id = base.Columns["AntMovieCatalog_Id"];
+ this.columnProperties = base.Columns["Properties"];
+ this.columnCatalog_Id = base.Columns["Catalog_Id"];
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ private void InitClass() {
+ this.columnAntMovieCatalog_Id = new System.Data.DataColumn("AntMovieCatalog_Id", typeof(int), null, System.Data.MappingType.Hidden);
+ base.Columns.Add(this.columnAntMovieCatalog_Id);
+ this.columnProperties = new System.Data.DataColumn("Properties", typeof(string), null, System.Data.MappingType.Element);
+ base.Columns.Add(this.columnProperties);
+ this.columnCatalog_Id = new System.Data.DataColumn("Catalog_Id", typeof(int), null, System.Data.MappingType.Hidden);
+ base.Columns.Add(this.columnCatalog_Id);
+ this.Constraints.Add(new System.Data.UniqueConstraint("Constraint1", new System.Data.DataColumn[] {
+ this.columnCatalog_Id}, true));
+ this.columnAntMovieCatalog_Id.Namespace = "";
+ this.columnCatalog_Id.AutoIncrement = true;
+ this.columnCatalog_Id.AllowDBNull = false;
+ this.columnCatalog_Id.Unique = true;
+ this.columnCatalog_Id.Namespace = "";
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ public CatalogRow NewCatalogRow() {
+ return ((CatalogRow)(this.NewRow()));
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) {
+ return new CatalogRow(builder);
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ protected override System.Type GetRowType() {
+ return typeof(CatalogRow);
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) {
+ base.OnRowChanged(e);
+ if ((this.CatalogRowChanged != null)) {
+ this.CatalogRowChanged(this, new CatalogRowChangeEvent(((CatalogRow)(e.Row)), e.Action));
+ }
+ }
+
+ [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) {
+ base.OnRowChanging(e);
+ if ((this.CatalogRowChanging != null)) {
+ this.CatalogRowChanging(this, new CatalogRowChangeEvent(((CatalogRow)(e.Row)), e.Action));
+ }
+ }
+
+ ...
[truncated message content] |
|
From: <fr...@us...> - 2007-01-31 06:18:19
|
Revision: 58
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=58&view=rev
Author: framug
Date: 2007-01-30 22:18:14 -0800 (Tue, 30 Jan 2007)
Log Message:
-----------
Add My Status Plugin
Added Paths:
-----------
trunk/plugins/My Status/
trunk/plugins/My Status/GUIStatus.cs
trunk/plugins/My Status/GUIStatusDetails.cs
trunk/plugins/My Status/GUIStatusPrefs.cs
trunk/plugins/My Status/My Status.csproj
trunk/plugins/My Status/My Status.sln
trunk/plugins/My Status/My Status.suo
trunk/plugins/My Status/Properties/
trunk/plugins/My Status/Properties/AssemblyInfo.cs
trunk/plugins/My Status/SetupForm.cs
trunk/plugins/My Status/SetupForm.resx
trunk/plugins/My Status/bin/
trunk/plugins/My Status/bin/Release/
trunk/plugins/My Status/bin/Release/Core.dll
trunk/plugins/My Status/bin/Release/Dialogs.dll
trunk/plugins/My Status/bin/Release/My Status.dll
trunk/plugins/My Status/bin/Release/My Status.pdb
trunk/plugins/My Status/bin/Release/Utils.dll
trunk/plugins/My Status/bin/Release/mbm5.dll
Added: trunk/plugins/My Status/GUIStatus.cs
===================================================================
--- trunk/plugins/My Status/GUIStatus.cs (rev 0)
+++ trunk/plugins/My Status/GUIStatus.cs 2007-01-31 06:18:14 UTC (rev 58)
@@ -0,0 +1,905 @@
+/*
+ * Copyright (C) 2005 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
+ *
+ */
+
+#region Usings
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+using System.Management;
+using System.Collections;
+using MediaPortal.Util;
+using MediaPortal.GUI.Library;
+using MediaPortal.Dialogs;
+using MediaPortal.Player;
+using MediaPortal.Playlists;
+using mbm5.MBMInfo;
+#endregion
+
+namespace MediaPortal.GUI.GUIStatus
+{
+ /// <summary>
+ /// Summary description for GUIStatus.
+ /// </summary>
+ public class GUIStatus : GUIWindow
+ {
+ public static int WINDOW_STATUS = 755;
+
+ #region Private Enumerations
+ enum Controls
+ {
+ CONTROL_PREFERENCES = 2, // preference button
+ CONTROL_DETAIL = 3, // status details
+ CONTROL_NEXTPAGE = 4, // next page
+ CONTROL_STATUS = 9, // status text
+ CONTROL_1 = 10,
+ CONTROL_STATUSBAR = 9875 // status bar
+ };
+
+ enum SensorTypes
+ {
+ Volt = 1,
+ Fan = 2,
+ Percentage = 3,
+ Temperature = 4,
+ HD = 5,
+ Mhz = 6,
+ Ram = 7
+ };
+
+ #endregion
+
+ #region Private Variables
+
+ private struct Sensor
+ {
+ public string name;
+ public string sname;
+ public int sensorNum;
+ public int sensorType;
+ public string drive;
+ public string first;
+ public string last;
+ public bool alarm;
+ public bool shutdown;
+ public long max;
+ public long min;
+ }
+
+ private string soundFolder="";
+ private string sound="";
+ private int playTime=0;
+ private int maxSensors = 24;
+ private int pageSensors = 12;
+ private int numSensors = 0;
+ private static Sensor[] sensors = new Sensor[42];
+ private bool starttimer=false;
+ private bool onWindow=false;
+ private bool onDetails=false;
+ private bool onStatus=false;
+ private bool showStatusBar=false;
+ private bool isMbm=false;
+ private bool page1=true;
+ private string statusBarSensor="";
+ private bool showTopBottom=false; // true=show status bar on top false=bottom
+ private static bool alarm=false;
+ private static bool shutdown=false;
+ private static int selectedSensor=0;
+ private static string name="";
+ private static int delayPlay=6;
+ private mbmSharedData MBMInfo=new mbmSharedData();
+ private System.Windows.Forms.Timer statusTimer = new System.Windows.Forms.Timer();
+ static bool m_bForceShutdown = true; // Force shutdown
+
+ #endregion
+
+ #region Constructor
+ public GUIStatus()
+ {
+ //
+ // TODO: Add constructor logic here
+ //
+ }
+
+ #endregion
+
+ #region Overrides
+
+ public override int GetID
+ {
+ get { return WINDOW_STATUS; }
+ set { base.GetID = value; }
+ }
+
+ public override bool Init()
+ {
+ onWindow=false;
+ onDetails=false;
+ onStatus=false;
+ //Log.Write("Start My Status");
+ LoadSettings();
+ InitializeStatusTimer();
+ return Load (GUIGraphicsContext.Skin+@"\mystatus.xml");
+ }
+
+ public override void OnAction(Action action)
+ {
+ if (action.wID == Action.ActionType.ACTION_PREVIOUS_MENU)
+ {
+ onWindow=false;
+ onDetails=false;
+ onStatus=false;
+ GUIWindowManager.ShowPreviousWindow();
+ return;
+ }
+ base.OnAction(action);
+ }
+ public override bool OnMessage(GUIMessage message)
+ {
+ switch ( message.Message )
+ {
+ case GUIMessage.MessageType.GUI_MSG_WINDOW_INIT:
+ base.OnMessage(message);
+ onStatus=false;
+ onWindow=true;
+ onDetails=false;
+ page1=true;
+ ShowButtons();
+ UpdateFields();
+ LoadSound();
+ GUIPropertyManager.SetProperty("#currentmodule", GUILocalizeStrings.Get(1950));
+ return true;
+ case GUIMessage.MessageType.GUI_MSG_CLICKED:
+ //get sender control
+ base.OnMessage(message);
+ int iControl=message.SenderControlId;
+ if (iControl>=(int)Controls.CONTROL_1 && iControl<=((int)Controls.CONTROL_1 + maxSensors))
+ {
+ selectedSensor=iControl;
+ alarm=sensors[selectedSensor-10].alarm;
+ name=sensors[selectedSensor-10].name;
+ onWindow=false;
+ onDetails=true;
+ onStatus=true;
+ GUIWindowManager.ActivateWindow(GUIStatusDetails.WINDOW_STATUS_DETAILS);
+ return true;
+ }
+ if (iControl==(int)Controls.CONTROL_PREFERENCES) // select preference page
+ {
+ onStatus=false;
+ onWindow=false;
+ onDetails=false;
+ GUIWindowManager.ActivateWindow(GUIStatusPrefs.WINDOW_STATUS_PREFS);
+ return true;
+ }
+ if (iControl==(int)Controls.CONTROL_NEXTPAGE) // select preference page
+ {
+ if(numSensors>12)
+ {
+ if (page1==true)
+ {
+ page1=false;
+ HideButtons();
+ ShowButtons();
+ }
+ else
+ {
+ page1=true;
+ HideButtons();
+ ShowButtons();
+ }
+ }
+ return true;
+ }
+ if (iControl==(int)Controls.CONTROL_DETAIL) // select status details
+ {
+ if (onStatus==false) // show textfield
+ {
+ onStatus=true;
+ onWindow=false;
+ onDetails=false;
+ HideButtons();
+ GUIControl.HideControl( GetID,(int)Controls.CONTROL_NEXTPAGE);
+ GUIControl.DisableControl( GetID,(int)Controls.CONTROL_NEXTPAGE);
+ GUIControl.ShowControl( GetID,(int)Controls.CONTROL_STATUS);
+ GUIControl.EnableControl( GetID,(int)Controls.CONTROL_STATUS);
+ GUIControl.SetControlLabel(GetID,(int)Controls.CONTROL_DETAIL,GUILocalizeStrings.Get(712));
+ return true;
+ }
+ else // hide textfield
+ {
+ onStatus=false;
+ onWindow=true;
+ onDetails=false;
+ GUIControl.HideControl( GetID,(int)Controls.CONTROL_STATUS);
+ GUIControl.DisableControl( GetID,(int)Controls.CONTROL_STATUS);
+ GUIControl.SetControlLabel(GetID,(int)Controls.CONTROL_DETAIL,GUILocalizeStrings.Get(1972));
+ ShowButtons();
+ return true;
+ }
+ }
+ return true;
+ case GUIMessage.MessageType.GUI_MSG_WINDOW_DEINIT:
+ onWindow=false;
+ break;
+ }
+ return base.OnMessage (message);
+ }
+
+ #endregion
+
+ #region Private Methods
+
+ private void HideButtons() // Switch status buttons off
+ {
+ for (int i=(int)Controls.CONTROL_1;i<((int)Controls.CONTROL_1+pageSensors);i++)
+ {
+ GUIControl.HideControl( GetID,i );
+ GUIControl.DisableControl( GetID,i );
+ }
+ }
+
+ private void ShowButtons() // Switch status buttons on
+ {
+ int st;
+ if (onStatus==false)
+ {
+ GUIControl.HideControl( GetID,(int)Controls.CONTROL_STATUS);
+ GUIControl.DisableControl( GetID,(int)Controls.CONTROL_STATUS);
+ }
+ if(numSensors>12)
+ {
+ GUIControl.ShowControl( GetID,(int)Controls.CONTROL_NEXTPAGE);
+ GUIControl.EnableControl( GetID,(int)Controls.CONTROL_NEXTPAGE);
+ }
+ else
+ {
+ GUIControl.HideControl( GetID,(int)Controls.CONTROL_NEXTPAGE);
+ GUIControl.DisableControl( GetID,(int)Controls.CONTROL_NEXTPAGE);
+ }
+ if (page1==true)
+ {
+ GUIControl.SetControlLabel(GetID,(int)Controls.CONTROL_NEXTPAGE,GUILocalizeStrings.Get(1975));
+ if(numSensors>12)
+ {
+ st=(12+(int)Controls.CONTROL_1);
+ }
+ else
+ {
+ st=(numSensors+(int)Controls.CONTROL_1);
+ }
+ }
+ else
+ {
+ GUIControl.SetControlLabel(GetID,(int)Controls.CONTROL_NEXTPAGE,GUILocalizeStrings.Get(712));
+ st=((numSensors-12)+(int)Controls.CONTROL_1);
+ }
+ for (int i=(int)Controls.CONTROL_1; i<((int)Controls.CONTROL_1+pageSensors); i++)
+ {
+ if (i<st)
+ {
+ GUIControl.ShowControl( GetID,i);
+ GUIControl.EnableControl( GetID,i);
+ }
+ else
+ {
+ GUIControl.HideControl( GetID,i );
+ GUIControl.DisableControl( GetID,i );
+ }
+ }
+ }
+
+ /// <summary>
+ /// init 1 sec timer.
+ /// </summary>
+ private void InitializeStatusTimer()
+ {
+ statusTimer.Tick += new EventHandler(OnTimer);
+ statusTimer.Interval = 1000; //1 sec Intervall
+ statusTimer.Enabled=true;
+ statusTimer.Start();
+ starttimer=true;
+ }
+
+ private void OnTimer(Object sender, EventArgs e)
+ {
+ if(sender == statusTimer)
+ {
+ if (starttimer) UpdateFields();
+ }
+ }
+
+ /// <summary>
+ /// calculate KB,MB and GB View
+ /// </summary>
+ private string CalcExt(long m)
+ {
+ string lw="";
+ if (m >= 10737418240)
+ {
+ m = (m / (1024 * 1024 * 1024));
+ lw=m.ToString()+" GB";
+ }
+ else if (m >= 1048576 )
+ {
+ m = (m / (1024 * 1024));
+ lw=m.ToString()+" MB";
+ }
+ else if (m >= 1024 )
+ {
+ m = (m / 1024);
+ lw=m.ToString()+" KB";
+ }
+ return lw;
+ }
+
+ /// <summary>
+ /// get infos of a disk
+ /// </summary>
+ private string GetDiskInfo(string lw)
+ {
+ ManagementObjectSearcher query;
+ ManagementObjectCollection queryCollection;
+ System.Management.ObjectQuery oq;
+ string stringMachineName = "localhost";
+ long s=0;
+ long m=0;
+ string f="";
+ string str="";
+ //Connect to the remote computer
+ ConnectionOptions co = new ConnectionOptions();
+
+ //Point to machine
+ System.Management.ManagementScope ms = new System.Management.ManagementScope("\\\\" + stringMachineName + "\\root\\cimv2", co);
+ oq = new System.Management.ObjectQuery("SELECT * FROM Win32_LogicalDisk WHERE DeviceID = '"+lw+"'");
+ query = new ManagementObjectSearcher(ms,oq);
+ queryCollection = query.Get();
+ foreach ( ManagementObject mo in queryCollection)
+ {
+ m=Convert.ToInt64(mo["FreeSpace"]);
+ s=Convert.ToInt64(mo["Size"]);
+ f=Convert.ToString(mo["FileSystem"]);
+ }
+ str=lw+" "+CalcExt(m)+" "+GUILocalizeStrings.Get(1973)+" "+CalcExt(s)+" "+GUILocalizeStrings.Get(1953)+" "+GUILocalizeStrings.Get(1977)+": "+" "+f;
+ return str;
+ }
+
+ /// <summary>
+ /// get the size of a disk
+ /// </summary>
+ private long GetDiskSize(string lw)
+ {
+ ManagementObjectSearcher query;
+ ManagementObjectCollection queryCollection;
+ System.Management.ObjectQuery oq;
+ string stringMachineName = "localhost";
+ long s=0;
+ //Connect to the remote computer
+ ConnectionOptions co = new ConnectionOptions();
+
+ //Point to machine
+ System.Management.ManagementScope ms = new System.Management.ManagementScope("\\\\" + stringMachineName + "\\root\\cimv2", co);
+ oq = new System.Management.ObjectQuery("SELECT * FROM Win32_LogicalDisk WHERE DeviceID = '"+lw+"'");
+ query = new ManagementObjectSearcher(ms,oq);
+ queryCollection = query.Get();
+ foreach ( ManagementObject mo in queryCollection)
+ {
+ s=Convert.ToInt64(mo["Size"]);
+ }
+ return s;
+ }
+
+ /// <summary>
+ /// get memory infos
+ /// </summary>
+ private string GetMemInfo()
+ {
+ string str="";
+ try
+ {
+ ManagementClass memoryClass = new ManagementClass("Win32_OperatingSystem");
+ ManagementObjectCollection memory = memoryClass.GetInstances();
+ ManagementObjectCollection.ManagementObjectEnumerator memoryEnumerator = memory.GetEnumerator();
+ memoryEnumerator.MoveNext();
+ str=str+GUILocalizeStrings.Get(1974)+" "+Convert.ToString(memoryEnumerator.Current.Properties["FreePhysicalMemory"].Value) + " KB ";
+ str=str+GUILocalizeStrings.Get(1973)+" "+Convert.ToString(memoryEnumerator.Current.Properties["TotalVisibleMemorySize"].Value)+" KB "+GUILocalizeStrings.Get(1953)+"\n";
+ str=str+GUILocalizeStrings.Get(1978)+": "+Convert.ToString(memoryEnumerator.Current.Properties["FreeVirtualMemory"].Value)+" KB "+GUILocalizeStrings.Get(1973);
+ str=str+" "+Convert.ToString(memoryEnumerator.Current.Properties["TotalVirtualMemorySize"].Value)+" KB "+GUILocalizeStrings.Get(1953)+"\n";
+ }
+ catch {}
+ return str;
+ }
+
+ private long GetFreeDiskLong(string lw)
+ {
+ ManagementObjectSearcher query;
+ ManagementObjectCollection queryCollection;
+ System.Management.ObjectQuery oq;
+ string stringMachineName = "localhost";
+ long m=0;
+ //Connect to the remote computer
+ ConnectionOptions co = new ConnectionOptions();
+
+ //Point to machine
+ try
+ {
+ System.Management.ManagementScope ms = new System.Management.ManagementScope("\\\\" + stringMachineName + "\\root\\cimv2", co);
+ oq = new System.Management.ObjectQuery("SELECT * FROM Win32_LogicalDisk WHERE DeviceID = '"+lw+"'");
+ query = new ManagementObjectSearcher(ms,oq);
+ queryCollection = query.Get();
+ foreach ( ManagementObject mo in queryCollection)
+ {
+ m=Convert.ToInt64(mo["FreeSpace"]);
+ }
+ }
+ catch
+ {
+ }
+ return m;
+ }
+
+ private string GetFreeDisk(string lw)
+ {
+ return CalcExt(GetFreeDiskLong(lw));
+ }
+
+
+ private void UpdateFields()
+ {
+ int start=(int)Controls.CONTROL_1;
+ string s="";
+ string text="";
+ double act=0;
+ double max=0;
+ int p=0;
+ if (isMbm==true)
+ {
+ MBMInfo.Refresh();
+ }
+ if (onStatus==true) // show status detail page
+ {
+ text=text+GetMemInfo()+"\n";
+ for (int i=0; i<numSensors && i<=(int)Controls.CONTROL_1+maxSensors; i++)
+ {
+ if (sensors[i].sensorType==(int)SensorTypes.HD)
+ {
+ text=text+GetDiskInfo(sensors[i].drive)+"\n";
+ }
+ else
+ {
+ text=text+String.Format("{0}: {1:0.##} {2}",sensors[i].sname,MBMInfo.Sensor(sensors[i].sensorNum).ssCurrent,sensors[i].last);
+ if (sensors[i].sensorType!=(int)SensorTypes.Mhz && sensors[i].sensorType!=(int)SensorTypes.Percentage)
+ {
+ text=text+" < "+String.Format("{0:0.##} {1}",MBMInfo.Sensor(sensors[i].sensorNum).ssLow,sensors[i].last);
+ text=text+" > "+String.Format("{0:0.##} {1}",MBMInfo.Sensor(sensors[i].sensorNum).ssHigh, sensors[i].last)+"\n";
+ }
+ else
+ {
+ text=text+"\n";
+ }
+ }
+ }
+ GUIControl.SetControlLabel(GetID, (int)Controls.CONTROL_STATUS, text );
+ }
+
+ // test threshold for each sensor
+
+ for (int i=0; i<numSensors && i<=(int)Controls.CONTROL_1+maxSensors; i++)
+ {
+ if (showStatusBar==true) // show statusbar
+ {
+ if (statusBarSensor==sensors[i].sname)
+ {
+ GUIPropertyManager.SetProperty("#statusbar_name",sensors[i].name);
+ if(sensors[i].name=="lw")
+ {
+ act=Convert.ToDouble((GetFreeDiskLong(sensors[i].drive)));
+ max=GetDiskSize(sensors[i].drive);
+ p=100-Convert.ToInt16(act/(max/100));
+ GUIPropertyManager.SetProperty("#statusbar_perc",p.ToString());
+ GUIPropertyManager.SetProperty("#statusbar_act",act.ToString());
+ }
+ else
+ {
+ if (sensors[i].name=="perc1")
+ {
+ GUIPropertyManager.SetProperty("#statusbar_perc",Convert.ToString((int)MBMInfo.Sensor(sensors[i].sensorNum).ssCurrent));
+ GUIPropertyManager.SetProperty("#statusbar_act",Convert.ToString((int)MBMInfo.Sensor(sensors[i].sensorNum).ssCurrent));
+ }
+ else
+ {
+ act=Convert.ToDouble(MBMInfo.Sensor(sensors[i].sensorNum).ssCurrent);
+ max=(double)sensors[i].max;
+ try
+ {
+ p=Convert.ToInt16(act/(max/100d));
+ }
+ catch(Exception){}
+ GUIPropertyManager.SetProperty("#statusbar_perc",p.ToString());
+ GUIPropertyManager.SetProperty("#statusbar_act",act.ToString());
+ }
+ }
+ }
+ }
+ if (sensors[i].alarm==true) // is test alarm set?
+ {
+ switch (sensors[i].name) // which sensor
+ {
+ case "lw" : // hd
+ if ((GetFreeDiskLong(sensors[i].drive)/ (1024 * 1024))<sensors[i].min) Play();
+ break;
+ case "fan1" : // Fan Sensor 1
+ if (Convert.ToInt16(MBMInfo.Sensor(sensors[i].sensorNum).ssCurrent) <= sensors[i].min) Play();
+ break;
+ case "fan2" : // Fan Sensor 2
+ if (Convert.ToInt16(MBMInfo.Sensor(sensors[i].sensorNum).ssCurrent) <= sensors[i].min) Play();
+ break;
+ case "fan3" : // Fan Sensor 3
+ if (Convert.ToInt16(MBMInfo.Sensor(sensors[i].sensorNum).ssCurrent) <= sensors[i].min) Play();
+ break;
+ case "temp1" : // Temp Sensor 1
+ if (Convert.ToInt16(MBMInfo.Sensor(sensors[i].sensorNum).ssCurrent) >= sensors[i].max)
+ {
+ Play();
+ if (shutdown==true)
+ {
+//fmu Log.Write("Shutdown Temp Sensor 1 Alert");
+ Log.Warn("Shutdown Temp Sensor 1 Alert");
+ WindowsController.ExitWindows(RestartOptions.ShutDown, m_bForceShutdown);
+ }
+ }
+ break;
+ case "temp2" : // Temp Sensor 2
+ if (Convert.ToInt16(MBMInfo.Sensor(sensors[i].sensorNum).ssCurrent) >= sensors[i].max)
+ {
+ Play();
+ if (shutdown==true)
+ {
+ WindowsController.ExitWindows(RestartOptions.ShutDown, m_bForceShutdown);
+// Log.Write("Shutdown Temp Sensor 1 Alert");
+ Log.Warn("Shutdown Temp Sensor 1 Alert");
+ }
+ }
+ break;
+ case "temp3" : // Temp Sensor 3
+ if (Convert.ToInt16(MBMInfo.Sensor(sensors[i].sensorNum).ssCurrent) >= sensors[i].max)
+ {
+ Play();
+ if (shutdown==true)
+ {
+ WindowsController.ExitWindows(RestartOptions.ShutDown, m_bForceShutdown);
+//fmu Log.Write("Shutdown Temp Sensor 1 Alert");
+ Log.Warn("Shutdown Temp Sensor 1 Alert");
+ }
+ }
+ break;
+ }
+ }
+ }
+ if (onWindow==true || onDetails==true)
+ {
+ int st=0;
+ int offset=0;
+ int i=0;
+ if(page1==true)
+ {
+ st=numSensors;
+ }
+ else
+ {
+ st=numSensors-pageSensors;
+ offset=pageSensors;
+ }
+ i=offset;
+ for (int l=0; l<st && l<=(int)Controls.CONTROL_1+pageSensors; i++,l++)
+ {
+ if (sensors[i].sensorType==(int)SensorTypes.HD)
+ {
+ s=String.Format("{0} {1} {2}",sensors[i].first,GetFreeDisk(sensors[i].drive),sensors[i].last);
+ }
+ else
+ {
+ s=String.Format("{0}: {1:0.##} {2}",sensors[i].sname,MBMInfo.Sensor(sensors[i].sensorNum).ssCurrent,sensors[i].last);
+ }
+
+ if (onWindow==true) GUIControl.SetControlLabel(GetID,start,s);
+ if (onDetails==true)
+ {
+ if (selectedSensor==start)
+ {
+ GUIPropertyManager.SetProperty("#sensor",s);
+ if (sensors[i].sensorType!=(int)SensorTypes.HD && sensors[i].sensorType!=(int)SensorTypes.Mhz)
+ {
+ GUIPropertyManager.SetProperty("#high",String.Format("{0}: {1:0.##}", GUILocalizeStrings.Get(1965),MBMInfo.Sensor(sensors[i].sensorNum).ssHigh));
+ GUIPropertyManager.SetProperty("#low",String.Format("{0}: {1:0.##}",GUILocalizeStrings.Get(1966),MBMInfo.Sensor(sensors[i].sensorNum).ssLow));
+ GUIPropertyManager.SetProperty("#alhigh",String.Format("{0}: {1:0.##}",GUILocalizeStrings.Get(1967),sensors[i].max));
+ GUIPropertyManager.SetProperty("#allow",String.Format("{0}: {1:0.##}",GUILocalizeStrings.Get(1968),sensors[i].min));
+ }
+ else
+ {
+ if (sensors[i].sensorType==(int)SensorTypes.Mhz)
+ {
+ GUIPropertyManager.SetProperty("#high"," ");
+ }
+ else
+ {
+ GUIPropertyManager.SetProperty("#high",GUILocalizeStrings.Get(1968)+" "+sensors[i].min.ToString()+" MB");
+ }
+ GUIPropertyManager.SetProperty("#low"," ");
+ GUIPropertyManager.SetProperty("#alhigh"," ");
+ GUIPropertyManager.SetProperty("#allow"," ");
+ }
+ }
+ }
+ start++;
+ }
+ }
+ }
+
+ public static bool IsShutdown()
+ {
+ return shutdown;
+ }
+
+ public static bool IsAlarm()
+ {
+ return alarm;
+ }
+
+ public static void SetShutdown(bool sh)
+ {
+ shutdown=sh;
+ }
+
+ public static void SetAlarm(bool al)
+ {
+ sensors[selectedSensor-10].alarm=al;
+ }
+
+ public static void SetInterval(int dl)
+ {
+ delayPlay=dl;
+ }
+
+ public static int GetInterval()
+ {
+ return delayPlay;
+ }
+
+ public static string GetName()
+ {
+ return name;
+ }
+
+ private void Play()
+ {
+ try
+ {
+ if (playTime==0)
+ {
+ g_Player.Play(soundFolder + "\\" + sound);
+ g_Player.Volume=99;
+ }
+ playTime++;
+ if (playTime>delayPlay) playTime=0;
+ }
+ catch
+ {
+ }
+ }
+
+ private void LoadSound()
+ {
+ using(MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml"))
+ {
+ soundFolder=xmlreader.GetValueAsString("status","status_sound_folder","");
+ sound=xmlreader.GetValueAsString("status","status_sound","");
+ }
+ }
+
+ private void LoadSettings()
+ {
+ int num=0;
+ using(MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml"))
+ {
+ isMbm=xmlreader.GetValueAsBool("status","status_is_mbm",false);
+ showStatusBar=xmlreader.GetValueAsBool("status","status_bar_show",false);
+ if (showStatusBar==false) GUIPropertyManager.SetProperty("#statusbar_perc","-1");
+ bool top=xmlreader.GetValueAsBool("status","status_bar_top",false);
+ bool bot=xmlreader.GetValueAsBool("status","status_bar_bottom",false);
+ if (top==true) showTopBottom=true;
+ if (bot==true) showTopBottom=false;
+ if (showTopBottom==true)
+ {
+ GUIPropertyManager.SetProperty("#statusbarTB","1");
+ }
+ else
+ {
+ GUIPropertyManager.SetProperty("#statusbarTB","2");
+ }
+ statusBarSensor=xmlreader.GetValueAsString("status","status_bar_sensor","");
+ soundFolder=xmlreader.GetValueAsString("status","status_sound_folder","c:\\windows\\media");
+ sound=xmlreader.GetValueAsString("status","status_sound","ding.wav");
+ delayPlay=xmlreader.GetValueAsInt("status","status_sound_delay",6);
+ shutdown=xmlreader.GetValueAsBool("status","status_shutdown",false);
+ int hdt=xmlreader.GetValueAsInt("status","status_hd_threshold",200);
+ char drive='C';
+ char ldrive='c';
+ for (int i=0;i<24;i++) // read all drives
+ {
+ if (xmlreader.GetValueAsBool("status","status_lw"+ldrive,false))
+ {
+ sensors[num].name="lw";
+ sensors[num].sname=drive+":";
+ sensors[num].drive=drive+":";
+ sensors[num].min=hdt;
+ sensors[num].alarm=xmlreader.GetValueAsBool("status","status_lw"+ldrive+"al",false);
+ sensors[num].first=GUILocalizeStrings.Get(1951)+" "+drive+":";
+ sensors[num].last=GUILocalizeStrings.Get(1953);
+ sensors[num++].sensorType=(int)SensorTypes.HD;
+ }
+ drive++;
+ ldrive++;
+ }
+ if (isMbm==true)
+ {
+ MBMInfo.Refresh();
+ if (xmlreader.GetValueAsBool("status","status_temp1",false))
+ {
+ sensors[num].name="temp1";
+ sensors[num].sensorNum=xmlreader.GetValueAsInt("status","status_temp1i",0);
+ sensors[num].sname=Convert.ToString(MBMInfo.Sensor(sensors[num].sensorNum).ssName);
+ sensors[num].alarm=xmlreader.GetValueAsBool("status","status_temp1al",false);
+ sensors[num].shutdown=xmlreader.GetValueAsBool("status","status_temp1sh",false);
+ sensors[num].min=Convert.ToInt16(MBMInfo.Sensor(sensors[num].sensorNum).ssAlarm2);
+ sensors[num].max=Convert.ToInt16(MBMInfo.Sensor(sensors[num].sensorNum).ssAlarm1);
+ sensors[num].first=GUILocalizeStrings.Get(1954)+" 1:";
+ sensors[num].last=GUILocalizeStrings.Get(1955);
+ sensors[num++].sensorType=(int)SensorTypes.Temperature;
+ }
+ if (xmlreader.GetValueAsBool("status","status_temp2",false))
+ {
+ sensors[num].name="temp2";
+ sensors[num].sensorNum=xmlreader.GetValueAsInt("status","status_temp2i",0);
+ sensors[num].sname=Convert.ToString(MBMInfo.Sensor(sensors[num].sensorNum).ssName);
+ sensors[num].alarm=xmlreader.GetValueAsBool("status","status_temp2al",false);
+ sensors[num].shutdown=xmlreader.GetValueAsBool("status","status_temp1sh",false);
+ sensors[num].min=Convert.ToInt16(MBMInfo.Sensor(sensors[num].sensorNum).ssAlarm2);
+ sensors[num].max=Convert.ToInt16(MBMInfo.Sensor(sensors[num].sensorNum).ssAlarm1);
+ sensors[num].first=GUILocalizeStrings.Get(1954)+" 2:";
+ sensors[num].last=GUILocalizeStrings.Get(1955);
+ sensors[num++].sensorType=(int)SensorTypes.Temperature;
+ }
+ if (xmlreader.GetValueAsBool("status","status_temp3",false))
+ {
+ sensors[num].name="temp3";
+ sensors[num].sensorNum=xmlreader.GetValueAsInt("status","status_temp3i",0);
+ sensors[num].sname=Convert.ToString(MBMInfo.Sensor(sensors[num].sensorNum).ssName);
+ sensors[num].alarm=xmlreader.GetValueAsBool("status","status_temp3al",false);
+ sensors[num].shutdown=xmlreader.GetValueAsBool("status","status_temp1sh",false);
+ sensors[num].min=Convert.ToInt16(MBMInfo.Sensor(sensors[num].sensorNum).ssAlarm2);
+ sensors[num].max=Convert.ToInt16(MBMInfo.Sensor(sensors[num].sensorNum).ssAlarm1);
+ sensors[num].first=GUILocalizeStrings.Get(1954)+" 3:";
+ sensors[num].last=GUILocalizeStrings.Get(1955);
+ sensors[num++].sensorType=(int)SensorTypes.Temperature;
+ }
+ if (xmlreader.GetValueAsBool("status","status_fan1",false))
+ {
+ sensors[num].name="fan1";
+ sensors[num].sensorNum=xmlreader.GetValueAsInt("status","status_fan...
[truncated message content] |
|
From: <an...@us...> - 2007-01-31 11:39:00
|
Revision: 59
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=59&view=rev
Author: and-81
Date: 2007-01-31 03:38:55 -0800 (Wed, 31 Jan 2007)
Log Message:
-----------
Property Changed:
----------------
trunk/plugins/
trunk/plugins/TV3MceBlaster/
Property changes on: trunk/plugins
___________________________________________________________________
Name: svn:ignore
+ My Plugins.FxCop
My Plugins.sln
My Plugins.suo
Property changes on: trunk/plugins/TV3MceBlaster
___________________________________________________________________
Name: svn:ignore
+ bin
obj
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fr...@us...> - 2007-01-31 19:32:59
|
Revision: 61
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=61&view=rev
Author: framug
Date: 2007-01-31 11:32:51 -0800 (Wed, 31 Jan 2007)
Log Message:
-----------
Add My Explorer plugin
Added Paths:
-----------
trunk/plugins/My Explorer/
trunk/plugins/My Explorer/GUIExplorer.cs
trunk/plugins/My Explorer/My Explorer.csproj
trunk/plugins/My Explorer/My Explorer.sln
trunk/plugins/My Explorer/My Explorer.suo
trunk/plugins/My Explorer/Properties/
trunk/plugins/My Explorer/Properties/AssemblyInfo.cs
trunk/plugins/My Explorer/SetupForm.cs
trunk/plugins/My Explorer/SetupForm.resx
trunk/plugins/My Explorer/bin/
trunk/plugins/My Explorer/bin/Release/
trunk/plugins/My Explorer/bin/Release/Core.dll
trunk/plugins/My Explorer/bin/Release/Dialogs.dll
trunk/plugins/My Explorer/bin/Release/My Explorer.dll
trunk/plugins/My Explorer/bin/Release/My Explorer.pdb
trunk/plugins/My Explorer/bin/Release/Utils.dll
Added: trunk/plugins/My Explorer/GUIExplorer.cs
===================================================================
--- trunk/plugins/My Explorer/GUIExplorer.cs (rev 0)
+++ trunk/plugins/My Explorer/GUIExplorer.cs 2007-01-31 19:32:51 UTC (rev 61)
@@ -0,0 +1,825 @@
+/*
+ * Copyright (C) 2005 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
+ *
+ */
+
+#region usings
+using System;
+using System.IO;
+using System.Collections;
+using MediaPortal.Util;
+using MediaPortal.GUI.Library;
+using MediaPortal.Dialogs;
+#endregion
+
+namespace MediaPortal.GUI.GUIExplorer
+{
+ /// <summary>
+ /// Summary description for GUIExplorer
+ /// </summary>
+ public class GUIExplorer : GUIWindow
+ {
+ public static int WINDOW_STATUS = 770;
+
+ #region Private Enumerations
+
+ enum Controls
+ {
+ CONTROL_SELECT_SOURCE = 2,
+ CONTROL_SELECT_DEST = 3,
+ CONTROL_COPY = 4,
+ CONTROL_MOVE = 5,
+ CONTROL_DELETE = 6,
+ CONTROL_MAKE_DIR = 7,
+ CONTROL_RESET_SELECT = 8,
+ CONTROL_MARK_ALL = 9,
+ CONTROL_TRASHCAN = 10,
+ CONTROL_LIST_DIR = 20
+ };
+
+ enum States
+ {
+ STATE_MAIN = 0,
+ STATE_SELECT_SOURCE = 1,
+ STATE_SELECT_DEST = 2,
+ STATE_COPY = 3,
+ STATE_MAKE_DIR = 4,
+ STATE_RESET_SELECT = 5
+ };
+
+ private States currentState = States.STATE_MAIN;
+
+ #endregion
+
+ #region Private Variables
+ private struct file
+ {
+ public string name;
+ public long size;
+ public string fullpath;
+ public string path;
+ }
+
+ string[] video = new string[20]; // video shares folder
+ string[] vname = new string[20]; // video share names
+ string[] sound = new string[20]; // sound shares folder
+ string[] sname = new string[20]; // sound shares names
+ string[] pictures = new string[20]; // pictures shares folder
+ string[] pname = new string[20]; // pictures shares names
+
+ private string tempFolder=""; // trashcan folder
+ private bool showOnlyShares=false; // shows only shares in destination folder
+ private bool enableDelete=false; // shows delete button
+ private bool deleteImmed=false; // enable immediate delete funtion
+ private bool deleteTemp=false; // enable trashcan
+
+ private ArrayList files = new ArrayList();
+ private ArrayList selected = new ArrayList();
+ private string tmpStr;
+ private ArrayList currentExt= new ArrayList();
+ private string currentFolder=null;
+ private string[] drives=new string[27];
+ private string[] drivesCd=new string[27];
+ private int driveCount=0;
+ private int driveCdCount=0;
+ private long actSize=0;
+ private int fileCount=0;
+ #endregion
+
+ #region Constructor
+ public GUIExplorer()
+ {
+ //
+ // TODO: Add constructor logic here
+ //
+ }
+ #endregion
+
+ #region Overrides
+ public override int GetID
+ {
+ get { return WINDOW_STATUS; }
+ set { base.GetID = value; }
+ }
+
+ public override bool Init()
+ {
+ return Load (GUIGraphicsContext.Skin+@"\myexplorer.xml");
+ }
+
+ public override void OnAction(Action action)
+ {
+ if (action.wID == Action.ActionType.ACTION_PREVIOUS_MENU)
+ {
+ GUIWindowManager.ShowPreviousWindow();
+ return;
+ }
+ base.OnAction(action);
+ }
+
+ public override bool OnMessage(GUIMessage message)
+ {
+ switch ( message.Message )
+ {
+ case GUIMessage.MessageType.GUI_MSG_WINDOW_INIT: // MyExplorer starts
+ base.OnMessage(message);
+ GUIPropertyManager.SetProperty("#currentmodule", GUILocalizeStrings.Get(2200));
+ GUIPropertyManager.SetProperty("#explorer_title",GUILocalizeStrings.Get(2200));
+ GUIPropertyManager.SetProperty("#explorer_size"," ");
+ LoadShareSettings(); // loads showShares settings from XML
+ driveCount=0;
+ driveCdCount=0;
+ GetDrives(); // loads all drives
+ LoadSettings(); // loads all settings from XML
+ ResetValues();
+ currentExt.Add("*");
+ return true;
+ case GUIMessage.MessageType.GUI_MSG_CLICKED:
+ //get sender control
+ base.OnMessage(message);
+ int iControl=message.SenderControlId;
+ if (iControl==(int)Controls.CONTROL_SELECT_SOURCE) // select source
+ {
+ GUIControl.DisableControl(GetID,(int)Controls.CONTROL_SELECT_DEST);
+ GUIControl.DisableControl(GetID,(int)Controls.CONTROL_COPY);
+ GUIControl.DisableControl(GetID,(int)Controls.CONTROL_MOVE);
+ GUIControl.DisableControl(GetID,(int)Controls.CONTROL_DELETE);
+ GUIControl.DisableControl(GetID,(int)Controls.CONTROL_MAKE_DIR);
+ currentState=States.STATE_SELECT_SOURCE;
+ GUIControl.ClearControl(GetID,(int)Controls.CONTROL_LIST_DIR);
+ GUIPropertyManager.SetProperty("#explorer_title",GUILocalizeStrings.Get(2201));
+ LoadDriveListControl(true);
+ currentFolder="";
+ actSize=0;
+ return true;
+ }
+ if (iControl==(int)Controls.CONTROL_SELECT_DEST) // select destination
+ {
+ GUIControl.EnableControl(GetID,(int)Controls.CONTROL_COPY);
+ GUIControl.EnableControl(GetID,(int)Controls.CONTROL_MOVE);
+ GUIControl.EnableControl(GetID,(int)Controls.CONTROL_MAKE_DIR);
+ currentState=States.STATE_SELECT_DEST;
+ GUIControl.ClearControl(GetID,(int)Controls.CONTROL_LIST_DIR);
+ GUIPropertyManager.SetProperty("#explorer_title",GUILocalizeStrings.Get(2202));
+ LoadDriveListControl(false);
+ currentFolder="";
+ actSize=0;
+ return true;
+ }
+ if (iControl==(int)Controls.CONTROL_TRASHCAN) // select trashcan
+ {
+ GUIControl.EnableControl(GetID,(int)Controls.CONTROL_COPY);
+ GUIControl.EnableControl(GetID,(int)Controls.CONTROL_MOVE);
+ currentState=States.STATE_SELECT_SOURCE;
+ GUIControl.ClearControl(GetID,(int)Controls.CONTROL_LIST_DIR);
+ GUIPropertyManager.SetProperty("#explorer_title",GUILocalizeStrings.Get(2202));
+ LoadListControl(tempFolder,currentExt);
+ currentFolder=tempFolder;
+ actSize=0;
+ return true;
+ }
+ if (iControl==(int)Controls.CONTROL_COPY || iControl==(int)Controls.CONTROL_MOVE) // select copy data
+ {
+ if (currentState==States.STATE_SELECT_DEST)
+ {
+ GUIDialogYesNo dlgYesNo = (GUIDialogYesNo)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_YES_NO);
+ if (null==dlgYesNo) break;
+ dlgYesNo.SetHeading(GUILocalizeStrings.Get(2200));
+ if (iControl==(int)Controls.CONTROL_COPY)
+ {
+ dlgYesNo.SetLine(2,GUILocalizeStrings.Get(2209));
+ GUIPropertyManager.SetProperty("#explorer_size",GUILocalizeStrings.Get(2211));
+ }
+ else
+ {
+ dlgYesNo.SetLine(2,GUILocalizeStrings.Get(2214));
+ GUIPropertyManager.SetProperty("#explorer_size",GUILocalizeStrings.Get(2215));
+ }
+ dlgYesNo.DoModal(GetID);
+ if (dlgYesNo.IsConfirmed)
+ {
+ foreach(file f in selected)
+ {
+ if (iControl==(int)Controls.CONTROL_COPY)
+ {
+ Move(false,f.fullpath, f.name, currentFolder+"\\");
+ }
+ else
+ {
+ Move(true,f.fullpath, f.name, currentFolder+"\\");
+ }
+ }
+ GUIDialogOK dlgOk = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK);
+ dlgOk.SetHeading(GUILocalizeStrings.Get(2200));
+ if (iControl==(int)Controls.CONTROL_COPY)
+ {
+ dlgOk.SetLine(2,fileCount.ToString()+" "+GUILocalizeStrings.Get(2210));
+ }
+ else
+ {
+ dlgOk.SetLine(2,fileCount.ToString()+" "+GUILocalizeStrings.Get(2216));
+ }
+ dlgOk.DoModal(GetID);
+ }
+ ResetValues();
+ LoadListControl(currentFolder,currentExt);
+ }
+ }
+ if (iControl==(int)Controls.CONTROL_MAKE_DIR) // select make directory
+ {
+ if (currentState==States.STATE_SELECT_DEST)
+ {
+ int activeWindow=(int)GUIWindowManager.ActiveWindow;
+ GUIPropertyManager.SetProperty("#explorer_title",GUILocalizeStrings.Get(2204));
+//fmu VirtualSearchKeyboard keyBoard=(VirtualSearchKeyboard)GUIWindowManager.GetWindow(1001);
+//fmu keyBoard.Text = "";
+//fmu keyBoard.Reset();
+//fmu keyBoard.TextChanged+=new MediaPortal.Dialogs.VirtualSearchKeyboard.TextChangedEventHandler(keyboard_TextChanged); // add the event handler
+//fmu keyBoard.DoModal(activeWindow); // show it...
+//fmu keyBoard.TextChanged-=new MediaPortal.Dialogs.VirtualSearchKeyboard.TextChangedEventHandler(keyboard_TextChanged); // remove the handler
+//fmu string verStr = keyBoard.Text;
+
+ VirtualKeyboard keyboard = (VirtualKeyboard)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_VIRTUAL_KEYBOARD);
+ keyboard.Text = "";
+ keyboard.Reset();
+ keyboard.TextChanged += new MediaPortal.Dialogs.VirtualKeyboard.TextChangedEventHandler(keyboard_TextChanged); // add the event handler
+ keyboard.DoModal(activeWindow); // show it...
+ keyboard.TextChanged -= new MediaPortal.Dialogs.VirtualKeyboard.TextChangedEventHandler(keyboard_TextChanged); // remove the handler
+ string verStr = keyboard.Text;
+
+ GUIDialogYesNo dlgYesNo = (GUIDialogYesNo)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_YES_NO);
+ if (null == dlgYesNo) break;
+ dlgYesNo.SetHeading(GUILocalizeStrings.Get(2200));
+ dlgYesNo.SetLine(1,GUILocalizeStrings.Get(2207));
+ dlgYesNo.SetLine(2,verStr+" "+GUILocalizeStrings.Get(2208));
+ dlgYesNo.DoModal(GetID);
+ if (dlgYesNo.IsConfirmed)
+ {
+ string path = currentFolder+"\\"+verStr;
+ try
+ {
+ // Determine whether the directory exists.
+ if (Directory.Exists(path))
+ {
+ GUIDialogOK dlgOk = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK);
+ dlgOk.SetHeading(GUILocalizeStrings.Get(2200));
+ dlgOk.SetLine(2,GUILocalizeStrings.Get(2224));
+ dlgOk.DoModal(GetID);
+ }
+ else
+ {
+ DirectoryInfo di = Directory.CreateDirectory(path);
+ GUIDialogOK dlgOk2 = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK);
+ dlgOk2.SetHeading(GUILocalizeStrings.Get(2200));
+ dlgOk2.SetLine(2,GUILocalizeStrings.Get(2224));
+ dlgOk2.DoModal(GetID);
+ }
+ }
+ catch (Exception )
+ {
+//fmu Log.Write("Error Make Dir");
+ Log.Error("Error Make Dir");
+ }
+ LoadListControl(currentFolder,currentExt);
+ }
+ }
+ }
+ if (iControl==(int)Controls.CONTROL_RESET_SELECT) // select reset all selections
+ {
+ GUIDialogYesNo dlgYesNo = (GUIDialogYesNo)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_YES_NO);
+ if (null==dlgYesNo) break;
+ dlgYesNo.SetHeading(GUILocalizeStrings.Get(2200));
+ dlgYesNo.SetLine(2,GUILocalizeStrings.Get(2205));
+ dlgYesNo.DoModal(GetID);
+ if (dlgYesNo.IsConfirmed)
+ {
+ ResetValues();
+ }
+ return true;
+ }
+
+ if (iControl==(int)Controls.CONTROL_MARK_ALL) // select mark all
+ {
+ if (currentState==States.STATE_SELECT_SOURCE)
+ {
+ GUIControl.EnableControl(GetID,(int)Controls.CONTROL_SELECT_DEST); // you can select destination only when a file is selected
+ if(enableDelete==true)
+ {
+ GUIControl.EnableControl(GetID,(int)Controls.CONTROL_DELETE); // you can delete files only when a file is selected
+ }
+ int count = GUIControl.GetItemCount(GetID, (int)Controls.CONTROL_LIST_DIR);
+ for (int i=0; i<count; i++)
+ {
+ GUIListItem item = GUIControl.GetListItem(GetID, (int)Controls.CONTROL_LIST_DIR,i);
+ if (item.IconImage!="check-box.png" && !item.Label.StartsWith("\\..") && !item.Label.StartsWith("\\") && item.Label.Substring(1,1)!=":")
+ {
+ item.IconImage = "check-box.png";
+ file fl = new file();
+ fl.name=item.Label;
+ fl.fullpath=currentFolder+"\\"+item.Label;
+ fl.path=currentFolder;
+
+ foreach(file f in files)
+ {
+ if (f.name==item.Label)
+ {
+ actSize=actSize+f.size;
+ fl.size=f.size;
+ break;
+ }
+ }
+ selected.Add(fl);
+ fileCount++;
+//fmu tmpStr=fileCount.ToString()+ " Files "+Utils.GetSize(actSize)+" ";
+ tmpStr = fileCount.ToString() + " Files " + Util.Utils.GetSize(actSize) + " ";
+ GUIPropertyManager.SetProperty("#explorer_size", tmpStr);
+ }
+ }
+ }
+ }
+ if (iControl==(int)Controls.CONTROL_DELETE) // delete selected files
+ {
+ GUIDialogYesNo dlgYesNo = (GUIDialogYesNo)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_YES_NO);
+ if (null==dlgYesNo) break;
+ dlgYesNo.SetHeading(GUILocalizeStrings.Get(2200));
+ dlgYesNo.SetLine(2,GUILocalizeStrings.Get(2221));
+ GUIPropertyManager.SetProperty("#explorer_size",GUILocalizeStrings.Get(2211));
+ dlgYesNo.DoModal(GetID);
+ if (dlgYesNo.IsConfirmed)
+ {
+ foreach(file f in selected)
+ {
+ if(deleteImmed==true)
+ {
+//fmu Utils.FileDelete(f.fullpath);
+ Util.Utils.FileDelete(f.fullpath);
+ }
+ else
+ {
+ if(deleteTemp==true)
+ {
+ try
+ {
+ if(currentFolder==tempFolder)
+ {
+//fmu Utils.FileDelete(f.fullpath);
+ Util.Utils.FileDelete(f.fullpath);
+ }
+ else
+ {
+ FileInfo fi = new FileInfo(f.fullpath);
+ fi.MoveTo(tempFolder+"\\"+f.name);
+ }
+ }
+ catch (Exception)
+ {
+//fmu Log.Write("MyExplorer Delete Error: {0} | {1}",f.fullpath,tempFolder);
+ Log.Error("MyExplorer Delete Error: {0} | {1}", f.fullpath, tempFolder);
+ }
+ }
+ }
+ }
+ GUIDialogOK dlgOk = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK);
+ dlgOk.SetHeading(GUILocalizeStrings.Get(2200));
+ dlgOk.SetLine(2,fileCount.ToString()+" "+GUILocalizeStrings.Get(2222));
+ dlgOk.DoModal(GetID);
+ }
+ ResetValues();
+ LoadListControl(currentFolder,currentExt);
+ }
+ if (iControl==(int)Controls.CONTROL_LIST_DIR) // select list dir
+ {
+ GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_ITEM_SELECTED,GetID,0,iControl,0,0,null);
+ OnMessage(msg);
+ int iItem=(int)msg.Param1;
+ int iAction=(int)message.Param1;
+ if (iAction == (int)Action.ActionType.ACTION_SELECT_ITEM)
+ {
+ GUIListItem item = GUIControl.GetSelectedListItem(GetID, (int)Controls.CONTROL_LIST_DIR );
+ if (item.Label.StartsWith("..")) // go back folder
+ {
+ if (item.Path=="")
+ LoadDriveListControl(true);
+ else
+ LoadListControl(item.Path,currentExt);
+ }
+ else if(item.Label.StartsWith("("))
+ {
+ if (item.Label.Contains(":)")) LoadListControl(item.Label[1] + @":\", currentExt);
+ else LoadListControl(item.Path, currentExt); // is a folder
+ }
+ else if (item.Label.StartsWith("[")) // is a share
+ {
+ String shareName=item.Label.Substring(1);
+ shareName=shareName.Substring(0,shareName.Length-1);
+ bool shareFound = false;
+ for (int i=0; i<20; i++)
+ {
+ if (pname[i]==shareName)
+ {
+ currentFolder=pictures[i];
+ LoadListControl(currentFolder,currentExt);
+ shareFound = true;
+ break;
+ }
+ if (sname[i]==shareName)
+ {
+ currentFolder=sound[i];
+ LoadListControl(currentFolder,currentExt);
+ shareFound = true;
+ break;
+ }
+ if (vname[i]==shareName)
+ {
+ currentFolder=video[i];
+ LoadListControl(currentFolder,currentExt);
+ shareFound = true;
+ break;
+ }
+ }
+ if (shareFound) LoadListControl(currentFolder,currentExt);
+ else LoadListControl(item.Path, currentExt); // is a folder
+ }
+ else if (item.IsFolder) // is a folder
+ {
+ LoadListControl(item.Path,currentExt);
+ }
+ else if (item.Label.Substring(1,1)==":") // is a drive
+ {
+ currentFolder=item.Label;
+ if (currentFolder!=String.Empty)
+ LoadListControl(currentFolder,currentExt);
+ else
+ LoadDriveListControl(true);
+ }
+ else
+ {
+ if (currentState==States.STATE_SELECT_SOURCE) // mark files only in source select mode
+ {
+ GUIControl.EnableControl(GetID,(int)Controls.CONTROL_SELECT_DEST); // you can select destination only when a file is selected
+ if(enableDelete==true)
+ {
+ GUIControl.EnableControl(GetID,(int)Controls.CONTROL_DELETE); // you can delete files only when a file is selected
+ }
+ if (item.IconImage=="check-box.png") // if file selected then unselect now
+ {
+ item.FreeIcons();
+ int indx=0;
+ int indxm=-1;
+ long s=0;
+ foreach(file fil in selected)
+ {
+ if (item.Label==fil.name)
+ {
+ indxm=indx;
+ s=fil.size;
+ break;
+ }
+ indx++;
+ }
+ if (indxm>=0)
+ {
+ selected.RemoveAt(indxm);
+ actSize=actSize-s;
+ fileCount--;
+ }
+ }
+ else
+ { // select file
+ item.IconImage = "check-box.png";
+ int indx=currentFolder.IndexOf("\\\\");
+ if (indx>0)
+ {
+ currentFolder=currentFolder.Remove(indx,1);
+ }
+ file fl = new file();
+ fl.name=item.Label;
+ fl.fullpath=currentFolder+"\\"+item.Label;
+ fl.path=currentFolder;
+
+ foreach(file f in files)
+ {
+ if (f.name==item.Label)
+ {
+ actSize=actSize+f.size;
+ fl.size=f.size;
+ break;
+ }
+ }
+ selected.Add(fl);
+ fileCount++;
+ }
+//fmu tmpStr=fileCount.ToString()+ " Files "+Utils.GetSize(actSize)+" ";
+ tmpStr = fileCount.ToString() + " Files " + Util.Utils.GetSize(actSize) + " ";
+ GUIPropertyManager.SetProperty("#explorer_size", tmpStr);
+ }
+ }
+ }
+ return true;
+ }
+ return true;
+ }
+ return base.OnMessage (message);
+ }
+
+ #endregion
+
+ #region Private Methods
+
+ /// <summary>
+ /// Reset all Values to start settings
+ /// </summary>
+ private void ResetValues()
+ {
+ fileCount=0;
+ selected.Clear();
+ currentState=States.STATE_MAIN;
+ GUIControl.ClearControl(GetID,(int)Controls.CONTROL_LIST_DIR);
+ GUIPropertyManager.SetProperty("#explorer_size"," ");
+ if(deleteTemp==false)
+ {
+ GUIControl.HideControl(GetID,(int)Controls.CONTROL_TRASHCAN);
+ }
+ GUIControl.DisableControl(GetID,(int)Controls.CONTROL_SELECT_DEST);
+ GUIControl.DisableControl(GetID,(int)Controls.CONTROL_COPY);
+ GUIControl.DisableControl(GetID,(int)Controls.CONTROL_MOVE);
+ GUIControl.DisableControl(GetID,(int)Controls.CONTROL_DELETE);
+ GUIControl.DisableControl(GetID,(int)Controls.CONTROL_MAKE_DIR);
+ GUIControl.EnableControl(GetID,(int)Controls.CONTROL_SELECT_SOURCE);
+ }
+
+ /// <summary>
+ /// Loads files from folder in a list control
+ /// </summary>
+ private void LoadListControl(string folder,ArrayList Exts)
+ {
+ //clear the list
+//fmu folder=Utils.RemoveTrailingSlash(folder);
+ folder = Util.Utils.RemoveTrailingSlash(folder);
+ file f = new file();
+ GUIControl.ClearControl(GetID,(int)Controls.CONTROL_LIST_DIR);
+ VirtualDirectory Directory;
+ ArrayList itemlist;
+ Directory = new VirtualDirectory();
+ Directory.SetExtensions(Exts);
+ itemlist = Directory.GetDirectory(folder);
+
+ foreach (GUIListItem item in itemlist)
+ {
+ if(!item.IsFolder) // if item a folder
+ {
+ GUIListItem pItem = new GUIListItem(item.FileInfo.Name);
+ pItem.IsFolder=false;
+ pItem.Path=String.Format(@"{0}\{1}", folder,item.FileInfo.Name);
+ GUIControl.AddListItemControl(GetID,(int)Controls.CONTROL_LIST_DIR,pItem);
+ f.name=item.FileInfo.Name;
+ f.size=item.FileInfo.Length;
+ files.Add(f);
+ }
+ else
+ {
+ GUIListItem pItem = new GUIListItem(item.Label);
+ pItem.IsFolder=true;
+ pItem.Path=String.Format(@"{0}\{1}", folder,item.Label);
+ if (item.Label=="..")
+ {
+ string prevFolder="";
+ int pos=folder.LastIndexOf(@"\");
+ if (pos>=0) prevFolder=folder.Substring(0,pos);
+ pItem.Path=prevFolder;
+ }
+//fmu Utils.SetDefaultIcons(pItem);
+ Util.Utils.SetDefaultIcons(pItem);
+ GUIControl.AddListItemControl(GetID, (int)Controls.CONTROL_LIST_DIR, pItem);
+ }
+ }
+ string strObjects =String.Format("{0} {1}",GUIControl.GetItemCount(GetID,(int)Controls.CONTROL_LIST_DIR).ToString(), GUILocalizeStrings.Get(632));
+ GUIPropertyManager.SetProperty("#itemcount",strObjects);
+
+ currentFolder=folder;
+ }
+
+ /// <summary>
+ /// Loads drivelist and shares in a list control
+ /// </summary>
+ private void LoadDriveListControl(bool cd)
+ {
+ currentFolder="";
+ //clear the list
+ GUIControl.ClearControl(GetID,(int)Controls.CONTROL_LIST_DIR);
+
+ cd = false;
+
+ if (cd==true)
+ {
+ for (int i=0; i<driveCdCount; i++)
+ {
+ GUIListItem pItem = new GUIListItem(drivesCd[i]);
+ pItem.Path=drivesCd[i];
+ pItem.IsFolder=true;
+//fmu Utils.SetDefaultIcons(pItem);
+ Util.Utils.SetDefaultIcons(pItem);
+ GUIControl.AddListItemControl(GetID, (int)Controls.CONTROL_LIST_DIR, pItem);
+ }
+ }
+ else
+ {
+ for (int i=0; i<driveCount; i++)
+ {
+ GUIListItem pItem = new GUIListItem(drives[i]);
+ pItem.Path=drives[i];
+ pItem.IsFolder=true;
+//fmu Utils.SetDefaultIcons(pItem);
+ Util.Utils.SetDefaultIcons(pItem);
+ GUIControl.AddListItemControl(GetID, (int)Controls.CONTROL_LIST_DIR, pItem);
+ }
+ }
+
+ string strObjects = String.Format("{0} {1}", GUIControl.GetItemCount(GetID, (int)Controls.CONTROL_LIST_DIR).ToString(), GUILocalizeStrings.Get(632));
+ GUIPropertyManager.SetProperty("#itemcount", strObjects);
+ }
+
+
+ void keyboard_TextChanged(int kindOfSearch,string data)
+ {
+ //
+ }
+
+ enum DriveType
+ {
+ Removable = 2,
+ Fixed = 3,
+ RemoteDisk = 4,
+ CD = 5,
+ DVD = 5,
+ RamDisk = 6
+ }
+
+ /// <summary>
+ /// fills the drive array.
+ /// when showOnlyShares==false then the array drives contains all drives witout CD.
+ /// array drivesCd contains all drives
+ /// </summary>
+ void GetDrives()
+ {
+ foreach(string drive in Environment.GetLogicalDrives())
+ {
+ DriveType driveType = (DriveType)Util.Utils.getDriveType(drive);
+ string name="";
+
+ switch(driveType)
+ {
+ case DriveType.Removable:
+ name=String.Format("({0}:) Removable",drive.Substring(0, 1).ToUpper());
+ break;
+ case DriveType.Fixed:
+ name=String.Format("({0}:) Fixed",drive.Substring(0, 1).ToUpper());
+ break;
+ case DriveType.RemoteDisk:
+ name=String.Format("({0}:) Remote",drive.Substring(0, 1).ToUpper());
+ break;
+ case DriveType.DVD:
+ name=String.Format("({0}:) CD/DVD",drive.Substring(0, 1).ToUpper());
+ break;
+ case DriveType.RamDisk:
+ name=String.Format("({0}:) Ram",drive.Substring(0, 1).ToUpper());
+ break;
+ }
+
+ if(showOnlyShares == false)
+ {
+ drives[driveCount]=name;
+ driveCount++;
+ }
+
+ if(driveType == DriveType.DVD)
+ {
+ drivesCd[driveCdCount]=name;
+ driveCdCount++;
+ }
+ }
+ }
+
+ /// <summary>
+ /// Moves or Copy a file
+ /// if mc==false copy a file otherwise move a file
+ /// </summary>
+
+ void Move(bool mc, string source, string name, string destination)
+ {
+ bool doNot=false;
+ try
+ {
+ if (System.IO.File.Exists(destination+name))
+ {
+ GUIDialogYesNo dlgYesNo = (GUIDialogYesNo)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_YES_NO);
+ dlgYesNo.SetHeading(GUILocalizeStrings.Get(2200));
+ dlgYesNo.SetLine(1,name);
+ dlgYesNo.SetLine(2,GUILocalizeStrings.Get(2217));
+ dlgYesNo.SetLine(3,GUILocalizeStrings.Get(2218));
+ dlgYesNo.DoModal(GetID);
+ if (dlgYesNo.IsConfirmed)
+ {
+ doNot=false;
+//fmu Utils.FileDelete(destination+name);
+ Util.Utils.FileDelete(destination + name);
+ }
+ else
+ {
+ doNot=true;
+ }
+ }
+ if (doNot==false)
+ {
+ FileInfo fi = new FileInfo(source);
+ if (mc)
+ {
+ fi.MoveTo(destination+name);
+ }
+ else
+ {
+ fi.CopyTo(destination+name,false);
+ }
+ }
+ }
+ catch (Exception)
+ {
+//fmu Log.Write("MyExplorer Error: from {0} to {1} MC:{2}",source,destination+name,mc);
+ Log.Error("MyExplorer Error: from {0} to {1} MC:{2}", source, destination + name, mc);
+ }
+ }
+
+ /// <summary>
+ /// Loads only the ShowOnlyShare status
+ /// </summary>
+ private void LoadShareSettings()
+ {
+ using(MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml"))
+ {
+ showOnlyShares=xmlreader.GetValueAsBool("myexplorer","show_only_shares",false);
+ }
+ }
+
+ /// <summary>
+ /// Loads all Settings from MediaPortal.xml
+ /// </summary>
+ private void LoadSettings()
+ {
+ using(MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml"))
+ {
+ tempFolder=xmlreader.GetValueAsString("myexplorer","temp_folder","");
+ enableDelete=xmlreader.GetValueAsBool("myexplorer","enable_delete",false);
+ deleteImmed=xmlreader.GetValueAsBool("myexplorer","delete_immediately",false);
+ deleteTemp=xmlreader.GetValueAsBool("myexplorer","delete_temp",false);
+ for (int i=0; i<20; i++)
+ {
+ sound[i]=xmlreader.GetValueAsString("music","sharepath"+i.ToString()," ").Trim();
+ sname[i]=xmlreader.GetValueAsString("music","sharename"+i.ToString()," ").Trim();
+ vname[i]=xmlreader.GetValueAsString("movies","sharename"+i.ToString()," ").Trim();
+ video[i]=xmlreader.GetValueAsString("movies","sharepath"+i.ToString()," ").Trim();
+ pname[i]=xmlreader.GetValueAsString("pictures","sharename"+i.ToString()," ").Trim();
+ pictures[i]=xmlreader.GetValueAsString("pictures","sharepath"+i.ToString()," ").Trim();
+
+ if (pname[i].Contains("CD/")==false && pictures[i]!="")
+ {
+ drives[driveCount]="["+pname[i]+"]";
+ driveCount++;
+ drivesCd[driveCdCount]="["+pname[i]+"]";
+ driveCdCount++;
+ }
+ if (vname[i].Contains("CD/") == false && video[i] != "")
+ {
+ drives[driveCount]="["+vname[i]+"]";
+ driveCount++;
+ drivesCd[driveCdCount]="["+vname[i]+"]";
+ driveCdCount++;
+ }
+ if (sname[i].Contains("CD/") == false && sound[i] != "")
+ {
+ drives[driveCount]="["+sname[i]+"]";
+ driveCount++;
+ drivesCd[driveCdCount]="["+sname[i]+"]";
+ driveCdCount++;
+ }
+ }
+ }
+ }
+ #endregion
+ }
+}
Added: trunk/plugins/My Explorer/My Explorer.csproj
===================================================================
--- trunk/plugins/My Explorer/My Explorer.csproj (rev 0)
+++ trunk/plugins/My Explorer/My Explorer.csproj 2007-01-31 19:32:51 UTC (rev 61)
@@ -0,0 +1,70 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$...
[truncated message content] |
|
From: <fr...@us...> - 2007-01-31 19:35:28
|
Revision: 62
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=62&view=rev
Author: framug
Date: 2007-01-31 11:35:13 -0800 (Wed, 31 Jan 2007)
Log Message:
-----------
Add My ClickMania
Added Paths:
-----------
trunk/plugins/My clickmania/
trunk/plugins/My clickmania/AssemblyInfo.cs
trunk/plugins/My clickmania/Class1.cs
trunk/plugins/My clickmania/ClickMania.cs
trunk/plugins/My clickmania/ClickManiaControl.cs
trunk/plugins/My clickmania/ClickManiaSetup.cs
trunk/plugins/My clickmania/ClickManiaSetup.designer.cs
trunk/plugins/My clickmania/ClickManiaSetup.resx
trunk/plugins/My clickmania/GUIClickMania.csproj
trunk/plugins/My clickmania/GUIClickMania.csproj.user
trunk/plugins/My clickmania/GUIClickMania.sln
trunk/plugins/My clickmania/GUIClickMania.suo
trunk/plugins/My clickmania/UpgradeLog.XML
trunk/plugins/My clickmania/bin/
trunk/plugins/My clickmania/bin/Release/
trunk/plugins/My clickmania/bin/Release/Core.dll
trunk/plugins/My clickmania/bin/Release/Dialogs.dll
trunk/plugins/My clickmania/bin/Release/GUIClickMania.dll
trunk/plugins/My clickmania/bin/Release/Utils.dll
trunk/plugins/My clickmania/myClickMania.cs
Added: trunk/plugins/My clickmania/AssemblyInfo.cs
===================================================================
--- trunk/plugins/My clickmania/AssemblyInfo.cs (rev 0)
+++ trunk/plugins/My clickmania/AssemblyInfo.cs 2007-01-31 19:35:13 UTC (rev 62)
@@ -0,0 +1,58 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+//
+// 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("")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+//
+// 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.*")]
+
+//
+// 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("")]
Added: trunk/plugins/My clickmania/Class1.cs
===================================================================
--- trunk/plugins/My clickmania/Class1.cs (rev 0)
+++ trunk/plugins/My clickmania/Class1.cs 2007-01-31 19:35:13 UTC (rev 62)
@@ -0,0 +1,17 @@
+using System;
+
+namespace GUIClickMania
+{
+ /// <summary>
+ /// Summary description for Class1.
+ /// </summary>
+ public class Class1
+ {
+ public Class1()
+ {
+ //
+ // TODO: Add constructor logic here
+ //
+ }
+ }
+}
Added: trunk/plugins/My clickmania/ClickMania.cs
===================================================================
--- trunk/plugins/My clickmania/ClickMania.cs (rev 0)
+++ trunk/plugins/My clickmania/ClickMania.cs 2007-01-31 19:35:13 UTC (rev 62)
@@ -0,0 +1,357 @@
+using System;
+using MediaPortal.GUI.Library;
+
+namespace MyClickMania
+{
+ /// <summary>
+ /// Summary description for ClickMania.
+ /// </summary>
+ ///
+
+ enum BlockStatus
+ {
+ visible = 0,
+ disappearing,
+ invisible,
+ };
+
+ enum GameStatus
+ {
+ Stopped = 0,
+ Running,
+ Disapering,
+ MoveDown,
+ MoveLeft,
+ Check,
+ Lost,
+ Won,
+ };
+
+ public class ClickMania
+ {
+ #region const, structs and member variables
+ // const
+ private const int m_nSizeX = 8;
+ private const int m_nSizeY = 12;
+ private const int m_MaxColor = 5;
+ private const int m_MaxMoves = (int)((m_nSizeX * m_nSizeY)/2) + 2;
+
+ // structs
+ public struct Block
+ {
+ public int color;
+ public int status;
+ };
+
+ // member variables
+ private int m_nScore = 0;
+ private int m_nMoves = 0;
+ private int m_nStatus = (int) GameStatus.Stopped;
+ private Block [,] m_Grid;
+ private Block [,,] m_GridHistory;
+ private int [] m_ScoreHistory;
+
+ #endregion
+
+ #region Properties
+ public int MaxX { get {return m_nSizeX; } }
+ public int MaxY { get {return m_nSizeY; } }
+ public int MaxColor { get {return m_MaxColor; } }
+ public int Score { get {return m_nScore; } set {m_nScore = value; } }
+ public int Status { get {return m_nStatus; } set {m_nStatus = value; } }
+ #endregion
+
+ #region Indexer
+ public Block this [int x, int y]
+ {
+ get { return m_Grid[x,y]; } // ToDo: check x,y
+ set { m_Grid[x,y] = value; } // ToDo: check x,y
+ }
+ #endregion
+
+ #region Init & Start
+ public ClickMania()
+ {
+ m_Grid = new Block[m_nSizeX, m_nSizeY];
+ m_GridHistory = new Block[m_MaxMoves, m_nSizeX, m_nSizeY];
+ m_ScoreHistory = new int[m_MaxMoves];
+ m_nStatus = (int) GameStatus.Stopped;
+ }
+
+
+ // Generates the grid
+ public void Start()
+ {
+ m_nScore = 0;
+ m_nMoves = 0;
+ m_nStatus = (int) GameStatus.Stopped;
+ Random r = new Random(unchecked((int)DateTime.Now.Ticks));
+
+ for (int i = 0; i < m_nSizeX; i++)
+ {
+ for (int j = 0; j < m_nSizeY; j++)
+ {
+ m_Grid[i,j].color = r.Next(0, m_MaxColor);
+ m_Grid[i,j].status = (int)BlockStatus.visible;
+ }
+ }
+
+ StoreMove();
+ m_nStatus = (int) GameStatus.Running;
+ }
+ #endregion
+
+ #region Check Clicked Block
+ // clicked on x, y pos in Array
+ // return number of found pos with equal color
+ public int Clicked(int x, int y)
+ {
+ if (m_Grid[x,y].status == (int)BlockStatus.disappearing)
+ {
+ return 0;
+ }
+ int col = m_Grid[x,y].color;
+
+ int px, py, nx, ny; //
+ px = (x == 0 ? 0 : x-1); //prior x
+ py = (y == 0 ? 0 : y-1); //prior y
+ nx = (x == m_nSizeX-1 ? m_nSizeX-1 : x+1); // next x
+ ny = (y == m_nSizeY-1 ? m_nSizeY-1 : y+1); // next y
+
+ // check if min one neighour has same color
+ if ( ((m_Grid[px,y].color == col) && (px != x) && (m_Grid[px,y].status == (int)BlockStatus.visible))
+ ||((m_Grid[nx,y].color == col) && (nx != x) && (m_Grid[nx,y].status == (int)BlockStatus.visible))
+ ||((m_Grid[x,py].color == col) && (py != y) && (m_Grid[x,py].status == (int)BlockStatus.visible))
+ ||((m_Grid[x,ny].color == col) && (ny != y) && (m_Grid[x,ny].status == (int)BlockStatus.visible)) )
+ {
+ int found = CheckPos(x,y, col);
+ if (found > 1)
+ {
+ m_nStatus = (int)GameStatus.Disapering;
+ }
+ return found;
+ }
+ return 1;
+ }
+
+
+ public int CheckPos(int x, int y, int col)
+ {
+ if (m_Grid[x,y].status == (int)BlockStatus.disappearing)
+ {
+ return 0;
+ }
+
+ m_Grid[x,y].status = (int)BlockStatus.disappearing;
+
+ int px, py, nx, ny; //
+ px = (x == 0 ? 0 : x-1); //prior x
+ py = (y == 0 ? 0 : y-1); //prior y
+ nx = (x == m_nSizeX-1 ? m_nSizeX-1 : x+1); // next x
+ ny = (y == m_nSizeY-1 ? m_nSizeY-1 : y+1); // next y
+ int ret = 1;
+
+ if ((m_Grid[px,y].status == (int)BlockStatus.visible) && (m_Grid[px,y].color == col))
+ {
+ ret += CheckPos(px, y, col);
+ }
+
+ if ((m_Grid[nx,y].status == (int)BlockStatus.visible) && (m_Grid[nx,y].color == col))
+ {
+ ret += CheckPos(nx, y, col);
+ }
+
+ if ((m_Grid[x,py].status == (int)BlockStatus.visible) && (m_Grid[x,py].color == col))
+ {
+ ret += CheckPos(x, py, col);
+ }
+
+ if ((m_Grid[x,ny].status == (int)BlockStatus.visible) && (m_Grid[x,ny].color == col))
+ {
+ ret += CheckPos(x, ny, col);
+ }
+
+ return ret;
+ }
+ #endregion
+
+ #region Move Blocks
+ public bool MakeInvisible()
+ {
+ bool ret = false;
+ for (int i = 0; i < m_nSizeX; i++)
+ {
+ for (int j = 0; j < m_nSizeY; j++)
+ {
+ if (m_Grid[i,j].status == (int)BlockStatus.disappearing)
+ {
+ m_Grid[i,j].status = (int)BlockStatus.invisible;
+ ret = true;
+ }
+ }
+ }
+ m_nStatus = (int) GameStatus.MoveDown;
+ return ret;
+ }
+
+ public bool MoveDown()
+ {
+ bool ret = false;
+ for (int i = 0; i < m_nSizeX; i++)
+ {
+ for (int j = m_nSizeY-1; j >= 0; j--)
+ {
+ // if current pos invisible, then ...
+ if (m_Grid[i,j].status == (int)BlockStatus.invisible)
+ {
+ // ... search for the next visible pos
+ for (int k = j-1; k>= 0; k--)
+ {
+ if (m_Grid[i,k].status == (int)BlockStatus.visible)
+ {
+ Block temp = m_Grid[i,j];
+ m_Grid[i,j] = m_Grid[i, k];
+ m_Grid[i,k] = temp;
+ ret = true;
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ m_nStatus = (int) GameStatus.MoveLeft;
+ return ret;
+ }
+
+ public bool MoveLeft()
+ {
+ bool ret = false;
+ for (int i = 0; i < m_nSizeX; i++)
+ {
+ // check if first block is invisible, then ...
+ if (m_Grid[i,m_nSizeY-1].status == (int)BlockStatus.invisible)
+ {
+ // ... search for the next visible
+ for (int k = i+1; k < m_nSizeX; k++)
+ {
+ if (m_Grid[k,m_nSizeY-1].status == (int)BlockStatus.visible)
+ {
+ // move the complete row
+ ret = true;
+ for (int j = 0; j < m_nSizeY; j++)
+ {
+ Block temp = m_Grid[i,j];
+ m_Grid[i,j] = m_Grid[k, j];
+ m_Grid[k,j] = temp;
+ }
+ break;
+ }
+ }
+ }
+ }
+
+ StoreMove();
+ m_nStatus = (int) GameStatus.Check;
+ return ret;
+ }
+ #endregion
+
+ #region Check Won or Lost
+ public bool CheckWon()
+ {
+ if (m_Grid[0, m_nSizeY-1].status == (int)BlockStatus.invisible)
+ {
+ m_nStatus = (int) GameStatus.Won;
+ return true;
+ }
+ m_nStatus = (int)GameStatus.Running;
+ return false;
+ }
+
+ public bool CheckLost()
+ {
+ bool MoveLeft = false;
+ //search for a possible move
+ for (int i = 0; i < m_nSizeX; i++)
+ {
+ for (int j = m_nSizeY-1; j >= 0; j--)
+ {
+ if (m_Grid[i,j].status == (int)BlockStatus.visible)
+ {
+ // test if around the visible block a other with the same color exists
+ int px, py, nx, ny, col;
+ px = (i == 0 ? 0 : i-1); //prior x
+ py = (j == 0 ? 0 : j-1); //prior y
+ nx = (i == m_nSizeX-1 ? m_nSizeX-1 : i+1); // next x
+ ny = (j == m_nSizeY-1 ? m_nSizeY-1 : j+1); // next y
+ col = m_Grid[i,j].color;
+
+ // check if min one neighour has same color
+ if ( ((m_Grid[px,j].color == col) && (px != i) && (m_Grid[px,j].status == (int)BlockStatus.visible))
+ ||((m_Grid[nx,j].color == col) && (nx != i) && (m_Grid[nx,j].status == (int)BlockStatus.visible))
+ ||((m_Grid[i,py].color == col) && (py != j) && (m_Grid[i,py].status == (int)BlockStatus.visible))
+ ||((m_Grid[i,ny].color == col) && (ny != j) && (m_Grid[i,ny].status == (int)BlockStatus.visible)) )
+ {
+ MoveLeft = true;
+ }
+ }
+ else
+ {
+ break;
+ }
+ }
+ }
+
+
+ if (MoveLeft == false)
+ {
+ m_nStatus = (int) GameStatus.Lost;
+ return true;
+ }
+ m_nStatus = (int)GameStatus.Running;
+ return false;
+ }
+ #endregion
+
+ #region History
+ public void StoreMove()
+ {
+ for (int i = 0; i < m_nSizeX; i++)
+ {
+ for (int j = 0; j < m_nSizeY; j++)
+ {
+ m_GridHistory[m_nMoves,i,j].color = m_Grid[i,j].color;
+ m_GridHistory[m_nMoves,i,j].status = m_Grid[i,j].status;
+ }
+ }
+ m_ScoreHistory[m_nMoves] = Score;
+ if (m_nMoves < m_MaxMoves - 1)
+ {
+ m_nMoves++;
+ }
+ }
+
+ public void TakeBackMove()
+ {
+ int back = 0;
+ if (m_nMoves > 1)
+ {
+ m_nMoves--;
+ back = m_nMoves - 1;
+ }
+
+ Score = m_ScoreHistory[back];
+ for (int i = 0; i < m_nSizeX; i++)
+ {
+ for (int j = 0; j < m_nSizeY; j++)
+ {
+ m_Grid[i,j].color = m_GridHistory[back,i,j].color;
+ m_Grid[i,j].status = m_GridHistory[back,i,j].status;
+ }
+ }
+ }
+ #endregion
+
+ }
+}
Added: trunk/plugins/My clickmania/ClickManiaControl.cs
===================================================================
--- trunk/plugins/My clickmania/ClickManiaControl.cs (rev 0)
+++ trunk/plugins/My clickmania/ClickManiaControl.cs 2007-01-31 19:35:13 UTC (rev 62)
@@ -0,0 +1,508 @@
+using System;
+using System.Windows.Forms;
+using System.Xml.Serialization;
+using System.Drawing;
+
+using MediaPortal.GUI.Library;
+using MediaPortal.Dialogs;
+using MediaPortal.Util;
+using MediaPortal.Drawing;
+
+using Microsoft.DirectX;
+using Microsoft.DirectX.Direct3D;
+using Direct3D=Microsoft.DirectX.Direct3D;
+
+
+
+namespace MyClickMania
+{
+ /// <summary>
+ /// Summary description for ClickManiaControl.
+ /// </summary>
+ public class ClickManiaControl : GUIControl
+ {
+ #region Member variables
+
+ ClickMania m_game = new ClickMania(); // the game itselfe without visualisation
+ Settings m_Settings = new Settings(); // Serialization
+ //GUIFont m_Font; // fonts needed
+ GUIImage[] m_imgBackgrounds; // some backgrounds
+ GUIImage[] m_imgBlocks; // blocks in differnt colors
+ GUIImage[] m_imgBlocksGlow; // glowing blocks in different colors
+ GUIImage[] m_imgCursors; // something for the remote control user
+ int m_nxCursor = 0; // x position of cursor
+ int m_nyCursor = 0; // y position of cursor
+ int m_ncCount = 0; // Counter for the cursor image
+ int m_nCursorTick = 0; // cursor animation delay implementation
+ int m_nCursorDelay = 25; // the delay itselfe
+ int m_nxScale = 1; // x scaling factor
+ int m_nyScale = 1; // y scaling factor
+ int m_nxOffset = 0; // x offset of the board
+ int m_nyOffset = 0; // y offset of the board
+ int m_nBoardWidth = 0; // width of the board
+ int m_nBoardHeight = 0; // height of the board
+ int m_nLastTick = 0; // for delay implementation
+ int m_nDelay = 150; // the delay itselfe
+ long m_lStartTime = 0; // save the start time for the game timer
+ int m_dwPosX = 592;
+ int m_dwPosY = 88;
+
+ protected long m_dwColorDiffuse = 0xFFFFFFFF; //
+
+ #endregion
+
+ #region Properties
+
+ public int Score
+ {
+ get {return (m_game != null ? m_game.Score : 0);}
+ }
+
+ public int HighScore
+ {
+ get {return (m_Settings != null ? m_Settings.Highscore : 0);}
+ set
+ {
+ if (m_Settings != null)
+ {
+ m_Settings.Highscore = value;
+ m_Settings.Save();
+ }
+ }
+ }
+
+ public bool Sound
+ {
+ get { return (m_Settings != null ? m_Settings.Sound : false); }
+ set
+ {
+ if (m_Settings != null)
+ {
+ m_Settings.Sound = value;
+ m_Settings.Save();
+ }
+ if (value) GUIControl.SelectControl(GetID, 4);
+ else GUIControl.DeSelectControl(GetID, 4);
+ }
+ }
+
+ public bool KeyInterface
+ {
+ get { return (m_Settings != null ? m_Settings.KeyInterface : false); }
+ set
+ {
+ if (m_Settings != null)
+ {
+ m_Settings.KeyInterface = value;
+ m_Settings.Save();
+ }
+ if (value) GUIControl.SelectControl(GetID, 6);
+ else GUIControl.DeSelectControl(GetID, 6);
+ }
+ }
+
+ #endregion
+
+ #region Serialization
+
+ [Serializable]
+ public class Settings
+ {
+ protected int m_nHighscore;
+ protected bool m_bKeyInterface;
+ protected bool m_bSound;
+
+ public Settings()
+ {
+ m_nHighscore = 0;
+ m_bKeyInterface = false;
+ m_bSound = false;
+ }
+
+ [XmlElement("Highscore")]
+ public int Highscore
+ {
+ get { return m_nHighscore; }
+ set { m_nHighscore = value;}
+ }
+
+ [XmlElement("KeyInterface")]
+ public bool KeyInterface
+ {
+ get { return m_bKeyInterface; }
+ set { m_bKeyInterface = value;}
+ }
+
+ [XmlElement("Sound")]
+ public bool Sound
+ {
+ get { return m_bSound; }
+ set { m_bSound = value;}
+ }
+
+ public void Load()
+ {
+ using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml"))
+ {
+ m_nHighscore = xmlreader.GetValueAsInt("clickmania", "highscore", 0);
+ m_bKeyInterface = xmlreader.GetValueAsBool("clickmania", "keyinterface", false);
+ m_bSound = xmlreader.GetValueAsBool("clickmania", "sound", true);
+ }
+ }
+
+ public void Save()
+ {
+ using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings("MediaPortal.xml"))
+ {
+ xmlwriter.SetValue("clickmania", "highscore", m_nHighscore);
+ xmlwriter.SetValueAsBool("clickmania", "keyinterface", m_bKeyInterface);
+ xmlwriter.SetValueAsBool("clickmania", "sound", m_bSound);
+ }
+ }
+ }
+
+ #endregion Serialization
+
+ #region Init & Start Game
+ public ClickManiaControl(int nParentID): base(nParentID)
+ {
+ m_Settings.Load();
+ }
+
+
+ public void Start(int m_dwControlID)
+ {
+
+ GUIControl.FocusControl(GetID, m_dwControlID);
+
+ GUIPropertyManager.SetProperty("#cm_status", " ");
+
+ m_lStartTime = -DateTime.Now.Ticks; // negative to get a counter from zero
+ m_nxCursor = 0; // set cursor to the lower left side
+ m_nyCursor = m_game.MaxY-1;
+ m_ncCount = 0;
+ m_nCursorTick = Environment.TickCount;
+ m_game.Start();
+ GUIPropertyManager.SetProperty("#cm_score", m_game.Score.ToString());
+ }
+
+ #endregion
+
+ #region Overrides
+
+ public override void FinalizeConstruction()
+ {
+ base.FinalizeConstruction ();
+
+ m_nBoardWidth = this.Width;
+ m_nBoardHeight = this.Height;
+
+ m_nyScale = m_nBoardHeight / (m_game.MaxY + 2);
+ m_nxScale = m_nyScale;
+ m_nBoardWidth = m_nxScale * m_game.MaxX;
+ m_dwPosX = this._positionX;
+ m_dwPosY = this._positionY;
+ m_nxOffset = m_dwPosX + ((this.Width - (m_nxScale * m_game.MaxX)) / 2);
+ m_nyOffset = m_dwPosY+ ((this.Height - (m_nyScale * m_game.MaxY)) / 2);
+ m_imgBlocks = new GUIImage[]
+ {
+ new GUIImage(GetID, 10001, m_dwPosX, m_dwPosY, m_nxScale, m_nyScale, GUIGraphicsContext.Skin + @"\media\clickmania\block_red.png", m_dwColorDiffuse),
+ new GUIImage(GetID, 10002, m_dwPosX, m_dwPosY, m_nxScale, m_nyScale, GUIGraphicsContext.Skin + @"\media\clickmania\block_blue.png", m_dwColorDiffuse),
+ new GUIImage(GetID, 10003, m_dwPosX, m_dwPosY, m_nxScale, m_nyScale, GUIGraphicsContext.Skin + @"\media\clickmania\block_gray.png", m_dwColorDiffuse),
+ new GUIImage(GetID, 10004, m_dwPosX, m_dwPosY, m_nxScale, m_nyScale, GUIGraphicsContext.Skin + @"\media\clickmania\block_yellow.png", m_dwColorDiffuse),
+ new GUIImage(GetID, 10005, m_dwPosX, m_dwPosY, m_nxScale, m_nyScale, GUIGraphicsContext.Skin + @"\media\clickmania\block_cyan.png", m_dwColorDiffuse),
+ new GUIImage(GetID, 10006, m_dwPosX, m_dwPosY, m_nxScale, m_nyScale, GUIGraphicsContext.Skin + @"\media\clickmania\block_orange.png", m_dwColorDiffuse),
+ new GUIImage(GetID, 10007, m_dwPosX, m_dwPosY, m_nxScale, m_nyScale, GUIGraphicsContext.Skin + @"\media\clickmania\block_green.png", m_dwColorDiffuse),
+ };
+
+ m_imgBlocksGlow = new GUIImage[]
+ {
+ new GUIImage(GetID, 10011, m_dwPosX, m_dwPosY, m_nxScale, m_nyScale, GUIGraphicsContext.Skin + @"\media\clickmania\block_red_glow.png", m_dwColorDiffuse),
+ new GUIImage(GetID, 10012, m_dwPosX, m_dwPosY, m_nxScale, m_nyScale, GUIGraphicsContext.Skin + @"\media\clickmania\block_blue_glow.png", m_dwColorDiffuse),
+ new GUIImage(GetID, 10013, m_dwPosX, m_dwPosY, m_nxScale, m_nyScale, GUIGraphicsContext.Skin + @"\media\clickmania\block_gray_glow.png", m_dwColorDiffuse),
+ new GUIImage(GetID, 10014, m_dwPosX, m_dwPosY, m_nxScale, m_nyScale, GUIGraphicsContext.Skin + @"\media\clickmania\block_yellow_glow.png", m_dwColorDiffuse),
+ new GUIImage(GetID, 10015, m_dwPosX, m_dwPosY, m_nxScale, m_nyScale, GUIGraphicsContext.Skin + @"\media\clickmania\block_cyan_glow.png", m_dwColorDiffuse),
+ new GUIImage(GetID, 10016, m_dwPosX, m_dwPosY, m_nxScale, m_nyScale, GUIGraphicsContext.Skin + @"\media\clickmania\block_orange_glow.png", m_dwColorDiffuse),
+ new GUIImage(GetID, 10017, m_dwPosX, m_dwPosY, m_nxScale, m_nyScale, GUIGraphicsContext.Skin + @"\media\clickmania\block_green_glow.png", m_dwColorDiffuse),
+ };
+
+ m_imgBackgrounds = new GUIImage[]
+ {
+ new GUIImage(GetID, 10021, m_dwPosX, m_dwPosY, this.Width, this.Height, GUIGraphicsContext.Skin + @"\media\clickmania\background.png", m_dwColorDiffuse),
+ new GUIImage(GetID, 10022, m_dwPosX, m_dwPosY, this.Width, this.Height, GUIGraphicsContext.Skin + @"\media\clickmania\background_focus.png", m_dwColorDiffuse),
+ };
+
+ m_imgCursors = new GUIImage[]
+ {
+ new GUIImage(GetID, 10031, m_dwPosX, m_dwPosY, m_nxScale, m_nyScale, GUIGraphicsContext.Skin + @"\media\clickmania\cursor1.png", Color.Black),
+ new GUIImage(GetID, 10032, m_dwPosX, m_dwPosY, m_nxScale, m_nyScale, GUIGraphicsContext.Skin + @"\media\clickmania\cursor2.png", Color.Black),
+ new GUIImage(GetID, 10033, m_dwPosX, m_dwPosY, m_nxScale, m_nyScale, GUIGraphicsContext.Skin + @"\media\clickmania\cursor3.png", Color.Black),
+ new GUIImage(GetID, 10034, m_dwPosX, m_dwPosY, m_nxScale, m_nyScale, GUIGraphicsContext.Skin + @"\media\clickmania\cursor4.png", Color.Black),
+ new GUIImage(GetID, 10034, m_dwPosX, m_dwPosY, m_nxScale, m_nyScale, GUIGraphicsContext.Skin + @"\media\clickmania\cursor5.png", Color.Black),
+ new GUIImage(GetID, 10034, m_dwPosX, m_dwPosY, m_nxScale, m_nyScale, GUIGraphicsContext.Skin + @"\media\clickmania\cursor6.png", Color.Black),
+ new GUIImage(GetID, 10034, m_dwPosX, m_dwPosY, m_nxScale, m_nyScale, GUIGraphicsContext.Skin + @"\media\clickmania\cursor7.png", Color.Black),
+ };
+ }
+
+
+ public override void AllocResources()
+ {
+ base.AllocResources ();
+
+ if(m_imgBlocks != null)
+ {
+ foreach(GUIImage image in m_imgBlocks)
+ {
+ image.AllocResources();
+ }
+ }
+
+
+ if(m_imgBlocksGlow != null)
+ {
+ foreach(GUIImage image in m_imgBlocksGlow)
+ {
+ image.AllocResources();
+ }
+ }
+
+ if(m_imgBackgrounds != null)
+ {
+ foreach(GUIImage image in m_imgBackgrounds)
+ {
+ image.AllocResources();
+ }
+ }
+
+ if(m_imgCursors != null)
+ {
+ foreach(GUIImage image in m_imgCursors)
+ {
+ image.AllocResources();
+ }
+ }
+ }
+
+ public override void OnAction(Action action)
+ {
+ if (m_game.Status != (int)GameStatus.Stopped)
+ {
+ switch (action.wID)
+ {
+ case Action.ActionType.ACTION_KEY_PRESSED:
+
+ if ((KeyInterface == true) && (m_game.Status == (int)GameStatus.Running) /* && (action.m_key.KeyCode == 0x13) */)
+ {
+ ProcessBlockClicked(m_nxCursor, m_nyCursor);
+ }
+ else
+ {
+ base.OnAction(action);
+ }
+ break;
+ case Action.ActionType.ACTION_MOUSE_CLICK:
+ if (m_game.Status == (int)GameStatus.Running)
+ {
+ // calc the block where the mouse was clicked on
+ int x = (int)((int)action.fAmount1 - m_nxOffset)/m_nxScale;
+ int y = (int)((int)action.fAmount2 - m_nyOffset)/m_nyScale;
+ if ((x > -1) & (x < 8) & (y > -1) & (y < 12))
+ ProcessBlockClicked(x, y);
+ }
+ else
+ {
+ base.OnAction(action);
+ }
+ break;
+ case Action.ActionType.ACTION_MOVE_UP:
+ if (m_nyCursor > 0) m_nyCursor -= 1;
+ break;
+ case Action.ActionType.ACTION_MOVE_DOWN:
+ if (m_nyCursor < m_game.MaxY-1) m_nyCursor += 1;
+ break;
+ case Action.ActionType.ACTION_MOVE_LEFT:
+ if (m_nxCursor > 0) m_nxCursor -= 1;
+ else
+ base.OnAction(action);
+ break;
+ case Action.ActionType.ACTION_MOVE_RIGHT:
+ if (m_nxCursor < m_game.MaxX-1) m_nxCursor += 1;
+ break;
+ default:
+ base.OnAction(action);
+ break;
+ }
+ }
+ else
+ {
+ base.OnAction(action);
+ }
+ }
+
+ public override void Render(float timePassed)
+ {
+ RenderBackground(timePassed);
+
+ if (m_game.Status != (int)GameStatus.Stopped)
+ {
+ // show timer only when game is running
+ if (m_game.Status < (int)GameStatus.Lost)
+ {
+ GUIPropertyManager.SetProperty("#cm_time", DateTime.Now.AddTicks(m_lStartTime).ToLongTimeString());
+ }
+
+ for (int i=0; i<m_game.MaxX; i++)
+ {
+ int posX = m_nxOffset + (int) (i * m_nxScale);
+ for (int j=0; j<m_game.MaxY; j++)
+ {
+ int posY = m_nyOffset + (int) (j * m_nyScale);
+ int col = m_game[i, j].color;
+
+ switch (m_game[i, j].status)
+ {
+ case (int)BlockStatus.visible:
+ if (m_imgBlocks != null && m_imgBlocks[col] != null)
+ {
+ m_imgBlocks[col].SetPosition(posX, posY);
+ m_imgBlocks[col].Render(timePassed);
+ }
+ break;
+ case (int)BlockStatus.disappearing:
+ if (m_imgBlocks != null && m_imgBlocks[col] != null)
+ {
+ m_imgBlocksGlow[col].SetPosition(posX, posY);
+ m_imgBlocksGlow[col].Render(timePassed);
+ }
+ break;
+ }
+ }
+ }
+
+ switch (m_game.Status)
+ {
+ case (int)GameStatus.Disapering:
+ if ((Environment.TickCount - m_nLastTick) > m_nDelay)
+ {
+ if (m_game.MakeInvisible() == true)
+ {
+ //if (Sound == true) Utils.PlaySound("ClickMania.Block.wav", false, true);
+ }
+ m_nLastTick = Environment.TickCount;
+ }
+ break;
+
+ case (int)GameStatus.MoveDown:
+ if ((Environment.TickCount - m_nLastTick) > m_nDelay)
+ {
+ if (m_game.MoveDown() == true)
+ {
+ //if (Sound == true) Utils.PlaySound("ClickMania.MoveDown.wav", false, true);
+ }
+ m_nLastTick = Environment.TickCount;
+ }
+ break;
+
+ case (int)GameStatus.MoveLeft:
+ if ((Environment.TickCount - m_nLastTick) > m_nDelay)
+ {
+ if (m_game.MoveLeft() == true)
+ {
+ if (m_game.Status == (int)GameStatus.Running)
+ {
+ if (Sound == true) Utils.PlaySound("ClickMania.MoveLeft.wav", false, true);
+ }
+ }
+ m_nLastTick = Environment.TickCount;
+ }
+ break;
+ case (int)GameStatus.Check:
+ if (m_game.CheckWon() == true) // did we won?
+ {
+ if (Sound == true) Utils.PlaySound("ClickMania.Won.wav", false, true);
+ }
+ else if (m_game.CheckLost() == true) // no more move possible?
+ {
+ GUIPropertyManager.SetProperty("#cm_status", "Game Over");
+ if (Sound == true) Utils.PlaySound("ClickMania.GameOver.wav", false, true);
+ }
+ break;
+
+ case (int)GameStatus.Won:
+ GUIPropertyManager.SetProperty("#cm_status", String.Format("Your Score: {0}", m_game.Score));
+ break;
+
+ case (int)GameStatus.Lost:
+ GUIPropertyManager.SetProperty("#cm_status", "Game Over");
+ break;
+
+ }
+ RenderCursor(timePassed);
+ }
+ }
+
+ public void RenderBackground(float timePassed)
+ {
+ if(IsFocused)
+ {
+ m_imgBackgrounds[1].Render(timePassed);
+ }
+ else
+ {
+ m_imgBackgrounds[0].Render(timePassed);
+ }
+ }
+
+ public void RenderCursor(float timePassed)
+ {
+ if ((KeyInterface) && (m_imgCursors != null))
+ {
+ int posX = m_nxOffset + (int) (m_nxCursor * m_nxScale); //can be optimized
+ int posY = m_nyOffset + (int) (m_nyCursor * m_nyScale); //can be optimized
+ m_imgCursors[m_ncCount].SetPosition(posX, posY);
+ m_imgCursors[m_ncCount].Render(timePassed);
+ if ((Environment.TickCount - m_nCursorTick) > m_nCursorDelay)
+ {
+ m_nCursorTick = Environment.TickCount;
+ m_ncCount += 1;
+ if (m_ncCount >= m_imgCursors.Length)
+ {
+ m_ncCount = 0;
+ }
+ }
+ }
+ }
+
+
+ public void ProcessBlockClicked(int x, int y)
+ {
+ int found = m_game.Clicked(x, y);
+ if (found > 1)
+ {
+ if (Sound == true) Utils.PlaySound("ClickMania.Block.wav", false, true);
+ m_game.Score += found*found;
+ if (m_game.Score > m_Settings.Highscore)
+ {
+ m_Settings.Highscore = m_game.Score;
+ m_Settings.Save();
+ }
+ GUIPropertyManager.SetProperty("#cm_score", m_game.Score.ToString());
+ GUIPropertyManager.SetProperty("#cm_highscore", m_Settings.Highscore.ToString());
+ m_nLastTick = Environment.TickCount;
+ }
+ }
+
+ #endregion
+
+
+ public void TakeBackMove()
+ {
+ if (m_...
[truncated message content] |
|
From: <fr...@us...> - 2007-01-31 19:51:32
|
Revision: 63
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=63&view=rev
Author: framug
Date: 2007-01-31 11:51:26 -0800 (Wed, 31 Jan 2007)
Log Message:
-----------
Add file explorer plugin
Added Paths:
-----------
trunk/plugins/file explorer/
trunk/plugins/file explorer/Release/
trunk/plugins/file explorer/Release/Plugins/
trunk/plugins/file explorer/Release/Plugins/Windows/
trunk/plugins/file explorer/Release/Plugins/Windows/Explorer.dll
trunk/plugins/file explorer/Release/Plugins/Windows/FileExplorer/
trunk/plugins/file explorer/Release/Plugins/Windows/FileExplorer/Compression.dll
trunk/plugins/file explorer/Release/Skin/
trunk/plugins/file explorer/Release/Skin/BlueTwo/
trunk/plugins/file explorer/Release/Skin/BlueTwo/explorer_dialog.xml
trunk/plugins/file explorer/Release/Skin/BlueTwo/explorer_main.xml
trunk/plugins/file explorer/Release/Skin/BlueTwo/explorer_modulepreview.xml
trunk/plugins/file explorer/Release/Skin/BlueTwo/explorer_musicpreview.xml
trunk/plugins/file explorer/Release/Skin/BlueTwo/explorer_textpreview.xml
trunk/plugins/file explorer/Release/Skin/MCE/
trunk/plugins/file explorer/Release/Skin/MCE/explorer_dialog.xml
trunk/plugins/file explorer/Release/Skin/MCE/explorer_main.xml
trunk/plugins/file explorer/Release/Skin/MCE/explorer_modulepreview.xml
trunk/plugins/file explorer/Release/Skin/MCE/explorer_musicpreview.xml
trunk/plugins/file explorer/Release/Skin/MCE/explorer_textpreview.xml
trunk/plugins/file explorer/Release/Skin/Project X/
trunk/plugins/file explorer/Release/Skin/Project X/explorer_dialog.xml
trunk/plugins/file explorer/Release/Skin/Project X/explorer_main.xml
trunk/plugins/file explorer/Release/Skin/Project X/explorer_modulepreview.xml
trunk/plugins/file explorer/Release/Skin/Project X/explorer_musicpreview.xml
trunk/plugins/file explorer/Release/Skin/Project X/explorer_textpreview.xml
trunk/plugins/file explorer/Source/
trunk/plugins/file explorer/Source/AssemblyInfo.cs
trunk/plugins/file explorer/Source/Compression/
trunk/plugins/file explorer/Source/Compression/Compression.dsp
trunk/plugins/file explorer/Source/Compression/Compression.dsw
trunk/plugins/file explorer/Source/Compression/Compression.ncb
trunk/plugins/file explorer/Source/Compression/Compression.opt
trunk/plugins/file explorer/Source/Compression/Compression.plg
trunk/plugins/file explorer/Source/Compression/export.cpp
trunk/plugins/file explorer/Source/Compression/export.h
trunk/plugins/file explorer/Source/Compression/main.cpp
trunk/plugins/file explorer/Source/Constants.cs
trunk/plugins/file explorer/Source/Dialogs/
trunk/plugins/file explorer/Source/Dialogs/GUIDialogOperation.cs
trunk/plugins/file explorer/Source/DrivesView.cs
trunk/plugins/file explorer/Source/ExceptionViewer.cs
trunk/plugins/file explorer/Source/Explorer.cs
trunk/plugins/file explorer/Source/Explorer.csproj
trunk/plugins/file explorer/Source/Explorer.sln
trunk/plugins/file explorer/Source/Explorer.suo
trunk/plugins/file explorer/Source/Preview/
trunk/plugins/file explorer/Source/Preview/ModulePreview.cs
trunk/plugins/file explorer/Source/Preview/PicturePreview.cs
trunk/plugins/file explorer/Source/Preview/StreamingPreview.cs
trunk/plugins/file explorer/Source/Preview/TextPreview.cs
trunk/plugins/file explorer/Source/Setup.Designer.cs
trunk/plugins/file explorer/Source/Setup.cs
trunk/plugins/file explorer/Source/Setup.resx
trunk/plugins/file explorer/Source/bin/
trunk/plugins/file explorer/Source/bin/Release/
trunk/plugins/file explorer/Source/bin/Release/Core.dll
trunk/plugins/file explorer/Source/bin/Release/Dialogs.dll
trunk/plugins/file explorer/Source/bin/Release/Explorer.dll
trunk/plugins/file explorer/Source/bin/Release/System.Drawing.dll
trunk/plugins/file explorer/Source/bin/Release/System.Windows.Forms.dll
trunk/plugins/file explorer/Source/bin/Release/Utils.dll
trunk/plugins/file explorer/doc/
trunk/plugins/file explorer/doc/Bugs.txt
trunk/plugins/file explorer/doc/COPYING.txt
Added: trunk/plugins/file explorer/Release/Plugins/Windows/Explorer.dll
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/file explorer/Release/Plugins/Windows/Explorer.dll
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/file explorer/Release/Plugins/Windows/FileExplorer/Compression.dll
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/file explorer/Release/Plugins/Windows/FileExplorer/Compression.dll
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/file explorer/Release/Skin/BlueTwo/explorer_dialog.xml
===================================================================
--- trunk/plugins/file explorer/Release/Skin/BlueTwo/explorer_dialog.xml (rev 0)
+++ trunk/plugins/file explorer/Release/Skin/BlueTwo/explorer_dialog.xml 2007-01-31 19:51:26 UTC (rev 63)
@@ -0,0 +1,46 @@
+<window>
+ <id>557316</id>
+ <defaultcontrol>10</defaultcontrol>
+ <allowoverlay>no</allowoverlay>
+ <controls>
+ <control>
+ <type>image</type>
+ <id>0</id>
+ <posX>177</posX>
+ <posY>225</posY>
+ <width>409</width>
+ <height>202</height>
+ <texture>dialog_background.png</texture>
+ </control>
+ <control>
+ <description>dialog Heading</description>
+ <type>label</type>
+ <id>2</id>
+ <posX>190</posX>
+ <posY>230</posY>
+ <label>0</label>
+ <font>font13</font>
+ <textcolor>ffffffff</textcolor>
+ </control>
+ <control>
+ <description>dialog line 1</description>
+ <type>label</type>
+ <id>3</id>
+ <posX>190</posX>
+ <posY>260</posY>
+ <label>0</label>
+ <font>font13</font>
+ <textcolor>ffffffff</textcolor>
+ </control>
+ <control>
+ <description>dialog line 2</description>
+ <type>label</type>
+ <id>4</id>
+ <posX>190</posX>
+ <posY>280</posY>
+ <label>0</label>
+ <font>font13</font>
+ <textcolor>ffffffff</textcolor>
+ </control>
+ </controls>
+</window>
Added: trunk/plugins/file explorer/Release/Skin/BlueTwo/explorer_main.xml
===================================================================
--- trunk/plugins/file explorer/Release/Skin/BlueTwo/explorer_main.xml (rev 0)
+++ trunk/plugins/file explorer/Release/Skin/BlueTwo/explorer_main.xml 2007-01-31 19:51:26 UTC (rev 63)
@@ -0,0 +1,112 @@
+<window>
+ <id>557311</id>
+ <defaultcontrol>1</defaultcontrol>
+ <allowoverlay>no</allowoverlay>
+ <controls>
+ <control>
+ <description>BackGround</description>
+ <type>image</type>
+ <id>5</id>
+ <posX>0</posX>
+ <posY>0</posY>
+ <width>720</width>
+ <height>576</height>
+ <texture>background.png</texture>
+ </control>
+ <control>
+ <description>Menu left</description>
+ <type>button</type>
+ <id>1</id>
+ <posX>1</posX>
+ <posY>1</posY>
+ <label>Menu left</label>
+ <onleft>1</onleft>
+ <onright>2</onright>
+ <onup>1</onup>
+ <ondown>3</ondown>
+ </control>
+ <control>
+ <description>Menu right</description>
+ <type>button</type>
+ <id>2</id>
+ <posX>352</posX>
+ <posY>1</posY>
+ <label>Menu right</label>
+ <onleft>1</onleft>
+ <onright>2</onright>
+ <onup>2</onup>
+ <ondown>4</ondown>
+ </control>
+ <control>
+ <description>file listcontrol</description>
+ <type>listcontrol</type>
+ <id>3</id>
+ <posX>1</posX>
+ <posY>55</posY>
+ <height>500</height>
+ <width>350</width>
+ <onright>4</onright>
+ <onleft>1</onleft>
+ <onup>3</onup>
+ <ondown>3</ondown>
+ <spinPosX>240</spinPosX>
+ </control>
+ <control>
+ <description>file listcontrol</description>
+ <type>listcontrol</type>
+ <id>4</id>
+ <posX>352</posX>
+ <posY>55</posY>
+ <height>500</height>
+ <width>350</width>
+ <onright>2</onright>
+ <onleft>3</onleft>
+ <onup>4</onup>
+ <ondown>4</ondown>
+ </control>
+ <control>
+ <description>label left</description>
+ <type>label</type>
+ <id>6</id>
+ <posX>1</posX>
+ <posY>500</posY>
+ <label>Test</label>
+ <font>font10</font>
+ <align>left</align>
+ <textcolor>White</textcolor>
+ </control>
+ <control>
+ <description>label right</description>
+ <type>label</type>
+ <id>7</id>
+ <posX>352</posX>
+ <posY>500</posY>
+ <label>Test</label>
+ <font>font10</font>
+ <align>left</align>
+ <textcolor>White</textcolor>
+ </control>
+ <control>
+ <description>labeldir left</description>
+ <type>label</type>
+ <id>9</id>
+ <posX>1</posX>
+ <posY>35</posY>
+ <label>Test</label>
+ <font>font10</font>
+ <align>left</align>
+ <textcolor>White</textcolor>
+ </control>
+ <control>
+ <description>labeldir right</description>
+ <type>label</type>
+ <id>10</id>
+ <posX>352</posX>
+ <posY>36</posY>
+ <label>Test</label>
+ <font>font10</font>
+ <align>left</align>
+ <textcolor>White</textcolor>
+ </control>
+ </controls>
+</window>
Added: trunk/plugins/file explorer/Release/Skin/BlueTwo/explorer_modulepreview.xml
===================================================================
--- trunk/plugins/file explorer/Release/Skin/BlueTwo/explorer_modulepreview.xml (rev 0)
+++ trunk/plugins/file explorer/Release/Skin/BlueTwo/explorer_modulepreview.xml 2007-01-31 19:51:26 UTC (rev 63)
@@ -0,0 +1,64 @@
+<window>
+ <id>557313</id>
+ <defaultcontrol>10</defaultcontrol>
+ <allowoverlay>no</allowoverlay>
+ <controls>
+ <control>
+ <type>image</type>
+ <id>0</id>
+ <posX>177</posX>
+ <posY>225</posY>
+ <width>409</width>
+ <height>202</height>
+ <texture>dialog_background.png</texture>
+ </control>
+ <control>
+ <description>dialog Heading</description>
+ <type>label</type>
+ <id>2</id>
+ <posX>190</posX>
+ <posY>230</posY>
+ <label></label>
+ <font>font13</font>
+ <textcolor>ffffffff</textcolor>
+ </control>
+ <control>
+ <description>dialog line 1</description>
+ <type>label</type>
+ <id>3</id>
+ <posX>190</posX>
+ <posY>260</posY>
+ <label></label>
+ <font>font13</font>
+ <textcolor>ffffffff</textcolor>
+ </control>
+ <control>
+ <description>dialog line 2</description>
+ <type>label</type>
+ <id>4</id>
+ <posX>190</posX>
+ <posY>280</posY>
+ <label></label>
+ <font>font13</font>
+ <textcolor>ffffffff</textcolor>
+ </control>
+ <control>
+ <description>OK button</description>
+ <type>button</type>
+ <id>10</id>
+ <posX>435</posX>
+ <posY>355</posY>
+ <textXOff>10</textXOff>
+ <textYOff>7</textYOff>
+ <width>105</width>
+ <height>38</height>
+ <textureFocus>small_button_focus.png</textureFocus>
+ <textureNoFocus>small_button_nofocus.png</textureNoFocus>
+ <label>186</label>
+ <onleft>10</onleft>
+ <onright>10</onright>
+ <onup>10</onup>
+ <ondown>10</ondown>
+ </control>
+ </controls>
+</window>
Added: trunk/plugins/file explorer/Release/Skin/BlueTwo/explorer_musicpreview.xml
===================================================================
--- trunk/plugins/file explorer/Release/Skin/BlueTwo/explorer_musicpreview.xml (rev 0)
+++ trunk/plugins/file explorer/Release/Skin/BlueTwo/explorer_musicpreview.xml 2007-01-31 19:51:26 UTC (rev 63)
@@ -0,0 +1,64 @@
+<window>
+ <id>557314</id>
+ <defaultcontrol>10</defaultcontrol>
+ <allowoverlay>no</allowoverlay>
+ <controls>
+ <control>
+ <type>image</type>
+ <id>0</id>
+ <posX>177</posX>
+ <posY>225</posY>
+ <width>409</width>
+ <height>202</height>
+ <texture>dialog_background.png</texture>
+ </control>
+ <control>
+ <description>dialog Heading</description>
+ <type>label</type>
+ <id>2</id>
+ <posX>190</posX>
+ <posY>230</posY>
+ <label></label>
+ <font>font13</font>
+ <textcolor>ffffffff</textcolor>
+ </control>
+ <control>
+ <description>dialog line 1</description>
+ <type>label</type>
+ <id>3</id>
+ <posX>190</posX>
+ <posY>260</posY>
+ <label></label>
+ <font>font13</font>
+ <textcolor>ffffffff</textcolor>
+ </control>
+ <control>
+ <description>dialog line 2</description>
+ <type>label</type>
+ <id>4</id>
+ <posX>190</posX>
+ <posY>280</posY>
+ <label></label>
+ <font>font13</font>
+ <textcolor>ffffffff</textcolor>
+ </control>
+ <control>
+ <description>OK button</description>
+ <type>button</type>
+ <id>10</id>
+ <posX>435</posX>
+ <posY>355</posY>
+ <textXOff>10</textXOff>
+ <textYOff>7</textYOff>
+ <width>105</width>
+ <height>38</height>
+ <textureFocus>small_button_focus.png</textureFocus>
+ <textureNoFocus>small_button_nofocus.png</textureNoFocus>
+ <label>186</label>
+ <onleft>10</onleft>
+ <onright>10</onright>
+ <onup>10</onup>
+ <ondown>10</ondown>
+ </control>
+ </controls>
+</window>
Added: trunk/plugins/file explorer/Release/Skin/BlueTwo/explorer_textpreview.xml
===================================================================
--- trunk/plugins/file explorer/Release/Skin/BlueTwo/explorer_textpreview.xml (rev 0)
+++ trunk/plugins/file explorer/Release/Skin/BlueTwo/explorer_textpreview.xml 2007-01-31 19:51:26 UTC (rev 63)
@@ -0,0 +1,29 @@
+<window>
+ <id>557312</id>
+ <defaultcontrol>2</defaultcontrol>
+ <allowoverlay>no</allowoverlay>
+ <controls>
+ <control>
+ <description>BackGround</description>
+ <type>image</type>
+ <id>1</id>
+ <posX>0</posX>
+ <posY>0</posY>
+ <width>720</width>
+ <height>576</height>
+ <texture>background.png</texture>
+ </control>
+ <control>
+ <type>textbox</type>
+ <id>2</id>
+ <posX>1</posX>
+ <posY>1</posY>
+ <width>700</width>
+ <height>576</height>
+ <font>font12</font>
+ <textcolor>White</textcolor>
+ <spinPosX>640</spinPosX>
+ <spinPosY>560</spinPosY>
+ </control>
+ </controls>
+</window>
Added: trunk/plugins/file explorer/Release/Skin/MCE/explorer_dialog.xml
===================================================================
--- trunk/plugins/file explorer/Release/Skin/MCE/explorer_dialog.xml (rev 0)
+++ trunk/plugins/file explorer/Release/Skin/MCE/explorer_dialog.xml 2007-01-31 19:51:26 UTC (rev 63)
@@ -0,0 +1,46 @@
+<window>
+ <id>557316</id>
+ <defaultcontrol>10</defaultcontrol>
+ <allowoverlay>no</allowoverlay>
+ <controls>
+ <control>
+ <type>image</type>
+ <id>0</id>
+ <posX>177</posX>
+ <posY>225</posY>
+ <width>409</width>
+ <height>202</height>
+ <texture>dialog_background.png</texture>
+ </control>
+ <control>
+ <description>dialog Heading</description>
+ <type>label</type>
+ <id>2</id>
+ <posX>190</posX>
+ <posY>230</posY>
+ <label>0</label>
+ <font>font13</font>
+ <textcolor>ffffffff</textcolor>
+ </control>
+ <control>
+ <description>dialog line 1</description>
+ <type>label</type>
+ <id>3</id>
+ <posX>190</posX>
+ <posY>260</posY>
+ <label>0</label>
+ <font>font13</font>
+ <textcolor>ffffffff</textcolor>
+ </control>
+ <control>
+ <description>dialog line 2</description>
+ <type>label</type>
+ <id>4</id>
+ <posX>190</posX>
+ <posY>280</posY>
+ <label>0</label>
+ <font>font13</font>
+ <textcolor>ffffffff</textcolor>
+ </control>
+ </controls>
+</window>
Added: trunk/plugins/file explorer/Release/Skin/MCE/explorer_main.xml
===================================================================
--- trunk/plugins/file explorer/Release/Skin/MCE/explorer_main.xml (rev 0)
+++ trunk/plugins/file explorer/Release/Skin/MCE/explorer_main.xml 2007-01-31 19:51:26 UTC (rev 63)
@@ -0,0 +1,112 @@
+<window>
+ <id>557311</id>
+ <defaultcontrol>1</defaultcontrol>
+ <allowoverlay>no</allowoverlay>
+ <controls>
+ <control>
+ <description>BackGround</description>
+ <type>image</type>
+ <id>5</id>
+ <posX>0</posX>
+ <posY>0</posY>
+ <width>720</width>
+ <height>576</height>
+ <texture>background.png</texture>
+ </control>
+ <control>
+ <description>Menu left</description>
+ <type>button</type>
+ <id>1</id>
+ <posX>1</posX>
+ <posY>1</posY>
+ <label>Menu left</label>
+ <onleft>1</onleft>
+ <onright>2</onright>
+ <onup>1</onup>
+ <ondown>3</ondown>
+ </control>
+ <control>
+ <description>Menu right</description>
+ <type>button</type>
+ <id>2</id>
+ <posX>352</posX>
+ <posY>1</posY>
+ <label>Menu right</label>
+ <onleft>1</onleft>
+ <onright>2</onright>
+ <onup>2</onup>
+ <ondown>4</ondown>
+ </control>
+ <control>
+ <description>file listcontrol</description>
+ <type>listcontrol</type>
+ <id>3</id>
+ <posX>1</posX>
+ <posY>55</posY>
+ <height>500</height>
+ <width>350</width>
+ <onright>4</onright>
+ <onleft>1</onleft>
+ <onup>3</onup>
+ <ondown>3</ondown>
+ <spinPosX>240</spinPosX>
+ </control>
+ <control>
+ <description>file listcontrol</description>
+ <type>listcontrol</type>
+ <id>4</id>
+ <posX>352</posX>
+ <posY>55</posY>
+ <height>500</height>
+ <width>350</width>
+ <onright>2</onright>
+ <onleft>3</onleft>
+ <onup>4</onup>
+ <ondown>4</ondown>
+ </control>
+ <control>
+ <description>label left</description>
+ <type>label</type>
+ <id>6</id>
+ <posX>1</posX>
+ <posY>500</posY>
+ <label>Test</label>
+ <font>font10</font>
+ <align>left</align>
+ <textcolor>White</textcolor>
+ </control>
+ <control>
+ <description>label right</description>
+ <type>label</type>
+ <id>7</id>
+ <posX>352</posX>
+ <posY>500</posY>
+ <label>Test</label>
+ <font>font10</font>
+ <align>left</align>
+ <textcolor>White</textcolor>
+ </control>
+ <control>
+ <description>labeldir left</description>
+ <type>label</type>
+ <id>9</id>
+ <posX>1</posX>
+ <posY>35</posY>
+ <label>Test</label>
+ <font>font10</font>
+ <align>left</align>
+ <textcolor>White</textcolor>
+ </control>
+ <control>
+ <description>labeldir right</description>
+ <type>label</type>
+ <id>10</id>
+ <posX>352</posX>
+ <posY>36</posY>
+ <label>Test</label>
+ <font>font10</font>
+ <align>left</align>
+ <textcolor>White</textcolor>
+ </control>
+ </controls>
+</window>
Added: trunk/plugins/file explorer/Release/Skin/MCE/explorer_modulepreview.xml
===================================================================
--- trunk/plugins/file explorer/Release/Skin/MCE/explorer_modulepreview.xml (rev 0)
+++ trunk/plugins/file explorer/Release/Skin/MCE/explorer_modulepreview.xml 2007-01-31 19:51:26 UTC (rev 63)
@@ -0,0 +1,64 @@
+<window>
+ <id>557313</id>
+ <defaultcontrol>10</defaultcontrol>
+ <allowoverlay>no</allowoverlay>
+ <controls>
+ <control>
+ <type>image</type>
+ <id>0</id>
+ <posX>177</posX>
+ <posY>225</posY>
+ <width>409</width>
+ <height>202</height>
+ <texture>dialog_background.png</texture>
+ </control>
+ <control>
+ <description>dialog Heading</description>
+ <type>label</type>
+ <id>2</id>
+ <posX>190</posX>
+ <posY>230</posY>
+ <label></label>
+ <font>font13</font>
+ <textcolor>ffffffff</textcolor>
+ </control>
+ <control>
+ <description>dialog line 1</description>
+ <type>label</type>
+ <id>3</id>
+ <posX>190</posX>
+ <posY>260</posY>
+ <label></label>
+ <font>font13</font>
+ <textcolor>ffffffff</textcolor>
+ </control>
+ <control>
+ <description>dialog line 2</description>
+ <type>label</type>
+ <id>4</id>
+ <posX>190</posX>
+ <posY>280</posY>
+ <label></label>
+ <font>font13</font>
+ <textcolor>ffffffff</textcolor>
+ </control>
+ <control>
+ <description>OK button</description>
+ <type>button</type>
+ <id>10</id>
+ <posX>435</posX>
+ <posY>355</posY>
+ <textXOff>10</textXOff>
+ <textYOff>7</textYOff>
+ <width>105</width>
+ <height>38</height>
+ <textureFocus>small_button_focus.png</textureFocus>
+ <textureNoFocus>small_button_nofocus.png</textureNoFocus>
+ <label>186</label>
+ <onleft>10</onleft>
+ <onright>10</onright>
+ <onup>10</onup>
+ <ondown>10</ondown>
+ </control>
+ </controls>
+</window>
Added: trunk/plugins/file explorer/Release/Skin/MCE/explorer_musicpreview.xml
===================================================================
--- trunk/plugins/file explorer/Release/Skin/MCE/explorer_musicpreview.xml (rev 0)
+++ trunk/plugins/file explorer/Release/Skin/MCE/explorer_musicpreview.xml 2007-01-31 19:51:26 UTC (rev 63)
@@ -0,0 +1,64 @@
+<window>
+ <id>557314</id>
+ <defaultcontrol>10</defaultcontrol>
+ <allowoverlay>no</allowoverlay>
+ <controls>
+ <control>
+ <type>image</type>
+ <id>0</id>
+ <posX>177</posX>
+ <posY>225</posY>
+ <width>409</width>
+ <height>202</height>
+ <texture>dialog_background.png</texture>
+ </control>
+ <control>
+ <description>dialog Heading</description>
+ <type>label</type>
+ <id>2</id>
+ <posX>190</posX>
+ <posY>230</posY>
+ <label></label>
+ <font>font13</font>
+ <textcolor>ffffffff</textcolor>
+ </control>
+ <control>
+ <description>dialog line 1</description>
+ <type>label</type>
+ <id>3</id>
+ <posX>190</posX>
+ <posY>260</posY>
+ <label></label>
+ <font>font13</font>
+ <textcolor>ffffffff</textcolor>
+ </control>
+ <control>
+ <description>dialog line 2</description>
+ <type>label</type>
+ <id>4</id>
+ <posX>190</posX>
+ <posY>280</posY>
+ <label></label>
+ <font>font13</font>
+ <textcolor>ffffffff</textcolor>
+ </control>
+ <control>
+ <description>OK button</description>
+ <type>button</type>
+ <id>10</id>
+ <posX>435</posX>
+ <posY>355</posY>
+ <textXOff>10</textXOff>
+ <textYOff>7</textYOff>
+ <width>105</width>
+ <height>38</height>
+ <textureFocus>small_button_focus.png</textureFocus>
+ <textureNoFocus>small_button_nofocus.png</textureNoFocus>
+ <label>186</label>
+ <onleft>10</onleft>
+ <onright>10</onright>
+ <onup>10</onup>
+ <ondown>10</ondown>
+ </control>
+ </controls>
+</window>
Added: trunk/plugins/file explorer/Release/Skin/MCE/explorer_textpreview.xml
===================================================================
--- trunk/plugins/file explorer/Release/Skin/MCE/explorer_textpreview.xml (rev 0)
+++ trunk/plugins/file explorer/Release/Skin/MCE/explorer_textpreview.xml 2007-01-31 19:51:26 UTC (rev 63)
@@ -0,0 +1,29 @@
+<window>
+ <id>557312</id>
+ <defaultcontrol>2</defaultcontrol>
+ <allowoverlay>no</allowoverlay>
+ <controls>
+ <control>
+ <description>BackGround</description>
+ <type>image</type>
+ <id>1</id>
+ <posX>0</posX>
+ <posY>0</posY>
+ <width>720</width>
+ <height>576</height>
+ <texture>background.png</texture>
+ </control>
+ <control>
+ <type>textbox</type>
+ <id>2</id>
+ <posX>1</posX>
+ <posY>1</posY>
+ <width>700</width>
+ <height>576</height>
+ <font>font12</font>
+ <textcolor>White</textcolor>
+ <spinPosX>640</spinPosX>
+ <spinPosY>560</spinPosY>
+ </control>
+ </controls>
+</window>
Added: trunk/plugins/file explorer/Release/Skin/Project X/explorer_dialog.xml
===================================================================
--- trunk/plugins/file explorer/Release/Skin/Project X/explorer_dialog.xml (rev 0)
+++ trunk/plugins/file explorer/Release/Skin/Project X/explorer_dialog.xml 2007-01-31 19:51:26 UTC (rev 63)
@@ -0,0 +1,46 @@
+<window>
+ <id>557316</id>
+ <defaultcontrol>10</defaultcontrol>
+ <allowoverlay>no</allowoverlay>
+ <controls>
+ <control>
+ <type>image</type>
+ <id>0</id>
+ <posX>177</posX>
+ <posY>225</posY>
+ <width>409</width>
+ <height>202</height>
+ <texture>dialog_background.png</texture>
+ </control>
+ <control>
+ <description>dialog Heading</description>
+ <type>label</type>
+ <id>2</id>
+ <posX>190</posX>
+ <posY>230</posY>
+ <label>0</label>
+ <font>font13</font>
+ <textcolor>ffffffff</textcolor>
+ </control>
+ <control>
+ <description>dialog line 1</description>
+ <type>label</type>
+ <id>3</id>
+ <posX>190</posX>
+ <posY>260</posY>
+ <label>0</label>
+ <font>font13</font>
+ <textcolor>ffffffff</textcolor>
+ </control>
+ <control>
+ <description>dialog line 2</description>
+ <type>label</type>
+ <id>4</id>
+ <posX>190</posX>
+ <posY>280</posY>
+ <label>0</label>
+ <font>font13</font>
+ <textcolor>ffffffff</textcolor>
+ </control>
+ </controls>
+</window>
Added: trunk/plugins/file explorer/Release/Skin/Project X/explorer_main.xml
===================================================================
--- trunk/plugins/file explorer/Release/Skin/Project X/explorer_main.xml (rev 0)
+++ trunk/plugins/file explorer/Release/Skin/Project X/explorer_main.xml 2007-01-31 19:51:26 UTC (rev 63)
@@ -0,0 +1,112 @@
+<window>
+ <id>557311</id>
+ <defaultcontrol>1</defaultcontrol>
+ <allowoverlay>no</allowoverlay>
+ <controls>
+ <control>
+ <description>BackGround</description>
+ <type>image</type>
+ <id>5</id>
+ <posX>0</posX>
+ <posY>0</posY>
+ <width>720</width>
+ <height>576</height>
+ <texture>background.png</texture>
+ </control>
+ <control>
+ <description>Menu left</description>
+ <type>button</type>
+ <id>1</id>
+ <posX>1</posX>
+ <posY>1</posY>
+ <label>Menu left</label>
+ <onleft>1</onleft>
+ <onright>2</onright>
+ <onup>1</onup>
+ <ondown>3</ondown>
+ </control>
+ <control>
+ <description>Menu right</description>
+ <type>button</type>
+ <id>2</id>
+ <posX>352</posX>
+ <posY>1</posY>
+ <label>Menu right</label>
+ <onleft>1</onleft>
+ <onright>2</onright>
+ <onup>2</onup>
+ <ondown>4</ondown>
+ </control>
+ <control>
+ <description>file listcontrol</description>
+ <type>listcontrol</type>
+ <id>3</id>
+ <posX>1</posX>
+ <posY>55</posY>
+ <height>500</height>
+ <width>350</width>
+ <onright>4</onright>
+ <onleft>1</onleft>
+ <onup>3</onup>
+ <ondown>3</ondown>
+ <spinPosX>240</spinPosX>
+ </control>
+ <control>
+ <description>file listcontrol</description>
+ <type>listcontrol</type>
+ <id>4</id>
+ <posX>352</posX>
+ <posY>55</posY>
+ <height>500</height>
+ <width>350</width>
+ <onright>2</onright>
+ <onleft>3</onleft>
+ <onup>4</onup>
+ <ondown>4</ondown>
+ </control>
+ <control>
+ <description>label left</description>
+ <type>label</type>
+ <id>6</id>
+ <posX>1</posX>
+ <posY>500</posY>
+ <label>Test</label>
+ <font>font10</font>
+ <align>left</align>
+ <textcolor>White</textcolor>
+ </control>
+ <control>
+ <description>label right</description>
+ <type>label</type>
+ <id>7</id>
+ <posX>352</posX>
+ <posY>500</posY>
+ <label>Test</label>
+ <font>font10</font>
+ <align>left</align>
+ <textcolor>White</textcolor>
+ </control>
+ <control>
+ <description>labeldir left</description>
+ <type>label</type>
+ <id>9</id>
+ <posX>1</posX>
+ <posY>35</posY>
+ <label>Test</label>
+ <font>font10</font>
+ <align>left</align>
+ <textcolor>White</textcolor>
+ </control>
+ <control>
+ <description>labeldir right</description>
+ <type>label</type>
+ <id>10</id>
+ <posX>352</posX>
+ <posY>36</posY>
+ <label>Test</label>
+ <font>font10</font>
+ <align>left</align>
+ <textcolor>White</textcolor>
+ </control>
+ </controls>
+</window>
Added: trunk/plugins/file explorer/Release/Skin/Project X/explorer_modulepreview.xml
===================================================================
--- trunk/plugins/file explorer/Release/Skin/Project X/explorer_modulepreview.xml (rev 0)
+++ trunk/plugins/file explorer/Release/Skin/Project X/explorer_modulepreview.xml 2007-01-31 19:51:26 UTC (rev 63)
@@ -0,0 +1,64 @@
+<window>
+ <id>557313</id>
+ <defaultcontrol>10</defaultcontrol>
+ <allowoverlay>no</allowoverlay>
+ <controls>
+ <control>
+ <type>image</type>
+ <id>0</id>
+ <posX>177</posX>
+ <posY>225</posY>
+ <width>409</width>
+ <height>202</height>
+ <texture>dialog_background.png</texture>
+ </control>
+ <control>
+ <description>dialog Heading</description>
+ <type>label</type>
+ <id>2</id>
+ <posX>190</posX>
+ <posY>230</posY>
+ <label></label>
+ <font>font13</font>
+ <textcolor>ffffffff</textcolor>
+ </control>
+ <control>
+ <description>dialog line 1</description>
+ <type>label</type>
+ <id>3</id>
+ <posX>190</posX>
+ <posY>260</posY>
+ <label></label>
+ <font>font13</font>
+ <textcolor>ffffffff</textcolor>
+ </control>
+ <control>
+ <description>dialog line 2</description>
+ <type>label</type>
+ <id>4</id>
+ <posX>190</posX>
+ <posY>280</posY>
+ <label></label>
+ <font>font13</font>
+ <textcolor>ffffffff</textcolor>
+ </control>
+ <control>
+ <description>OK button</description>
+ <type>button</type>
+ <id>10</id>
+ <posX>435</posX>
+ <posY>355</posY>
+ <textXOff>10</textXOff>
+ <textYOff>7</textYOff>
+ <width>105</width>
+ <height>38</height>
+ <textureFocus>small_button_focus.png</textureFocus>
+ <textureNoFocus>small_button_nofocus.png</textureNoFocus>
+ <label>186</label>
+ <onleft>10</onleft>
+ <onright>10</onright>
+ <onup>10</onup>
+ <ondown>10</ondown>
+ </control>
+ </controls>
+</window>
Added: trunk/plugins/file explorer/Release/Skin/Project X/explorer_musicpreview.xml
===================================================================
--- trunk/plugins/file explorer/Release/Skin/Project X/explorer_musicpreview.xml (rev 0)
+++ trunk/plugins/file explorer/Release/Skin/Project X/explorer_musicpreview.xml 2007-01-31 19:51:26 UTC (rev 63)
@@ -0,0 +1,64 @@
+<window>
+ <id>557314</id>
+ <defaultcontrol>10</defaultcontrol>
+ <allowoverlay>no</allowoverlay>
+ <controls>
+ <control>
+ <type>image</type>
+ <id>0</id>
+ <posX>177</posX>
+ <posY>225</posY>
+ <width>409</width>
+ <height>202</height>
+ <texture>dialog_background.png</texture>
+ </control>
+ <control>
+ <description>dialog Heading</description>
+ <type>label</type>
+ <id>2</id>
+ ...
[truncated message content] |
|
From: <fr...@us...> - 2007-01-31 21:34:52
|
Revision: 67
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=67&view=rev
Author: framug
Date: 2007-01-31 13:34:49 -0800 (Wed, 31 Jan 2007)
Log Message:
-----------
Add MultiShortcut plugin (tested, it works), enjoy ;)
Added Paths:
-----------
trunk/plugins/MultiShortcut/
trunk/plugins/MultiShortcut/DLLFix/
trunk/plugins/MultiShortcut/DLLFix/DLLFix.csproj
trunk/plugins/MultiShortcut/DLLFix/Program.cs
trunk/plugins/MultiShortcut/DLLFix/Properties/
trunk/plugins/MultiShortcut/DLLFix/Properties/AssemblyInfo.cs
trunk/plugins/MultiShortcut/DLLFix/bin/
trunk/plugins/MultiShortcut/DLLFix/bin/Release/
trunk/plugins/MultiShortcut/DLLFix/bin/Release/AxInterop.WMPLib.dll
trunk/plugins/MultiShortcut/DLLFix/bin/Release/Bass.Net.dll
trunk/plugins/MultiShortcut/DLLFix/bin/Release/BassRegistration.dll
trunk/plugins/MultiShortcut/DLLFix/bin/Release/Core.dll
trunk/plugins/MultiShortcut/DLLFix/bin/Release/DLLFix.exe
trunk/plugins/MultiShortcut/DLLFix/bin/Release/DLLFix.pdb
trunk/plugins/MultiShortcut/DLLFix/bin/Release/Databases.dll
trunk/plugins/MultiShortcut/DLLFix/bin/Release/Dialogs.dll
trunk/plugins/MultiShortcut/DLLFix/bin/Release/DirectShowLib.dll
trunk/plugins/MultiShortcut/DLLFix/bin/Release/ICSharpCode.SharpZipLib.dll
trunk/plugins/MultiShortcut/DLLFix/bin/Release/Interop.SHDocVw.dll
trunk/plugins/MultiShortcut/DLLFix/bin/Release/Interop.WMPLib.dll
trunk/plugins/MultiShortcut/DLLFix/bin/Release/MediaPortal.Support.dll
trunk/plugins/MultiShortcut/DLLFix/bin/Release/MediaPortal.Support.pdb
trunk/plugins/MultiShortcut/DLLFix/bin/Release/MultiShortcut00.dll
trunk/plugins/MultiShortcut/DLLFix/bin/Release/MultiShortcut00.pdb
trunk/plugins/MultiShortcut/DLLFix/bin/Release/Utils.dll
trunk/plugins/MultiShortcut/DLLFix/bin/Release/edtftpnet-1.2.2.dll
trunk/plugins/MultiShortcut/MultiButton.sln
trunk/plugins/MultiShortcut/MultiButton.suo
trunk/plugins/MultiShortcut/MultiShortcut/
trunk/plugins/MultiShortcut/MultiShortcut/Config.Designer.cs
trunk/plugins/MultiShortcut/MultiShortcut/Config.cs
trunk/plugins/MultiShortcut/MultiShortcut/Config.resx
trunk/plugins/MultiShortcut/MultiShortcut/MultiShortcut.cs
trunk/plugins/MultiShortcut/MultiShortcut/MultiShortcut.csproj
trunk/plugins/MultiShortcut/MultiShortcut/Properties/
trunk/plugins/MultiShortcut/MultiShortcut/Properties/AssemblyInfo.cs
trunk/plugins/MultiShortcut/MultiShortcut/bin/
trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/
trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/AxInterop.WMPLib.dll
trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/Bass.Net.dll
trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/BassRegistration.dll
trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/Core.dll
trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/Databases.dll
trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/Dialogs.dll
trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/DirectShowLib.dll
trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/ICSharpCode.SharpZipLib.dll
trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/Interop.SHDocVw.dll
trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/Interop.WMPLib.dll
trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/MediaPortal.Support.dll
trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/MediaPortal.Support.pdb
trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/MultiShortcut00.dll
trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/MultiShortcut00.pdb
trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/Utils.dll
trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/edtftpnet-1.2.2.dll
trunk/plugins/MultiShortcut/TestServer/
trunk/plugins/MultiShortcut/TestServer/Program.cs
trunk/plugins/MultiShortcut/TestServer/Properties/
trunk/plugins/MultiShortcut/TestServer/Properties/AssemblyInfo.cs
trunk/plugins/MultiShortcut/TestServer/TestServer.csproj
trunk/plugins/MultiShortcut/TestServer/bin/
trunk/plugins/MultiShortcut/TestServer/bin/Release/
trunk/plugins/MultiShortcut/TestServer/bin/Release/AxInterop.WMPLib.dll
trunk/plugins/MultiShortcut/TestServer/bin/Release/Bass.Net.dll
trunk/plugins/MultiShortcut/TestServer/bin/Release/BassRegistration.dll
trunk/plugins/MultiShortcut/TestServer/bin/Release/Core.dll
trunk/plugins/MultiShortcut/TestServer/bin/Release/Databases.dll
trunk/plugins/MultiShortcut/TestServer/bin/Release/Dialogs.dll
trunk/plugins/MultiShortcut/TestServer/bin/Release/DirectShowLib.dll
trunk/plugins/MultiShortcut/TestServer/bin/Release/ICSharpCode.SharpZipLib.dll
trunk/plugins/MultiShortcut/TestServer/bin/Release/Interop.SHDocVw.dll
trunk/plugins/MultiShortcut/TestServer/bin/Release/Interop.WMPLib.dll
trunk/plugins/MultiShortcut/TestServer/bin/Release/MediaPortal.Support.dll
trunk/plugins/MultiShortcut/TestServer/bin/Release/MediaPortal.Support.pdb
trunk/plugins/MultiShortcut/TestServer/bin/Release/MultiShortcut00.dll
trunk/plugins/MultiShortcut/TestServer/bin/Release/MultiShortcut00.pdb
trunk/plugins/MultiShortcut/TestServer/bin/Release/TestServer.exe
trunk/plugins/MultiShortcut/TestServer/bin/Release/TestServer.pdb
trunk/plugins/MultiShortcut/TestServer/bin/Release/Utils.dll
trunk/plugins/MultiShortcut/TestServer/bin/Release/edtftpnet-1.2.2.dll
Added: trunk/plugins/MultiShortcut/DLLFix/DLLFix.csproj
===================================================================
--- trunk/plugins/MultiShortcut/DLLFix/DLLFix.csproj (rev 0)
+++ trunk/plugins/MultiShortcut/DLLFix/DLLFix.csproj 2007-01-31 21:34:49 UTC (rev 67)
@@ -0,0 +1,57 @@
+<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>{8EDA7E5D-E56B-486E-BFB3-DB3A47733E39}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>DLLFix</RootNamespace>
+ <AssemblyName>DLLFix</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Core, Version=1.0.2587.38185, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\MediaPortal\Core\bin\Release\Core.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Program.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\MultiShortcut\MultiShortcut.csproj">
+ <Project>{7CBDA33F-E11F-400B-8B3F-ABB0B54462AC}</Project>
+ <Name>MultiShortcut</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.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
Added: trunk/plugins/MultiShortcut/DLLFix/Program.cs
===================================================================
--- trunk/plugins/MultiShortcut/DLLFix/Program.cs (rev 0)
+++ trunk/plugins/MultiShortcut/DLLFix/Program.cs 2007-01-31 21:34:49 UTC (rev 67)
@@ -0,0 +1,96 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.IO;
+using System.Reflection;
+
+using MediaPortal.MultiShortcut;
+
+namespace DLLFix
+{
+ class Program
+ {
+ const int fixStart = 11290;
+
+ static void Main(string[] args)
+ {
+
+ byte[] search_bytes = new byte[]
+ {
+ 0x52, 0x75, 0x6E, 0x74, 0x69, 0x6D, 0x65, 0x43,
+ 0x6F, 0x6D, 0x70, 0x61, 0x74, 0x69, 0x62, 0x69,
+ 0x6C, 0x69, 0x74, 0x79, 0x41, 0x74, 0x74, 0x72,
+ 0x69, 0x62, 0x75, 0x74, 0x65, 0x00, 0x4D, 0x75,
+ 0x6C, 0x74, 0x69, 0x53, 0x68, 0x6F, 0x72, 0x74,
+ 0x63, 0x75, 0x74
+ };
+
+ byte fileCounter = 0;
+
+ string myPath = System.Reflection.Assembly.GetExecutingAssembly().Location;
+ myPath = myPath.Substring(0, myPath.LastIndexOf('\\'));
+
+ string[] files = Directory.GetFiles(myPath, "*.dll");
+
+ Console.WriteLine("*******************************************************");
+ Console.WriteLine("** **");
+ Console.WriteLine("** MultiShortcut DLL fix (.net metadata changer) **");
+ Console.WriteLine("** **");
+ Console.WriteLine("*******************************************************");
+ Console.WriteLine("");
+ Console.WriteLine("1.) Patching files...\n");
+ foreach (string s in files)
+ {
+ using (Stream st = new FileStream(s, FileMode.Open, FileAccess.ReadWrite))
+ {
+ int offset = 0;
+ long file_pos = 0;
+ int bytes_read = 0;
+ byte[] buffer = new byte[65536];
+
+ bool match = false;
+
+ while ((bytes_read = st.Read(buffer, offset, buffer.Length - offset)) > 0 && !match)
+ {
+ for (int i = 0; i < bytes_read + offset - search_bytes.Length; i++)
+ {
+ match = true;
+
+ for (int j = 0; j < search_bytes.Length; j++)
+ {
+ if (search_bytes[j] != buffer[i + j])
+ {
+ match = false;
+ break;
+ }
+ }
+
+ if (match)
+ {
+ st.Seek(file_pos + i - offset + search_bytes.Length, SeekOrigin.Begin);
+ byte[] replaceBuffer = new byte[] { (Byte)(48 + (fileCounter > 9 ? ((int)fileCounter / 10) : 0)), (Byte)(48 + ((int)fileCounter % 10)) };
+ st.Write(replaceBuffer, 0, replaceBuffer.Length);
+ Console.WriteLine(" - PATCHED: {0}",s.Substring(s.LastIndexOf('\\')+1));
+ break;
+ }
+ }
+
+ file_pos = st.Position;
+
+ offset = search_bytes.Length;
+ for (int i = 0; i < offset; i++)
+ {
+ buffer[i] = buffer[buffer.Length - offset + i];
+ }
+ }
+
+ }
+ fileCounter++;
+ }
+
+ Console.WriteLine("\n2.) Done.");
+ Console.WriteLine("\n3.) Press Enter to close...");
+ Console.ReadKey();
+ }
+ }
+}
Added: trunk/plugins/MultiShortcut/DLLFix/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/MultiShortcut/DLLFix/Properties/AssemblyInfo.cs (rev 0)
+++ trunk/plugins/MultiShortcut/DLLFix/Properties/AssemblyInfo.cs 2007-01-31 21:34:49 UTC (rev 67)
@@ -0,0 +1,33 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 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("DLLFix")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("lr-software")]
+[assembly: AssemblyProduct("DLLFix")]
+[assembly: AssemblyCopyright("Copyright © lr-software 2006")]
+[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)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("351bc816-4ecd-4da5-b4fb-a8af512fec21")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
Added: trunk/plugins/MultiShortcut/DLLFix/bin/Release/AxInterop.WMPLib.dll
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/MultiShortcut/DLLFix/bin/Release/AxInterop.WMPLib.dll
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/MultiShortcut/DLLFix/bin/Release/Bass.Net.dll
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/MultiShortcut/DLLFix/bin/Release/Bass.Net.dll
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/MultiShortcut/DLLFix/bin/Release/BassRegistration.dll
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/MultiShortcut/DLLFix/bin/Release/BassRegistration.dll
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/MultiShortcut/DLLFix/bin/Release/Core.dll
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/MultiShortcut/DLLFix/bin/Release/Core.dll
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/MultiShortcut/DLLFix/bin/Release/DLLFix.exe
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/MultiShortcut/DLLFix/bin/Release/DLLFix.exe
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/MultiShortcut/DLLFix/bin/Release/DLLFix.pdb
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/MultiShortcut/DLLFix/bin/Release/DLLFix.pdb
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/MultiShortcut/DLLFix/bin/Release/Databases.dll
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/MultiShortcut/DLLFix/bin/Release/Databases.dll
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/MultiShortcut/DLLFix/bin/Release/Dialogs.dll
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/MultiShortcut/DLLFix/bin/Release/Dialogs.dll
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/MultiShortcut/DLLFix/bin/Release/DirectShowLib.dll
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/MultiShortcut/DLLFix/bin/Release/DirectShowLib.dll
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/MultiShortcut/DLLFix/bin/Release/ICSharpCode.SharpZipLib.dll
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/MultiShortcut/DLLFix/bin/Release/ICSharpCode.SharpZipLib.dll
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/MultiShortcut/DLLFix/bin/Release/Interop.SHDocVw.dll
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/MultiShortcut/DLLFix/bin/Release/Interop.SHDocVw.dll
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/MultiShortcut/DLLFix/bin/Release/Interop.WMPLib.dll
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/MultiShortcut/DLLFix/bin/Release/Interop.WMPLib.dll
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/MultiShortcut/DLLFix/bin/Release/MediaPortal.Support.dll
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/MultiShortcut/DLLFix/bin/Release/MediaPortal.Support.dll
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/MultiShortcut/DLLFix/bin/Release/MediaPortal.Support.pdb
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/MultiShortcut/DLLFix/bin/Release/MediaPortal.Support.pdb
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/MultiShortcut/DLLFix/bin/Release/MultiShortcut00.dll
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/MultiShortcut/DLLFix/bin/Release/MultiShortcut00.dll
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/MultiShortcut/DLLFix/bin/Release/MultiShortcut00.pdb
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/MultiShortcut/DLLFix/bin/Release/MultiShortcut00.pdb
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/MultiShortcut/DLLFix/bin/Release/Utils.dll
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/MultiShortcut/DLLFix/bin/Release/Utils.dll
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/MultiShortcut/DLLFix/bin/Release/edtftpnet-1.2.2.dll
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/MultiShortcut/DLLFix/bin/Release/edtftpnet-1.2.2.dll
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/MultiShortcut/MultiButton.sln
===================================================================
--- trunk/plugins/MultiShortcut/MultiButton.sln (rev 0)
+++ trunk/plugins/MultiShortcut/MultiButton.sln 2007-01-31 21:34:49 UTC (rev 67)
@@ -0,0 +1,32 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestServer", "TestServer\TestServer.csproj", "{D2159E0B-44FA-41D8-B701-081D2C931CC0}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MultiShortcut", "MultiShortcut\MultiShortcut.csproj", "{7CBDA33F-E11F-400B-8B3F-ABB0B54462AC}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DLLFix", "DLLFix\DLLFix.csproj", "{8EDA7E5D-E56B-486E-BFB3-DB3A47733E39}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {D2159E0B-44FA-41D8-B701-081D2C931CC0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D2159E0B-44FA-41D8-B701-081D2C931CC0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D2159E0B-44FA-41D8-B701-081D2C931CC0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D2159E0B-44FA-41D8-B701-081D2C931CC0}.Release|Any CPU.Build.0 = Release|Any CPU
+ {7CBDA33F-E11F-400B-8B3F-ABB0B54462AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7CBDA33F-E11F-400B-8B3F-ABB0B54462AC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7CBDA33F-E11F-400B-8B3F-ABB0B54462AC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7CBDA33F-E11F-400B-8B3F-ABB0B54462AC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8EDA7E5D-E56B-486E-BFB3-DB3A47733E39}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8EDA7E5D-E56B-486E-BFB3-DB3A47733E39}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8EDA7E5D-E56B-486E-BFB3-DB3A47733E39}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8EDA7E5D-E56B-486E-BFB3-DB3A47733E39}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
Added: trunk/plugins/MultiShortcut/MultiButton.suo
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/MultiShortcut/MultiButton.suo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/MultiShortcut/MultiShortcut/Config.Designer.cs
===================================================================
--- trunk/plugins/MultiShortcut/MultiShortcut/Config.Designer.cs (rev 0)
+++ trunk/plugins/MultiShortcut/MultiShortcut/Config.Designer.cs 2007-01-31 21:34:49 UTC (rev 67)
@@ -0,0 +1,90 @@
+namespace MediaPortal.MultiShortcut
+{
+ partial class Config
+ {
+ /// <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.propertyGrid1 = new System.Windows.Forms.PropertyGrid();
+ this.button1 = new System.Windows.Forms.Button();
+ this.button2 = new System.Windows.Forms.Button();
+ this.SuspendLayout();
+ //
+ // propertyGrid1
+ //
+ this.propertyGrid1.HelpVisible = false;
+ this.propertyGrid1.Location = new System.Drawing.Point(12, 12);
+ this.propertyGrid1.Name = "propertyGrid1";
+ this.propertyGrid1.Size = new System.Drawing.Size(270, 383);
+ this.propertyGrid1.TabIndex = 0;
+ this.propertyGrid1.ToolbarVisible = false;
+ //
+ // button1
+ //
+ this.button1.DialogResult = System.Windows.Forms.DialogResult.OK;
+ this.button1.Location = new System.Drawing.Point(126, 401);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(75, 23);
+ this.button1.TabIndex = 1;
+ this.button1.Text = "&Save";
+ this.button1.UseVisualStyleBackColor = true;
+ //
+ // button2
+ //
+ this.button2.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.button2.Location = new System.Drawing.Point(207, 401);
+ this.button2.Name = "button2";
+ this.button2.Size = new System.Drawing.Size(75, 23);
+ this.button2.TabIndex = 2;
+ this.button2.Text = "Cancel";
+ this.button2.UseVisualStyleBackColor = true;
+ //
+ // Config
+ //
+ this.AcceptButton = this.button1;
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.AutoSize = true;
+ this.CancelButton = this.button2;
+ this.ClientSize = new System.Drawing.Size(295, 434);
+ this.ControlBox = false;
+ this.Controls.Add(this.button2);
+ this.Controls.Add(this.button1);
+ this.Controls.Add(this.propertyGrid1);
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+ this.Name = "Config";
+ this.Text = "MultiShortcut Configuration";
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.PropertyGrid propertyGrid1;
+ private System.Windows.Forms.Button button1;
+ private System.Windows.Forms.Button button2;
+ }
+}
\ No newline at end of file
Added: trunk/plugins/MultiShortcut/MultiShortcut/Config.cs
===================================================================
--- trunk/plugins/MultiShortcut/MultiShortcut/Config.cs (rev 0)
+++ trunk/plugins/MultiShortcut/MultiShortcut/Config.cs 2007-01-31 21:34:49 UTC (rev 67)
@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+
+namespace MediaPortal.MultiShortcut
+{
+ public partial class Config : Form
+ {
+ public Config()
+ {
+ InitializeComponent();
+ }
+
+ public void SetPropertyGrid(object o)
+ {
+ propertyGrid1.SelectedObject = o;
+ }
+
+ }
+}
\ No newline at end of file
Added: trunk/plugins/MultiShortcut/MultiShortcut/Config.resx
===================================================================
--- trunk/plugins/MultiShortcut/MultiShortcut/Config.resx (rev 0)
+++ trunk/plugins/MultiShortcut/MultiShortcut/Config.resx 2007-01-31 21:34:49 UTC (rev 67)
@@ -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 ...
[truncated message content] |
|
From: <du...@us...> - 2007-01-31 22:14:08
|
Revision: 68
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=68&view=rev
Author: dukus
Date: 2007-01-31 14:14:04 -0800 (Wed, 31 Jan 2007)
Log Message:
-----------
Added Paths:
-----------
trunk/plugins/mpinstaler/
trunk/plugins/mpinstaler/MPInstaler/
trunk/plugins/mpinstaler/MPInstaler/Build dialog.Designer.cs
trunk/plugins/mpinstaler/MPInstaler/Build dialog.cs
trunk/plugins/mpinstaler/MPInstaler/Build dialog.resx
trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs
trunk/plugins/mpinstaler/MPInstaler/Form1.cs
trunk/plugins/mpinstaler/MPInstaler/Form1.resx
trunk/plugins/mpinstaler/MPInstaler/Form2.Designer.cs
trunk/plugins/mpinstaler/MPInstaler/Form2.cs
trunk/plugins/mpinstaler/MPInstaler/Form2.resx
trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj
trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj.user
trunk/plugins/mpinstaler/MPInstaler/MPInstaler_TemporaryKey.pfx
trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs
trunk/plugins/mpinstaler/MPInstaler/OptionForm.Designer.cs
trunk/plugins/mpinstaler/MPInstaler/OptionForm.cs
trunk/plugins/mpinstaler/MPInstaler/OptionForm.resx
trunk/plugins/mpinstaler/MPInstaler/Program.cs
trunk/plugins/mpinstaler/MPInstaler/Properties/
trunk/plugins/mpinstaler/MPInstaler/Properties/AssemblyInfo.cs
trunk/plugins/mpinstaler/MPInstaler/Properties/Resources.Designer.cs
trunk/plugins/mpinstaler/MPInstaler/Properties/Resources.resx
trunk/plugins/mpinstaler/MPInstaler/Properties/Settings.Designer.cs
trunk/plugins/mpinstaler/MPInstaler/Properties/Settings.settings
trunk/plugins/mpinstaler/MPInstaler/Properties/app.manifest
trunk/plugins/mpinstaler/MPInstaler/SkinSelect.Designer.cs
trunk/plugins/mpinstaler/MPInstaler/SkinSelect.cs
trunk/plugins/mpinstaler/MPInstaler/SkinSelect.resx
trunk/plugins/mpinstaler/MPInstaler/bin/
trunk/plugins/mpinstaler/MPInstaler/bin/Debug/
trunk/plugins/mpinstaler/MPInstaler/bin/Debug/ICSharpCode.SharpZipLib.dll
trunk/plugins/mpinstaler/MPInstaler/bin/Debug/MPInstaler.application
trunk/plugins/mpinstaler/MPInstaler/bin/Debug/MPInstaler.exe
trunk/plugins/mpinstaler/MPInstaler/bin/Debug/MPInstaler.exe.manifest
trunk/plugins/mpinstaler/MPInstaler/bin/Debug/MPInstaler.pdb
trunk/plugins/mpinstaler/MPInstaler/bin/Debug/MPInstaler.vshost.application
trunk/plugins/mpinstaler/MPInstaler/bin/Debug/MPInstaler.vshost.exe
trunk/plugins/mpinstaler/MPInstaler/bin/Debug/MPInstaler.vshost.exe.manifest
trunk/plugins/mpinstaler/MPInstaler/bin/Release/
trunk/plugins/mpinstaler/MPInstaler/bin/Release/ICSharpCode.SharpZipLib.dll
trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.application
trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.exe
trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.exe.manifest
trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.pdb
trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.publish/
trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.publish/MPInstaler.application
trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.publish/MPInstaler_1_0_0_0/
trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.publish/MPInstaler_1_0_0_0/AxInterop.WMPLib.dll.deploy
trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.publish/MPInstaler_1_0_0_0/Core.dll.deploy
trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.publish/MPInstaler_1_0_0_0/Databases.dll.deploy
trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.publish/MPInstaler_1_0_0_0/Dialogs.dll.deploy
trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.publish/MPInstaler_1_0_0_0/DirectShowLib.dll.deploy
trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.publish/MPInstaler_1_0_0_0/ICSharpCode.SharpZipLib.DLL.deploy
trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.publish/MPInstaler_1_0_0_0/Interop.WMPLib.dll.deploy
trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.publish/MPInstaler_1_0_0_0/MPInstaler.exe.deploy
trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.publish/MPInstaler_1_0_0_0/MPInstaler.exe.manifest
trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.publish/MPInstaler_1_0_0_0/MediaPortal.Support.dll.deploy
trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.publish/MPInstaler_1_0_0_0/Utils.dll.deploy
trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.publish/MPInstaler_1_0_0_0/edtftpnet-1.2.2.dll.deploy
trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.publish/setup.exe
trunk/plugins/mpinstaler/MPInstaler/bin/Release/q
trunk/plugins/mpinstaler/MPInstaler/obj/
trunk/plugins/mpinstaler/MPInstaler/obj/Debug/
trunk/plugins/mpinstaler/MPInstaler/obj/Debug/MPInstaler.Build_dialog.resources
trunk/plugins/mpinstaler/MPInstaler/obj/Debug/MPInstaler.Form1.resources
trunk/plugins/mpinstaler/MPInstaler/obj/Debug/MPInstaler.Form2.resources
trunk/plugins/mpinstaler/MPInstaler/obj/Debug/MPInstaler.OptionForm.resources
trunk/plugins/mpinstaler/MPInstaler/obj/Debug/MPInstaler.Properties.Resources.resources
trunk/plugins/mpinstaler/MPInstaler/obj/Debug/MPInstaler.SkinSelect.resources
trunk/plugins/mpinstaler/MPInstaler/obj/Debug/MPInstaler.TrustInfo.xml
trunk/plugins/mpinstaler/MPInstaler/obj/Debug/MPInstaler.application
trunk/plugins/mpinstaler/MPInstaler/obj/Debug/MPInstaler.csproj.GenerateResource.Cache
trunk/plugins/mpinstaler/MPInstaler/obj/Debug/MPInstaler.exe
trunk/plugins/mpinstaler/MPInstaler/obj/Debug/MPInstaler.exe.manifest
trunk/plugins/mpinstaler/MPInstaler/obj/Debug/MPInstaler.pdb
trunk/plugins/mpinstaler/MPInstaler/obj/Debug/ResolveAssemblyReference.cache
trunk/plugins/mpinstaler/MPInstaler/obj/Debug/TempPE/
trunk/plugins/mpinstaler/MPInstaler/obj/MPInstaler.csproj.FileList.txt
trunk/plugins/mpinstaler/MPInstaler/obj/Release/
trunk/plugins/mpinstaler/MPInstaler/obj/Release/MPInstaler.Build_dialog.resources
trunk/plugins/mpinstaler/MPInstaler/obj/Release/MPInstaler.Form1.resources
trunk/plugins/mpinstaler/MPInstaler/obj/Release/MPInstaler.Form2.resources
trunk/plugins/mpinstaler/MPInstaler/obj/Release/MPInstaler.OptionForm.resources
trunk/plugins/mpinstaler/MPInstaler/obj/Release/MPInstaler.Properties.Resources.resources
trunk/plugins/mpinstaler/MPInstaler/obj/Release/MPInstaler.SkinSelect.resources
trunk/plugins/mpinstaler/MPInstaler/obj/Release/MPInstaler.TrustInfo.xml
trunk/plugins/mpinstaler/MPInstaler/obj/Release/MPInstaler.application
trunk/plugins/mpinstaler/MPInstaler/obj/Release/MPInstaler.csproj.GenerateResource.Cache
trunk/plugins/mpinstaler/MPInstaler/obj/Release/MPInstaler.exe
trunk/plugins/mpinstaler/MPInstaler/obj/Release/MPInstaler.exe.manifest
trunk/plugins/mpinstaler/MPInstaler/obj/Release/MPInstaler.pdb
trunk/plugins/mpinstaler/MPInstaler/obj/Release/Refactor/
trunk/plugins/mpinstaler/MPInstaler/obj/Release/ResolveAssemblyReference.cache
trunk/plugins/mpinstaler/MPInstaler/obj/Release/TempPE/
trunk/plugins/mpinstaler/MPInstaler/publish/
trunk/plugins/mpinstaler/MPInstaler/publish/MPInstaler.application
trunk/plugins/mpinstaler/MPInstaler/publish/MPInstaler_1_0_0_0/
trunk/plugins/mpinstaler/MPInstaler/publish/MPInstaler_1_0_0_0/AxInterop.WMPLib.dll.deploy
trunk/plugins/mpinstaler/MPInstaler/publish/MPInstaler_1_0_0_0/Core.dll.deploy
trunk/plugins/mpinstaler/MPInstaler/publish/MPInstaler_1_0_0_0/Databases.dll.deploy
trunk/plugins/mpinstaler/MPInstaler/publish/MPInstaler_1_0_0_0/Dialogs.dll.deploy
trunk/plugins/mpinstaler/MPInstaler/publish/MPInstaler_1_0_0_0/DirectShowLib.dll.deploy
trunk/plugins/mpinstaler/MPInstaler/publish/MPInstaler_1_0_0_0/ICSharpCode.SharpZipLib.DLL.deploy
trunk/plugins/mpinstaler/MPInstaler/publish/MPInstaler_1_0_0_0/Interop.WMPLib.dll.deploy
trunk/plugins/mpinstaler/MPInstaler/publish/MPInstaler_1_0_0_0/MPInstaler.exe.deploy
trunk/plugins/mpinstaler/MPInstaler/publish/MPInstaler_1_0_0_0/MPInstaler.exe.manifest
trunk/plugins/mpinstaler/MPInstaler/publish/MPInstaler_1_0_0_0/MediaPortal.Support.dll.deploy
trunk/plugins/mpinstaler/MPInstaler/publish/MPInstaler_1_0_0_0/Utils.dll.deploy
trunk/plugins/mpinstaler/MPInstaler/publish/MPInstaler_1_0_0_0/edtftpnet-1.2.2.dll.deploy
trunk/plugins/mpinstaler/MPInstaler/publish/MPInstaler_1_0_0_0.application
trunk/plugins/mpinstaler/MPInstaler/publish/setup.exe
trunk/plugins/mpinstaler/MPInstaler.sln
trunk/plugins/mpinstaler/MPInstaler.suo
Added: trunk/plugins/mpinstaler/MPInstaler/Build dialog.Designer.cs
===================================================================
--- trunk/plugins/mpinstaler/MPInstaler/Build dialog.Designer.cs (rev 0)
+++ trunk/plugins/mpinstaler/MPInstaler/Build dialog.Designer.cs 2007-01-31 22:14:04 UTC (rev 68)
@@ -0,0 +1,118 @@
+namespace MPInstaler
+{
+ partial class Build_dialog
+ {
+ /// <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.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
+ this.textBox1 = new System.Windows.Forms.TextBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.button1 = new System.Windows.Forms.Button();
+ this.button2 = new System.Windows.Forms.Button();
+ this.button3 = new System.Windows.Forms.Button();
+ this.SuspendLayout();
+ //
+ // saveFileDialog1
+ //
+ this.saveFileDialog1.DefaultExt = "mpi";
+ this.saveFileDialog1.Filter = "MPI files|*.mpi|ZIP files|*.zip|All files|*.*";
+ //
+ // textBox1
+ //
+ this.textBox1.Location = new System.Drawing.Point(12, 23);
+ this.textBox1.Name = "textBox1";
+ this.textBox1.Size = new System.Drawing.Size(484, 20);
+ this.textBox1.TabIndex = 0;
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(9, 7);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(58, 13);
+ this.label1.TabIndex = 1;
+ this.label1.Text = "File name :";
+ //
+ // button1
+ //
+ this.button1.Location = new System.Drawing.Point(502, 23);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(27, 23);
+ this.button1.TabIndex = 2;
+ this.button1.Text = "...";
+ this.button1.UseVisualStyleBackColor = true;
+ this.button1.Click += new System.EventHandler(this.button1_Click);
+ //
+ // button2
+ //
+ this.button2.Location = new System.Drawing.Point(12, 136);
+ this.button2.Name = "button2";
+ this.button2.Size = new System.Drawing.Size(75, 23);
+ this.button2.TabIndex = 3;
+ this.button2.Text = "Build";
+ this.button2.UseVisualStyleBackColor = true;
+ this.button2.Click += new System.EventHandler(this.button2_Click);
+ //
+ // button3
+ //
+ this.button3.Location = new System.Drawing.Point(421, 136);
+ this.button3.Name = "button3";
+ this.button3.Size = new System.Drawing.Size(75, 23);
+ this.button3.TabIndex = 4;
+ this.button3.Text = "OK";
+ this.button3.UseVisualStyleBackColor = true;
+ this.button3.Click += new System.EventHandler(this.button3_Click);
+ //
+ // Build_dialog
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(537, 171);
+ this.Controls.Add(this.button3);
+ this.Controls.Add(this.button2);
+ this.Controls.Add(this.button1);
+ this.Controls.Add(this.label1);
+ this.Controls.Add(this.textBox1);
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "Build_dialog";
+ this.Text = "Build";
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.SaveFileDialog saveFileDialog1;
+ private System.Windows.Forms.TextBox textBox1;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Button button1;
+ private System.Windows.Forms.Button button2;
+ private System.Windows.Forms.Button button3;
+ }
+}
\ No newline at end of file
Added: trunk/plugins/mpinstaler/MPInstaler/Build dialog.cs
===================================================================
--- trunk/plugins/mpinstaler/MPInstaler/Build dialog.cs (rev 0)
+++ trunk/plugins/mpinstaler/MPInstaler/Build dialog.cs 2007-01-31 22:14:04 UTC (rev 68)
@@ -0,0 +1,50 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+
+namespace MPInstaler
+{
+ public partial class Build_dialog : Form
+ {
+ public MPinstalerStruct _struct = new MPinstalerStruct();
+ public Build_dialog()
+ {
+ InitializeComponent();
+ }
+ public Build_dialog(MPinstalerStruct st)
+ {
+ _struct = st;
+ InitializeComponent();
+ textBox1.Text = _struct.BuildFileName;
+ }
+
+ private void button1_Click(object sender, EventArgs e)
+ {
+ if (saveFileDialog1.ShowDialog(this) == DialogResult.OK)
+ {
+ textBox1.Text = saveFileDialog1.FileName;
+ }
+
+ }
+
+ private void button3_Click(object sender, EventArgs e)
+ {
+ _struct.BuildFileName = textBox1.Text;
+ this.Hide();
+ }
+
+ private void button2_Click(object sender, EventArgs e)
+ {
+ _struct.BuildFileName = textBox1.Text;
+ _struct.BuilFile();
+ }
+ public void onbuild()
+ {
+
+ }
+ }
+}
\ No newline at end of file
Added: trunk/plugins/mpinstaler/MPInstaler/Build dialog.resx
===================================================================
--- trunk/plugins/mpinstaler/MPInstaler/Build dialog.resx (rev 0)
+++ trunk/plugins/mpinstaler/MPInstaler/Build dialog.resx 2007-01-31 22:14:04 UTC (rev 68)
@@ -0,0 +1,123 @@
+<?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="saveFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>17, 17</value>
+ </metadata>
+</root>
\ No newline at end of file
Added: trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs
===================================================================
--- trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs (rev 0)
+++ trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs 2007-01-31 22:14:04 UTC (rev 68)
@@ -0,0 +1,380 @@
+namespace MPInstaler
+{
+ partial class Form1
+ {
+ /// <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();
+ this.menuStrip1 = new System.Windows.Forms.MenuStrip();
+ this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.newToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.openProiectToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.sToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.saveProiectAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.buildToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
+ this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
+ this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.addToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.windowPluginToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.windowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.procesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.subtitleToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.tagReadersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.externalPlayersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.skinToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.componentToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.mediaToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.fullToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.languageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.bossview = new System.Windows.Forms.ListView();
+ this.columnHeader1 = new System.Windows.Forms.ColumnHeader();
+ this.columnHeader2 = new System.Windows.Forms.ColumnHeader();
+ this.columnHeader3 = new System.Windows.Forms.ColumnHeader();
+ this.columnHeader4 = new System.Windows.Forms.ColumnHeader();
+ this.columnHeader5 = new System.Windows.Forms.ColumnHeader();
+ this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this.toolStripComboBox1 = new System.Windows.Forms.ToolStripMenuItem();
+ this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
+ this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.menuStrip1.SuspendLayout();
+ this.contextMenuStrip1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // menuStrip1
+ //
+ this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.fileToolStripMenuItem,
+ this.addToolStripMenuItem});
+ this.menuStrip1.Location = new System.Drawing.Point(0, 0);
+ this.menuStrip1.Name = "menuStrip1";
+ this.menuStrip1.Size = new System.Drawing.Size(675, 24);
+ this.menuStrip1.TabIndex = 1;
+ this.menuStrip1.Text = "menuStrip1";
+ //
+ // fileToolStripMenuItem
+ //
+ this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.newToolStripMenuItem,
+ this.openProiectToolStripMenuItem,
+ this.sToolStripMenuItem,
+ this.saveProiectAsToolStripMenuItem,
+ this.buildToolStripMenuItem,
+ this.toolStripSeparator1,
+ this.optionsToolStripMenuItem,
+ this.toolStripSeparator2,
+ this.exitToolStripMenuItem});
+ this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
+ this.fileToolStripMenuItem.Size = new System.Drawing.Size(35, 20);
+ this.fileToolStripMenuItem.Text = "File";
+ //
+ // newToolStripMenuItem
+ //
+ this.newToolStripMenuItem.Name = "newToolStripMenuItem";
+ this.newToolStripMenuItem.Size = new System.Drawing.Size(168, 22);
+ this.newToolStripMenuItem.Text = "New Proiect";
+ this.newToolStripMenuItem.Click += new System.EventHandler(this.newToolStripMenuItem_Click);
+ //
+ // openProiectToolStripMenuItem
+ //
+ this.openProiectToolStripMenuItem.Name = "openProiectToolStripMenuItem";
+ this.openProiectToolStripMenuItem.Size = new System.Drawing.Size(168, 22);
+ this.openProiectToolStripMenuItem.Text = "Open Proiect ..";
+ this.openProiectToolStripMenuItem.Click += new System.EventHandler(this.openProiectToolStripMenuItem_Click);
+ //
+ // sToolStripMenuItem
+ //
+ this.sToolStripMenuItem.Name = "sToolStripMenuItem";
+ this.sToolStripMenuItem.Size = new System.Drawing.Size(168, 22);
+ this.sToolStripMenuItem.Text = "Save Proiect";
+ this.sToolStripMenuItem.Click += new System.EventHandler(this.sToolStripMenuItem_Click);
+ //
+ // saveProiectAsToolStripMenuItem
+ //
+ this.saveProiectAsToolStripMenuItem.Name = "saveProiectAsToolStripMenuItem";
+ this.saveProiectAsToolStripMenuItem.Size = new System.Drawing.Size(168, 22);
+ this.saveProiectAsToolStripMenuItem.Text = "Save Proiect As..";
+ //
+ // buildToolStripMenuItem
+ //
+ this.buildToolStripMenuItem.Name = "buildToolStripMenuItem";
+ this.buildToolStripMenuItem.Size = new System.Drawing.Size(168, 22);
+ this.buildToolStripMenuItem.Text = "Build";
+ this.buildToolStripMenuItem.Click += new System.EventHandler(this.buildToolStripMenuItem_Click);
+ //
+ // toolStripSeparator1
+ //
+ this.toolStripSeparator1.Name = "toolStripSeparator1";
+ this.toolStripSeparator1.Size = new System.Drawing.Size(165, 6);
+ //
+ // optionsToolStripMenuItem
+ //
+ this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem";
+ this.optionsToolStripMenuItem.Size = new System.Drawing.Size(168, 22);
+ this.optionsToolStripMenuItem.Text = "Options";
+ this.optionsToolStripMenuItem.Click += new System.EventHandler(this.optionsToolStripMenuItem_Click);
+ //
+ // toolStripSeparator2
+ //
+ this.toolStripSeparator2.Name = "toolStripSeparator2";
+ this.toolStripSeparator2.Size = new System.Drawing.Size(165, 6);
+ //
+ // exitToolStripMenuItem
+ //
+ this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
+ this.exitToolStripMenuItem.Size = new System.Drawing.Size(168, 22);
+ this.exitToolStripMenuItem.Text = "Exit";
+ //
+ // addToolStripMenuItem
+ //
+ this.addToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.windowPluginToolStripMenuItem,
+ this.skinToolStripMenuItem,
+ this.languageToolStripMenuItem});
+ this.addToolStripMenuItem.Name = "addToolStripMenuItem";
+ this.addToolStripMenuItem.Size = new System.Drawing.Size(38, 20);
+ this.addToolStripMenuItem.Text = "Add";
+ //
+ // windowPluginToolStripMenuItem
+ //
+ this.windowPluginToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.windowToolStripMenuItem,
+ this.procesToolStripM...
[truncated message content] |
|
From: Fnee F. <fn...@fr...> - 2007-02-01 07:20:22
|
Hi dukus, I see your plugin on the SVN MP plugins site. What is it purpose ? Is it = to install plugin or something like this ? I download the sources and try to compile it but a reference is missing : ICSharpCode.SharpZipLib Where can I find it ? Can you put it with sources ? Thanks zebons ----- Original Message -----=20 From: <du...@us...> To: <mp-...@li...> Sent: Wednesday, January 31, 2007 11:14 PM Subject: [Mp-plugins-svn] SF.net SVN: mp-plugins: [68] trunk/plugins > Revision: 68 > http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=3D68&vie= w=3Drev > Author: dukus > Date: 2007-01-31 14:14:04 -0800 (Wed, 31 Jan 2007) > > Log Message: > ----------- > > > Added Paths: > ----------- > trunk/plugins/mpinstaler/ > trunk/plugins/mpinstaler/MPInstaler/ > trunk/plugins/mpinstaler/MPInstaler/Build dialog.Designer.cs > trunk/plugins/mpinstaler/MPInstaler/Build dialog.cs > trunk/plugins/mpinstaler/MPInstaler/Build dialog.resx > trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs > trunk/plugins/mpinstaler/MPInstaler/Form1.cs > trunk/plugins/mpinstaler/MPInstaler/Form1.resx > trunk/plugins/mpinstaler/MPInstaler/Form2.Designer.cs > trunk/plugins/mpinstaler/MPInstaler/Form2.cs > trunk/plugins/mpinstaler/MPInstaler/Form2.resx > trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj > trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj.user > trunk/plugins/mpinstaler/MPInstaler/MPInstaler_TemporaryKey.pfx > trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs > trunk/plugins/mpinstaler/MPInstaler/OptionForm.Designer.cs > trunk/plugins/mpinstaler/MPInstaler/OptionForm.cs > trunk/plugins/mpinstaler/MPInstaler/OptionForm.resx > trunk/plugins/mpinstaler/MPInstaler/Program.cs > trunk/plugins/mpinstaler/MPInstaler/Properties/ > trunk/plugins/mpinstaler/MPInstaler/Properties/AssemblyInfo.cs > trunk/plugins/mpinstaler/MPInstaler/Properties/Resources.Designer.cs > trunk/plugins/mpinstaler/MPInstaler/Properties/Resources.resx > trunk/plugins/mpinstaler/MPInstaler/Properties/Settings.Designer.cs > trunk/plugins/mpinstaler/MPInstaler/Properties/Settings.settings > trunk/plugins/mpinstaler/MPInstaler/Properties/app.manifest > trunk/plugins/mpinstaler/MPInstaler/SkinSelect.Designer.cs > trunk/plugins/mpinstaler/MPInstaler/SkinSelect.cs > trunk/plugins/mpinstaler/MPInstaler/SkinSelect.resx > trunk/plugins/mpinstaler/MPInstaler/bin/ > trunk/plugins/mpinstaler/MPInstaler/bin/Debug/ > > trunk/plugins/mpinstaler/MPInstaler/bin/Debug/ICSharpCode.SharpZipLib.d= ll > trunk/plugins/mpinstaler/MPInstaler/bin/Debug/MPInstaler.application > trunk/plugins/mpinstaler/MPInstaler/bin/Debug/MPInstaler.exe > trunk/plugins/mpinstaler/MPInstaler/bin/Debug/MPInstaler.exe.manifes= t > trunk/plugins/mpinstaler/MPInstaler/bin/Debug/MPInstaler.pdb > > trunk/plugins/mpinstaler/MPInstaler/bin/Debug/MPInstaler.vshost.applica= tion > trunk/plugins/mpinstaler/MPInstaler/bin/Debug/MPInstaler.vshost.exe > > trunk/plugins/mpinstaler/MPInstaler/bin/Debug/MPInstaler.vshost.exe.man= ifest > trunk/plugins/mpinstaler/MPInstaler/bin/Release/ > > trunk/plugins/mpinstaler/MPInstaler/bin/Release/ICSharpCode.SharpZipLib= .dll > trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.applicati= on > trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.exe > trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.exe.manif= est > trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.pdb > trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.publish/ > > trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.publish/MPIn= staler.application > > trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.publish/MPIn= staler_1_0_0_0/ > > trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.publish/MPIn= staler_1_0_0_0/AxInterop.WMPLib.dll.deploy > > trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.publish/MPIn= staler_1_0_0_0/Core.dll.deploy > > trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.publish/MPIn= staler_1_0_0_0/Databases.dll.deploy > > trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.publish/MPIn= staler_1_0_0_0/Dialogs.dll.deploy > > trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.publish/MPIn= staler_1_0_0_0/DirectShowLib.dll.deploy > > trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.publish/MPIn= staler_1_0_0_0/ICSharpCode.SharpZipLib.DLL.deploy > > trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.publish/MPIn= staler_1_0_0_0/Interop.WMPLib.dll.deploy > > trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.publish/MPIn= staler_1_0_0_0/MPInstaler.exe.deploy > > trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.publish/MPIn= staler_1_0_0_0/MPInstaler.exe.manifest > > trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.publish/MPIn= staler_1_0_0_0/MediaPortal.Support.dll.deploy > > trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.publish/MPIn= staler_1_0_0_0/Utils.dll.deploy > > trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.publish/MPIn= staler_1_0_0_0/edtftpnet-1.2.2.dll.deploy > > trunk/plugins/mpinstaler/MPInstaler/bin/Release/MPInstaler.publish/setu= p.exe > trunk/plugins/mpinstaler/MPInstaler/bin/Release/q > trunk/plugins/mpinstaler/MPInstaler/obj/ > trunk/plugins/mpinstaler/MPInstaler/obj/Debug/ > > trunk/plugins/mpinstaler/MPInstaler/obj/Debug/MPInstaler.Build_dialog.r= esources > > trunk/plugins/mpinstaler/MPInstaler/obj/Debug/MPInstaler.Form1.resource= s > > trunk/plugins/mpinstaler/MPInstaler/obj/Debug/MPInstaler.Form2.resource= s > > trunk/plugins/mpinstaler/MPInstaler/obj/Debug/MPInstaler.OptionForm.res= ources > > trunk/plugins/mpinstaler/MPInstaler/obj/Debug/MPInstaler.Properties.Res= ources.resources > > trunk/plugins/mpinstaler/MPInstaler/obj/Debug/MPInstaler.SkinSelect.res= ources > trunk/plugins/mpinstaler/MPInstaler/obj/Debug/MPInstaler.TrustInfo.x= ml > trunk/plugins/mpinstaler/MPInstaler/obj/Debug/MPInstaler.application > > trunk/plugins/mpinstaler/MPInstaler/obj/Debug/MPInstaler.csproj.Generat= eResource.Cache > trunk/plugins/mpinstaler/MPInstaler/obj/Debug/MPInstaler.exe > trunk/plugins/mpinstaler/MPInstaler/obj/Debug/MPInstaler.exe.manifes= t > trunk/plugins/mpinstaler/MPInstaler/obj/Debug/MPInstaler.pdb > > trunk/plugins/mpinstaler/MPInstaler/obj/Debug/ResolveAssemblyReference.= cache > trunk/plugins/mpinstaler/MPInstaler/obj/Debug/TempPE/ > trunk/plugins/mpinstaler/MPInstaler/obj/MPInstaler.csproj.FileList.t= xt > trunk/plugins/mpinstaler/MPInstaler/obj/Release/ > > trunk/plugins/mpinstaler/MPInstaler/obj/Release/MPInstaler.Build_dialog= .resources > > trunk/plugins/mpinstaler/MPInstaler/obj/Release/MPInstaler.Form1.resour= ces > > trunk/plugins/mpinstaler/MPInstaler/obj/Release/MPInstaler.Form2.resour= ces > > trunk/plugins/mpinstaler/MPInstaler/obj/Release/MPInstaler.OptionForm.r= esources > > trunk/plugins/mpinstaler/MPInstaler/obj/Release/MPInstaler.Properties.R= esources.resources > > trunk/plugins/mpinstaler/MPInstaler/obj/Release/MPInstaler.SkinSelect.r= esources > > trunk/plugins/mpinstaler/MPInstaler/obj/Release/MPInstaler.TrustInfo.xm= l > trunk/plugins/mpinstaler/MPInstaler/obj/Release/MPInstaler.applicati= on > > trunk/plugins/mpinstaler/MPInstaler/obj/Release/MPInstaler.csproj.Gener= ateResource.Cache > trunk/plugins/mpinstaler/MPInstaler/obj/Release/MPInstaler.exe > trunk/plugins/mpinstaler/MPInstaler/obj/Release/MPInstaler.exe.manif= est > trunk/plugins/mpinstaler/MPInstaler/obj/Release/MPInstaler.pdb > trunk/plugins/mpinstaler/MPInstaler/obj/Release/Refactor/ > > trunk/plugins/mpinstaler/MPInstaler/obj/Release/ResolveAssemblyReferenc= e.cache > trunk/plugins/mpinstaler/MPInstaler/obj/Release/TempPE/ > trunk/plugins/mpinstaler/MPInstaler/publish/ > trunk/plugins/mpinstaler/MPInstaler/publish/MPInstaler.application > trunk/plugins/mpinstaler/MPInstaler/publish/MPInstaler_1_0_0_0/ > > trunk/plugins/mpinstaler/MPInstaler/publish/MPInstaler_1_0_0_0/AxIntero= p.WMPLib.dll.deploy > > trunk/plugins/mpinstaler/MPInstaler/publish/MPInstaler_1_0_0_0/Core.dll= .deploy > > trunk/plugins/mpinstaler/MPInstaler/publish/MPInstaler_1_0_0_0/Database= s.dll.deploy > > trunk/plugins/mpinstaler/MPInstaler/publish/MPInstaler_1_0_0_0/Dialogs.= dll.deploy > > trunk/plugins/mpinstaler/MPInstaler/publish/MPInstaler_1_0_0_0/DirectSh= owLib.dll.deploy > > trunk/plugins/mpinstaler/MPInstaler/publish/MPInstaler_1_0_0_0/ICSharpC= ode.SharpZipLib.DLL.deploy > > trunk/plugins/mpinstaler/MPInstaler/publish/MPInstaler_1_0_0_0/Interop.= WMPLib.dll.deploy > > trunk/plugins/mpinstaler/MPInstaler/publish/MPInstaler_1_0_0_0/MPInstal= er.exe.deploy > > trunk/plugins/mpinstaler/MPInstaler/publish/MPInstaler_1_0_0_0/MPInstal= er.exe.manifest > > trunk/plugins/mpinstaler/MPInstaler/publish/MPInstaler_1_0_0_0/MediaPor= tal.Support.dll.deploy > > trunk/plugins/mpinstaler/MPInstaler/publish/MPInstaler_1_0_0_0/Utils.dl= l.deploy > > trunk/plugins/mpinstaler/MPInstaler/publish/MPInstaler_1_0_0_0/edtftpne= t-1.2.2.dll.deploy > > trunk/plugins/mpinstaler/MPInstaler/publish/MPInstaler_1_0_0_0.applicat= ion > trunk/plugins/mpinstaler/MPInstaler/publish/setup.exe > trunk/plugins/mpinstaler/MPInstaler.sln > trunk/plugins/mpinstaler/MPInstaler.suo > > Added: trunk/plugins/mpinstaler/MPInstaler/Build dialog.Designer.cs > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- trunk/plugins/mpinstaler/MPInstaler/Build dialog.Designer.cs > (rev 0) > +++ trunk/plugins/mpinstaler/MPInstaler/Build dialog.Designer.cs > 2007-01-31 22:14:04 UTC (rev 68) > @@ -0,0 +1,118 @@ > +namespace MPInstaler > +{ > + partial class Build_dialog > + { > + /// <summary> > + /// Required designer variable. > + /// </summary> > + private System.ComponentModel.IContainer components =3D null; > + > + /// <summary> > + /// Clean up any resources being used. > + /// </summary> > + /// <param name=3D"disposing">true if managed resources should be > disposed; otherwise, false.</param> > + protected override void Dispose(bool disposing) > + { > + if (disposing && (components !=3D 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.saveFileDialog1 =3D new System.Windows.Forms.SaveFileDialog= (); > + this.textBox1 =3D new System.Windows.Forms.TextBox(); > + this.label1 =3D new System.Windows.Forms.Label(); > + this.button1 =3D new System.Windows.Forms.Button(); > + this.button2 =3D new System.Windows.Forms.Button(); > + this.button3 =3D new System.Windows.Forms.Button(); > + this.SuspendLayout(); > + // > + // saveFileDialog1 > + // > + this.saveFileDialog1.DefaultExt =3D "mpi"; > + this.saveFileDialog1.Filter =3D "MPI files|*.mpi|ZIP files|*.zip= |All > files|*.*"; > + // > + // textBox1 > + // > + this.textBox1.Location =3D new System.Drawing.Point(12, 23); > + this.textBox1.Name =3D "textBox1"; > + this.textBox1.Size =3D new System.Drawing.Size(484, 20); > + this.textBox1.TabIndex =3D 0; > + // > + // label1 > + // > + this.label1.AutoSize =3D true; > + this.label1.Location =3D new System.Drawing.Point(9, 7); > + this.label1.Name =3D "label1"; > + this.label1.Size =3D new System.Drawing.Size(58, 13); > + this.label1.TabIndex =3D 1; > + this.label1.Text =3D "File name :"; > + // > + // button1 > + // > + this.button1.Location =3D new System.Drawing.Point(502, 23); > + this.button1.Name =3D "button1"; > + this.button1.Size =3D new System.Drawing.Size(27, 23); > + this.button1.TabIndex =3D 2; > + this.button1.Text =3D "..."; > + this.button1.UseVisualStyleBackColor =3D true; > + this.button1.Click +=3D new System.EventHandler(this.button1_Cli= ck); > + // > + // button2 > + // > + this.button2.Location =3D new System.Drawing.Point(12, 136); > + this.button2.Name =3D "button2"; > + this.button2.Size =3D new System.Drawing.Size(75, 23); > + this.button2.TabIndex =3D 3; > + this.button2.Text =3D "Build"; > + this.button2.UseVisualStyleBackColor =3D true; > + this.button2.Click +=3D new System.EventHandler(this.button2_Cli= ck); > + // > + // button3 > + // > + this.button3.Location =3D new System.Drawing.Point(421, 136); > + this.button3.Name =3D "button3"; > + this.button3.Size =3D new System.Drawing.Size(75, 23); > + this.button3.TabIndex =3D 4; > + this.button3.Text =3D "OK"; > + this.button3.UseVisualStyleBackColor =3D true; > + this.button3.Click +=3D new System.EventHandler(this.button3_Cli= ck); > + // > + // Build_dialog > + // > + this.AutoScaleDimensions =3D new System.Drawing.SizeF(6F, 13F); > + this.AutoScaleMode =3D System.Windows.Forms.AutoScaleMode.Font; > + this.ClientSize =3D new System.Drawing.Size(537, 171); > + this.Controls.Add(this.button3); > + this.Controls.Add(this.button2); > + this.Controls.Add(this.button1); > + this.Controls.Add(this.label1); > + this.Controls.Add(this.textBox1); > + this.MaximizeBox =3D false; > + this.MinimizeBox =3D false; > + this.Name =3D "Build_dialog"; > + this.Text =3D "Build"; > + this.ResumeLayout(false); > + this.PerformLayout(); > + > + } > + > + #endregion > + > + private System.Windows.Forms.SaveFileDialog saveFileDialog1; > + private System.Windows.Forms.TextBox textBox1; > + private System.Windows.Forms.Label label1; > + private System.Windows.Forms.Button button1; > + private System.Windows.Forms.Button button2; > + private System.Windows.Forms.Button button3; > + } > +} > \ No newline at end of file > > Added: trunk/plugins/mpinstaler/MPInstaler/Build dialog.cs > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- trunk/plugins/mpinstaler/MPInstaler/Build dialog.cs > (rev 0) > +++ trunk/plugins/mpinstaler/MPInstaler/Build dialog.cs 2007-01-31 > 22:14:04 UTC (rev 68) > @@ -0,0 +1,50 @@ > +using System; > +using System.Collections.Generic; > +using System.ComponentModel; > +using System.Data; > +using System.Drawing; > +using System.Text; > +using System.Windows.Forms; > + > +namespace MPInstaler > +{ > + public partial class Build_dialog : Form > + { > + public MPinstalerStruct _struct =3D new MPinstalerStruct(); > + public Build_dialog() > + { > + InitializeComponent(); > + } > + public Build_dialog(MPinstalerStruct st) > + { > + _struct =3D st; > + InitializeComponent(); > + textBox1.Text =3D _struct.BuildFileName; > + } > + > + private void button1_Click(object sender, EventArgs e) > + { > + if (saveFileDialog1.ShowDialog(this) =3D=3D DialogResult.OK) > + { > + textBox1.Text =3D saveFileDialog1.FileName; > + } > + > + } > + > + private void button3_Click(object sender, EventArgs e) > + { > + _struct.BuildFileName =3D textBox1.Text; > + this.Hide(); > + } > + > + private void button2_Click(object sender, EventArgs e) > + { > + _struct.BuildFileName =3D textBox1.Text; > + _struct.BuilFile(); > + } > + public void onbuild() > + { > + > + } > + } > +} > \ No newline at end of file > > Added: trunk/plugins/mpinstaler/MPInstaler/Build dialog.resx > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- trunk/plugins/mpinstaler/MPInstaler/Build dialog.resx > (rev 0) > +++ trunk/plugins/mpinstaler/MPInstaler/Build dialog.resx 2007-01-31 > 22:14:04 UTC (rev 68) > @@ -0,0 +1,123 @@ > +<?xml version=3D"1.0" encoding=3D"utf-8"?> > +<root> > + <!--=20 > + 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=3D"resmimetype">text/microsoft-resx</resheader> > + <resheader name=3D"version">2.0</resheader> > + <resheader name=3D"reader">System.Resources.ResXResourceReader, > System.Windows.Forms, ...</resheader> > + <resheader name=3D"writer">System.Resources.ResXResourceWriter, > System.Windows.Forms, ...</resheader> > + <data name=3D"Name1"><value>this is my long string</value><comment= >this > is a comment</comment></data> > + <data name=3D"Color1" type=3D"System.Drawing.Color, > System.Drawing">Blue</data> > + <data name=3D"Bitmap1" > mimetype=3D"application/x-microsoft.net.object.binary.base64"> > + <value>[base64 mime encoded serialized .NET Framework > object]</value> > + </data> > + <data name=3D"Icon1" type=3D"System.Drawing.Icon, System.Drawing" > mimetype=3D"application/x-microsoft.net.object.bytearray.base64"> > + <value>[base64 mime encoded string representing a byte array f= orm > 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 for= mat > + 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.SoapFormatt= er > + : 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=3D"root" xmlns=3D"" > xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema" > xmlns:msdata=3D"urn:schemas-microsoft-com:xml-msdata"> > + <xsd:import namespace=3D"http://www.w3.org/XML/1998/namespace" /> > + <xsd:element name=3D"root" msdata:IsDataSet=3D"true"> > + <xsd:complexType> > + <xsd:choice maxOccurs=3D"unbounded"> > + <xsd:element name=3D"metadata"> > + <xsd:complexType> > + <xsd:sequence> > + <xsd:element name=3D"value" type=3D"xsd:string" minOcc= urs=3D"0" > /> > + </xsd:sequence> > + <xsd:attribute name=3D"name" use=3D"required" type=3D"xs= d:string" > /> > + <xsd:attribute name=3D"type" type=3D"xsd:string" /> > + <xsd:attribute name=3D"mimetype" type=3D"xsd:string" /> > + <xsd:attribute ref=3D"xml:space" /> > + </xsd:complexType> > + </xsd:element> > + <xsd:element name=3D"assembly"> > + <xsd:complexType> > + <xsd:attribute name=3D"alias" type=3D"xsd:string" /> > + <xsd:attribute name=3D"name" type=3D"xsd:string" /> > + </xsd:complexType> > + </xsd:element> > + <xsd:element name=3D"data"> > + <xsd:complexType> > + <xsd:sequence> > + <xsd:element name=3D"value" type=3D"xsd:string" minOcc= urs=3D"0" > msdata:Ordinal=3D"1" /> > + <xsd:element name=3D"comment" type=3D"xsd:string" > minOccurs=3D"0" msdata:Ordinal=3D"2" /> > + </xsd:sequence> > + <xsd:attribute name=3D"name" type=3D"xsd:string" use=3D"= required" > msdata:Ordinal=3D"1" /> > + <xsd:attribute name=3D"type" type=3D"xsd:string" > msdata:Ordinal=3D"3" /> > + <xsd:attribute name=3D"mimetype" type=3D"xsd:string" > msdata:Ordinal=3D"4" /> > + <xsd:attribute ref=3D"xml:space" /> > + </xsd:complexType> > + </xsd:element> > + <xsd:element name=3D"resheader"> > + <xsd:complexType> > + <xsd:sequence> > + <xsd:element name=3D"value" type=3D"xsd:string" minOcc= urs=3D"0" > msdata:Ordinal=3D"1" /> > + </xsd:sequence> > + <xsd:attribute name=3D"name" type=3D"xsd:string" use=3D"= required" > /> > + </xsd:complexType> > + </xsd:element> > + </xsd:choice> > + </xsd:complexType> > + </xsd:element> > + </xsd:schema> > + <resheader name=3D"resmimetype"> > + <value>text/microsoft-resx</value> > + </resheader> > + <resheader name=3D"version"> > + <value>2.0</value> > + </resheader> > + <resheader name=3D"reader"> > + <value>System.Resources.ResXResourceReader, System.Windows.Forms, > Version=3D2.0.0.0, Culture=3Dneutral, PublicKeyToken=3Db77a5c561934e089= </value> > + </resheader> > + <resheader name=3D"writer"> > + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, > Version=3D2.0.0.0, Culture=3Dneutral, PublicKeyToken=3Db77a5c561934e089= </value> > + </resheader> > + <metadata name=3D"saveFileDialog1.TrayLocation" > type=3D"System.Drawing.Point, System.Drawing, Version=3D2.0.0.0, > Culture=3Dneutral, PublicKeyToken=3Db03f5f7f11d50a3a"> > + <value>17, 17</value> > + </metadata> > +</root> > \ No newline at end of file > > Added: trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs > (rev 0) > +++ trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs 2007-01-31 > 22:14:04 UTC (rev 68) > @@ -0,0 +1,380 @@ > +namespace MPInstaler > +{ > + partial class Form1 > + { > + /// <summary> > + /// Required designer variable. > + /// </summary> > + private System.ComponentModel.IContainer components =3D null; > + > + /// <summary> > + /// Clean up any resources being used. > + /// </summary> > + /// <param name=3D"disposing">true if managed resources should= be > disposed; otherwise, false.</param> > + protected override void Dispose(bool disposing) > + { > + if (disposing && (components !=3D 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 =3D new System.ComponentModel.Container(); > + this.menuStrip1 =3D new System.Windows.Forms.MenuStrip(); > + this.fileToolStripMenuItem =3D new > System.Windows.Forms.ToolStripMenuItem(); > + this.newToolStripMenuItem =3D new > System.Windows.Forms.ToolStripMenuItem(); > + this.openProiectToolStripMenuItem =3D new > System.Windows.Forms.ToolStripMenuItem(); > + this.sToolStripMenuItem =3D new > System.Windows.Forms.ToolStripMenuItem(); > + this.saveProiectAsToolStripMenuItem =3D new > System.Windows.Forms.ToolStripMenuItem(); > + this.buildToolStripMenuItem =3D new > System.Windows.Forms.ToolStripMenuItem(); > + this.toolStripSeparator1 =3D new > System.Windows.Forms.ToolStripSeparator(); > + this.optionsToolStripMenuItem =3D new > System.Windows.Forms.ToolStripMenuItem(); > + this.toolStripSeparator2 =3D new > System.Windows.Forms.ToolStripSeparator(); > + this.exitToolStripMenuItem =3D new > System.Windows.Forms.ToolStripMenuItem(); > + this.addToolStripMenuItem =3D new > System.Windows.Forms.ToolStripMenuItem(); > + this.windowPluginToolStripMenuItem =3D new > System.Windows.Forms.ToolStripMenuItem(); > + this.windowToolStripMenuItem =3D new > System.Windows.Forms.ToolStripMenuItem(); > + this.procesToolStripMenuItem =3D new > System.Windows.Forms.ToolStripMenuItem(); > + this.subtitleToolStripMenuItem =3D new > System.Windows.Forms.ToolStripMenuItem(); > + this.tagReadersToolStripMenuItem =3D new > System.Windows.Forms.ToolStripMenuItem(); > + this.externalPlayersToolStripMenuItem =3D new > System.Windows.Forms.ToolStripMenuItem(); > + this.skinToolStripMenuItem =3D new > System.Windows.Forms.ToolStripMenuItem(); > + this.componentToolStripMenuItem =3D new > System.Windows.Forms.ToolStripMenuItem(); > + this.mediaToolStripMenuItem =3D new > System.Windows.Forms.ToolStripMenuItem(); > + this.fullToolStripMenuItem =3D new > System.Windows.Forms.ToolStripMenuItem(); > + this.languageToolStripMenuItem =3D new > System.Windows.Forms.ToolStripMenuItem(); > + this.bossview =3D new System.Windows.Forms.ListView(); > + this.columnHeader1 =3D new System.Windows.Forms.ColumnHeader= (); > + this.columnHeader2 =3D new System.Windows.Forms.ColumnHeader= (); > + this.columnHeader3 =3D new System.Windows.Forms.ColumnHeader= (); > + this.columnHeader4 =3D new System.Windows.Forms.ColumnHeader= (); > + this.columnHeader5 =3D new System.Windows.Forms.ColumnHeader= (); > + this.contextMenuStrip1 =3D new > System.Windows.Forms.ContextMenuStrip(this.components); > + this.toolStripComboBox1 =3D new > System.Windows.Forms.ToolStripMenuItem(); > + this.openFileDialog1 =3D new > System.Windows.Forms.OpenFileDialog(); > + this.saveFileDialog1 =3D new > System.Windows.Forms.SaveFileDialog(); > + this.groupBox1 =3D new System.Windows.Forms.GroupBox(); > + this.menuStrip1.SuspendLayout(); > + this.contextMenuStrip1.SuspendLayout(); > + this.SuspendLayout(); > + // > + // menuStrip1 > + // > + this.menuStrip1.Items.AddRange(new > System.Windows.Forms.ToolStripItem[] { > + this.fileToolStripMenuItem, > + this.addToolStripMenuItem}); > + this.menuStrip1.Location =3D new System.Drawing.Point(0, 0); > + this.menuStrip1.Name =3D "menuStrip1"; > + this.menuStrip1.Size =3D new System.Drawing.Size(675, 24); > + this.menuStrip1.TabIndex =3D 1; > + this.menuStrip1.Text =3D "menuStrip1"; > + // > + // fileToolStripMenuItem > + // > + this.fileToolStripMenuItem.DropDownItems.AddRange(new > System.Windows.Forms.ToolStripItem[] { > + this.newToolStripMenuItem, > + this.openProiectToolStripMenuItem, > + this.sToolStripMenuItem, > + this.saveProiectAsToolStripMenuItem, > + this.buildToolStripMenuItem, > + this.toolStripSeparator1, > + this.optionsToolStripMenuItem, > + this.toolStripSeparator2, > + this.exitToolStripMenuItem}); > + this.fileToolStripMenuItem.Name =3D "fileToolStripMenuItem"; > + this.fileToolStripMenuItem.Size =3D new System.Drawing.Size(= 35, > 20); > + this.fileToolStripMenuItem.Text =3D "File"; > + // > + // newToolStripMenuItem > + // > + this.newToolStripMenuItem.Name =3D "newToolStripMenuItem"; > + this.newToolStripMenuItem.Size =3D new System.Drawing.Size(1= 68, > 22); > + this.newToolStripMenuItem.Text =3D "New Proiect"; > + this.newToolStripMenuItem.Click +=3D new > System.EventHandler(this.newToolStripMenuItem_Click); > + // > + // openProiectToolStripMenuItem > + // > + this.openProiectToolStripMenuItem.Name =3D > "openProiectToolStripMenuItem"; > + this.openProiectToolStripMenuItem.Size =3D new > System.Drawing.Size(168, 22); > + this.openProiectToolStripMenuItem.Text =3D "Open Proiect .."= ; > + this.openProiectToolStripMenuItem.Click +=3D new > System.EventHandler(this.openProiectToolStripMenuItem_Click); > + // > + // sToolStripMenuItem > + // > + this.sToolStripMenuItem.Name =3D "sToolStripMenuItem"; > + this.sToolStripMenuItem.Size =3D new System.Drawing.Size(168= , > 22); > + this.sToolStripMenuItem.Text =3D "Save Proiect"; > + this.sToolStripMenuItem.Click +=3D new > System.EventHandler(this.sToolStripMenuItem_Click); > + ... [truncated message content] |
|
From: <moi...@us...> - 2007-02-01 00:58:53
|
Revision: 70
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=70&view=rev
Author: moiristo
Date: 2007-01-31 16:58:51 -0800 (Wed, 31 Jan 2007)
Log Message:
-----------
A new version of IPTV@UT
Modified Paths:
--------------
trunk/plugins/IPTV@UT/IPTV@UT/ConfigurationForm.cs
trunk/plugins/IPTV@UT/IPTV@UT/IPTV.cs
trunk/plugins/IPTV@UT/IPTV@UT/IP...@UT...
trunk/plugins/IPTV@UT/IPTV@UT/IPTVPlugin.cs
trunk/plugins/IPTV@UT/IP...@UT...
trunk/plugins/MyTorrents/c3o.plugins.suo
trunk/plugins/UitzendingGemist/UitGemist.suo
trunk/plugins/VideoLAN/ConfigurationForm.cs
trunk/plugins/VideoLAN/VideoLanPlugin.cs
trunk/plugins/VideoLAN/VlcUserControl.cs
Added Paths:
-----------
trunk/plugins/IPTV@UT/[ Default Skin ]/MyIPTV.xml
Removed Paths:
-------------
trunk/plugins/IPTV@UT/[ Default Skin ]/MP_0.2.1/
trunk/plugins/IPTV@UT/[ Default Skin ]/MP_0.2.1_SVN/
trunk/plugins/IPTV@UT/[ Project Mayhem 3 ]/
Modified: trunk/plugins/IPTV@UT/IPTV@UT/ConfigurationForm.cs
===================================================================
--- trunk/plugins/IPTV@UT/IPTV@UT/ConfigurationForm.cs 2007-01-31 22:29:16 UTC (rev 69)
+++ trunk/plugins/IPTV@UT/IPTV@UT/ConfigurationForm.cs 2007-02-01 00:58:51 UTC (rev 70)
@@ -7,7 +7,7 @@
using System.Text;
using System.Windows.Forms;
using MediaPortal.GUI.Library;
-using MediaPortal.Util;
+using MediaPortal.Utils;
namespace MediaPortal.GUI.IPTV
{
Modified: trunk/plugins/IPTV@UT/IPTV@UT/IPTV.cs
===================================================================
--- trunk/plugins/IPTV@UT/IPTV@UT/IPTV.cs 2007-01-31 22:29:16 UTC (rev 69)
+++ trunk/plugins/IPTV@UT/IPTV@UT/IPTV.cs 2007-02-01 00:58:51 UTC (rev 70)
@@ -3,7 +3,6 @@
using MediaPortal.Util;
using MediaPortal.Dialogs;
using MediaPortal.Playlists;
-using MediaPortal.VideoLanPlugin;
using System.Drawing;
using System.IO;
@@ -12,8 +11,12 @@
public class IPTV : GUIWindow
{
#region SkinControlAttributes
- [SkinControlAttribute(2)]
+ [SkinControlAttribute(19)]
+ protected GUIListControl listview = null;
+ [SkinControlAttribute(21)]
protected GUIButtonControl btnLoad = null;
+ [SkinControlAttribute(22)]
+ protected GUIButtonControl btnRecordings = null;
[SkinControlAttribute(99)]
protected GUIVideoControl videoWindow = null;
#endregion
@@ -22,9 +25,11 @@
private static int currentChannel = 0;
private static PlayListVLCIO plvi = new PlayListVLCIO();
private static VirtualDirectory plDirectory = new VirtualDirectory();
+ private static VirtualDirectory recDirectory = new VirtualDirectory();
private static string playListPath;
private static OnActionHandler ah;
- private static bool inited = false;
+ private static bool inited = false;
+ private static string vlciptvdir = Directory.GetCurrentDirectory() + @"\vlciptv";
public override int GetID
{
@@ -54,6 +59,14 @@
share.Path = playListPath;
plDirectory.IsRootShare(playListPath);
+ recDirectory.AddExtension(".ts");
+ recDirectory.ShowFilesWithoutExtension = false;
+
+ Share share2 = new Share();
+ share2.Name = "Recordings";
+ share2.Path = vlciptvdir;
+ recDirectory.IsRootShare(vlciptvdir);
+
if(ah == null) ah = new OnActionHandler(OnAction2);
return result;
@@ -62,7 +75,8 @@
public void OnAction2(Action action)
{
if (GUIWindowManager.ActiveWindowEx == (int) GUIWindow.Window.WINDOW_DIALOG_MENU) return;
-
+ bool actionTaken = true;
+
switch (action.wID)
{
case Action.ActionType.ACTION_PREV_CHANNEL:
@@ -121,8 +135,13 @@
Play(currentChannel);
break;
}
+ break;
+ default:
+ actionTaken = false;
break;
}
+
+ if(actionTaken) listview.SelectedListItemIndex = currentChannel;
}
public override void OnAction(Action action)
@@ -141,16 +160,16 @@
}
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType)
- {
+ {
if (control == btnLoad)
{
- if (g_Player.Playing) g_Player.Stop();
- GUIDialogSelect diag = (GUIDialogSelect)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_SELECT);
+ GUIDialogSelect diag = (GUIDialogSelect)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_SELECT);
diag.SetHeading("Choose Playlist");
diag.Reset();
+ diag.IsOverlayAllowed = true;
foreach (GUIListItem item in plDirectory.GetDirectory(playListPath))
{
- if(!item.IsFolder) diag.Add(item.Label);
+ if (!item.IsFolder) diag.Add(item.Label);
}
diag.EnableButton(true);
diag.SetButtonLabel("Load Playlist");
@@ -159,11 +178,48 @@
// and wait till user selects one, then load it immediately
string selected = diag.SelectedLabelText;
- if(File.Exists(playListPath + @"\" + selected + ".vlc"))
- LoadAndPlay(playListPath + @"\" + selected + ".vlc");
- else LoadAndPlay(playListPath + @"\" + selected + ".m3u");
+ if (!selected.Trim().Equals(""))
+ {
+ if (File.Exists(playListPath + @"\" + selected + ".vlc"))
+ LoadAndPlay(playListPath + @"\" + selected + ".vlc");
+ else LoadAndPlay(playListPath + @"\" + selected + ".m3u");
+ }
}
+ if (control == btnRecordings)
+ {
+ GUIDialogSelect diag = (GUIDialogSelect)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_SELECT);
+ diag.SetHeading("Available Recordings");
+ diag.Reset();
+ diag.IsOverlayAllowed = true;
+ foreach (GUIListItem item in recDirectory.GetDirectory(vlciptvdir))
+ {
+ if (!item.IsFolder) diag.Add(item.Label);
+ }
+ diag.EnableButton(true);
+ diag.SetButtonLabel("Load Recording");
+ diag.DoModal(GUIWindowManager.ActiveWindow);
+ // and wait till user selects one, then load it immediately
+ string selected = diag.SelectedLabelText;
+
+ if (!selected.Trim().Equals(""))
+ {
+ GUIGraphicsContext.IsFullScreenVideo = false;
+ g_Player.Play(vlciptvdir + @"\" + selected + ".ts");
+ GUIPropertyManager.SetProperty("#IPTV.View.channel", selected);
+ }
+ }
+ if (control == listview && actionType == Action.ActionType.ACTION_SELECT_ITEM)
+ {
+ if (listview.SelectedListItemIndex == -1) return;
+ else
+ {
+ currentChannel = listview.SelectedListItemIndex;
+ Play(currentChannel);
+ }
+ }
+ listview.SelectedListItemIndex = currentChannel;
+
base.OnClicked(controlId, control, actionType);
}
@@ -191,10 +247,16 @@
GUIPropertyManager.SetProperty("#IPTV.View.channel", "");
// Read a playlist, if configured, and start playing it
LoadAndPlay(GetDefaultPlayList());
-
inited = true;
}
-
+
+ foreach (PlayListItem item in playlist)
+ {
+ GUIListItem litem = new GUIListItem();
+ litem.Label = item.Description;
+ litem.IconImage = "check-box.png";
+ listview.Add(litem);
+ }
}
protected override void OnPageDestroy(int new_windowId)
@@ -205,20 +267,20 @@
protected override void OnShowContextMenu()
{
- if (playlist.Count == 0) return;
+ //if (playlist.Count == 0) return;
- GUIDialogMenu menu = (GUIDialogMenu)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_MENU);
- menu.Reset();
+ //GUIDialogMenu menu = (GUIDialogMenu)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_MENU);
+ //menu.Reset();
- menu.SetHeading("Channel List");
- foreach (PlayListItem item in playlist)
- menu.Add(item.Description);
- if (menu.SelectedId == -1) return;
- else
- {
- currentChannel = menu.SelectedId - 1;
- Play(currentChannel);
- }
+ //menu.SetHeading("Channel List");
+ //foreach (PlayListItem item in playlist)
+ // menu.Add(item.Description);
+ //if (menu.SelectedId == -1) return;
+ //else
+ //{
+ // currentChannel = menu.SelectedId - 1;
+ // Play(currentChannel);
+ //}
base.OnShowContextMenu();
}
@@ -231,7 +293,7 @@
playlist.Clear();
bool result = plvi.Load(playlist, plFile);
if (result)
- {
+ {
if (currentChannel < playlist.Count) Play(currentChannel);
else if (playlist.Count > 0) Play(0);
}
@@ -257,7 +319,7 @@
plDir = reader.GetValueAsString("settings", "PlayListDir", "");
}
return plDir;
- }
+ }
public static void Play(int plIndex)
{
@@ -267,7 +329,7 @@
Log.Info("MyIPTV: Trying to play channel '" + item.Description + "' (" + item.FileName + ").");
GUIGraphicsContext.IsFullScreenVideo = false;
g_Player.Play(item.FileName);
- GUIPropertyManager.SetProperty("#IPTV.View.channel", item.Description);
+ GUIPropertyManager.SetProperty("#IPTV.View.channel", item.Description);
}
}
}
\ No newline at end of file
Modified: trunk/plugins/IPTV@UT/IPTV@UT/IP...@UT...
===================================================================
--- trunk/plugins/IPTV@UT/IPTV@UT/IP...@UT... 2007-01-31 22:29:16 UTC (rev 69)
+++ trunk/plugins/IPTV@UT/IPTV@UT/IP...@UT... 2007-02-01 00:58:51 UTC (rev 70)
@@ -28,24 +28,24 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
- <Reference Include="Core, Version=1.0.2524.28381, Culture=neutral, processorArchitecture=MSIL">
+ <Reference Include="Core, Version=1.0.2586.6922, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\trunk\mediaportal\xbmc\bin\Release\Core.dll</HintPath>
+ <HintPath>..\..\..\trunk\mediaportal\Core\bin\Release\Core.dll</HintPath>
</Reference>
<Reference Include="Dialogs, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\trunk\mediaportal\Dialogs\bin\Release\Dialogs.dll</HintPath>
+ <HintPath>..\..\..\trunk\mediaportal\Dialogs\bin\Release\Dialogs.dll</HintPath>
</Reference>
- <Reference Include="ExternalPlayers, Version=1.0.2543.36238, Culture=neutral, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\trunk\mediaportal\ExternalPlayers\bin\Release\ExternalPlayers.dll</HintPath>
- </Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.DirectoryServices" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
+ <Reference Include="Utils, Version=1.0.2586.6921, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\trunk\mediaportal\Utils\bin\Release\Utils.dll</HintPath>
+ </Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="ConfigurationForm.cs">
@@ -75,4 +75,7 @@
<Target Name="AfterBuild">
</Target>
-->
+ <PropertyGroup>
+ <PostBuildEvent>xcopy $(TargetPath) D:\MediaPortal\trunk\mediaportal\xbmc\bin\Release\plugins\windows\ /y</PostBuildEvent>
+ </PropertyGroup>
</Project>
\ No newline at end of file
Modified: trunk/plugins/IPTV@UT/IPTV@UT/IPTVPlugin.cs
===================================================================
--- trunk/plugins/IPTV@UT/IPTV@UT/IPTVPlugin.cs 2007-01-31 22:29:16 UTC (rev 69)
+++ trunk/plugins/IPTV@UT/IPTV@UT/IPTVPlugin.cs 2007-02-01 00:58:51 UTC (rev 70)
@@ -37,7 +37,7 @@
// Returns the name of the plugin which is shown in the plugin menu
public string PluginName()
{
- return "My IPTV";
+ return "VLC IPTV";
}
// Returns the description of the plugin is shown in the plugin menu
Modified: trunk/plugins/IPTV@UT/IP...@UT...
===================================================================
(Binary files differ)
Added: trunk/plugins/IPTV@UT/[ Default Skin ]/MyIPTV.xml
===================================================================
--- trunk/plugins/IPTV@UT/[ Default Skin ]/MyIPTV.xml (rev 0)
+++ trunk/plugins/IPTV@UT/[ Default Skin ]/MyIPTV.xml 2007-02-01 00:58:51 UTC (rev 70)
@@ -0,0 +1,91 @@
+<window>
+ <id>7500</id>
+ <defaultcontrol>19</defaultcontrol>
+ <allowoverlay>no</allowoverlay>
+ <define>#header.label:My IPTV</define>
+ <define>#header.image:</define>
+ <define>#header.hover:hover_my tv.png</define>
+ <controls>
+ <import>common.window.xml</import>
+ <control>
+ <type>image</type>
+ <description>background image</description>
+ <id>1</id>
+ <posX>0</posX>
+ <posY>0</posY>
+ <texture>background.png</texture>
+ </control>
+ <control>
+ <type>listcontrol</type>
+ <description>afleveringen</description>
+ <id>19</id>
+ <posX>290</posX>
+ <posY>97</posY>
+ <width>410</width>
+ <onup>17</onup>
+ <font2>font10</font2>
+ <font3>font10</font3>
+ <textureHeight>25</textureHeight>
+ <IconYOff>3</IconYOff>
+ <textYOff>0</textYOff>
+ </control>
+ <control>
+ <type>videowindow</type>
+ <description>video window</description>
+ <id>99</id>
+ <posX>30</posX>
+ <posY>190</posY>
+ <width>224</width>
+ <height>136</height>
+ <colordiffuse>ffffffff</colordiffuse>
+ <onright>19</onright>
+ <onup>17</onup>
+ <ondown>21</ondown>
+ <animation>WindowClose</animation>
+ <action>18</action>
+ <textureFocus>tv_green_border.png</textureFocus>
+ </control>
+
+ <control>
+ <type>group</type>
+ <description>group element</description>
+ <animation effect="fade" time="250">WindowOpen</animation>
+ <animation effect="fade" time="500">WindowClose</animation>
+ <animation effect="slide" time="250" start="-300,0">WindowOpen</animation>
+ <animation effect="slide" time="500" end="0,-300">WindowClose</animation>
+ <layout>StackLayout</layout>
+ <posX>45</posX>
+ <posY>420</posY>
+ <control>
+ <type>button</type>
+ <description>Load playlist button</description>
+ <id>21</id>
+ <onright>19</onright>
+ <onup>99</onup>
+ <ondown>22</ondown>
+ <label>Load Playlist</label>
+ </control>
+ <control>
+ <type>button</type>
+ <description>Recordings button</description>
+ <id>22</id>
+ <onright>19</onright>
+ <onup>21</onup>
+ <ondown>19</ondown>
+ <label>Recordings</label>
+ </control>
+ </control>
+
+ <control>
+ <type>fadelabel</type>
+ <description>Current Channelname</description>
+ <id>13</id>
+ <posX>32</posX>
+ <posY>152</posY>
+ <width>224</width>
+ <align>left</align>
+ <label>#IPTV.View.channel</label>
+ <textcolor>white</textcolor>
+ </control>
+ </controls>
+</window>
\ No newline at end of file
Property changes on: trunk/plugins/IPTV@UT/[ Default Skin ]/MyIPTV.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/plugins/MyTorrents/c3o.plugins.suo
===================================================================
(Binary files differ)
Modified: trunk/plugins/UitzendingGemist/UitGemist.suo
===================================================================
(Binary files differ)
Modified: trunk/plugins/VideoLAN/ConfigurationForm.cs
===================================================================
--- trunk/plugins/VideoLAN/ConfigurationForm.cs 2007-01-31 22:29:16 UTC (rev 69)
+++ trunk/plugins/VideoLAN/ConfigurationForm.cs 2007-02-01 00:58:51 UTC (rev 70)
@@ -197,7 +197,7 @@
{
m_enabledExt = xmlreader.GetValueAsString("vlcplugin", "enabledextensions", ".ts,.gary");
m_enabledStreams = xmlreader.GetValueAsString("vlcplugin", "enabledstreams", "udp");
- bufsize = xmlreader.GetValueAsString("vlcplugin", "buffer", "400");
+ bufsize = xmlreader.GetValueAsString("vlcplugin", "buffer", "5000");
m_enabledExt.Replace(":", ","); // in case it was using the old plugin code where the separator was ":"
}
if (m_enabledExt != null && m_enabledExt.Length > 0)
Modified: trunk/plugins/VideoLAN/VideoLanPlugin.cs
===================================================================
--- trunk/plugins/VideoLAN/VideoLanPlugin.cs 2007-01-31 22:29:16 UTC (rev 69)
+++ trunk/plugins/VideoLAN/VideoLanPlugin.cs 2007-02-01 00:58:51 UTC (rev 70)
@@ -30,6 +30,7 @@
bool _isFullScreen = false;
bool _notifyPlaying = true;
int _positionX = 10, _positionY = 10, _videoWidth = 100, _videoHeight = 100;
+ int audioDelay = 0;
public static VlcUserControl vlcControl = null;
@@ -62,7 +63,7 @@
public override string VersionNumber
{
- get { return "0.6"; }
+ get { return "0.7"; }
}
public override string[] GetAllSupportedExtensions()
@@ -141,11 +142,24 @@
GUIWindowManager.SendThreadMessage(msg);
Player_Initializing();
+ string vlciptvdir = Directory.GetCurrentDirectory() + @"\vlciptv";
+ if (!Directory.Exists(vlciptvdir)) Directory.CreateDirectory(vlciptvdir);
- string[] option = new string[2];
- option[0] = ":http-caching=" + getBufferSize();
- option[1] = ":vout=direct3d";
-
+ string[] option = new string[]{
+ ":http-caching=" + getBufferSize(),
+ ":mms-caching=" + getBufferSize(),
+ ":realrtsp-caching=" + getBufferSize(),
+ //":tcp-caching==" + getBufferSize(),
+ //":udp-caching==" + getBufferSize(),
+ ":smb-caching=" + getBufferSize(),
+ ":snapshot-path=" + vlciptvdir,
+ ":record-path=" + vlciptvdir,
+ ":timeshift-dir=" + vlciptvdir,
+ ":access-filter=record"
+ };
+
+
+ vlcControl.Stop();
vlcControl.ClearPlayList();
vlcControl.AddToPlayList(strFile, null, option);
vlcControl.Play();
@@ -171,16 +185,12 @@
{
vlcControl.RotateAudioTrack();
}
- if (foAction.wID == Action.ActionType.ACTION_FORWARD)
+ if (foAction.wID == Action.ActionType.ACTION_TAKE_SCREENSHOT)
{
- vlcControl.Faster();
+ vlcControl.SnapShot();
}
- if (foAction.wID == Action.ActionType.ACTION_REWIND)
+ if (foAction.wID == Action.ActionType.ACTION_RECORD)
{
- vlcControl.Slower();
- }
- if (foAction.wID == Action.ActionType.ACTION_TAKE_SCREENSHOT)
- {
vlcControl.SnapShot();
}
if (foAction.wID == Action.ActionType.ACTION_ASPECT_RATIO)
@@ -192,6 +202,87 @@
UpdateStatus();
SetWindows();
}
+ if (foAction.wID == Action.ActionType.ACTION_AUDIO_DELAY_MIN)
+ {
+ if(audioDelay>0)
+ {
+ audioDelay--;
+ vlcControl.AudioDelay = audioDelay;
+ }
+ }
+ if (foAction.wID == Action.ActionType.ACTION_AUDIO_DELAY_PLUS)
+ {
+ audioDelay++;
+ vlcControl.AudioDelay = audioDelay;
+ }
+ if (foAction.wID == Action.ActionType.ACTION_BIG_STEP_BACK)
+ {
+ vlcControl.BigStepBack();
+ }
+ if (foAction.wID == Action.ActionType.ACTION_BIG_STEP_FORWARD)
+ {
+ vlcControl.BigStepForward();
+ }
+ if (foAction.wID == Action.ActionType.ACTION_DVD_MENU)
+ {
+ vlcControl.DvdMenu();
+ }
+ //if (foAction.wID == Action.ActionType.ACTION_FORWARD)
+ //{
+ // vlcControl.Faster();
+ //}
+ //if (foAction.wID == Action.ActionType.ACTION_REWIND)
+ //{
+ // vlcControl.Slower();
+ //}
+ if (foAction.wID == Action.ActionType.ACTION_FORWARD || foAction.wID == Action.ActionType.ACTION_STEP_FORWARD)
+ {
+ vlcControl.MediumStepForward();
+ }
+ if (foAction.wID == Action.ActionType.ACTION_REWIND || foAction.wID == Action.ActionType.ACTION_STEP_BACK)
+ {
+ vlcControl.MediumStepBack();
+ }
+ if (foAction.wID == Action.ActionType.ACTION_MOVE_LEFT)
+ {
+ vlcControl.MoveLeft();
+ }
+ if (foAction.wID == Action.ActionType.ACTION_MOVE_RIGHT)
+ {
+ vlcControl.MoveRight();
+ }
+ if (foAction.wID == Action.ActionType.ACTION_MOVE_DOWN)
+ {
+ vlcControl.MoveDown();
+ }
+ if (foAction.wID == Action.ActionType.ACTION_MOVE_UP)
+ {
+ vlcControl.MoveUp();
+ }
+ if (foAction.wID == Action.ActionType.ACTION_NEXT_SUBTITLE)
+ {
+ vlcControl.RotateSubtitles();
+ }
+ if (foAction.wID == Action.ActionType.ACTION_NEXT_CHAPTER)
+ {
+ vlcControl.NextDvdChapter();
+ }
+ if (foAction.wID == Action.ActionType.ACTION_PREV_CHAPTER)
+ {
+ vlcControl.PreviousDvdChapter();
+ }
+ if (foAction.wID == Action.ActionType.ACTION_RECORD)
+ {
+ vlcControl.Record();
+ }
+ if (foAction.wID == Action.ActionType.ACTION_SMALL_STEP_BACK)
+ {
+ vlcControl.ShortStepBack();
+ }
+ if (foAction.wID == Action.ActionType.ACTION_SELECT_ITEM)
+ {
+ vlcControl.Activate();
+ }
if (foAction.wID == Action.ActionType.ACTION_STOP)
{
Player_stopEvent();
@@ -565,7 +656,7 @@
private int getBufferSize()
{
- int result = 400;
+ int result = 5000;
using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Directory.GetCurrentDirectory() + @"\MediaPortal.xml"))
{
result = xmlreader.GetValueAsInt("vlcplugin", "buffer", 400);
Modified: trunk/plugins/VideoLAN/VlcUserControl.cs
===================================================================
--- trunk/plugins/VideoLAN/VlcUserControl.cs 2007-01-31 22:29:16 UTC (rev 69)
+++ trunk/plugins/VideoLAN/VlcUserControl.cs 2007-02-01 00:58:51 UTC (rev 70)
@@ -830,6 +830,11 @@
this.nativeVlc.PressKey("key-snapshot");
}
+ public void Record()
+ {
+ this.nativeVlc.PressKey("key-record");
+ }
+
public void UnCropTop()
{
//this.nativeVlc.PressKey("key-uncrop-top");
@@ -894,6 +899,11 @@
set { this.useMpegVbrOffset = value; }
}
+ public void DvdMenu()
+ {
+ this.nativeVlc.PressKey("key-disc-menu");
+ }
+
public void NextDvdTrack()
{
this.nativeVlc.PressKey("key-title-next");
@@ -914,6 +924,61 @@
this.nativeVlc.PressKey("key-chapter-prev");
}
+ public void BigStepBack()
+ {
+ this.nativeVlc.PressKey("key-jump-long");
+ }
+
+ public void BigStepForward()
+ {
+ this.nativeVlc.PressKey("key-jump+long");
+ }
+
+ public void MediumStepBack()
+ {
+ this.nativeVlc.PressKey("key-jump-medium");
+ }
+
+ public void MediumStepForward()
+ {
+ this.nativeVlc.PressKey("key-jump+medium");
+ }
+
+ public void ShortStepBack()
+ {
+ this.nativeVlc.PressKey("key-jump-short");
+ }
+
+ public void ShortStepForward()
+ {
+ this.nativeVlc.PressKey("key-jump+short");
+ }
+
+ public void MoveLeft()
+ {
+ this.nativeVlc.PressKey("key-nav-left");
+ }
+
+ public void MoveRight()
+ {
+ this.nativeVlc.PressKey("key-nav-right");
+ }
+
+ public void MoveDown()
+ {
+ this.nativeVlc.PressKey("key-nav-down");
+ }
+
+ public void MoveUp()
+ {
+ this.nativeVlc.PressKey("key-nav-up");
+ }
+
+ public void Activate()
+ {
+ this.nativeVlc.PressKey("key-nav-activate");
+ }
+
private void VlcUserControl_Resize(object sender, EventArgs e)
{
if(!ComputeCrop())
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dal...@us...> - 2007-02-02 07:47:28
|
Revision: 79
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=79&view=rev
Author: dalanorth
Date: 2007-02-01 23:47:21 -0800 (Thu, 01 Feb 2007)
Log Message:
-----------
Added WebBrowser
Added Paths:
-----------
trunk/plugins/WebBrowser/
trunk/plugins/WebBrowser/AxMOZILLACONTROLLib.dll
trunk/plugins/WebBrowser/Common.cs
trunk/plugins/WebBrowser/GUIFavorites.cs
trunk/plugins/WebBrowser/GUIWebBrowser.cs
trunk/plugins/WebBrowser/GUIWebBrowser.csproj
trunk/plugins/WebBrowser/GUIWebBrowser.sln
trunk/plugins/WebBrowser/GUIWebBrowser.suo
trunk/plugins/WebBrowser/INIFile.cs
trunk/plugins/WebBrowser/MOZILLACONTROLLib.dll
trunk/plugins/WebBrowser/Properties/
trunk/plugins/WebBrowser/Properties/AssemblyInfo.cs
trunk/plugins/WebBrowser/Readme.txt
trunk/plugins/WebBrowser/WebBrowserControl.Designer.cs
trunk/plugins/WebBrowser/WebBrowserControl.cs
trunk/plugins/WebBrowser/WebBrowserControl.resx
trunk/plugins/WebBrowser/WebBrowserSetup.Designer.cs
trunk/plugins/WebBrowser/WebBrowserSetup.cs
trunk/plugins/WebBrowser/WebBrowserSetup.resx
Added: trunk/plugins/WebBrowser/AxMOZILLACONTROLLib.dll
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/WebBrowser/AxMOZILLACONTROLLib.dll
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/WebBrowser/Common.cs
===================================================================
--- trunk/plugins/WebBrowser/Common.cs (rev 0)
+++ trunk/plugins/WebBrowser/Common.cs 2007-02-02 07:47:21 UTC (rev 79)
@@ -0,0 +1,56 @@
+#region Copyright (C) 2005-2007 Team MediaPortal
+
+/*
+ * Copyright (C) 2005-2007 Team MediaPortal
+ * http://www.team-mediaportal.com
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Make; see the file COPYING. If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ */
+
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace MediaPortal.GUI.WebBrowser
+{
+ class Common
+ {
+ /// <summary>
+ /// Menu state enum
+ /// </summary>
+ public enum MenuState
+ {
+ Browser = 0,
+ TopBar = 1
+ }
+ /// <summary>
+ /// Gets the user configured home page from the mediaportal settings
+ /// </summary>
+ public static string HomePage
+ {
+ get
+ {
+ using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml"))
+ {
+ return xmlreader.GetValueAsString("webbrowser", "homePage", string.Empty);
+ }
+ }
+ }
+ }
+}
Added: trunk/plugins/WebBrowser/GUIFavorites.cs
===================================================================
--- trunk/plugins/WebBrowser/GUIFavorites.cs (rev 0)
+++ trunk/plugins/WebBrowser/GUIFavorites.cs 2007-02-02 07:47:21 UTC (rev 79)
@@ -0,0 +1,224 @@
+#region Copyright (C) 2005-2007 Team MediaPortal
+
+/*
+ * Copyright (C) 2005-2007 Team MediaPortal
+ * http://www.team-mediaportal.com
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Make; see the file COPYING. If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ */
+
+#endregion
+
+using System;
+using System.Collections;
+using MediaPortal.GUI.Library;
+using MediaPortal.Util;
+using MediaPortal.Dialogs;
+
+namespace MediaPortal.GUI.WebBrowser
+{
+ /// <summary>
+ /// A web browser plugin for mediaportal
+ /// </summary>
+ public class GUIFavorites : GUIWindow
+ {
+ public const int WINDOW_FAVORITES = 5501;
+
+ DirectoryHistory m_history = new DirectoryHistory();
+ string currentFolder = String.Empty;
+ [SkinControlAttribute(50)] protected GUIFacadeControl facadeView=null;
+
+ #region Constructor
+ public GUIFavorites()
+ {
+ GetID = WINDOW_FAVORITES;
+ }
+ #endregion
+
+ #region Private Enumerations
+ /// <summary>
+ /// Gui Widgets
+ /// </summary>
+ enum Controls
+ {
+ BackButton = 3,
+ }
+
+ #endregion
+
+ #region Overrides
+ public override bool Init()
+ {
+ return Load (GUIGraphicsContext.Skin+@"\WebFavorites.xml");
+ }
+
+ protected override void OnPageLoad()
+ {
+ base.OnPageLoad();
+ if (FavoritesPath.Length != 0)
+ {
+ LoadDirectory(FavoritesPath);
+ }
+ else
+ {
+ //no favorites folder specified.
+ ShowErrorDialog(4003);
+ }
+
+ }
+
+ public override bool OnMessage(GUIMessage message)
+ {
+ switch ( message.Message )
+ {
+
+ case GUIMessage.MessageType.GUI_MSG_WINDOW_INIT:
+ {
+ base.OnMessage(message);
+ GUIPropertyManager.SetProperty("#currentmodule", GUILocalizeStrings.Get(4001));
+ return true;
+ }
+ case GUIMessage.MessageType.GUI_MSG_CLICKED:
+ {
+ //get sender control
+ base.OnMessage(message);
+ int iControl=message.SenderControlId;
+
+ if (iControl==(int)Controls.BackButton)
+ {
+ GUIWindowManager.ShowPreviousWindow();
+ break;
+ }
+ if (iControl==facadeView.GetID)
+ {
+ if(facadeView.SelectedListItem.IsFolder)
+ {
+ LoadDirectory(facadeView.SelectedListItem.Path);
+ }
+ else
+ {
+ // The URL file is in standard "INI" format
+ if (facadeView.SelectedListItem != null)
+ {
+ try
+ {
+ IniFile objINI = new IniFile(facadeView.SelectedListItem.Path);
+ WebBrowserControl.Instance.Browser.Navigate(objINI.IniReadValue("InternetShortcut", "URL"));
+ GUIWindowManager.ShowPreviousWindow();
+
+ }
+ catch
+ {
+ ShowErrorDialog(4002);
+ }
+ }
+ }
+ break;
+ }
+
+
+ return true;
+ }
+ case GUIMessage.MessageType.GUI_MSG_WINDOW_DEINIT:
+ {
+ break;
+ }
+ case GUIMessage.MessageType.GUI_MSG_SHOW_DIRECTORY:
+ {
+ currentFolder=message.Label;
+ LoadDirectory(currentFolder);
+ break;
+ }
+
+ }
+ return base.OnMessage(message);
+ }
+
+
+ #endregion
+
+ #region Private Properties
+ /// <summary>
+ /// Gets the Internet Favorites path selected by the user
+ /// </summary>
+ private static string FavoritesPath
+ {
+ get
+ {
+ using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml"))
+ {
+ return xmlreader.GetValueAsString("webbrowser", "favoritesFolder", string.Empty);
+ }
+ }
+ }
+ #endregion
+
+ #region Private Methods
+ /// <summary>
+ /// Loads the directory.
+ /// </summary>
+ /// <param name="newFolderName">New name of the folder.</param>
+ private void LoadDirectory(string newFolderName)
+ {
+ GUIListItem selectedListItem = facadeView.SelectedListItem;
+
+ if (selectedListItem != null)
+ {
+ if (selectedListItem.IsFolder && selectedListItem.Label != "..")
+ {
+ m_history.Set(selectedListItem.Label, currentFolder);
+ }
+ }
+ currentFolder = newFolderName;
+
+ GUIControl.ClearControl(GetID, facadeView.GetID);
+ VirtualDirectory Directory;
+ ArrayList itemlist;
+ ArrayList UrlExtensions = new ArrayList();
+ UrlExtensions.Add(".url");
+
+ Directory = new VirtualDirectory();
+ Directory.SetExtensions(UrlExtensions);
+
+ itemlist = Directory.GetDirectory(currentFolder);
+
+ foreach (GUIListItem item in itemlist)
+ {
+ GUIControl.AddListItemControl(GetID, facadeView.GetID, item);
+ }
+ }
+
+ /// <summary>
+ /// Shows the Error Dialog
+ /// </summary>
+ private void ShowErrorDialog(int messsageNumber)
+ {
+ GUIDialogOK dlgOK = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK);
+ if (dlgOK != null)
+ {
+ dlgOK.SetHeading(257);
+ dlgOK.SetLine(1, messsageNumber);
+ dlgOK.SetLine(2, "");
+ dlgOK.DoModal(GetID);
+ }
+ return;
+ }
+
+ #endregion
+
+ }
+}
Added: trunk/plugins/WebBrowser/GUIWebBrowser.cs
===================================================================
--- trunk/plugins/WebBrowser/GUIWebBrowser.cs (rev 0)
+++ trunk/plugins/WebBrowser/GUIWebBrowser.cs 2007-02-02 07:47:21 UTC (rev 79)
@@ -0,0 +1,336 @@
+#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
+
+/*
+ *
+ * Thanks to Adam Lock for making the Mozilla ActiveX Control
+ * Licensed under the MPL - http://www.mozilla.org/MPL/MPL-1.1.txt
+ *
+ * http://www.iol.ie/~locka/mozilla/mozilla.htm
+ *
+ */
+
+using System;
+using System.Collections;
+using MediaPortal.GUI.Library;
+using MediaPortal.Util;
+using MediaPortal.Dialogs;
+using System.Windows.Forms;
+
+namespace MediaPortal.GUI.WebBrowser
+{
+ /// <summary>
+ /// A web browser plugin for mediaportal
+ /// </summary>
+ public class GUIWebBrowser : GUIWindow
+ {
+ public const int WINDOW_WEB_BROWSER = 5500;
+
+ private WebBrowserControl wb;
+
+ #region Constructor
+ /// <summary>
+ /// Initializes a new instance of the <see cref="GUIWebBrowser"/> class.
+ /// </summary>
+ public GUIWebBrowser()
+ {
+ GetID = WINDOW_WEB_BROWSER;
+ }
+ #endregion
+
+ #region Enumerations
+ /// <summary>
+ /// Gui Widgets
+ /// </summary>
+ public enum Controls
+ {
+ BackButton = 2,
+ ForwardButton = 3,
+ RefreshButton = 4,
+ StopButton = 5,
+ FavoritesButton = 6,
+ UrlButton = 7,
+ Progress = 8,
+ HomeButton = 9
+ }
+
+ #endregion
+
+ #region Overrides
+
+ public override bool SupportsDelayedLoad
+ {
+ get { return true; }
+ }
+ /// <summary>
+ /// Inits this instance.
+ /// </summary>
+ /// <returns></returns>
+ public override bool Init()
+ {
+ try
+ {
+
+ wb = WebBrowserControl.Instance;
+ GUIGraphicsContext.form.Controls.Add(wb);
+ wb.Visible = false;
+ wb.Enabled = false;
+ //set focus back to the form after loading web browser
+ GUIGraphicsContext.form.Focus();
+ wb.Browser.NavigateComplete2 += new AxMOZILLACONTROLLib.DWebBrowserEvents2_NavigateComplete2EventHandler(Browser_NavigateComplete2);
+ wb.Browser.DownloadBegin += new EventHandler(Browser_DownloadBegin);
+ wb.Browser.DownloadComplete += new EventHandler(Browser_DownloadComplete);
+ wb.Browser.BeforeNavigate2 += new AxMOZILLACONTROLLib.DWebBrowserEvents2_BeforeNavigate2EventHandler(Browser_BeforeNavigate2);
+ wb.Browser.StatusTextChange += new AxMOZILLACONTROLLib.DWebBrowserEvents2_StatusTextChangeEventHandler(Browser_StatusTextChange);
+ wb.Browser.ProgressChange += new AxMOZILLACONTROLLib.DWebBrowserEvents2_ProgressChangeEventHandler(Browser_ProgressChange);
+ return Load(GUIGraphicsContext.Skin + @"\webbrowser.xml");
+ }
+ catch
+ {
+ Log.Error("Unable to load the web browser plugin, verify that Mozilla ActiveX Control is installed");
+ }
+ return false;
+ }
+
+ public override void DeInit()
+ {
+ base.DeInit();
+ wb.Dispose();
+ WebBrowserControl.Instance.Dispose();
+ }
+
+ /// <summary>
+ /// Called when [action].
+ /// </summary>
+ /// <param name="action">The action.</param>
+ public override void OnAction(Action action)
+ {
+ switch (action.wID)
+ {
+ case Action.ActionType.ACTION_SHOW_INFO:
+ {
+ GUIWindowManager.ActivateWindow(GUIFavorites.WINDOW_FAVORITES);
+ break;
+ }
+ case Action.ActionType.ACTION_CONTEXT_MENU:
+ {
+ wb.ToggleMenu();
+ break;
+ }
+ case Action.ActionType.ACTION_PREVIOUS_MENU:
+ {
+ GUIWindowManager.ShowPreviousWindow();
+ return;
+ }
+ }
+ base.OnAction(action);
+ }
+
+ /// <summary>
+ /// Called when [message].
+ /// </summary>
+ /// <param name="message">The message.</param>
+ /// <returns></returns>
+ public override bool OnMessage(GUIMessage message)
+ {
+ switch (message.Message)
+ {
+
+ case GUIMessage.MessageType.GUI_MSG_WINDOW_INIT:
+ {
+ base.OnMessage(message);
+ GUIPropertyManager.SetProperty("#currentmodule", GUILocalizeStrings.Get(4000));
+ //make web browser visible
+ wb.Visible = true;
+ wb.Enabled = true;
+ wb.Focus();
+ return true;
+ }
+ case GUIMessage.MessageType.GUI_MSG_CLICKED:
+ {
+ //get sender control
+ base.OnMessage(message);
+ int iControl = message.SenderControlId;
+
+ if (iControl == (int)Controls.BackButton)
+ {
+ wb.Browser.GoBack();
+ break;
+ }
+ if (iControl == (int)Controls.ForwardButton)
+ {
+ wb.Browser.GoForward();
+ break;
+ }
+ if (iControl == (int)Controls.RefreshButton)
+ {
+ wb.RefreshBrowser();
+ break;
+ }
+ if (iControl == (int)Controls.StopButton)
+ {
+ wb.Browser.Stop();
+ break;
+ }
+ if (iControl == (int)Controls.HomeButton)
+ {
+ if (Common.HomePage.Length != 0)
+ wb.Browser.Navigate(Common.HomePage);
+ break;
+ }
+ if (iControl == (int)Controls.FavoritesButton)
+ {
+ GUIWindowManager.ActivateWindow(GUIFavorites.WINDOW_FAVORITES);
+ break;
+ }
+ if (iControl == (int)Controls.UrlButton)
+ {
+ //hide browser control for keyboard display
+ wb.Visible = false;
+ //set focus to main form to avoid browser caputuring entered text
+ GUIGraphicsContext.form.Focus();
+ wb.Enabled = false;
+ string strName = string.Empty;
+ GetStringFromKeyboard(ref strName);
+ if (strName.Length != 0)
+ {
+ wb.Browser.Navigate(strName);
+ GUIPropertyManager.SetProperty("#location.url", strName);
+ GUIPropertyManager.SetProperty("#location.name", string.Empty);
+ }
+ wb.Visible = true;
+ wb.Enabled = true;
+ break;
+ }
+ return true;
+ }
+ case GUIMessage.MessageType.GUI_MSG_WINDOW_DEINIT:
+ {
+ //hide the browser
+ wb.Visible = false;
+ wb.Enabled = false;
+ GUIGraphicsContext.form.Focus();
+ }
+ break;
+ }
+ return base.OnMessage(message);
+ }
+ #endregion
+ protected override void OnPageDestroy(int new_windowId)
+ {
+ base.OnPageDestroy(new_windowId);
+
+ //hide the browser
+ wb.Visible = false;
+ wb.Enabled = false;
+ GUIGraphicsContext.form.Focus();
+ }
+
+ #region Private Methods
+ /// <summary>
+ /// Gets the input from the virtual keyboard window
+ /// </summary>
+ /// <param name="strLine">The STR line.</param>
+ private void GetStringFromKeyboard(ref string strLine)
+ {
+
+ VirtualWebKeyboard keyboard = (VirtualWebKeyboard)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_VIRTUAL_WEB_KEYBOARD);
+ if (null == keyboard) return;
+ keyboard.Reset();
+ keyboard.Text = strLine;
+ keyboard.DoModal(GetID);
+ if (keyboard.IsConfirmed)
+ {
+ strLine = keyboard.Text;
+ }
+
+ }
+ #endregion
+
+ #region Browser Events
+ /// <summary>
+ /// Handles the NavigateComplete2 event of the Browser control.
+ /// </summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void Browser_NavigateComplete2(object sender, AxMOZILLACONTROLLib.DWebBrowserEvents2_NavigateComplete2Event e)
+ {
+ GUIPropertyManager.SetProperty("#location.name", wb.Browser.LocationName);
+ GUIPropertyManager.SetProperty("#location.url", wb.Browser.LocationURL);
+ }
+ /// <summary>
+ /// Handles the DownloadBegin event of the Browser control.
+ /// </summary>
+ /// <param name="sender">The source of the event.</param>
+ /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
+ private void Browser_DownloadBegin(object sender, EventArgs e)
+ {
+ GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_VISIBLE, GetID, 0, (int)Controls.Progress, 0, 0, null);
+ OnMessage(msg);
+ }
+ /// <summary>
+ /// Handles the BeforeNavigate2 event of the Browser control.
+ /// </summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void Browser_BeforeNavigate2(object sender, AxMOZILLACONTROLLib.DWebBrowserEvents2_BeforeNavigate2Event e)
+ {
+ GUIPropertyManager.SetProperty("#location.url", e.uRL.ToString());
+ GUIPropertyManager.SetProperty("#status", "Loading " + e.uRL.ToString());
+ }
+ /// <summary>
+ /// Handles the StatusTextChange event of the Browser control.
+ /// </summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void Browser_StatusTextChange(object sender, AxMOZILLACONTROLLib.DWebBrowserEvents2_StatusTextChangeEvent e)
+ {
+ GUIPropertyManager.SetProperty("#status", e.text);
+ }
+ /// <summary>
+ /// Handles the ProgressChange event of the Browser control.
+ /// </summary>
+ /// <param name="sender">The sender.</param>
+ /// <param name="e">The e.</param>
+ private void Browser_ProgressChange(object sender, AxMOZILLACONTROLLib.DWebBrowserEvents2_ProgressChangeEvent e)
+ {
+ double Progress;
+ GUIProgressControl pControl = (GUIProgressControl)GetControl((int)Controls.Progress);
+ Progress = (e.progress * 100) / e.progressMax;
+ pControl.Percentage = Convert.ToInt32(Progress);
+ }
+ /// <summary>
+ /// Handles the DownloadComplete event of the Browser control.
+ /// </summary>
+ /// <param name="sender">The source of the event.</param>
+ /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
+ private void Browser_DownloadComplete(object sender, EventArgs e)
+ {
+ GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_HIDDEN, GetID, 0, (int)Controls.Progress, 0, 0, null);
+ OnMessage(msg);
+ }
+ #endregion
+ }
+}
Added: trunk/plugins/WebBrowser/GUIWebBrowser.csproj
===================================================================
--- trunk/plugins/WebBrowser/GUIWebBrowser.csproj (rev 0)
+++ trunk/plugins/WebBrowser/GUIWebBrowser.csproj 2007-02-02 07:47:21 UTC (rev 79)
@@ -0,0 +1,107 @@
+<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>{E11423D6-9D7B-4304-9967-077885F58373}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>GUIWebBrowser</RootNamespace>
+ <AssemblyName>WebBrowser</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>true</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>
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ <Optimize>true</Optimize>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="AxMOZILLACONTROLLib, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>.\AxMOZILLACONTROLLib.dll</HintPath>
+ </Reference>
+ <Reference Include="Core, Version=1.0.2587.17398, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\MediaPortal\xbmc\bin\Release\Core.dll</HintPath>
+ </Reference>
+ <Reference Include="Dialogs, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\MediaPortal\Dialogs\bin\Release\Dialogs.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Windows.Forms" />
+ <Reference Include="Utils, Version=1.0.2587.17396, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\MediaPortal\Utils\bin\Release\Utils.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Common.cs" />
+ <Compile Include="GUIFavorites.cs" />
+ <Compile Include="GUIWebBrowser.cs" />
+ <Compile Include="INIFile.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="WebBrowserControl.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
+ <Compile Include="WebBrowserControl.Designer.cs">
+ <DependentUpon>WebBrowserControl.cs</DependentUpon>
+ </Compile>
+ <Compile Include="WebBrowserSetup.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="WebBrowserSetup.Designer.cs">
+ <DependentUpon>WebBrowserSetup.cs</DependentUpon>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="WebBrowserControl.resx">
+ <DependentUpon>WebBrowserControl.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="WebBrowserSetup.resx">
+ <DependentUpon>WebBrowserSetup.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
Added: trunk/plugins/WebBrowser/GUIWebBrowser.sln
===================================================================
--- trunk/plugins/WebBrowser/GUIWebBrowser.sln (rev 0)
+++ trunk/plugins/WebBrowser/GUIWebBrowser.sln 2007-02-02 07:47:21 UTC (rev 79)
@@ -0,0 +1,26 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GUIWebBrowser", "GUIWebBrowser.csproj", "{E11423D6-9D7B-4304-9967-077885F58373}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {E11423D6-9D7B-4304-9967-077885F58373}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E11423D6-9D7B-4304-9967-077885F58373}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E11423D6-9D7B-4304-9967-077885F58373}.Debug|x86.ActiveCfg = Debug|x86
+ {E11423D6-9D7B-4304-9967-077885F58373}.Debug|x86.Build.0 = Debug|x86
+ {E11423D6-9D7B-4304-9967-077885F58373}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E11423D6-9D7B-4304-9967-077885F58373}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E11423D6-9D7B-4304-9967-077885F58373}.Release|x86.ActiveCfg = Release|x86
+ {E11423D6-9D7B-4304-9967-077885F58373}.Release|x86.Build.0 = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
Added: trunk/plugins/WebBrowser/GUIWebBrowser.suo
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/WebBrowser/GUIWebBrowser.suo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/WebBrowser/INIFile.cs
===================================================================
--- trunk/plugins/WebBrowser/INIFile.cs (rev 0)
+++ trunk/plugins/WebBrowser/INIFile.cs 2007-02-02 07:47:21 UTC (rev 79)
@@ -0,0 +1,83 @@
+#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.Runtime.InteropServices;
+using...
[truncated message content] |
|
From: <an...@us...> - 2007-02-02 12:52:44
|
Revision: 80
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=80&view=rev
Author: and-81
Date: 2007-02-02 04:52:42 -0800 (Fri, 02 Feb 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/MCEReplacement/Forms/KeysCommand.Designer.cs
trunk/plugins/MCEReplacement/Forms/MessageCommand.Designer.cs
trunk/plugins/MCEReplacement/Forms/MessageCommand.cs
trunk/plugins/TV3ExtChannelChanger/Forms/KeysCommand.Designer.cs
trunk/plugins/TV3ExtChannelChanger/Forms/MessageCommand.Designer.cs
trunk/plugins/TV3ExtChannelChanger/Forms/MessageCommand.cs
trunk/plugins/TV3MceBlaster/Forms/KeysCommand.Designer.cs
trunk/plugins/TV3MceBlaster/Forms/MessageCommand.Designer.cs
trunk/plugins/TV3MceBlaster/Forms/MessageCommand.cs
Modified: trunk/plugins/MCEReplacement/Forms/KeysCommand.Designer.cs
===================================================================
--- trunk/plugins/MCEReplacement/Forms/KeysCommand.Designer.cs 2007-02-02 07:47:21 UTC (rev 79)
+++ trunk/plugins/MCEReplacement/Forms/KeysCommand.Designer.cs 2007-02-02 12:52:42 UTC (rev 80)
@@ -43,7 +43,7 @@
this.buttonCancel.Location = new System.Drawing.Point(264, 128);
this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(64, 24);
- this.buttonCancel.TabIndex = 14;
+ this.buttonCancel.TabIndex = 3;
this.buttonCancel.Text = "Cancel";
this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
@@ -54,7 +54,7 @@
this.buttonOK.Location = new System.Drawing.Point(192, 128);
this.buttonOK.Name = "buttonOK";
this.buttonOK.Size = new System.Drawing.Size(64, 24);
- this.buttonOK.TabIndex = 13;
+ this.buttonOK.TabIndex = 2;
this.buttonOK.Text = "OK";
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
@@ -69,7 +69,7 @@
this.textBoxKeystrokes.Name = "textBoxKeystrokes";
this.textBoxKeystrokes.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.textBoxKeystrokes.Size = new System.Drawing.Size(320, 96);
- this.textBoxKeystrokes.TabIndex = 12;
+ this.textBoxKeystrokes.TabIndex = 1;
//
// labelKeystrokes
//
@@ -78,19 +78,22 @@
this.labelKeystrokes.Location = new System.Drawing.Point(8, 8);
this.labelKeystrokes.Name = "labelKeystrokes";
this.labelKeystrokes.Size = new System.Drawing.Size(320, 16);
- this.labelKeystrokes.TabIndex = 15;
+ this.labelKeystrokes.TabIndex = 0;
this.labelKeystrokes.Text = "Keystrokes:";
//
// KeysCommand
//
+ this.AcceptButton = this.buttonOK;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(336, 160);
+ this.CancelButton = this.buttonCancel;
+ this.ClientSize = new System.Drawing.Size(336, 161);
this.Controls.Add(this.labelKeystrokes);
this.Controls.Add(this.buttonCancel);
this.Controls.Add(this.buttonOK);
this.Controls.Add(this.textBoxKeystrokes);
this.MinimizeBox = false;
+ this.MinimumSize = new System.Drawing.Size(344, 188);
this.Name = "KeysCommand";
this.ShowIcon = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
Modified: trunk/plugins/MCEReplacement/Forms/MessageCommand.Designer.cs
===================================================================
--- trunk/plugins/MCEReplacement/Forms/MessageCommand.Designer.cs 2007-02-02 07:47:21 UTC (rev 79)
+++ trunk/plugins/MCEReplacement/Forms/MessageCommand.Designer.cs 2007-02-02 12:52:42 UTC (rev 80)
@@ -38,14 +38,14 @@
this.numericUpDownLParam = new System.Windows.Forms.NumericUpDown();
this.numericUpDownWParam = new System.Windows.Forms.NumericUpDown();
this.numericUpDownMsg = new System.Windows.Forms.NumericUpDown();
+ this.contextMenuStripWM = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this.wMAPPToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.wMUSERToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.labelLParam = new System.Windows.Forms.Label();
this.labelWParam = new System.Windows.Forms.Label();
this.labelMessage = new System.Windows.Forms.Label();
this.buttonCancel = new System.Windows.Forms.Button();
this.buttonOK = new System.Windows.Forms.Button();
- this.contextMenuStripWM = new System.Windows.Forms.ContextMenuStrip(this.components);
- this.wMAPPToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.wMUSERToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownLParam)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownWParam)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownMsg)).BeginInit();
@@ -60,6 +60,7 @@
this.checkBoxMsgCurrApp.TabIndex = 3;
this.checkBoxMsgCurrApp.Text = "Send to active window";
this.checkBoxMsgCurrApp.UseVisualStyleBackColor = true;
+ this.checkBoxMsgCurrApp.CheckedChanged += new System.EventHandler(this.checkBoxMsgCurrApp_CheckedChanged);
//
// labelMsgApp
//
@@ -133,6 +134,28 @@
this.numericUpDownMsg.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.numericUpDownMsg.ThousandsSeparator = true;
//
+ // contextMenuStripWM
+ //
+ this.contextMenuStripWM.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.wMAPPToolStripMenuItem,
+ this.wMUSERToolStripMenuItem});
+ this.contextMenuStripWM.Name = "contextMenuStripWM";
+ this.contextMenuStripWM.Size = new System.Drawing.Size(136, 48);
+ //
+ // wMAPPToolStripMenuItem
+ //
+ this.wMAPPToolStripMenuItem.Name = "wMAPPToolStripMenuItem";
+ this.wMAPPToolStripMenuItem.Size = new System.Drawing.Size(135, 22);
+ this.wMAPPToolStripMenuItem.Text = "WM_APP";
+ this.wMAPPToolStripMenuItem.Click += new System.EventHandler(this.wMAPPToolStripMenuItem_Click);
+ //
+ // wMUSERToolStripMenuItem
+ //
+ this.wMUSERToolStripMenuItem.Name = "wMUSERToolStripMenuItem";
+ this.wMUSERToolStripMenuItem.Size = new System.Drawing.Size(135, 22);
+ this.wMUSERToolStripMenuItem.Text = "WM_USER";
+ this.wMUSERToolStripMenuItem.Click += new System.EventHandler(this.wMUSERToolStripMenuItem_Click);
+ //
// labelLParam
//
this.labelLParam.Location = new System.Drawing.Point(8, 128);
@@ -183,38 +206,16 @@
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
//
- // contextMenuStripWM
- //
- this.contextMenuStripWM.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.wMAPPToolStripMenuItem,
- this.wMUSERToolStripMenuItem});
- this.contextMenuStripWM.Name = "contextMenuStripWM";
- this.contextMenuStripWM.Size = new System.Drawing.Size(136, 48);
- //
- // wMAPPToolStripMenuItem
- //
- this.wMAPPToolStripMenuItem.Name = "wMAPPToolStripMenuItem";
- this.wMAPPToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
- this.wMAPPToolStripMenuItem.Text = "WM_APP";
- this.wMAPPToolStripMenuItem.Click += new System.EventHandler(this.wMAPPToolStripMenuItem_Click);
- //
- // wMUSERToolStripMenuItem
- //
- this.wMUSERToolStripMenuItem.Name = "wMUSERToolStripMenuItem";
- this.wMUSERToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
- this.wMUSERToolStripMenuItem.Text = "WM_USER";
- this.wMUSERToolStripMenuItem.Click += new System.EventHandler(this.wMUSERToolStripMenuItem_Click);
- //
// MessageCommand
//
this.AcceptButton = this.buttonOK;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.buttonCancel;
- this.ClientSize = new System.Drawing.Size(384, 184);
+ this.ClientSize = new System.Drawing.Size(384, 185);
+ this.Controls.Add(this.checkBoxMsgCurrApp);
this.Controls.Add(this.buttonCancel);
this.Controls.Add(this.buttonOK);
- this.Controls.Add(this.checkBoxMsgCurrApp);
this.Controls.Add(this.labelMsgApp);
this.Controls.Add(this.buttonFindMsgApp);
this.Controls.Add(this.textBoxMsgApp);
@@ -225,6 +226,7 @@
this.Controls.Add(this.labelWParam);
this.Controls.Add(this.labelMessage);
this.MinimizeBox = false;
+ this.MinimumSize = new System.Drawing.Size(392, 212);
this.Name = "MessageCommand";
this.ShowIcon = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
Modified: trunk/plugins/MCEReplacement/Forms/MessageCommand.cs
===================================================================
--- trunk/plugins/MCEReplacement/Forms/MessageCommand.cs 2007-02-02 07:47:21 UTC (rev 79)
+++ trunk/plugins/MCEReplacement/Forms/MessageCommand.cs 2007-02-02 12:52:42 UTC (rev 80)
@@ -90,6 +90,12 @@
numericUpDownMsg.Value = new decimal(Win32.WM_USER);
}
+ private void checkBoxMsgCurrApp_CheckedChanged(object sender, EventArgs e)
+ {
+ textBoxMsgApp.Enabled = !checkBoxMsgCurrApp.Checked;
+ buttonFindMsgApp.Enabled = !checkBoxMsgCurrApp.Checked;
+ }
+
}
}
Modified: trunk/plugins/TV3ExtChannelChanger/Forms/KeysCommand.Designer.cs
===================================================================
--- trunk/plugins/TV3ExtChannelChanger/Forms/KeysCommand.Designer.cs 2007-02-02 07:47:21 UTC (rev 79)
+++ trunk/plugins/TV3ExtChannelChanger/Forms/KeysCommand.Designer.cs 2007-02-02 12:52:42 UTC (rev 80)
@@ -43,7 +43,7 @@
this.buttonCancel.Location = new System.Drawing.Point(264, 128);
this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(64, 24);
- this.buttonCancel.TabIndex = 14;
+ this.buttonCancel.TabIndex = 3;
this.buttonCancel.Text = "Cancel";
this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
@@ -54,7 +54,7 @@
this.buttonOK.Location = new System.Drawing.Point(192, 128);
this.buttonOK.Name = "buttonOK";
this.buttonOK.Size = new System.Drawing.Size(64, 24);
- this.buttonOK.TabIndex = 13;
+ this.buttonOK.TabIndex = 2;
this.buttonOK.Text = "OK";
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
@@ -69,7 +69,7 @@
this.textBoxKeystrokes.Name = "textBoxKeystrokes";
this.textBoxKeystrokes.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.textBoxKeystrokes.Size = new System.Drawing.Size(320, 96);
- this.textBoxKeystrokes.TabIndex = 12;
+ this.textBoxKeystrokes.TabIndex = 1;
//
// labelKeystrokes
//
@@ -78,19 +78,22 @@
this.labelKeystrokes.Location = new System.Drawing.Point(8, 8);
this.labelKeystrokes.Name = "labelKeystrokes";
this.labelKeystrokes.Size = new System.Drawing.Size(320, 16);
- this.labelKeystrokes.TabIndex = 15;
+ this.labelKeystrokes.TabIndex = 0;
this.labelKeystrokes.Text = "Keystrokes:";
//
// KeysCommand
//
+ this.AcceptButton = this.buttonOK;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(336, 160);
+ this.CancelButton = this.buttonCancel;
+ this.ClientSize = new System.Drawing.Size(336, 161);
this.Controls.Add(this.labelKeystrokes);
this.Controls.Add(this.buttonCancel);
this.Controls.Add(this.buttonOK);
this.Controls.Add(this.textBoxKeystrokes);
this.MinimizeBox = false;
+ this.MinimumSize = new System.Drawing.Size(344, 188);
this.Name = "KeysCommand";
this.ShowIcon = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
Modified: trunk/plugins/TV3ExtChannelChanger/Forms/MessageCommand.Designer.cs
===================================================================
--- trunk/plugins/TV3ExtChannelChanger/Forms/MessageCommand.Designer.cs 2007-02-02 07:47:21 UTC (rev 79)
+++ trunk/plugins/TV3ExtChannelChanger/Forms/MessageCommand.Designer.cs 2007-02-02 12:52:42 UTC (rev 80)
@@ -38,14 +38,14 @@
this.numericUpDownLParam = new System.Windows.Forms.NumericUpDown();
this.numericUpDownWParam = new System.Windows.Forms.NumericUpDown();
this.numericUpDownMsg = new System.Windows.Forms.NumericUpDown();
+ this.contextMenuStripWM = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this.wMAPPToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.wMUSERToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.labelLParam = new System.Windows.Forms.Label();
this.labelWParam = new System.Windows.Forms.Label();
this.labelMessage = new System.Windows.Forms.Label();
this.buttonCancel = new System.Windows.Forms.Button();
this.buttonOK = new System.Windows.Forms.Button();
- this.contextMenuStripWM = new System.Windows.Forms.ContextMenuStrip(this.components);
- this.wMAPPToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.wMUSERToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownLParam)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownWParam)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownMsg)).BeginInit();
@@ -60,6 +60,7 @@
this.checkBoxMsgCurrApp.TabIndex = 3;
this.checkBoxMsgCurrApp.Text = "Send to active window";
this.checkBoxMsgCurrApp.UseVisualStyleBackColor = true;
+ this.checkBoxMsgCurrApp.CheckedChanged += new System.EventHandler(this.checkBoxMsgCurrApp_CheckedChanged);
//
// labelMsgApp
//
@@ -133,6 +134,28 @@
this.numericUpDownMsg.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.numericUpDownMsg.ThousandsSeparator = true;
//
+ // contextMenuStripWM
+ //
+ this.contextMenuStripWM.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.wMAPPToolStripMenuItem,
+ this.wMUSERToolStripMenuItem});
+ this.contextMenuStripWM.Name = "contextMenuStripWM";
+ this.contextMenuStripWM.Size = new System.Drawing.Size(136, 48);
+ //
+ // wMAPPToolStripMenuItem
+ //
+ this.wMAPPToolStripMenuItem.Name = "wMAPPToolStripMenuItem";
+ this.wMAPPToolStripMenuItem.Size = new System.Drawing.Size(135, 22);
+ this.wMAPPToolStripMenuItem.Text = "WM_APP";
+ this.wMAPPToolStripMenuItem.Click += new System.EventHandler(this.wMAPPToolStripMenuItem_Click);
+ //
+ // wMUSERToolStripMenuItem
+ //
+ this.wMUSERToolStripMenuItem.Name = "wMUSERToolStripMenuItem";
+ this.wMUSERToolStripMenuItem.Size = new System.Drawing.Size(135, 22);
+ this.wMUSERToolStripMenuItem.Text = "WM_USER";
+ this.wMUSERToolStripMenuItem.Click += new System.EventHandler(this.wMUSERToolStripMenuItem_Click);
+ //
// labelLParam
//
this.labelLParam.Location = new System.Drawing.Point(8, 128);
@@ -183,38 +206,16 @@
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
//
- // contextMenuStripWM
- //
- this.contextMenuStripWM.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.wMAPPToolStripMenuItem,
- this.wMUSERToolStripMenuItem});
- this.contextMenuStripWM.Name = "contextMenuStripWM";
- this.contextMenuStripWM.Size = new System.Drawing.Size(136, 48);
- //
- // wMAPPToolStripMenuItem
- //
- this.wMAPPToolStripMenuItem.Name = "wMAPPToolStripMenuItem";
- this.wMAPPToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
- this.wMAPPToolStripMenuItem.Text = "WM_APP";
- this.wMAPPToolStripMenuItem.Click += new System.EventHandler(this.wMAPPToolStripMenuItem_Click);
- //
- // wMUSERToolStripMenuItem
- //
- this.wMUSERToolStripMenuItem.Name = "wMUSERToolStripMenuItem";
- this.wMUSERToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
- this.wMUSERToolStripMenuItem.Text = "WM_USER";
- this.wMUSERToolStripMenuItem.Click += new System.EventHandler(this.wMUSERToolStripMenuItem_Click);
- //
// MessageCommand
//
this.AcceptButton = this.buttonOK;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.buttonCancel;
- this.ClientSize = new System.Drawing.Size(384, 184);
+ this.ClientSize = new System.Drawing.Size(384, 185);
+ this.Controls.Add(this.checkBoxMsgCurrApp);
this.Controls.Add(this.buttonCancel);
this.Controls.Add(this.buttonOK);
- this.Controls.Add(this.checkBoxMsgCurrApp);
this.Controls.Add(this.labelMsgApp);
this.Controls.Add(this.buttonFindMsgApp);
this.Controls.Add(this.textBoxMsgApp);
@@ -225,6 +226,7 @@
this.Controls.Add(this.labelWParam);
this.Controls.Add(this.labelMessage);
this.MinimizeBox = false;
+ this.MinimumSize = new System.Drawing.Size(392, 212);
this.Name = "MessageCommand";
this.ShowIcon = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
Modified: trunk/plugins/TV3ExtChannelChanger/Forms/MessageCommand.cs
===================================================================
--- trunk/plugins/TV3ExtChannelChanger/Forms/MessageCommand.cs 2007-02-02 07:47:21 UTC (rev 79)
+++ trunk/plugins/TV3ExtChannelChanger/Forms/MessageCommand.cs 2007-02-02 12:52:42 UTC (rev 80)
@@ -90,6 +90,12 @@
numericUpDownMsg.Value = new decimal(Win32.WM_USER);
}
+ private void checkBoxMsgCurrApp_CheckedChanged(object sender, EventArgs e)
+ {
+ textBoxMsgApp.Enabled = !checkBoxMsgCurrApp.Checked;
+ buttonFindMsgApp.Enabled = !checkBoxMsgCurrApp.Checked;
+ }
+
}
}
Modified: trunk/plugins/TV3MceBlaster/Forms/KeysCommand.Designer.cs
===================================================================
--- trunk/plugins/TV3MceBlaster/Forms/KeysCommand.Designer.cs 2007-02-02 07:47:21 UTC (rev 79)
+++ trunk/plugins/TV3MceBlaster/Forms/KeysCommand.Designer.cs 2007-02-02 12:52:42 UTC (rev 80)
@@ -43,7 +43,7 @@
this.buttonCancel.Location = new System.Drawing.Point(264, 128);
this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(64, 24);
- this.buttonCancel.TabIndex = 14;
+ this.buttonCancel.TabIndex = 3;
this.buttonCancel.Text = "Cancel";
this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
@@ -54,7 +54,7 @@
this.buttonOK.Location = new System.Drawing.Point(192, 128);
this.buttonOK.Name = "buttonOK";
this.buttonOK.Size = new System.Drawing.Size(64, 24);
- this.buttonOK.TabIndex = 13;
+ this.buttonOK.TabIndex = 2;
this.buttonOK.Text = "OK";
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
@@ -69,7 +69,7 @@
this.textBoxKeystrokes.Name = "textBoxKeystrokes";
this.textBoxKeystrokes.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.textBoxKeystrokes.Size = new System.Drawing.Size(320, 96);
- this.textBoxKeystrokes.TabIndex = 12;
+ this.textBoxKeystrokes.TabIndex = 1;
//
// labelKeystrokes
//
@@ -78,19 +78,22 @@
this.labelKeystrokes.Location = new System.Drawing.Point(8, 8);
this.labelKeystrokes.Name = "labelKeystrokes";
this.labelKeystrokes.Size = new System.Drawing.Size(320, 16);
- this.labelKeystrokes.TabIndex = 15;
+ this.labelKeystrokes.TabIndex = 0;
this.labelKeystrokes.Text = "Keystrokes:";
//
// KeysCommand
//
+ this.AcceptButton = this.buttonOK;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(336, 160);
+ this.CancelButton = this.buttonCancel;
+ this.ClientSize = new System.Drawing.Size(336, 161);
this.Controls.Add(this.labelKeystrokes);
this.Controls.Add(this.buttonCancel);
this.Controls.Add(this.buttonOK);
this.Controls.Add(this.textBoxKeystrokes);
this.MinimizeBox = false;
+ this.MinimumSize = new System.Drawing.Size(344, 188);
this.Name = "KeysCommand";
this.ShowIcon = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
Modified: trunk/plugins/TV3MceBlaster/Forms/MessageCommand.Designer.cs
===================================================================
--- trunk/plugins/TV3MceBlaster/Forms/MessageCommand.Designer.cs 2007-02-02 07:47:21 UTC (rev 79)
+++ trunk/plugins/TV3MceBlaster/Forms/MessageCommand.Designer.cs 2007-02-02 12:52:42 UTC (rev 80)
@@ -38,14 +38,14 @@
this.numericUpDownLParam = new System.Windows.Forms.NumericUpDown();
this.numericUpDownWParam = new System.Windows.Forms.NumericUpDown();
this.numericUpDownMsg = new System.Windows.Forms.NumericUpDown();
+ this.contextMenuStripWM = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this.wMAPPToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.wMUSERToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.labelLParam = new System.Windows.Forms.Label();
this.labelWParam = new System.Windows.Forms.Label();
this.labelMessage = new System.Windows.Forms.Label();
this.buttonCancel = new System.Windows.Forms.Button();
this.buttonOK = new System.Windows.Forms.Button();
- this.contextMenuStripWM = new System.Windows.Forms.ContextMenuStrip(this.components);
- this.wMAPPToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.wMUSERToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownLParam)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownWParam)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownMsg)).BeginInit();
@@ -60,6 +60,7 @@
this.checkBoxMsgCurrApp.TabIndex = 3;
this.checkBoxMsgCurrApp.Text = "Send to active window";
this.checkBoxMsgCurrApp.UseVisualStyleBackColor = true;
+ this.checkBoxMsgCurrApp.CheckedChanged += new System.EventHandler(this.checkBoxMsgCurrApp_CheckedChanged);
//
// labelMsgApp
//
@@ -133,6 +134,28 @@
this.numericUpDownMsg.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.numericUpDownMsg.ThousandsSeparator = true;
//
+ // contextMenuStripWM
+ //
+ this.contextMenuStripWM.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.wMAPPToolStripMenuItem,
+ this.wMUSERToolStripMenuItem});
+ this.contextMenuStripWM.Name = "contextMenuStripWM";
+ this.contextMenuStripWM.Size = new System.Drawing.Size(136, 48);
+ //
+ // wMAPPToolStripMenuItem
+ //
+ this.wMAPPToolStripMenuItem.Name = "wMAPPToolStripMenuItem";
+ this.wMAPPToolStripMenuItem.Size = new System.Drawing.Size(135, 22);
+ this.wMAPPToolStripMenuItem.Text = "WM_APP";
+ this.wMAPPToolStripMenuItem.Click += new System.EventHandler(this.wMAPPToolStripMenuItem_Click);
+ //
+ // wMUSERToolStripMenuItem
+ //
+ this.wMUSERToolStripMenuItem.Name = "wMUSERToolStripMenuItem";
+ this.wMUSERToolStripMenuItem.Size = new System.Drawing.Size(135, 22);
+ this.wMUSERToolStripMenuItem.Text = "WM_USER";
+ this.wMUSERToolStripMenuItem.Click += new System.EventHandler(this.wMUSERToolStripMenuItem_Click);
+ //
// labelLParam
//
this.labelLParam.Location = new System.Drawing.Point(8, 128);
@@ -183,38 +206,16 @@
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
//
- // contextMenuStripWM
- //
- this.contextMenuStripWM.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.wMAPPToolStripMenuItem,
- this.wMUSERToolStripMenuItem});
- this.contextMenuStripWM.Name = "contextMenuStripWM";
- this.contextMenuStripWM.Size = new System.Drawing.Size(136, 48);
- //
- // wMAPPToolStripMenuItem
- //
- this.wMAPPToolStripMenuItem.Name = "wMAPPToolStripMenuItem";
- this.wMAPPToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
- this.wMAPPToolStripMenuItem.Text = "WM_APP";
- this.wMAPPToolStripMenuItem.Click += new System.EventHandler(this.wMAPPToolStripMenuItem_Click);
- //
- // wMUSERToolStripMenuItem
- //
- this.wMUSERToolStripMenuItem.Name = "wMUSERToolStripMenuItem";
- this.wMUSERToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
- this.wMUSERToolStripMenuItem.Text = "WM_USER";
- this.wMUSERToolStripMenuItem.Click += new System.EventHandler(this.wMUSERToolStripMenuItem_Click);
- //
// MessageCommand
//
this.AcceptButton = this.buttonOK;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.buttonCancel;
- this.ClientSize = new System.Drawing.Size(384, 184);
+ this.ClientSize = new System.Drawing.Size(384, 185);
+ this.Controls.Add(this.checkBoxMsgCurrApp);
this.Controls.Add(this.buttonCancel);
this.Controls.Add(this.buttonOK);
- this.Controls.Add(this.checkBoxMsgCurrApp);
this.Controls.Add(this.labelMsgApp);
this.Controls.Add(this.buttonFindMsgApp);
this.Controls.Add(this.textBoxMsgApp);
@@ -225,6 +226,7 @@
this.Controls.Add(this.labelWParam);
this.Controls.Add(this.labelMessage);
this.MinimizeBox = false;
+ this.MinimumSize = new System.Drawing.Size(392, 212);
this.Name = "MessageCommand";
this.ShowIcon = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
Modified: trunk/plugins/TV3MceBlaster/Forms/MessageCommand.cs
===================================================================
--- trunk/plugins/TV3MceBlaster/Forms/MessageCommand.cs 2007-02-02 07:47:21 UTC (rev 79)
+++ trunk/plugins/TV3MceBlaster/Forms/MessageCommand.cs 2007-02-02 12:52:42 UTC (rev 80)
@@ -90,6 +90,12 @@
numericUpDownMsg.Value = new decimal(Win32.WM_USER);
}
+ private void checkBoxMsgCurrApp_CheckedChanged(object sender, EventArgs e)
+ {
+ textBoxMsgApp.Enabled = !checkBoxMsgCurrApp.Checked;
+ buttonFindMsgApp.Enabled = !checkBoxMsgCurrApp.Checked;
+ }
+
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ove...@us...> - 2007-03-16 20:07:54
|
Revision: 191
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=191&view=rev
Author: overture
Date: 2007-03-16 13:07:38 -0700 (Fri, 16 Mar 2007)
Log Message:
-----------
Removed Paths:
-------------
trunk/plugins/AddNewPlugin.cs
trunk/plugins/AssemblyInfo.cs
trunk/plugins/IPTVPlugin.csproj
trunk/plugins/IPTVPlugin.sln
trunk/plugins/IPTVSetup.cs
trunk/plugins/IPTVsetup.resx
trunk/plugins/ReflectionManager.cs
trunk/plugins/SetupManager.cs
trunk/plugins/SnapperInterface.cs
Deleted: trunk/plugins/AddNewPlugin.cs
===================================================================
--- trunk/plugins/AddNewPlugin.cs 2007-03-16 19:07:02 UTC (rev 190)
+++ trunk/plugins/AddNewPlugin.cs 2007-03-16 20:07:38 UTC (rev 191)
@@ -1,234 +0,0 @@
-using System;
-using System.Drawing;
-using System.Collections;
-using System.ComponentModel;
-using System.Windows.Forms;
-
-
-namespace myIPTV
-{
- /// <summary>
- /// Summary description for PluginsAddNew.
- /// </summary>
- public class PluginsAddNew : System.Windows.Forms.Form
- {
- private System.Windows.Forms.OpenFileDialog openFileDialog1;
- private CheckedListBox chklstBox;
- private System.Windows.Forms.Button btnOK;
- private System.Windows.Forms.Button btnCancel;
- private System.Windows.Forms.GroupBox grpDetails;
- private System.Windows.Forms.TextBox txtDesc;
- private System.Windows.Forms.Label lblDescription;
- private System.Windows.Forms.CheckBox chkBstate;
- private System.Windows.Forms.GroupBox grpDLLFile;
- private System.Windows.Forms.TextBox txtFilePath;
- private System.Windows.Forms.Button btnBrowse;
- private System.ComponentModel.Container components = null;
-
- #region Constructors
-
- public PluginsAddNew()
- {
- InitializeComponent();
- }
-
- public PluginsAddNew(CheckedListBox chkLstBox)
- {
- InitializeComponent();
- this.chklstBox = chkLstBox;
- }
-
- #endregion
-
- #region Dispose
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
-
- #endregion
-
- #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.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
- this.btnOK = new System.Windows.Forms.Button();
- this.btnCancel = new System.Windows.Forms.Button();
- this.grpDetails = new System.Windows.Forms.GroupBox();
- this.txtDesc = new System.Windows.Forms.TextBox();
- this.lblDescription = new System.Windows.Forms.Label();
- this.chkBstate = new System.Windows.Forms.CheckBox();
- this.grpDLLFile = new System.Windows.Forms.GroupBox();
- this.txtFilePath = new System.Windows.Forms.TextBox();
- this.btnBrowse = new System.Windows.Forms.Button();
- this.grpDetails.SuspendLayout();
- this.grpDLLFile.SuspendLayout();
- this.SuspendLayout();
- //
- // btnOK
- //
- this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.btnOK.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.btnOK.Location = new System.Drawing.Point(336, 216);
- this.btnOK.Name = "btnOK";
- this.btnOK.TabIndex = 3;
- this.btnOK.Text = "OK";
- this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
- //
- // btnCancel
- //
- this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.btnCancel.Location = new System.Drawing.Point(248, 216);
- this.btnCancel.Name = "btnCancel";
- this.btnCancel.TabIndex = 2;
- this.btnCancel.Text = "Cancel";
- this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
- //
- // grpDetails
- //
- this.grpDetails.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.grpDetails.Controls.Add(this.txtDesc);
- this.grpDetails.Controls.Add(this.lblDescription);
- this.grpDetails.Controls.Add(this.chkBstate);
- this.grpDetails.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.grpDetails.Location = new System.Drawing.Point(8, 80);
- this.grpDetails.Name = "grpDetails";
- this.grpDetails.Size = new System.Drawing.Size(400, 128);
- this.grpDetails.TabIndex = 1;
- this.grpDetails.TabStop = false;
- this.grpDetails.Text = "Details";
-
- //
- // txtDesc
- //
- this.txtDesc.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.txtDesc.Location = new System.Drawing.Point(104, 68);
- this.txtDesc.Name = "txtDesc";
- this.txtDesc.Size = new System.Drawing.Size(280, 20);
- this.txtDesc.TabIndex = 2;
- this.txtDesc.Text = "";
- //
- // lblDescription
- //
- this.lblDescription.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.lblDescription.Location = new System.Drawing.Point(16, 64);
- this.lblDescription.Name = "lblDescription";
- this.lblDescription.Size = new System.Drawing.Size(64, 23);
- this.lblDescription.TabIndex = 1;
- this.lblDescription.Text = "Description";
- this.lblDescription.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
-
- //
- // chkBstate
- //
- this.chkBstate.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.chkBstate.Location = new System.Drawing.Point(16, 24);
- this.chkBstate.Name = "chkBstate";
- this.chkBstate.TabIndex = 0;
- this.chkBstate.Text = "State (On/Off)";
-
- //
- // grpDLLFile
- //
- this.grpDLLFile.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.grpDLLFile.Controls.Add(this.txtFilePath);
- this.grpDLLFile.Controls.Add(this.btnBrowse);
- this.grpDLLFile.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.grpDLLFile.Location = new System.Drawing.Point(8, 8);
- this.grpDLLFile.Name = "grpDLLFile";
- this.grpDLLFile.Size = new System.Drawing.Size(400, 64);
- this.grpDLLFile.TabIndex = 0;
- this.grpDLLFile.TabStop = false;
- this.grpDLLFile.Text = "File";
-
- //
- // txtFilePath
- //
- this.txtFilePath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.txtFilePath.Location = new System.Drawing.Point(104, 24);
- this.txtFilePath.Name = "txtFilePath";
- this.txtFilePath.Size = new System.Drawing.Size(280, 20);
- this.txtFilePath.TabIndex = 1;
- this.txtFilePath.Text = "";
- //
- // btnBrowse
- //
- this.btnBrowse.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.btnBrowse.Location = new System.Drawing.Point(16, 24);
- this.btnBrowse.Name = "btnBrowse";
- this.btnBrowse.TabIndex = 0;
- this.btnBrowse.Text = "Browse";
- this.btnBrowse.Click += new System.EventHandler(this.btnBrowse_Click);
- //
- // PluginsAddNew
- //
- this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
- this.ClientSize = new System.Drawing.Size(416, 242);
- this.Controls.Add(this.btnOK);
- this.Controls.Add(this.btnCancel);
- this.Controls.Add(this.grpDetails);
- this.Controls.Add(this.grpDLLFile);
- this.Name = "PluginsAddNew";
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
- this.Text = "PluginsAddNew";
- this.grpDetails.ResumeLayout(false);
- this.grpDLLFile.ResumeLayout(false);
- this.ResumeLayout(false);
-
- }
- #endregion
-
- #region Event
-
- private void btnBrowse_Click(object sender, System.EventArgs e)
- {
- openFileDialog1.Filter = "Plugin files (*.dll)|*.dll|All files (*.*)|*.*";
- if(DialogResult.OK==openFileDialog1.ShowDialog())
- {
- txtFilePath.Text = openFileDialog1.FileName;
- }
- }
-
- private void btnOK_Click(object sender, System.EventArgs e)
- {
- SetupManager setupManager = new SetupManager();
- setupManager.LoadXMLDoc();
-
- bool ans = setupManager.TestNewItem(this.txtFilePath.Text,this.txtDesc.Text,this.chkBstate.Checked);
- if(ans)
- {
- setupManager.InsertNewItem(this.txtFilePath.Text,this.txtDesc.Text,this.chkBstate.Checked);
- this.chklstBox.Items.Add(this.txtDesc.Text,this.chkBstate.Checked);
- }
- this.Close();
- }
-
- private void btnCancel_Click(object sender, System.EventArgs e)
- {
- this.Close();
- }
-
- #endregion
- }
-}
Deleted: trunk/plugins/AssemblyInfo.cs
===================================================================
--- trunk/plugins/AssemblyInfo.cs 2007-03-16 19:07:02 UTC (rev 190)
+++ trunk/plugins/AssemblyInfo.cs 2007-03-16 20:07:38 UTC (rev 191)
@@ -1,27 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-// Information about this assembly is defined by the following
-// attributes.
-//
-// change them to the information which is associated with the assembly
-// you compile.
-
-[assembly: AssemblyTitle("MediaPortal IPTV Plugin")]
-[assembly: AssemblyDescription("IPTV Plugin Host Application for mini IPTV plugins")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("")]
-[assembly: AssemblyCopyright("")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// The assembly version has following format :
-//
-// Major.Minor.Build.Revision
-//
-// You can specify all values by your own or you can build default build and revision
-// numbers with the '*' character (the default):
-
-[assembly: AssemblyVersion("1.0.*")]
-
Deleted: trunk/plugins/IPTVPlugin.csproj
===================================================================
--- trunk/plugins/IPTVPlugin.csproj 2007-03-16 19:07:02 UTC (rev 190)
+++ trunk/plugins/IPTVPlugin.csproj 2007-03-16 20:07:38 UTC (rev 191)
@@ -1,49 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <OutputType>Library</OutputType>
- <RootNamespace>IPTVPlugin</RootNamespace>
- <AssemblyName>IPTVPlugin</AssemblyName>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProjectGuid>{14CD8D0D-30E2-44FB-8E49-078D1578668D}</ProjectGuid>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
- <OutputPath>bin\Debug\</OutputPath>
- <Optimize>False</Optimize>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <DebugSymbols>True</DebugSymbols>
- <DebugType>Full</DebugType>
- <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
- <OutputPath>bin\Release\</OutputPath>
- <Optimize>True</Optimize>
- <DefineConstants>TRACE</DefineConstants>
- <DebugSymbols>False</DebugSymbols>
- <DebugType>None</DebugType>
- <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Xml" />
- <Reference Include="System.Data, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
- <Reference Include="System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
- <Reference Include="Core">
- <HintPath>..\..\..\..\..\MediaPortal\mediaportal\Core\bin\Release\Core.dll</HintPath>
- <SpecificVersion>False</SpecificVersion>
- </Reference>
- <Reference Include="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="SnapperInterface.cs" />
- <Compile Include="AssemblyInfo.cs" />
- <Compile Include="ReflectionManager.cs" />
- <Compile Include="IPTVSetup.cs" />
- <EmbeddedResource Include="IPTVsetup.resx">
- <DependentUpon>IPTVSetup.cs</DependentUpon>
- </EmbeddedResource>
- <Compile Include="SetupManager.cs" />
- <Compile Include="AddNewPlugin.cs" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
-</Project>
\ No newline at end of file
Deleted: trunk/plugins/IPTVPlugin.sln
===================================================================
--- trunk/plugins/IPTVPlugin.sln 2007-03-16 19:07:02 UTC (rev 190)
+++ trunk/plugins/IPTVPlugin.sln 2007-03-16 20:07:38 UTC (rev 191)
@@ -1,16 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 9.00
-# SharpDevelop 2.0.0.922
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IPTVPlugin", "IPTVPlugin.csproj", "{14CD8D0D-30E2-44FB-8E49-078D1578668D}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {14CD8D0D-30E2-44FB-8E49-078D1578668D}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {14CD8D0D-30E2-44FB-8E49-078D1578668D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {14CD8D0D-30E2-44FB-8E49-078D1578668D}.Release|Any CPU.Build.0 = Release|Any CPU
- {14CD8D0D-30E2-44FB-8E49-078D1578668D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- EndGlobalSection
-EndGlobal
Deleted: trunk/plugins/IPTVSetup.cs
===================================================================
--- trunk/plugins/IPTVSetup.cs 2007-03-16 19:07:02 UTC (rev 190)
+++ trunk/plugins/IPTVSetup.cs 2007-03-16 20:07:38 UTC (rev 191)
@@ -1,501 +0,0 @@
-using System;
-using System.Drawing;
-using System.Windows.Forms;
-using System.Xml;
-using MediaPortal.GUI.Library;
-
-namespace myIPTV
-{
- /// <summary>
- /// Description of MyIPTVsetup.
- /// </summary>
- public class IPTVsetup : System.Windows.Forms.Form, ISetupForm
- {
- private System.ComponentModel.Container components = null;
-
- public IPTVsetup()
- {
- InitializeComponent();
- }
-
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
-
- #region Windows Forms Designer generated code
- /// <summary>
- /// This method is required for Windows Forms designer support.
- /// Do not change the method contents inside the source code editor. The Forms designer might
- /// not be able to load this method if it was changed manually.
- /// </summary>
- private void InitializeComponent()
- {
- this.grpBoxConnectInfo = new System.Windows.Forms.GroupBox();
- this.chkBoxUseDefaultProxy = new System.Windows.Forms.CheckBox();
- this.txtProxyPort = new System.Windows.Forms.TextBox();
- this.label7 = new System.Windows.Forms.Label();
- this.txtProxyIPAddress = new System.Windows.Forms.TextBox();
- this.label6 = new System.Windows.Forms.Label();
- this.txtProxyPass = new System.Windows.Forms.TextBox();
- this.label5 = new System.Windows.Forms.Label();
- this.chkBoxUseProxy = new System.Windows.Forms.CheckBox();
- this.txtProxyUser = new System.Windows.Forms.TextBox();
- this.label4 = new System.Windows.Forms.Label();
- this.btnCancel = new System.Windows.Forms.Button();
- this.btnOK = new System.Windows.Forms.Button();
- this.tabControl1 = new System.Windows.Forms.TabControl();
- this.tabPage1 = new System.Windows.Forms.TabPage();
- this.tabPage2 = new System.Windows.Forms.TabPage();
- this.btnAddNewPlug = new System.Windows.Forms.Button();
- this.btnRemove = new System.Windows.Forms.Button();
- this.checkedListBox1 = new System.Windows.Forms.CheckedListBox();
- this.label1 = new System.Windows.Forms.Label();
- this.lblAuthor = new System.Windows.Forms.Label();
- this.grpBoxConnectInfo.SuspendLayout();
- this.tabControl1.SuspendLayout();
- this.tabPage1.SuspendLayout();
- this.tabPage2.SuspendLayout();
- this.SuspendLayout();
- //
- // grpBoxConnectInfo
- //
- this.grpBoxConnectInfo.Controls.Add(this.chkBoxUseDefaultProxy);
- this.grpBoxConnectInfo.Controls.Add(this.txtProxyPort);
- this.grpBoxConnectInfo.Controls.Add(this.label7);
- this.grpBoxConnectInfo.Controls.Add(this.txtProxyIPAddress);
- this.grpBoxConnectInfo.Controls.Add(this.label6);
- this.grpBoxConnectInfo.Controls.Add(this.txtProxyPass);
- this.grpBoxConnectInfo.Controls.Add(this.label5);
- this.grpBoxConnectInfo.Controls.Add(this.chkBoxUseProxy);
- this.grpBoxConnectInfo.Controls.Add(this.txtProxyUser);
- this.grpBoxConnectInfo.Controls.Add(this.label4);
- this.grpBoxConnectInfo.Location = new System.Drawing.Point(6, 35);
- this.grpBoxConnectInfo.Name = "grpBoxConnectInfo";
- this.grpBoxConnectInfo.Size = new System.Drawing.Size(640, 246);
- this.grpBoxConnectInfo.TabIndex = 1;
- this.grpBoxConnectInfo.TabStop = false;
- this.grpBoxConnectInfo.Text = "Internet Connection Information";
- this.grpBoxConnectInfo.UseCompatibleTextRendering = true;
- //
- // chkBoxUseDefaultProxy
- //
- this.chkBoxUseDefaultProxy.Enabled = false;
- this.chkBoxUseDefaultProxy.Location = new System.Drawing.Point(67, 99);
- this.chkBoxUseDefaultProxy.Name = "chkBoxUseDefaultProxy";
- this.chkBoxUseDefaultProxy.Size = new System.Drawing.Size(242, 24);
- this.chkBoxUseDefaultProxy.TabIndex = 9;
- this.chkBoxUseDefaultProxy.Text = "Use Default Proxy Authentication?";
- this.chkBoxUseDefaultProxy.UseCompatibleTextRendering = true;
- this.chkBoxUseDefaultProxy.CheckedChanged += new System.EventHandler(this.ChkBoxUseDefaultProxyCheckedChanged);
- //
- // txtProxyPort
- //
- this.txtProxyPort.Enabled = false;
- this.txtProxyPort.Location = new System.Drawing.Point(488, 155);
- this.txtProxyPort.Name = "txtProxyPort";
- this.txtProxyPort.Size = new System.Drawing.Size(49, 20);
- this.txtProxyPort.TabIndex = 8;
- //
- // label7
- //
- this.label7.Location = new System.Drawing.Point(382, 155);
- this.label7.Name = "label7";
- this.label7.Size = new System.Drawing.Size(100, 23);
- this.label7.TabIndex = 7;
- this.label7.Text = "Port";
- this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- this.label7.UseCompatibleTextRendering = true;
- //
- // txtProxyIPAddress
- //
- this.txtProxyIPAddress.Enabled = false;
- this.txtProxyIPAddress.Location = new System.Drawing.Point(488, 129);
- this.txtProxyIPAddress.Name = "txtProxyIPAddress";
- this.txtProxyIPAddress.Size = new System.Drawing.Size(100, 20);
- this.txtProxyIPAddress.TabIndex = 6;
- //
- // label6
- //
- this.label6.Location = new System.Drawing.Point(382, 129);
- this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(100, 23);
- this.label6.TabIndex = 5;
- this.label6.Text = "IP Address";
- this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- this.label6.UseCompatibleTextRendering = true;
- //
- // txtProxyPass
- //
- this.txtProxyPass.Enabled = false;
- this.txtProxyPass.Location = new System.Drawing.Point(173, 155);
- this.txtProxyPass.Name = "txtProxyPass";
- this.txtProxyPass.Size = new System.Drawing.Size(100, 20);
- this.txtProxyPass.TabIndex = 4;
- //
- // label5
- //
- this.label5.Location = new System.Drawing.Point(67, 155);
- this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(100, 23);
- this.label5.TabIndex = 3;
- this.label5.Text = "Password";
- this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- this.label5.UseCompatibleTextRendering = true;
- //
- // chkBoxUseProxy
- //
- this.chkBoxUseProxy.Location = new System.Drawing.Point(33, 28);
- this.chkBoxUseProxy.Name = "chkBoxUseProxy";
- this.chkBoxUseProxy.Size = new System.Drawing.Size(136, 24);
- this.chkBoxUseProxy.TabIndex = 2;
- this.chkBoxUseProxy.Text = "Use a Proxy Server?";
- this.chkBoxUseProxy.UseCompatibleTextRendering = true;
- this.chkBoxUseProxy.CheckedChanged += new System.EventHandler(this.ChkBoxUseProxyCheckedChanged);
- //
- // txtProxyUser
- //
- this.txtProxyUser.Enabled = false;
- this.txtProxyUser.Location = new System.Drawing.Point(173, 129);
- this.txtProxyUser.Name = "txtProxyUser";
- this.txtProxyUser.Size = new System.Drawing.Size(100, 20);
- this.txtProxyUser.TabIndex = 1;
- //
- // label4
- //
- this.label4.Location = new System.Drawing.Point(67, 129);
- this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(100, 23);
- this.label4.TabIndex = 0;
- this.label4.Text = "Username";
- this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- this.label4.UseCompatibleTextRendering = true;
- //
- // btnCancel
- //
- this.btnCancel.Location = new System.Drawing.Point(597, 384);
- this.btnCancel.Name = "btnCancel";
- this.btnCancel.Size = new System.Drawing.Size(75, 23);
- this.btnCancel.TabIndex = 2;
- this.btnCancel.Text = "Cancel";
- this.btnCancel.TextAlign = System.Drawing.ContentAlignment.TopCenter;
- this.btnCancel.UseCompatibleTextRendering = true;
- this.btnCancel.Click += new System.EventHandler(this.BtnCancelClick);
- //
- // btnOK
- //
- this.btnOK.Location = new System.Drawing.Point(516, 384);
- this.btnOK.Name = "btnOK";
- this.btnOK.Size = new System.Drawing.Size(75, 23);
- this.btnOK.TabIndex = 3;
- this.btnOK.Text = "OK";
- this.btnOK.TextAlign = System.Drawing.ContentAlignment.TopCenter;
- this.btnOK.UseCompatibleTextRendering = true;
- this.btnOK.Click += new System.EventHandler(this.BtnOKClick);
- //
- // tabControl1
- //
- this.tabControl1.Controls.Add(this.tabPage2);
- this.tabControl1.Controls.Add(this.tabPage1);
- this.tabControl1.Location = new System.Drawing.Point(12, 12);
- this.tabControl1.Name = "tabControl1";
- this.tabControl1.SelectedIndex = 0;
- this.tabControl1.Size = new System.Drawing.Size(660, 357);
- this.tabControl1.TabIndex = 4;
- //
- // tabPage1
- //
- this.tabPage1.Controls.Add(this.grpBoxConnectInfo);
- this.tabPage1.Location = new System.Drawing.Point(4, 23);
- this.tabPage1.Name = "tabPage1";
- this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
- this.tabPage1.Size = new System.Drawing.Size(652, 330);
- this.tabPage1.TabIndex = 0;
- this.tabPage1.Text = "Proxy Settings";
- this.tabPage1.UseVisualStyleBackColor = true;
- //
- // tabPage2
- //
- this.tabPage2.Controls.Add(this.lblAuthor);
- this.tabPage2.Controls.Add(this.label1);
- this.tabPage2.Controls.Add(this.btnAddNewPlug);
- this.tabPage2.Controls.Add(this.btnRemove);
- this.tabPage2.Controls.Add(this.checkedListBox1);
- this.tabPage2.Location = new System.Drawing.Point(4, 23);
- this.tabPage2.Name = "tabPage2";
- this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
- this.tabPage2.Size = new System.Drawing.Size(652, 330);
- this.tabPage2.TabIndex = 1;
- this.tabPage2.Text = "IPTV Mini Plugins";
- this.tabPage2.UseVisualStyleBackColor = true;
- //
- // btnAddNewPlug
- //
- this.btnAddNewPlug.Location = new System.Drawing.Point(526, 301);
- this.btnAddNewPlug.Name = "btnAddNewPlug";
- this.btnAddNewPlug.Size = new System.Drawing.Size(107, 23);
- this.btnAddNewPlug.TabIndex = 2;
- this.btnAddNewPlug.Text = "Add New Plugin";
- this.btnAddNewPlug.UseCompatibleTextRendering = true;
- this.btnAddNewPlug.UseVisualStyleBackColor = true;
- this.btnAddNewPlug.Click += new System.EventHandler(this.BtnAddNewPlugClick);
- //
- // btnRemove
- //
- this.btnRemove.Location = new System.Drawing.Point(18, 301);
- this.btnRemove.Name = "btnRemove";
- this.btnRemove.Size = new System.Drawing.Size(110, 23);
- this.btnRemove.TabIndex = 1;
- this.btnRemove.Text = "Remove Selected";
- this.btnRemove.UseCompatibleTextRendering = true;
- this.btnRemove.UseVisualStyleBackColor = true;
- this.btnRemove.Click += new System.EventHandler(this.BtnRemoveClick);
- //
- // checkedListBox1
- //
- this.checkedListBox1.FormattingEnabled = true;
- this.checkedListBox1.Location = new System.Drawing.Point(18, 36);
- this.checkedListBox1.Name = "checkedListBox1";
- this.checkedListBox1.Size = new System.Drawing.Size(615, 259);
- this.checkedListBox1.TabIndex = 0;
- this.checkedListBox1.UseCompatibleTextRendering = true;
- this.checkedListBox1.SelectedIndexChanged += new System.EventHandler(this.CheckedListBox1SelectedIndexChanged);
- //
- // label1
- //
- this.label1.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.label1.Location = new System.Drawing.Point(18, 7);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(100, 23);
- this.label1.TabIndex = 3;
- this.label1.Text = "Author:";
- this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
- this.label1.UseCompatibleTextRendering = true;
- //
- // lblAuthor
- //
- this.lblAuthor.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.lblAuthor.Location = new System.Drawing.Point(99, 7);
- this.lblAuthor.Name = "lblAuthor";
- this.lblAuthor.Size = new System.Drawing.Size(100, 23);
- this.lblAuthor.TabIndex = 4;
- this.lblAuthor.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- this.lblAuthor.UseCompatibleTextRendering = true;
- //
- // IPTVsetup
- //
- this.ClientSize = new System.Drawing.Size(686, 410);
- this.Controls.Add(this.tabControl1);
- this.Controls.Add(this.btnOK);
- this.Controls.Add(this.btnCancel);
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
- this.Name = "IPTVsetup";
- this.Text = "My IPTV Setup";
- this.Load += new System.EventHandler(this.MyIPTVsetupLoad);
- this.grpBoxConnectInfo.ResumeLayout(false);
- this.grpBoxConnectInfo.PerformLayout();
- this.tabControl1.ResumeLayout(false);
- this.tabPage1.ResumeLayout(false);
- this.tabPage2.ResumeLayout(false);
- this.ResumeLayout(false);
- }
- private System.Windows.Forms.Label label1;
- private System.Windows.Forms.Label lblAuthor;
- private System.Windows.Forms.Button btnRemove;
- private System.Windows.Forms.Button btnAddNewPlug;
- private System.Windows.Forms.CheckedListBox checkedListBox1;
- private System.Windows.Forms.TabPage tabPage2;
- private System.Windows.Forms.TabPage tabPage1;
- private System.Windows.Forms.TabControl tabControl1;
- private System.Windows.Forms.Button btnOK;
- private System.Windows.Forms.Button btnCancel;
- private System.Windows.Forms.Label label4;
- private System.Windows.Forms.TextBox txtProxyUser;
- private System.Windows.Forms.CheckBox chkBoxUseProxy;
- private System.Windows.Forms.Label label5;
- private System.Windows.Forms.TextBox txtProxyPass;
- private System.Windows.Forms.Label label6;
- private System.Windows.Forms.TextBox txtProxyIPAddress;
- private System.Windows.Forms.Label label7;
- private System.Windows.Forms.TextBox txtProxyPort;
- private System.Windows.Forms.CheckBox chkBoxUseDefaultProxy;
- private System.Windows.Forms.GroupBox grpBoxConnectInfo;
- #endregion
-
- void ChkBoxUseProxyCheckedChanged(object sender, System.EventArgs e)
- {
- if(chkBoxUseProxy.Checked==true)
- {
- chkBoxUseDefaultProxy.Checked = true;
- chkBoxUseDefaultProxy.Enabled = true;
- txtProxyIPAddress.Enabled = true;
- txtProxyPort.Enabled = true;
- }
- else
- {
- chkBoxUseDefaultProxy.Checked = false;
- chkBoxUseDefaultProxy.Enabled = false;
- txtProxyIPAddress.Enabled = false;
- txtProxyPort.Enabled = false;
- txtProxyUser.Enabled = false;
- txtProxyPass.Enabled = false;
- }
-
- }
-
- void ChkBoxUseDefaultProxyCheckedChanged(object sender, System.EventArgs e)
- {
- if(chkBoxUseDefaultProxy.Checked==false)
- {
- txtProxyUser.Enabled = true;
- txtProxyPass.Enabled = true;
- }
- else
- {
- txtProxyUser.Enabled = false;
- txtProxyPass.Enabled = false;
- }
- }
-
- void MyIPTVsetupLoad(object sender, System.EventArgs e)
- {
- SetupManager setupManager = new SetupManager();
- setupManager.LoadXMLDoc();
- setupManager.GetPluginDetails();
- setupManager.LoadPluginItems(this.checkedListBox1);
-
- XmlDocument xmld = new XmlDocument();
- xmld.Load("iptvsettings.xml");
-
- // Load Proxy Details from XML file
- chkBoxUseProxy.Checked = Convert.ToBoolean(xmld.SelectSingleNode("/settings/proxydetails/useproxy").InnerText);
- chkBoxUseDefaultProxy.Checked = Convert.ToBoolean(xmld.SelectSingleNode("/settings/proxydetails/usedefaultproxy").InnerText);
- txtProxyUser.Text = xmld.SelectSingleNode("/settings/proxydetails/proxyuser").InnerText;
- txtProxyPass.Text = xmld.SelectSingleNode("/settings/proxydetails/proxypassword").InnerText;
- txtProxyIPAddress.Text = xmld.SelectSingleNode("/settings/proxydetails/proxyipaddress").InnerText;
- txtProxyPort.Text = xmld.SelectSingleNode("/settings/proxydetails/proxyport").InnerText;
- }
-
- void BtnOKClick(object sender, System.EventArgs e)
- {
- XmlNode nchkBoxUseProxyNode;
- XmlNode nchkBoxUseDefaultProxyNode;
- XmlNode ntxtProxyUserNode;
- XmlNode ntxtProxyPassNode;
- XmlNode ntxtProxyIPAddressNode;
- XmlNode ntxtProxyPortNode;
-
- XmlDocument xmld = new XmlDocument();
- xmld.Load("iptvsettings.xml");
-
- nchkBoxUseProxyNode = xmld.SelectSingleNode("/settings/proxydetails/useproxy");
- nchkBoxUseDefaultProxyNode = xmld.SelectSingleNode("/settings/proxydetails/usedefaultproxy");
- nt...
[truncated message content] |
|
From: <mab...@us...> - 2007-03-26 17:26:03
|
Revision: 226
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=226&view=rev
Author: mablebee
Date: 2007-03-26 10:25:54 -0700 (Mon, 26 Mar 2007)
Log Message:
-----------
Removed file/folder
Removed Paths:
-------------
trunk/plugins/AutoStart.sln
trunk/plugins/AutoStart.suo
Deleted: trunk/plugins/AutoStart.sln
===================================================================
--- trunk/plugins/AutoStart.sln 2007-03-26 17:25:24 UTC (rev 225)
+++ trunk/plugins/AutoStart.sln 2007-03-26 17:25:54 UTC (rev 226)
@@ -1,20 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual C# Express 2005
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutoStart", "AutoStart\AutoStart.csproj", "{9A71624D-ABAE-4D49-B05D-F1C83DE77C07}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {9A71624D-ABAE-4D49-B05D-F1C83DE77C07}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {9A71624D-ABAE-4D49-B05D-F1C83DE77C07}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {9A71624D-ABAE-4D49-B05D-F1C83DE77C07}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {9A71624D-ABAE-4D49-B05D-F1C83DE77C07}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
Deleted: trunk/plugins/AutoStart.suo
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gre...@us...> - 2007-04-26 00:24:40
|
Revision: 345
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=345&view=rev
Author: gregmac45
Date: 2007-04-25 17:24:38 -0700 (Wed, 25 Apr 2007)
Log Message:
-----------
Initial Import
Added Paths:
-----------
trunk/plugins/OnlinePhotos/
trunk/plugins/OnlinePhotos/AssemblyInfo.cs
trunk/plugins/OnlinePhotos/Flickr.cs
trunk/plugins/OnlinePhotos/FlickrNet.dll
trunk/plugins/OnlinePhotos/MyClass.cs
trunk/plugins/OnlinePhotos/OnlinePhotos.csproj
trunk/plugins/OnlinePhotos/OnlinePhotos.sln
trunk/plugins/OnlinePhotos/OnlinePhotos.suo
trunk/plugins/OnlinePhotos/bin/
trunk/plugins/OnlinePhotos/bin/Debug/
trunk/plugins/OnlinePhotos/bin/Release/
trunk/plugins/OnlinePhotos/myonlinephotos.xml
trunk/plugins/OnlinePhotos/obj/
trunk/plugins/OnlinePhotos/obj/Debug/
trunk/plugins/OnlinePhotos/obj/Release/
Added: trunk/plugins/OnlinePhotos/AssemblyInfo.cs
===================================================================
--- trunk/plugins/OnlinePhotos/AssemblyInfo.cs (rev 0)
+++ trunk/plugins/OnlinePhotos/AssemblyInfo.cs 2007-04-26 00:24:38 UTC (rev 345)
@@ -0,0 +1,31 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// Information about this assembly is defined by the following
+// attributes.
+//
+// change them to the information which is associated with the assembly
+// you compile.
+
+[assembly: AssemblyTitle("OnlinePhotos")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("OnlinePhotos")]
+[assembly: AssemblyCopyright("")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// This sets the default COM visibility of types in the assembly to invisible.
+// If you need to expose a type to COM, use [ComVisible(true)] on that type.
+[assembly: ComVisible(false)]
+
+// The assembly version has following format :
+//
+// Major.Minor.Build.Revision
+//
+// You can specify all values by your own or you can build default build and revision
+// numbers with the '*' character (the default):
+
+[assembly: AssemblyVersion("1.0.*")]
Added: trunk/plugins/OnlinePhotos/Flickr.cs
===================================================================
--- trunk/plugins/OnlinePhotos/Flickr.cs (rev 0)
+++ trunk/plugins/OnlinePhotos/Flickr.cs 2007-04-26 00:24:38 UTC (rev 345)
@@ -0,0 +1,92 @@
+/*
+ * Created by SharpDevelop.
+ * User: GZamor1
+ * Date: 4/24/2007
+ * Time: 10:44 AM
+ *
+ * To change this template use Tools | Options | Coding | Edit Standard Headers.
+ */
+
+using System;
+using FlickrNet;
+using System.Collections.Generic;
+namespace OnlinePhotos
+{
+ /// <summary>
+ /// Description of Flickr.
+ /// </summary>
+ public class MyFlickr
+ {
+ //public static MyFlickr instance = new MyFlickr();
+ private static Flickr _flickr = new Flickr("e48ef053dd76717cd30544475e36b2a6");
+
+ public static String getUserId(String username)
+ {
+ String userId = String.Empty;
+ try
+ {
+ FoundUser user= _flickr.PeopleFindByUsername(username);
+ userId = user.UserId;
+ }
+ catch (Exception)
+ {
+ }
+ return userId;
+ }
+ public static List<MyPhoto> getUserPhotos(String username)
+ {
+ List<MyPhoto> myPhotoList = new List<MyPhoto>();
+ String userID = getUserId(username);
+ if (userID == String.Empty)
+ {
+ return myPhotoList;
+ }
+ Photos userPhotos = _flickr.PhotosSearch(userID, "");
+ return loadMyPhotoList(userPhotos);
+
+
+ }
+ public static List<MyPhoto> getInterestingPhotos(){
+ PhotoSearchExtras extras = new PhotoSearchExtras();
+ Photos photos = _flickr.InterestingnessGetList(extras,50,1);
+ return loadMyPhotoList(photos);
+ }
+ public static List<MyPhoto> getRecentPhotos()
+ {
+ Photos photos = _flickr.PhotosGetRecent();
+ return loadMyPhotoList(photos);
+ }
+ public static List<MyPhoto> getPhotosByTag(String tag)
+ {
+ Photos photos = _flickr.PhotosSearch(tag,"");
+ return loadMyPhotoList(photos);
+ }
+ public static List<MyPhoto> getPhotosByText(String text)
+ {
+ Photos photos = _flickr.PhotosSearchText(text, "");
+ return loadMyPhotoList(photos);
+ }
+ private static List<MyPhoto> loadMyPhotoList(Photos photos)
+ {
+ List<MyPhoto> myPhotoList = new List<MyPhoto>();
+ MyPhoto myPhoto;
+ foreach (Photo photo in photos.PhotoCollection)
+ {
+ myPhoto = new MyPhoto();
+ myPhoto.id = photo.PhotoId;
+ myPhoto.Title = photo.Title;
+ myPhoto.largeUrl = photo.LargeUrl;
+ myPhoto.mediumUrl = photo.MediumUrl;
+ myPhoto.smallUrl = photo.SmallUrl;
+ myPhoto.thumbnailUrl = photo.ThumbnailUrl;
+ myPhotoList.Add(myPhoto);
+ //photo.;
+ }
+
+ return myPhotoList;
+
+ }
+
+
+ }
+}
Added: trunk/plugins/OnlinePhotos/FlickrNet.dll
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/OnlinePhotos/FlickrNet.dll
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/OnlinePhotos/MyClass.cs
===================================================================
--- trunk/plugins/OnlinePhotos/MyClass.cs (rev 0)
+++ trunk/plugins/OnlinePhotos/MyClass.cs 2007-04-26 00:24:38 UTC (rev 345)
@@ -0,0 +1,537 @@
+/*
+ * Created by SharpDevelop.
+ * User: GZamor1
+ * Date: 4/24/2007
+ * Time: 10:42 AM
+ *
+ * To change this template use Tools | Options | Coding | Edit Standard Headers.
+ */
+using System;
+using MediaPortal;
+using MediaPortal.Util;
+using MediaPortal.GUI.Library;
+using MediaPortal.Dialogs;
+using MediaPortal.GUI.Pictures;
+using System.Collections.Generic;
+using System.Xml;
+using System.Net;
+using System.Web;
+using System.ComponentModel;
+
+namespace OnlinePhotos
+{
+ public class MyPhoto
+ {
+ private String title;
+ public String Title
+ {
+ get
+ {
+ return title;
+ }
+ set
+ {
+ title = value;
+ ThumbName = Utils.GetFilename(Utils.GetThumb(value));
+ }
+ }
+ public String id;
+ public String thumbnailUrl;
+ public String largeUrl;
+ public String mediumUrl;
+ public String smallUrl;
+ public String ThumbName;
+ }
+
+ /// <summary>
+ /// Description of MyClass.
+ /// </summary>
+ public class MyOnlinePhotos : GUIWindow, ISetupForm
+ {
+ [SkinControlAttribute(2)]
+ protected GUIButtonControl btnViewAs = null;
+ [SkinControlAttribute(3)]
+ protected GUIButtonControl btnSlide = null;
+ [SkinControlAttribute(50)]
+ protected GUIFacadeControl facadeView = null;
+ private State _CurrentState = State.home;
+ protected View currentView = View.List;
+ protected List<MyPhoto> CurrentPhotoList;
+ protected bool _imagesDone = true;
+ public enum State
+ {
+ home = 0,
+ categories = 1,
+ videos = 2
+ }
+ public enum View
+ {
+ List = 0,
+ Icons = 1,
+ LargeIcons = 2,
+ FilmStrip = 3
+ }
+
+ public string PluginName()
+ {
+
+ return "Online Photos";
+
+ }
+
+ // Returns the description of the plugin is shown in the plugin menu
+
+ public string Description()
+ {
+
+ return "Flickr and Google Photo Plugin";
+
+ }
+
+ // Returns the author of the plugin which is shown in the plugin menu
+
+ public string Author()
+ {
+
+ return "GregMac45";
+
+ }
+
+ // show the setup dialog
+
+ public void ShowPlugin()
+ {
+
+ //MessageBox.Show("Nothing to configure, this is just an example");
+
+ }
+
+ // Indicates whether plugin can be enabled/disabled
+
+ public bool CanEnable()
+ {
+
+ return true;
+
+ }
+
+ // get ID of windowplugin belonging to this setup
+
+ public int GetWindowId()
+ {
+
+ return GetID;
+
+ }
+
+ // Indicates if plugin is enabled by default;
+
+ public bool DefaultEnabled()
+ {
+
+ return true;
+
+ }
+
+ // indicates if a plugin has its own setup screen
+
+ public bool HasSetup()
+ {
+
+ return false;
+
+ }
+ public override int GetID
+ {
+ get
+ {
+ return 5757;
+ }
+ set
+ {
+ }
+ }
+
+ public override bool Init()
+ {
+ LoadSettings();
+ return Load(GUIGraphicsContext.Skin + @"\myonlinephotos.xml");
+
+ }
+ public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage)
+ {
+ strButtonText = PluginName();
+
+ strButtonImage = String.Empty;
+
+ strButtonImageFocus = String.Empty;
+
+ strPictureImage = String.Empty;
+
+ return true;
+ }
+ public bool ShowDefaultHome()
+ {
+ return true;
+ }
+ protected override void OnPageLoad()
+ {
+ if (_CurrentState == State.home)
+ {
+ //_log.Info("onPageLoad state home");
+ GUIPropertyManager.SetProperty("#header.label", "Online Photos");
+ //DisplaySites();
+ }
+ currentView = View.Icons;
+ ChangeFacadeView();
+
+
+ base.OnPageLoad();
+ }
+
+ protected override void OnPageDestroy(int new_windowId)
+ {
+
+ base.OnPageDestroy(new_windowId);
+ }
+
+ protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType)
+ {
+ if (control == btnViewAs)
+ {
+ ChangeFacadeView();
+ }
+ else if (control == btnSlide)
+ {
+ OnSlideShow();
+ }
+ }
+ public void DisplayInterestingFlickrPhotos()
+ {
+ CurrentPhotoList =
+ MyFlickr.getInterestingPhotos();
+ DisplayCurrentPhotos();
+ }
+ public void DisplayRecentFlickrPhotos()
+ {
+ CurrentPhotoList = MyFlickr.getRecentPhotos();
+ DisplayCurrentPhotos();
+ }
+ public void DisplayFlickrPhotosWithTags(String tags)
+ {
+ CurrentPhotoList = MyFlickr.getPhotosByTag(tags);
+ DisplayCurrentPhotos();
+ }
+ public void DisplayCurrentPhotos()
+ {
+ facadeView.Clear();
+ GUIListItem item;
+ int i = 0;
+ List<String> ImageList = new List<string>();
+ foreach (MyPhoto photo in CurrentPhotoList)
+ {
+ item = new GUIListItem(photo.Title);
+ item.Path = photo.mediumUrl;
+ item.ItemId = i;
+ item.RetrieveArt = false;
+ item.OnRetrieveArt += new MediaPortal.GUI.Library.GUIListItem.RetrieveCoverArtHandler(OnRetrieveCoverArt);
+ item.OnItemSelected += new MediaPortal.GUI.Library.GUIListItem.ItemSelectedHandler(item_OnItemSelected);
+ ImageList.Add(photo.mediumUrl);
+ Log.Info("setting photo to url " + photo.mediumUrl);
+ facadeView.Add(item);
+ GUIWindowManager.Process();
+ i++;
+
+ }
+ BackgroundWorker worker = new BackgroundWorker();
+
+ worker.DoWork += new DoWorkEventHandler(downloadImages);
+ worker.RunWorkerAsync(ImageList);
+
+ using (WaitCursor cursor = new WaitCursor())
+ {
+ while (_imagesDone == false)
+ {
+ GUIWindowManager.Process();
+ }
+ }
+
+ }
+ private String GetThumbnail(String lsUrl)
+ {
+ string lsThumb = MediaPortal.Util.Utils.GetThumb(lsUrl);
+ lsThumb = System.IO.Path.GetFileName(lsThumb);
+ string lsThumbsDir = "C:\\Temp\\";
+ if (System.IO.Directory.Exists(lsThumbsDir) == false)
+ {
+ System.IO.Directory.CreateDirectory(lsThumbsDir);
+ }
+ lsThumb = lsThumbsDir + lsThumb;
+ //Log.Info(lsThumb);
+ if (System.IO.File.Exists(lsThumb) == false)
+ {
+ String lsFilename = System.IO.Path.GetFileName(lsThumb);
+ //moLog.Info("Filename will be {0}", lsFilename);
+ MediaPortal.Util.Utils.DownLoadImage(lsUrl, lsThumb);
+ }
+ if (System.IO.File.Exists(lsThumb))
+ {
+ //facadeView[liIdx].IconImageBig = lsThumb;
+ return lsThumb;
+ }
+ else
+ {
+ return "";
+ //facadeView[liIdx].IconImageBig = "";
+ }
+ }
+ public void downloadImages(object sender, DoWorkEventArgs e)
+ {
+ _imagesDone = false;
+ List<String> imageList = (List<String>)e.Argument;
+ WebClient client = new WebClient();
+ int i=0;
+ foreach (String url in imageList)
+ {
+ client.DownloadFile(url, "C:\\Temp\\" + CurrentPhotoList[i].ThumbName + ".jpg");
+ facadeView[i].RetrieveArt = true;
+ facadeView[i].RefreshCoverArt();
+ i++;
+ }
+ _imagesDone = true;
+ }
+ void OnRetrieveCoverArt(GUIListItem item)
+ {
+ item.ThumbnailImage = "C:\\Temp\\" + CurrentPhotoList[item.ItemId].ThumbName + ".jpg";
+ }
+
+ private void item_OnItemSelected(GUIListItem item, GUIControl parent)
+ {
+ GUIFilmstripControl filmstrip = parent as GUIFilmstripControl;
+ if (filmstrip == null)
+ return;
+ filmstrip.InfoImageFileName = item.ThumbnailImage;
+ }
+
+ private void ChangeFacadeView()
+ {
+
+
+ switch (currentView)
+ {
+ case View.List:
+ currentView = View.Icons;
+ facadeView.View = GUIFacadeControl.ViewMode.SmallIcons;
+ break;
+ case View.Icons:
+ currentView = View.LargeIcons;
+ facadeView.View = GUIFacadeControl.ViewMode.LargeIcons;
+ break;
+ case View.LargeIcons:
+ currentView = View.FilmStrip;
+ facadeView.View = GUIFacadeControl.ViewMode.Filmstrip;
+ break;
+ case View.FilmStrip:
+ currentView = View.List;
+ facadeView.View = GUIFacadeControl.ViewMode.List;
+ break;
+ }
+ GUIControl.FocusControl(GetID, facadeView.GetID);
+
+ string strLine = String.Empty;
+ View view = currentView;
+ switch (view)
+ {
+ case View.List:
+ strLine = GUILocalizeStrings.Get(101);
+ break;
+ case View.Icons:
+ strLine = GUILocalizeStrings.Get(100);
+ break;
+ case View.LargeIcons:
+ strLine = GUILocalizeStrings.Get(417);
+ break;
+ case View.FilmStrip:
+ strLine = GUILocalizeStrings.Get(733);
+ break;
+ }
+ GUIControl.SetControlLabel(GetID, btnViewAs.GetID, strLine);
+
+ }
+ private void LoadSettings()
+ {
+ XmlDocument doc = new XmlDocument();
+ try
+ {
+ doc.Load("OnlinePhotoSettings.xml");
+ /*
+ XmlNode filter = doc.SelectSingleNode("//settings/filter");
+ String lsFilter = filter.InnerText;
+ msFilterArray = lsFilter.Split(new char[] { ',' });
+ if (msFilterArray.Length == 1 && msFilterArray[0] == "")
+ {
+ msFilterArray = null;
+ }
+ XmlNode thumbNode = doc.SelectSingleNode("//settings/thumbLocation");
+ msThumbLocation = thumbNode.InnerText;
+
+ //lsFilterArray
+ //Log.Write("filter value {0}",filter.InnerText);
+
+ XmlNode root = doc.SelectSingleNode("//settings/sites/site");
+ XmlNodeList nodeList;
+ nodeList = root.SelectNodes("//settings/sites/site");
+ List<Site> loSiteList = new List<Site>();
+ Site loSite;
+ XmlNodeList RssNodeList;
+ RssLink loRssData;
+ bool lbDonwloadDirSet = false;
+ foreach (XmlNode chileNode in nodeList)
+ {
+ loSite = new Site();
+
+ XmlNode node = chileNode.SelectSingleNode("name");
+ loSite.name = node.InnerText;
+
+ node = chileNode.SelectSingleNode("id");
+ loSite.id = node.InnerText;
+
+ node = chileNode.SelectSingleNode("user");
+ if (node != null)
+ loSite.username = node.InnerText;
+
+ node = chileNode.SelectSingleNode("password");
+ if (node != null)
+ loSite.password = node.InnerText;
+
+ node = chileNode.SelectSingleNode("confirmAge");
+ if (node != null)
+ loSite.confirmAge = node.InnerText == "yes";
+
+ //Console.WriteLine("site Node:{0}", loSite.ToString());
+ RssNodeList = chileNode.SelectNodes("rss");
+ foreach (XmlNode RssNode in RssNodeList)
+ {
+ loRssData = new RssLink();
+ //node = chileNode.SelectSingleNode("d");
+
+ loRssData.name = RssNode.Attributes["name"].InnerText;
+ try
+ {
+ loRssData.isDynamic = RssNode.Attributes["dynamic"].InnerText.Equals("yes");
+ Log.Info("Found a dynamic category for site {0}", loSite.name);
+ }
+ catch (Exception) { }
+ loRssData.url = RssNode.InnerText;
+ if (lbDonwloadDirSet == false && loSite.id == "99")
+ {
+ msDownloadDir = loRssData.url;
+ lbDonwloadDirSet = true;
+ }
+ //Console.WriteLine("rss Node:{0}", loRssData.ToString());
+ loSite.RssList.Add(loRssData.name, loRssData);
+ }
+ moSiteList.Add(loSite.id, loSite);
+ }
+ * */
+ }
+
+ catch (Exception e)
+ {
+ //moLog.Error(e);
+ Log.Error(e);
+ }
+ }
+ private void DisplaySites()
+ {
+ //facadeView.Clear();
+ GUIControl.ClearControl(GetID, facadeView.GetID);
+
+ GUIListItem loListItem;
+ //foreach (Site loSite in moSiteList.Values)
+ //{
+ loListItem = new GUIListItem("Flickr");
+ loListItem.Path = "1";
+ loListItem.IsFolder = true;
+ MediaPortal.Util.Utils.SetDefaultIcons(loListItem);
+ facadeView.Add(loListItem);
+
+ loListItem = new GUIListItem("Picasa Web");
+ loListItem.Path = "2";
+ loListItem.IsFolder = true;
+ MediaPortal.Util.Utils.SetDefaultIcons(loListItem);
+ facadeView.Add(loListItem);
+ //}
+ //GUIPropertyManager.SetProperty("#itemcount", facadeView.Count-1 + "");
+ }
+ private void LoadFlickrCategories()
+ {
+ GUIControl.ClearControl(GetID, facadeView.GetID);
+
+ GUIListItem loListItem;
+ loListItem = new GUIListItem("..");
+ loListItem.IsFolder = true;
+ MediaPortal.Util.Utils.SetDefaultIcons(loListItem);
+ facadeView.Add(loListItem);
+
+ loListItem = new GUIListItem("Interesting Photos");
+ loListItem.Path = "1";
+ loListItem.IsFolder = true;
+ MediaPortal.Util.Utils.SetDefaultIcons(loListItem);
+ facadeView.Add(loListItem);
+
+ loListItem = new GUIListItem("Recent Photos");
+ loListItem.Path = "2";
+ loListItem.IsFolder = true;
+ MediaPortal.Util.Utils.SetDefaultIcons(loListItem);
+ facadeView.Add(loListItem);
+
+ loListItem = new GUIListItem("My Photos");
+ loListItem.Path = "3";
+ loListItem.IsFolder = true;
+ MediaPortal.Util.Utils.SetDefaultIcons(loListItem);
+ facadeView.Add(loListItem);
+
+
+ }
+ void OnSlideShow()
+ {
+ OnSlideShow(0);
+ }
+
+ void OnSlideShow(int iStartItem)
+ {
+
+ GUISlideShow SlideShow = (GUISlideShow)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_SLIDESHOW);
+ if (SlideShow == null)
+ return;
+
+ SlideShow.Reset();
+
+ if ((iStartItem < 0) || (iStartItem > CurrentPhotoList.Count))
+ iStartItem = 0;
+ int i = iStartItem;
+ do
+ {
+ GUIListItem item = facadeView[i];
+ if (!item.IsFolder && !item.IsRemote)
+ {
+ SlideShow.Add(CurrentPhotoList[i].smallUrl);
+ }
+
+ i++;
+ if (i >= CurrentPhotoList.Count)
+ {
+ i = 0;
+ }
+ }
+ while (i != iStartItem);
+
+ if (SlideShow.Count > 0)
+ {
+ SlideShow.StartSlideShow();
+ GUIWindowManager.ActivateWindow((int)GUIWindow.Window.WINDOW_SLIDESHOW);
+ }
+ }
+ }
+}
\ No newline at end of file
Added: trunk/plugins/OnlinePhotos/OnlinePhotos.csproj
===================================================================
--- trunk/plugins/OnlinePhotos/OnlinePhotos.csproj (rev 0)
+++ trunk/plugins/OnlinePhotos/OnlinePhotos.csproj 2007-04-26 00:24:38 UTC (rev 345)
@@ -0,0 +1,63 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{3ADCC0C7-F12C-47A2-95D1-0845399E9984}</ProjectGuid>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <OutputType>Library</OutputType>
+ <RootNamespace>OnlinePhotos</RootNamespace>
+ <AssemblyName>OnlinePhotos</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
+ <OutputPath>bin\Debug\</OutputPath>
+ <DebugSymbols>True</DebugSymbols>
+ <DebugType>Full</DebugType>
+ <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
+ <OutputPath>..\..\..\Program Files\Team MediaPortal\MediaPortal\Plugins\Windows\</OutputPath>
+ <DebugSymbols>False</DebugSymbols>
+ <DebugType>None</DebugType>
+ <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
+ <DefineConstants>TRACE</DefineConstants>
+ </PropertyGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
+ <ItemGroup>
+ <Reference Include="Core">
+ <HintPath>..\..\MediaPortal\Core\bin\Release\Core.DLL</HintPath>
+ <SpecificVersion>False</SpecificVersion>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="Databases">
+ <HintPath>..\..\MediaPortal\Databases\bin\Release\Databases.DLL</HintPath>
+ <SpecificVersion>False</SpecificVersion>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="Dialogs">
+ <HintPath>..\..\MediaPortal\Dialogs\bin\Release\Dialogs.DLL</HintPath>
+ <SpecificVersion>False</SpecificVersion>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="FlickrNet">
+ <HintPath>FlickrNet.dll</HintPath>
+ <SpecificVersion>False</SpecificVersion>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Xml" />
+ <Reference Include="Utils">
+ <HintPath>..\..\MediaPortal\Utils\bin\Release\Utils.DLL</HintPath>
+ <SpecificVersion>False</SpecificVersion>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="WindowPlugins">
+ <HintPath>..\..\MediaPortal\WindowPlugins\bin\Release\WindowPlugins.dll</HintPath>
+ <SpecificVersion>False</SpecificVersion>
+ <Private>False</Private>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AssemblyInfo.cs" />
+ <Compile Include="Flickr.cs" />
+ <Compile Include="MyClass.cs" />
+ </ItemGroup>
+</Project>
\ No newline at end of file
Added: trunk/plugins/OnlinePhotos/OnlinePhotos.sln
===================================================================
--- trunk/plugins/OnlinePhotos/OnlinePhotos.sln (rev 0)
+++ trunk/plugins/OnlinePhotos/OnlinePhotos.sln 2007-04-26 00:24:38 UTC (rev 345)
@@ -0,0 +1,24 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+# SharpDevelop 2.1.0.2429
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OnlinePhotos", "OnlinePhotos.csproj", "{3ADCC0C7-F12C-47A2-95D1-0845399E9984}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestRunner", "..\TestRunner\TestRunner.csproj", "{1EE2BACD-3C01-495E-A06E-F739D649A1ED}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {3ADCC0C7-F12C-47A2-95D1-0845399E9984}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3ADCC0C7-F12C-47A2-95D1-0845399E9984}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3ADCC0C7-F12C-47A2-95D1-0845399E9984}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3ADCC0C7-F12C-47A2-95D1-0845399E9984}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1EE2BACD-3C01-495E-A06E-F739D649A1ED}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1EE2BACD-3C01-495E-A06E-F739D649A1ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1EE2BACD-3C01-495E-A06E-F739D649A1ED}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1EE2BACD-3C01-495E-A06E-F739D649A1ED}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ EndGlobalSection
+EndGlobal
Added: trunk/plugins/OnlinePhotos/OnlinePhotos.suo
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/OnlinePhotos/OnlinePhotos.suo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/OnlinePhotos/myonlinephotos.xml
===================================================================
--- trunk/plugins/OnlinePhotos/myonlinephotos.xml (rev 0)
+++ trunk/plugins/OnlinePhotos/myonlinephotos.xml 2007-04-26 00:24:38 UTC (rev 345)
@@ -0,0 +1,35 @@
+<window>
+ <id>4755</id>
+ <defaultcontrol>50</defaultcontrol>
+ <allowoverlay>yes</allowoverlay>
+ <define>#header.label:MyOnlinePhotos</define>
+ <controls>
+ <import>common.window.xml</import>
+ <import>common.facade.xml</import>
+ <control>
+ <description>group element</description>
+ <type>group</type>
+ <animation effect="fade" time="250">WindowOpen</animation>
+ <animation effect="fade" time="500">WindowClose</animation>
+ <animation effect="slide" time="250" start="-300,0">WindowOpen</animation>
+ <animation effect="slide" time="500" end="0,-300">WindowClose</animation>
+ <posX>60</posX>
+ <posY>97</posY>
+ <layout>StackLayout</layout>
+ <control>
+ <type>button</type>
+ <description>View button</description>
+ <id>2</id>
+ <onright>50</onright>
+ <label>101</label>
+ </control>
+ <control>
+ <type>button</type>
+ <description>slideshow button</description>
+ <id>3</id>
+ <onright>50</onright>
+ <label>Slideshow</label>
+ </control>
+ </control>
+ </controls>
+</window>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's lar...
[truncated message content] |
|
From: <che...@us...> - 2007-05-27 08:59:47
|
Revision: 471
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=471&view=rev
Author: chef_koch
Date: 2007-05-27 01:59:43 -0700 (Sun, 27 May 2007)
Log Message:
-----------
added release folder, for easier svn export, when release new version
Added Paths:
-----------
trunk/plugins/My Hexxagon/Release/
trunk/plugins/My Hexxagon/Release/language/
trunk/plugins/My Hexxagon/Release/plugins/
trunk/plugins/My Hexxagon/Release/skin/
trunk/plugins/MySimon/Release/
trunk/plugins/MySimon/Release/language/
trunk/plugins/MySimon/Release/plugins/
trunk/plugins/MySimon/Release/skin/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <an...@us...> - 2007-10-02 05:45:10
|
Revision: 967
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=967&view=rev
Author: and-81
Date: 2007-10-01 22:45:04 -0700 (Mon, 01 Oct 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs
trunk/plugins/IR Server Suite/Applications/IR Server/Config.Designer.cs
trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs
trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs
trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs
trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs
trunk/plugins/IR Server Suite/Applications/Translator/Forms/EditProgramForm.cs
trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.cs
trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs
trunk/plugins/IR Server Suite/Applications/Translator/Program.cs
trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray.cs
trunk/plugins/IR Server Suite/Common/IrssComms/ClientManager.cs
trunk/plugins/IR Server Suite/Common/IrssComms/GenericPCQueue.cs
trunk/plugins/IR Server Suite/Common/IrssComms/IrssMessage.cs
trunk/plugins/IR Server Suite/Common/IrssComms/Server.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/IrssLog.cs
trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/FusionRemoteReceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/IR Server Plugin Interface.csproj
trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/IRMan Receiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/IRTransTransceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Configure.Designer.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Driver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverReplacement.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverVista.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverXP.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/UirtTransceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Transceiver/WinLirc Transceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Windows Message Receiver/Windows Message Receiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/X10 Transceiver/X10Transceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/XBCDRC Receiver/XBCDRC Receiver.cs
trunk/plugins/IR Server Suite/IR Server Suite.sln
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/MacroEditor.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/SetupForm.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/MacroEditor.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/SetupForm.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MappedEvent.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/MacroEditor.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/SetupForm.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/StbSetup.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/MacroEditor.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/PluginSetup.cs
trunk/plugins/MCEReplacement/Forms/MacroEditor.cs
trunk/plugins/MCEReplacement/Forms/MultiMapNameBox.cs
trunk/plugins/MCEReplacement/Forms/SetupForm.cs
trunk/plugins/MCEReplacement/Forms/StbSetup.cs
trunk/plugins/MCEReplacement/MCEReplacement.cs
trunk/plugins/MCEReplacement/MappedEvent.cs
Added Paths:
-----------
trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/IConfigure.cs
trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/IKeyboardReceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/ILearnIR.cs
trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/IMouseReceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/IRServerPluginBase.cs
trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/IRemoteReceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/ITransmitIR.cs
Removed Paths:
-------------
trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/IRServerPluginInterface.cs
Modified: trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs 2007-10-01 13:08:52 UTC (rev 966)
+++ trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs 2007-10-02 05:45:04 UTC (rev 967)
@@ -177,6 +177,9 @@
comboBoxPort.Items.Clear();
comboBoxPort.Items.AddRange(_irServerInfo.Ports);
comboBoxPort.SelectedIndex = 0;
+
+ _client.Send(new IrssMessage(MessageType.ActiveReceivers, MessageFlags.Request));
+ _client.Send(new IrssMessage(MessageType.ActiveBlasters, MessageFlags.Request));
}
else if ((received.Flags & MessageFlags.Failure) == MessageFlags.Failure)
{
@@ -184,6 +187,14 @@
}
return;
+ case MessageType.ActiveBlasters:
+ this.Invoke(_addStatusLine, new Object[] { received.GetDataAsString() });
+ break;
+
+ case MessageType.ActiveReceivers:
+ this.Invoke(_addStatusLine, new Object[] { received.GetDataAsString() });
+ break;
+
case MessageType.RemoteEvent:
RemoteHandlerCallback(received.GetDataAsString());
return;
@@ -521,6 +532,7 @@
private void buttonAutoTest_Click(object sender, EventArgs e)
{
AutoTest = new Thread(new ThreadStart(AutoTestThread));
+ AutoTest.Name = "DebugClient.AutoTest";
AutoTest.IsBackground = true;
AutoTest.Start();
}
Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Config.Designer.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Server/Config.Designer.cs 2007-10-01 13:08:52 UTC (rev 966)
+++ trunk/plugins/IR Server Suite/Applications/IR Server/Config.Designer.cs 2007-10-02 05:45:04 UTC (rev 967)
@@ -34,20 +34,21 @@
this.buttonCancel = new System.Windows.Forms.Button();
this.toolTips = new System.Windows.Forms.ToolTip(this.components);
this.checkBoxRunAtBoot = new System.Windows.Forms.CheckBox();
+ this.buttonAdvanced = new System.Windows.Forms.Button();
+ this.buttonDetect = new System.Windows.Forms.Button();
this.groupBoxTransceiver = new System.Windows.Forms.GroupBox();
this.gridPlugins = new SourceGrid.Grid();
this.buttonHelp = new System.Windows.Forms.Button();
- this.buttonAdvanced = new System.Windows.Forms.Button();
this.groupBoxTransceiver.SuspendLayout();
this.SuspendLayout();
//
// buttonOK
//
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonOK.Location = new System.Drawing.Point(352, 280);
+ this.buttonOK.Location = new System.Drawing.Point(352, 304);
this.buttonOK.Name = "buttonOK";
this.buttonOK.Size = new System.Drawing.Size(64, 24);
- this.buttonOK.TabIndex = 4;
+ this.buttonOK.TabIndex = 5;
this.buttonOK.Text = "OK";
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
@@ -56,26 +57,50 @@
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
- this.buttonCancel.Location = new System.Drawing.Point(424, 280);
+ this.buttonCancel.Location = new System.Drawing.Point(424, 304);
this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(64, 24);
- this.buttonCancel.TabIndex = 5;
+ this.buttonCancel.TabIndex = 6;
this.buttonCancel.Text = "Cancel";
this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
//
// checkBoxRunAtBoot
//
- this.checkBoxRunAtBoot.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
+ this.checkBoxRunAtBoot.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.checkBoxRunAtBoot.AutoSize = true;
- this.checkBoxRunAtBoot.Location = new System.Drawing.Point(168, 288);
+ this.checkBoxRunAtBoot.Location = new System.Drawing.Point(8, 272);
this.checkBoxRunAtBoot.Name = "checkBoxRunAtBoot";
this.checkBoxRunAtBoot.Size = new System.Drawing.Size(165, 17);
- this.checkBoxRunAtBoot.TabIndex = 3;
+ this.checkBoxRunAtBoot.TabIndex = 1;
this.checkBoxRunAtBoot.Text = "&Start IR Server with Windows";
this.toolTips.SetToolTip(this.checkBoxRunAtBoot, "Run IR Server when windows boots up?");
this.checkBoxRunAtBoot.UseVisualStyleBackColor = true;
//
+ // buttonAdvanced
+ //
+ this.buttonAdvanced.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+ this.buttonAdvanced.Location = new System.Drawing.Point(80, 304);
+ this.buttonAdvanced.Name = "buttonAdvanced";
+ this.buttonAdvanced.Size = new System.Drawing.Size(64, 24);
+ this.buttonAdvanced.TabIndex = 3;
+ this.buttonAdvanced.Text = "Advanced";
+ this.toolTips.SetToolTip(this.buttonAdvanced, "Click here for advanced options");
+ this.buttonAdvanced.UseVisualStyleBackColor = true;
+ this.buttonAdvanced.Click += new System.EventHandler(this.buttonAdvanced_Click);
+ //
+ // buttonDetect
+ //
+ this.buttonDetect.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
+ this.buttonDetect.Location = new System.Drawing.Point(216, 304);
+ this.buttonDetect.Name = "buttonDetect";
+ this.buttonDetect.Size = new System.Drawing.Size(80, 24);
+ this.buttonDetect.TabIndex = 4;
+ this.buttonDetect.Text = "Auto-Detect";
+ this.toolTips.SetToolTip(this.buttonDetect, "Click here to automatically detect attached devices");
+ this.buttonDetect.UseVisualStyleBackColor = true;
+ this.buttonDetect.Click += new System.EventHandler(this.buttonDetect_Click);
+ //
// groupBoxTransceiver
//
this.groupBoxTransceiver.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
@@ -108,31 +133,20 @@
// buttonHelp
//
this.buttonHelp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.buttonHelp.Location = new System.Drawing.Point(8, 280);
+ this.buttonHelp.Location = new System.Drawing.Point(8, 304);
this.buttonHelp.Name = "buttonHelp";
this.buttonHelp.Size = new System.Drawing.Size(64, 24);
- this.buttonHelp.TabIndex = 1;
+ this.buttonHelp.TabIndex = 2;
this.buttonHelp.Text = "Help";
this.buttonHelp.UseVisualStyleBackColor = true;
this.buttonHelp.Click += new System.EventHandler(this.buttonHelp_Click);
//
- // buttonAdvanced
- //
- this.buttonAdvanced.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.buttonAdvanced.Location = new System.Drawing.Point(80, 280);
- this.buttonAdvanced.Name = "buttonAdvanced";
- this.buttonAdvanced.Size = new System.Drawing.Size(64, 24);
- this.buttonAdvanced.TabIndex = 2;
- this.buttonAdvanced.Text = "Advanced";
- this.toolTips.SetToolTip(this.buttonAdvanced, "Click here for advanced options");
- this.buttonAdvanced.UseVisualStyleBackColor = true;
- this.buttonAdvanced.Click += new System.EventHandler(this.buttonAdvanced_Click);
- //
// Config
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(496, 319);
+ this.ClientSize = new System.Drawing.Size(496, 343);
+ this.Controls.Add(this.buttonDetect);
this.Controls.Add(this.buttonAdvanced);
this.Controls.Add(this.buttonHelp);
this.Controls.Add(this.checkBoxRunAtBoot);
@@ -140,7 +154,7 @@
this.Controls.Add(this.buttonCancel);
this.Controls.Add(this.buttonOK);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
- this.MinimumSize = new System.Drawing.Size(504, 346);
+ this.MinimumSize = new System.Drawing.Size(504, 370);
this.Name = "Config";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "IR Server - Configuration";
@@ -160,5 +174,6 @@
private System.Windows.Forms.Button buttonHelp;
private SourceGrid.Grid gridPlugins;
private System.Windows.Forms.Button buttonAdvanced;
+ private System.Windows.Forms.Button buttonDetect;
}
}
\ No newline at end of file
Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs 2007-10-01 13:08:52 UTC (rev 966)
+++ trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs 2007-10-02 05:45:04 UTC (rev 967)
@@ -20,7 +20,7 @@
#region Variables
- IRServerPlugin[] _transceivers;
+ IRServerPluginBase[] _transceivers;
IRServerMode _mode = IRServerMode.ServerMode;
string _hostComputer = String.Empty;
@@ -165,7 +165,7 @@
row++;
- foreach (IRServerPlugin transceiver in _transceivers)
+ foreach (IRServerPluginBase transceiver in _transceivers)
{
gridPlugins.Rows.Insert(row);
@@ -262,7 +262,7 @@
string plugin = gridPlugins[cell.Row.Index, 0].DisplayText;
- foreach (IRServerPlugin transceiver in _transceivers)
+ foreach (IRServerPluginBase transceiver in _transceivers)
if (transceiver.Name == plugin)
(transceiver as IConfigure).Configure();
}
@@ -344,6 +344,29 @@
#endregion Controls
+ private void buttonDetect_Click(object sender, EventArgs e)
+ {
+ SourceGrid.Cells.CheckBox checkBox;
+ for (int row = 1; row < gridPlugins.RowsCount; row++)
+ {
+ string name = gridPlugins[row, 0].DisplayText;
+
+ IRServerPluginBase plugin = Program.GetPlugin(name);
+
+ bool detected = plugin.Detect();
+
+ // Receive
+ checkBox = gridPlugins[row, 1] as SourceGrid.Cells.CheckBox;
+ if (checkBox != null)
+ checkBox.Checked = detected;
+
+ // Transmit
+ checkBox = gridPlugins[row, 2] as SourceGrid.Cells.CheckBox;
+ if (checkBox != null)
+ checkBox.Checked = detected;
+ }
+ }
+
}
}
Modified: trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2007-10-01 13:08:52 UTC (rev 966)
+++ trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2007-10-02 05:45:04 UTC (rev 967)
@@ -68,10 +68,10 @@
bool _registered = false; // Used for relay and repeater modes.
string[] _pluginNameReceive;
- IRServerPlugin[] _pluginReceive;
+ IRServerPluginBase[] _pluginReceive;
string _pluginNameTransmit;
- IRServerPlugin _pluginTransmit;
+ IRServerPluginBase _pluginTransmit;
bool _inConfiguration = false;
@@ -159,13 +159,13 @@
}
else
{
- List<IRServerPlugin> plugins = new List<IRServerPlugin>(_pluginNameReceive.Length);
+ List<IRServerPluginBase> plugins = new List<IRServerPluginBase>(_pluginNameReceive.Length);
for (int index = 0; index < _pluginNameReceive.Length; index++)
{
string pluginName = _pluginNameReceive[index];
- IRServerPlugin plugin = Program.GetPlugin(pluginName);
+ IRServerPluginBase plugin = Program.GetPlugin(pluginName);
if (plugin == null)
{
@@ -222,7 +222,7 @@
if (_pluginReceive != null)
{
- foreach (IRServerPlugin plugin in _pluginReceive)
+ foreach (IRServerPluginBase plugin in _pluginReceive)
{
try
{
@@ -316,7 +316,7 @@
if (_pluginReceive != null)
{
- foreach (IRServerPlugin plugin in _pluginReceive)
+ foreach (IRServerPluginBase plugin in _pluginReceive)
{
try
{
@@ -441,6 +441,7 @@
ServerMessageSink sink = new ServerMessageSink(ServerReceivedMessage);
_server = new Server(Server.DefaultPort, sink);
+ _server.ClientDisconnectCallback = new WaitCallback(ClientDisconnect);
_server.Start();
}
@@ -495,6 +496,17 @@
Thread.Sleep(1000);
}
+ void ClientDisconnect(object obj)
+ {
+ ClientManager clientManager = obj as ClientManager;
+
+ if (clientManager != null)
+ {
+ UnregisterClient(clientManager);
+ UnregisterRepeater(clientManager);
+ }
+ }
+
bool StartClient(IPEndPoint endPoint)
{
if (_client != null)
@@ -704,7 +716,7 @@
if (_pluginReceive != null)
{
- foreach (IRServerPlugin plugin in _pluginReceive)
+ foreach (IRServerPluginBase plugin in _pluginReceive)
{
if (_pluginTransmit == plugin)
resumedTransmit = true;
@@ -733,7 +745,7 @@
if (_pluginReceive != null)
{
- foreach (IRServerPlugin plugin in _pluginReceive)
+ foreach (IRServerPluginBase plugin in _pluginReceive)
{
if (_pluginTransmit == plugin)
suspendedTransmit = true;
@@ -987,6 +999,8 @@
{
switch (combo.Message.Type)
{
+
+ #region ForwardRemoteEvent
case MessageType.ForwardRemoteEvent:
if (_mode == IRServerMode.RelayMode)
{
@@ -999,7 +1013,9 @@
SendToAllExcept(combo.Manager, forward);
}
break;
+ #endregion ForwardRemoteEvent
+ #region ForwardKeyboardEvent
case MessageType.ForwardKeyboardEvent:
if (_mode == IRServerMode.RelayMode)
{
@@ -1012,7 +1028,9 @@
SendToAllExcept(combo.Manager, forward);
}
break;
+ #endregion ForwardKeyboardEvent
+ #region ForwardMouseEvent
case MessageType.ForwardMouseEvent:
if (_mode == IRServerMode.RelayMode)
{
@@ -1025,7 +1043,9 @@
SendToAllExcept(combo.Manager, forward);
}
break;
+ #endregion ForwardMouseEvent
+ #region BlastIR
case MessageType.BlastIR:
{
IrssMessage response = new IrssMessage(MessageType.BlastIR, MessageFlags.Response);
@@ -1050,7 +1070,9 @@
break;
}
+ #endregion BlastIR
+ #region LearnIR
case MessageType.LearnIR:
{
IrssMessage response = new IrssMessage(MessageType.LearnIR, MessageFlags.Response);
@@ -1085,7 +1107,9 @@
SendTo(combo.Manager, response);
break;
}
+ #endregion LearnIR
+ #region ServerShutdown
case MessageType.ServerShutdown:
if ((combo.Message.Flags & MessageFlags.Request) == MessageFlags.Request)
{
@@ -1093,9 +1117,10 @@
Stop();
Application.Exit();
}
-
break;
+ #endregion ServerShutdown
+ #region RegisterClient
case MessageType.RegisterClient:
{
IrssMessage response = new IrssMessage(MessageType.RegisterClient, MessageFlags.Response);
@@ -1125,11 +1150,15 @@
SendTo(combo.Manager, response);
break;
}
+ #endregion RegisterClient
+ #region UnregisterClient
case MessageType.UnregisterClient:
UnregisterClient(combo.Manager);
break;
+ #endregion UnregisterClient
+ #region RegisterRepeater
case MessageType.RegisterRepeater:
{
IrssMessage response = new IrssMessage(MessageType.RegisterRepeater, MessageFlags.Response);
@@ -1142,10 +1171,179 @@
SendTo(combo.Manager, response);
break;
}
+ #endregion RegisterRepeater
+ #region UnregisterRepeater
case MessageType.UnregisterRepeater:
UnregisterRepeater(combo.Manager);
break;
+ #endregion UnregisterRepeater
+
+ #region ActiveBlasters
+ case MessageType.ActiveBlasters:
+ {
+ IrssMessage response = new IrssMessage(MessageType.ActiveBlasters, MessageFlags.Response);
+ response.SetDataAsString(_pluginNameTransmit);
+
+ SendTo(combo.Manager, response);
+ break;
+ }
+ #endregion ActiveBlasters
+
+ #region ActiveReceivers
+ case MessageType.ActiveReceivers:
+ {
+ IrssMessage response = new IrssMessage(MessageType.ActiveReceivers, MessageFlags.Response);
+
+ if (_pluginNameReceive != null)
+ {
+ StringBuilder receivers = new StringBuilder();
+ for (int index = 0; index < _pluginNameReceive.Length; index++)
+ {
+ receivers.Append(_pluginNameReceive[index]);
+
+ if (index < _pluginNameReceive.Length - 1)
+ receivers.Append(',');
+ }
+
+ response.SetDataAsString(receivers.ToString());
+ }
+ else
+ {
+ response.SetDataAsString(null);
+ }
+
+ SendTo(combo.Manager, response);
+ break;
+ }
+ #endregion ActiveReceivers
+
+ #region AvailableBlasters
+ case MessageType.AvailableBlasters:
+ {
+ IrssMessage response = new IrssMessage(MessageType.AvailableBlasters, MessageFlags.Response);
+
+ IRServerPluginBase[] plugins = Program.AvailablePlugins();
+ StringBuilder blasters = new StringBuilder();
+
+ for (int index = 0; index < plugins.Length; index++)
+ {
+ IRServerPluginBase plugin = plugins[index];
+
+ if (plugin is ITransmitIR)
+ {
+ blasters.Append(plugin.Name);
+ blasters.Append(',');
+ }
+ }
+
+ if (blasters.Length == 0)
+ {
+ response.SetDataAsString(null);
+ }
+ else
+ {
+ blasters.Remove(blasters.Length - 1, 1);
+ response.SetDataAsString(blasters.ToString());
+ }
+
+ SendTo(combo.Manager, response);
+ break;
+ }
+ #endregion AvailableBlasters
+
+ #region AvailableReceivers
+ case MessageType.AvailableReceivers:
+ {
+ IrssMessage response = new IrssMessage(MessageType.AvailableReceivers, MessageFlags.Response);
+
+ IRServerPluginBase[] plugins = Program.AvailablePlugins();
+ StringBuilder receivers = new StringBuilder();
+
+ for (int index = 0; index < plugins.Length; index++)
+ {
+ IRServerPluginBase plugin = plugins[index];
+
+ if (plugin is IRemoteReceiver || plugin is IKeyboardReceiver || plugin is IMouseReceiver)
+ {
+ receivers.Append(plugin.Name);
+ receivers.Append(',');
+ }
+ }
+
+ if (receivers.Length == 0)
+ {
+ response.SetDataAsString(null);
+ }
+ else
+ {
+ receivers.Remove(receivers.Length - 1, 1);
+ response.SetDataAsString(receivers.ToString());
+ }
+
+ SendTo(combo.Manager, response);
+ break;
+ }
+ #endregion AvailableReceivers
+
+ #region DetectedBlasters
+ case MessageType.DetectedBlasters:
+ {
+ IrssMessage response = new IrssMessage(MessageType.DetectedBlasters, MessageFlags.Response);
+ string[] detectedBlasters = Program.DetectBlasters();
+
+ if (detectedBlasters != null)
+ {
+ StringBuilder blasters = new StringBuilder();
+ for (int index = 0; index < detectedBlasters.Length; index++)
+ {
+ blasters.Append(detectedBlasters[index]);
+
+ if (index < detectedBlasters.Length - 1)
+ blasters.Append(',');
+ }
+
+ response.SetDataAsString(blasters.ToString());
+ }
+ else
+ {
+ response.SetDataAsString(null);
+ }
+
+ SendTo(combo.Manager, response);
+ break;
+ }
+ #endregion DetectedBlasters
+
+ #region DetectedReceivers
+ case MessageType.DetectedReceivers:
+ {
+ IrssMessage response = new IrssMessage(MessageType.DetectedReceivers, MessageFlags.Response);
+ string[] detectedReceivers = Program.DetectReceivers();
+
+ if (detectedReceivers != null)
+ {
+ StringBuilder receivers = new StringBuilder();
+ for (int index = 0; index < detectedReceivers.Length; index++)
+ {
+ receivers.Append(detectedReceivers[index]);
+
+ if (index < detectedReceivers.Length - 1)
+ receivers.Append(',');
+ }
+
+ response.SetDataAsString(receivers.ToString());
+ }
+ else
+ {
+ response.SetDataAsString(null);
+ }
+
+ SendTo(combo.Manager, response);
+ break;
+ }
+ #endregion DetectedReceivers
+
}
}
catch (Exception ex)
@@ -1232,6 +1430,19 @@
catch (FileNotFoundException)
{
IrssLog.Warn("No configuration file found ({0}), creating default configuration file", ConfigurationFile);
+
+ string[] blasters = Program.DetectBlasters();
+ if (blasters == null)
+ _pluginNameTransmit = String.Empty;
+ else
+ _pluginNameTransmit = blasters[0];
+
+ string[] receivers = Program.DetectReceivers();
+ if (receivers == null)
+ _pluginNameReceive = null;
+ else
+ _pluginNameReceive = receivers;
+
SaveSettings();
return;
}
Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs 2007-10-01 13:08:52 UTC (rev 966)
+++ trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs 2007-10-02 05:45:04 UTC (rev 967)
@@ -30,14 +30,12 @@
catch (Exception ex)
{
Trace.WriteLine(ex.ToString());
- return;
- }
#else
catch
{
+#endif
return;
}
-#endif
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
@@ -74,11 +72,11 @@
/// Retreives a list of available IR Server plugins.
/// </summary>
/// <returns>Array of plugin instances.</returns>
- internal static IRServerPlugin[] AvailablePlugins()
+ internal static IRServerPluginBase[] AvailablePlugins()
{
try
{
- List<IRServerPlugin> plugins = new List<IRServerPlugin>();
+ List<IRServerPluginBase> plugins = new List<IRServerPluginBase>();
string installFolder = SystemRegistry.GetInstallFolder();
if (String.IsNullOrEmpty(installFolder))
@@ -95,10 +93,10 @@
foreach (Type type in types)
{
- if (type.IsClass && !type.IsAbstract && type.IsSubclassOf(typeof(IRServerPlugin)))
+ if (type.IsClass && !type.IsAbstract && type.IsSubclassOf(typeof(IRServerPluginBase)))
{
- IRServerPlugin plugin = (IRServerPlugin)assembly.CreateInstance(type.FullName);
-
+ IRServerPluginBase plugin = (IRServerPluginBase)assembly.CreateInstance(type.FullName);
+
if (plugin != null)
plugins.Add(plugin);
...
[truncated message content] |
|
From: <an...@us...> - 2007-12-02 09:18:00
|
Revision: 1115
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1115&view=rev
Author: and-81
Date: 2007-12-02 01:17:53 -0800 (Sun, 02 Dec 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote/Program.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote/Skins/web.html
trunk/plugins/IR Server Suite/Applications/Virtual Remote/Virtual Remote.csproj
trunk/plugins/IR Server Suite/Documentation/Virtual Remote/index.html
trunk/plugins/IR Server Suite/Documentation/new.html
trunk/plugins/IR Server Suite/IR Server Suite.nsi
trunk/plugins/IR Server Suite/IR Server Suite.sln
Added Paths:
-----------
trunk/plugins/IR Server Suite/Applications/Web Remote/
trunk/plugins/IR Server Suite/Applications/Web Remote/Icon.ico
trunk/plugins/IR Server Suite/Applications/Web Remote/Program.cs
trunk/plugins/IR Server Suite/Applications/Web Remote/Properties/
trunk/plugins/IR Server Suite/Applications/Web Remote/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Applications/Web Remote/RemoteButton.cs
trunk/plugins/IR Server Suite/Applications/Web Remote/Setup.Designer.cs
trunk/plugins/IR Server Suite/Applications/Web Remote/Setup.cs
trunk/plugins/IR Server Suite/Applications/Web Remote/Setup.resx
trunk/plugins/IR Server Suite/Applications/Web Remote/Web Remote.csproj
trunk/plugins/IR Server Suite/Applications/Web Remote/WebServer.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/Display.cs
trunk/plugins/ShortcutFileSupport/
trunk/plugins/ShortcutFileSupport/AssemblyInfo.cs
trunk/plugins/ShortcutFileSupport/FileIcon.cs
trunk/plugins/ShortcutFileSupport/LnkPlayer.cs
trunk/plugins/ShortcutFileSupport/ShellLink.cs
trunk/plugins/ShortcutFileSupport/ShortcutFileSupport Plugin.csproj
Removed Paths:
-------------
trunk/plugins/IR Server Suite/Applications/Virtual Remote/WebServer.cs
Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.cs 2007-12-01 16:54:02 UTC (rev 1114)
+++ trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.cs 2007-12-02 09:17:53 UTC (rev 1115)
@@ -72,11 +72,8 @@
}
}
- bool LoadSkinXml(string xmlFile)
+ void LoadSkinXml(string xmlFile)
{
- if (!File.Exists(xmlFile))
- return false;
-
XmlDocument doc = new XmlDocument();
doc.Load(xmlFile);
@@ -109,8 +106,6 @@
}
Program.Buttons = (RemoteButton[])buttons.ToArray(typeof(RemoteButton));
-
- return true;
}
void SetSkinList()
@@ -141,7 +136,7 @@
string skinFile = String.Format("{0}\\Skins\\{1}.png", Program.InstallFolder, skin);
if (!File.Exists(skinFile))
- throw new FileNotFoundException("Skin graphic file not found", skin);
+ throw new FileNotFoundException("Skin graphic file not found", skinFile);
// Try to load xml file of same name, failing that load using first word of skin name ...
string xmlFile = String.Format("{0}\\Skins\\{1}.xml", Program.InstallFolder, skin);
@@ -155,14 +150,12 @@
throw new FileNotFoundException("Skin file not found", xmlFile);
}
- if (LoadSkinXml(xmlFile))
- {
- this.BackgroundImage = new Bitmap(skinFile);
- this.ClientSize = new System.Drawing.Size(this.BackgroundImage.Width, this.BackgroundImage.Height);
- Program.RemoteSkin = skin;
- }
- else
- throw new FileNotFoundException("Failed to load skin, file not found", xmlFile);
+ LoadSkinXml(xmlFile);
+
+ this.BackgroundImage = new Bitmap(skinFile);
+ this.ClientSize = new Size(this.BackgroundImage.Width, this.BackgroundImage.Height);
+
+ Program.RemoteSkin = skin;
}
catch (Exception ex)
{
Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote/Program.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Virtual Remote/Program.cs 2007-12-01 16:54:02 UTC (rev 1114)
+++ trunk/plugins/IR Server Suite/Applications/Virtual Remote/Program.cs 2007-12-02 09:17:53 UTC (rev 1115)
@@ -25,7 +25,6 @@
#region Constants
const string DefaultSkin = "MCE";
- const int DefaultWebPort = 2481;
static readonly string ConfigurationFile = Common.FolderAppData + "Virtual Remote\\Virtual Remote.xml";
@@ -45,10 +44,6 @@
static RemoteButton[] _buttons;
- static WebServer _webServer;
-
- static int _webPort;
-
#endregion Variables
#region Properties
@@ -194,15 +189,8 @@
}
if (clientStarted)
- {
- _webServer = new WebServer(_webPort);
- _webServer.Run();
-
Application.Run(new MainForm());
- _webServer.Stop();
- }
-
SaveSettings();
}
@@ -252,14 +240,12 @@
_serverHost = "localhost";
_remoteSkin = DefaultSkin;
- _webPort = DefaultWebPort;
return;
}
try { _serverHost = doc.DocumentElement.Attributes["ServerHost"].Value; } catch { _serverHost = "localhost"; }
try { _remoteSkin = doc.DocumentElement.Attributes["RemoteSkin"].Value; } catch { _remoteSkin = DefaultSkin; }
- try { _webPort = int.Parse(doc.DocumentElement.Attributes["WebPort"].Value); } catch { _webPort = DefaultWebPort; }
}
static void SaveSettings()
{
@@ -275,7 +261,6 @@
writer.WriteAttributeString("ServerHost", _serverHost);
writer.WriteAttributeString("RemoteSkin", _remoteSkin);
- writer.WriteAttributeString("WebPort", _webPort.ToString());
writer.WriteEndElement(); // </settings>
writer.WriteEndDocument();
Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote/Skins/web.html
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Virtual Remote/Skins/web.html 2007-12-01 16:54:02 UTC (rev 1114)
+++ trunk/plugins/IR Server Suite/Applications/Virtual Remote/Skins/web.html 2007-12-02 09:17:53 UTC (rev 1115)
@@ -1,7 +1,22 @@
<HEAD>
-<TITLE>Virtual Remote</TITLE>
+<META HTTP-EQUIV="pragma" CONTENT="no-cache">
+<META HTTP-EQUIV="expires" CONTENT="0">
+
+<TITLE>Web Remote</TITLE>
+<SCRIPT LANGUAGE="JavaScript1.2">
+// <!--
+
+function SendMessage(message)
+{
+ xmlhttp = new XMLHttpRequest();
+ xmlhttp.open("GET", message, true);
+ xmlhttp.send(null);
+}
+
+// -->
+</SCRIPT>
</HEAD>
<BODY STYLE="margin: 0;">
-<IMG SRC="REMOTE_SKIN" BORDER="0" USEMAP="#REMOTE_MAP">
+<IMG SRC="REMOTE_SKIN.PNG" BORDER="0" USEMAP="#REMOTE_MAP">
</BODY>
Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote/Virtual Remote.csproj
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Virtual Remote/Virtual Remote.csproj 2007-12-01 16:54:02 UTC (rev 1114)
+++ trunk/plugins/IR Server Suite/Applications/Virtual Remote/Virtual Remote.csproj 2007-12-02 09:17:53 UTC (rev 1115)
@@ -59,7 +59,6 @@
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
- <Reference Include="System.Web" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
@@ -77,7 +76,6 @@
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
<Compile Include="RemoteButton.cs" />
- <Compile Include="WebServer.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Icon.ico" />
Deleted: trunk/plugins/IR Server Suite/Applications/Virtual Remote/WebServer.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Virtual Remote/WebServer.cs 2007-12-01 16:54:02 UTC (rev 1114)
+++ trunk/plugins/IR Server Suite/Applications/Virtual Remote/WebServer.cs 2007-12-02 09:17:53 UTC (rev 1115)
@@ -1,279 +0,0 @@
-using System;
-using System.Net;
-using System.Net.Sockets;
-using System.IO;
-using System.Text;
-using System.Threading;
-using System.Web;
-
-namespace VirtualRemote
-{
-
- /// <summary>
- /// Provides a Web front-end to the Virtual Remote.
- /// </summary>
- public class WebServer
- {
-
- #region Constants
-
- const string ServerName = "Virtual Remote";
-
- const string ButtonClickPrefix = "click?";
-
- #endregion Constants
-
- #region Variables
-
- int _serverPort;
-
- Socket _serverSocket;
- NetworkStream _networkStream;
- TextReader _networkReader;
-
- Thread _runningThread;
-
- #endregion Variables
-
- #region Constructor
-
- /// <summary>
- /// Initializes a new instance of the <see cref="WebServer"/> class.
- /// </summary>
- /// <param name="port">The port to serve on.</param>
- public WebServer(int port)
- {
- _serverPort = port;
- }
-
- #endregion Constructor
-
- #region Public Methods
-
- /// <summary>
- /// Runs the Web Server.
- /// </summary>
- public void Run()
- {
- if (_runningThread != null)
- _runningThread.Abort();
-
- _runningThread = new Thread(new ThreadStart(RunThread));
- _runningThread.IsBackground = true;
- _runningThread.Start();
- }
-
- /// <summary>
- /// Stops the Web Server.
- /// </summary>
- public void Stop()
- {
- if (_runningThread != null)
- {
- try
- {
- _runningThread.Abort();
- }
- finally
- {
- _runningThread = null;
- }
- }
- }
-
- #endregion Public Methods
-
- #region Implementation
-
- void RunThread()
- {
- try
- {
- _serverSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
-
- IPEndPoint ipe = new IPEndPoint(IPAddress.Any, _serverPort);
- _serverSocket.Bind(ipe);
-
- while (true)
- {
- Socket socket = AcceptConnection();
- string command = HttpUtility.UrlDecode(GetCommand());
-
- if (command.StartsWith("GET", StringComparison.OrdinalIgnoreCase))
- {
- string commandElement = GetCommandElement(command);
- DoGet(commandElement);
- }
-
- _networkStream.Flush();
- _networkStream.Close();
- }
-
- }
- finally
- {
- _serverSocket.Close();
- }
- }
-
- string CreateImageMap()
- {
- StringBuilder imageMap = new StringBuilder();
- imageMap.AppendLine("<MAP NAME=\"REMOTE_MAP\">");
-
- foreach (RemoteButton button in Program.Buttons)
- {
- string area = String.Format(
- "<AREA SHAPE=\"rect\" COORDS=\"{0},{1},{2},{3}\" TITLE=\"{4}\" HREF=\"{5}{6}\">",
- button.Left, button.Top, button.Left + button.Width, button.Top + button.Height,
- button.Name,
- ButtonClickPrefix, button.Code);
-
- imageMap.AppendLine(area);
- }
-
- imageMap.AppendLine("<AREA SHAPE=\"default\" NOHREF>");
- imageMap.AppendLine("</MAP>");
-
- return imageMap.ToString();
- }
-
- void DoGet(string argument)
- {
- string url = GetUrl(argument);
-
- if (url.StartsWith("/"))
- url = url.Substring(1);
-
- if (url.Length == 0)
- url = "INDEX.HTML";
-
- if (url.StartsWith(ButtonClickPrefix, StringComparison.OrdinalIgnoreCase))
- {
- string command = url.Substring(ButtonClickPrefix.Length);
-
- Program.ButtonPress(command);
-
- url = "INDEX.HTML";
- }
-
- switch (url.ToUpperInvariant())
- {
- case "INDEX.HTML":
- SendOK("text/html; charset=utf-8");
- SendString("<HTML>");
- SendFile(String.Format("{0}\\Skins\\web.html", Program.InstallFolder));
- SendString(CreateImageMap());
- SendString("</HTML>");
- break;
-
- case "REMOTE_SKIN":
- SendOK("image/png");
- SendFile(String.Format("{0}\\Skins\\{1}.png", Program.InstallFolder, Program.RemoteSkin));
- break;
-
- default:
- SendError(404, "File Not Found");
- break;
- }
- }
-
- string GetUrl(string argument)
- {
- StringBuilder outputString = new StringBuilder();
-
- for (int index = 0; index < argument.Length; index++)
- {
- char curChar = argument[index];
-
- if (Char.IsWhiteSpace(curChar))
- break;
-
- outputString.Append(curChar);
- }
-
- return outputString.ToString();
- }
-
- Socket AcceptConnection()
- {
-
- _serverSocket.Listen(1);
- Socket socket = _serverSocket.Accept();
-
- _networkStream = new NetworkStream(socket, FileAccess.ReadWrite, true);
- _networkReader = new StreamReader(_networkStream);
- IPEndPoint ep = (IPEndPoint)socket.RemoteEndPoint;
-
- return socket;
- }
-
- string GetCommand()
- {
- string buf;
- string command = String.Empty;
- bool first = true;
-
- while ((buf = _networkReader.ReadLine()) != null && buf.Length > 0)
- {
- if (first)
- {
- command = buf;
- first = false;
- }
- }
-
- return command;
- }
-
- string GetCommandElement(string command)
- {
- string[] commandElements = command.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
- return commandElements[1];
- }
-
- void SendFile(string path)
- {
- byte[] buffer = new byte[2048];
-
- int byteCount;
- using (FileStream fileStream = File.OpenRead(path))
- {
- while ((byteCount = fileStream.Read(buffer, 0, buffer.Length)) > 0)
- {
- _networkStream.Write(buffer, 0, byteCount);
- }
- }
- }
-
- void SendString(string message, params object[] args)
- {
- string output = String.Format(message, args);
-
- byte[] outputBytes = Encoding.ASCII.GetBytes(output);
-
- _networkStream.Write(outputBytes, 0, outputBytes.Length);
- }
-
- void SendError(int errorNumber, string errorString)
- {
- SendString("HTTP/1.1 {0} {1}\r\n", errorNumber, errorString);
- SendString("Date:{0}\r\n", DateTime.Now);
- SendString("Server:{0}\r\n", ServerName);
- SendString("Content-Type: text/html; charset=utf-8\r\n");
- SendString("Connection: close\r\n");
- }
-
- void SendOK(string contentType)
- {
- SendString("HTTP/1.1 200 OK\r\n");
- SendString("Date:{0}\r\n", DateTime.Now);
- SendString("Server:{0}\r\n", ServerName);
- SendString("Content-Type: {0}\r\n\r\n", contentType);
- }
-
- #endregion Implementation
-
- }
-
-}
Added: trunk/plugins/IR Server Suite/Applications/Web Remote/Icon.ico
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/IR Server Suite/Applications/Web Remote/Icon.ico
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/IR Server Suite/Applications/Web Remote/Program.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Web Remote/Program.cs (rev 0)
+++ trunk/plugins/IR Server Suite/Applications/Web Remote/Program.cs 2007-12-02 09:17:53 UTC (rev 1115)
@@ -0,0 +1,539 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Data;
+using System.Drawing;
+using System.IO;
+using System.Net;
+using System.Net.Sockets;
+using System.Text;
+using System.Threading;
+using System.Web;
+using System.Windows.Forms;
+using System.Xml;
+
+#if TRACE
+using System.Diagnostics;
+#endif
+
+using IrssComms;
+using IrssUtils;
+using IrssUtils.Forms;
+
+namespace WebRemote
+{
+
+ /// <summary>
+ /// Web Remote.
+ /// </summary>
+ public static class Program
+ {
+
+ #region Constants
+
+ internal const string ButtonClickPrefix = "send?";
+
+ const string DefaultSkin = "MCE";
+ const int DefaultWebPort = 2481;
+
+ static readonly string ConfigurationFile = Common.FolderAppData + "Virtual Remote\\Web Remote.xml";
+
+ #endregion Constants
+
+ #region Variables
+
+ static NotifyIcon _notifyIcon;
+
+ static bool _inConfiguration;
+
+ static Client _client;
+
+ static bool _registered;
+ static string _serverHost;
+ static string _installFolder;
+ static string _remoteSkin;
+
+ static RemoteButton[] _buttons;
+
+ static WebServer _webServer;
+ static int _webPort;
+
+ static string _imageFile;
+ static string _imageMap;
+ static string _webFile;
+
+ #endregion Variables
+
+ #region Properties
+
+ internal static string InstallFolder
+ {
+ get { return _installFolder; }
+ }
+
+ internal static string RemoteSkin
+ {
+ get { return _remoteSkin; }
+ }
+
+ internal static string ImageFile
+ {
+ get { return _imageFile; }
+ }
+
+ internal static string ImageMap
+ {
+ get { return _imageMap; }
+ }
+
+ internal static string WebFile
+ {
+ get { return _webFile; }
+ }
+
+ #endregion Properties
+
+ /// <summary>
+ /// The main entry point for the application.
+ /// </summary>
+ [STAThread]
+ static void Main()
+ {
+ // Check for multiple instances.
+ if (Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName).Length != 1)
+ return;
+
+ Application.EnableVisualStyles();
+ Application.SetCompatibleTextRenderingDefault(false);
+
+#if DEBUG
+ IrssLog.LogLevel = IrssLog.Level.Debug;
+#else
+ IrssLog.LogLevel = IrssLog.Level.Info;
+#endif
+ IrssLog.Open(Common.FolderIrssLogs + "Web Remote.log");
+
+ Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException);
+
+ LoadSettings();
+
+ if (String.IsNullOrEmpty(_serverHost))
+ {
+ ServerAddress serverAddress = new ServerAddress();
+ serverAddress.ShowDialog();
+
+ _serverHost = serverAddress.ServerHost;
+ }
+
+ bool clientStarted = false;
+
+ IPAddress serverIP = Client.GetIPFromName(_serverHost);
+ IPEndPoint endPoint = new IPEndPoint(serverIP, IrssComms.Server.DefaultPort);
+
+ try
+ {
+ clientStarted = StartClient(endPoint);
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex.ToString());
+ clientStarted = false;
+ }
+
+ if (clientStarted)
+ {
+ ContextMenuStrip contextMenu = new ContextMenuStrip();
+ contextMenu.Items.Add(new ToolStripMenuItem("&Setup", null, new EventHandler(ClickSetup)));
+ contextMenu.Items.Add(new ToolStripMenuItem("&Quit", null, new EventHandler(ClickQuit)));
+
+ _notifyIcon = new NotifyIcon();
+ _notifyIcon.ContextMenuStrip = contextMenu;
+ _notifyIcon.DoubleClick += new EventHandler(ClickSetup);
+ _notifyIcon.Icon = Properties.Resources.Icon;
+ _notifyIcon.Text = "Web Remote";
+
+ ChangeSkin();
+
+ try
+ {
+ _webServer = new WebServer(_webPort);
+ _webServer.Run();
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex.ToString());
+ }
+
+ _notifyIcon.Visible = true;
+
+ Application.Run();
+
+ _notifyIcon.Visible = false;
+
+ if (_webServer != null)
+ _webServer.Stop();
+ }
+
+ SaveSettings();
+
+ StopClient();
+
+ Application.ThreadException -= new ThreadExceptionEventHandler(Application_ThreadException);
+
+ IrssLog.Close();
+ }
+
+ /// <summary>
+ /// Handles unhandled exceptions.
+ /// </summary>
+ /// <param name="sender">Sender.</param>
+ /// <param name="e">Event args.</param>
+ public static void Application_ThreadException(object sender, ThreadExceptionEventArgs e)
+ {
+ IrssLog.Error(e.Exception.ToString());
+ }
+
+ static bool Configure()
+ {
+ Setup setup = new Setup();
+
+ setup.ServerHost = _serverHost;
+ setup.RemoteSkin = _remoteSkin;
+ setup.WebPort = _webPort;
+
+ if (setup.ShowDialog() == DialogResult.OK)
+ {
+ _serverHost = setup.ServerHost;
+ _remoteSkin = setup.RemoteSkin;
+ _webPort = setup.WebPort;
+
+ SaveSettings();
+
+ return true;
+ }
+
+ return false;
+ }
+
+ static void ClickSetup(object sender, EventArgs e)
+ {
+ IrssLog.Info("Setup");
+
+ _inConfiguration = true;
+
+ if (_webServer != null)
+ {
+ _webServer.Stop();
+ _webServer = null;
+ }
+
+ if (Configure())
+ ChangeSkin();
+
+ try
+ {
+ _webServer = new WebServer(_webPort);
+ _webServer.Run();
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex.ToString());
+ MessageBox.Show(ex.ToString(), "Web Remote - Setup Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+
+ _inConfiguration = false;
+ }
+ static void ClickQuit(object sender, EventArgs e)
+ {
+ IrssLog.Info("Quit");
+
+ if (_inConfiguration)
+ {
+ IrssLog.Info("In Configuration");
+ return;
+ }
+
+ Application.Exit();
+ }
+
+ internal static void ButtonPress(string keyCode)
+ {
+#if TRACE
+ Trace.WriteLine("ButtonPress: " + keyCode);
+#endif
+ if (!_registered)
+ return;
+
+ IrssMessage message = new IrssMessage(MessageType.ForwardRemoteEvent, MessageFlags.Notify, keyCode);
+ SendMessage(message);
+ }
+
+ static void ChangeSkin()
+ {
+ SetSkin(_remoteSkin);
+
+ _imageMap = CreateImageMap();
+ _webFile = String.Format("{0}\\Skins\\web.html", _installFolder);
+ }
+
+ static void SetSkin(string skin)
+ {
+ try
+ {
+ if (String.IsNullOrEmpty(skin))
+ return;
+
+ _imageFile = String.Format("{0}\\Skins\\{1}.png", _installFolder, skin);
+ if (!File.Exists(_imageFile))
+ throw new FileNotFoundException("Skin graphic file not found", _imageFile);
+
+ // Try to load xml file of same name, failing that load using first word of skin name ...
+ string xmlFile = String.Format("{0}\\Skins\\{1}.xml", _installFolder, skin);
+ if (!File.Exists(xmlFile))
+ {
+ string firstWord = skin.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)[0];
+
+ xmlFile = String.Format("{0}\\Skins\\{1}.xml", _installFolder, firstWord);
+
+ if (!File.Exists(xmlFile))
+ throw new FileNotFoundException("Skin file not found", xmlFile);
+ }
+
+ LoadSkinXml(xmlFile);
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show(ex.Message, "Web Remote - Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+ static void LoadSkinXml(string xmlFile)
+ {
+ XmlDocument doc = new XmlDocument();
+ doc.Load(xmlFile);
+
+ ArrayList buttons = new ArrayList();
+ RemoteButton temp;
+ string key = String.Empty;
+
+ XmlNodeList commandSequence = doc.DocumentElement.SelectNodes("button");
+ foreach (XmlNode item in commandSequence)
+ {
+ temp = new RemoteButton();
+ temp.Name = item.Attributes["name"].Value;
+ temp.Code = item.Attributes["code"].Value;
+
+ try
+ {
+ key = item.Attributes["shortcut"].Value;
+ temp.Shortcut = (Keys)Enum.Parse(typeof(Keys), key, true);
+ }
+ catch (ArgumentException)
+ {
+ IrssLog.Error("Invalid Key Shortcut \"{0}\" in skin \"{1}\"", key, xmlFile);
+ }
+
+ temp.Top = int.Parse(item.Attributes["top"].Value);
+ temp.Left = int.Parse(item.Attributes["left"].Value);
+ temp.Height = int.Parse(item.Attributes["height"].Value);
+ temp.Width = int.Parse(item.Attributes["width"].Value);
+ buttons.Add(temp);
+ }
+
+ _buttons = (RemoteButton[])buttons.ToArray(typeof(RemoteButton));
+ }
+
+ static string CreateImageMap()
+ {
+ StringBuilder imageMap = new StringBuilder();
+ imageMap.AppendLine("<MAP NAME=\"REMOTE_MAP\">");
+
+ foreach (RemoteButton button in _buttons)
+ {
+ string area = String.Format(
+ "<AREA SHAPE=\"rect\" COORDS=\"{0},{1},{2},{3}\" TITLE=\"{4}\" HREF=\"#\" ONCLICK=\"SendMessage('{5}{6}');return false;\">",
+ button.Left, button.Top, button.Left + button.Width, button.Top + button.Height,
+ button.Name,
+ ButtonClickPrefix, button.Code);
+
+ imageMap.AppendLine(area);
+ }
+
+ imageMap.AppendLine("<AREA SHAPE=\"default\" NOHREF>");
+ imageMap.AppendLine("</MAP>");
+
+ return imageMap.ToString();
+ }
+
+ static void LoadSettings()
+ {
+ try
+ {
+ _installFolder = SystemRegistry.GetInstallFolder();
+ if (String.IsNullOrEmpty(_installFolder))
+ _installFolder = ".";
+ else
+ _installFolder += "\\Virtual Remote";
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex.ToString());
+
+ _installFolder = ".";
+ }
+
+ XmlDocument doc = new XmlDocument();
+
+ try
+ {
+ doc.Load(ConfigurationFile);
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex.ToString());
+
+ _serverHost = "localhost";
+ _remoteSkin = DefaultSkin;
+ _webPort = DefaultWebPort;
+
+ return;
+ }
+
+ try { _serverHost = doc.DocumentElement.Attributes["ServerHost"].Value; } catch { _serverHost = "localhost"; }
+ try { _remoteSkin = doc.DocumentElement.Attributes["RemoteSkin"].Value; } catch { _remoteSkin = DefaultSkin; }
+ try { _webPort = int.Parse(doc.DocumentElement.Attributes["WebPort"].Value); } catch { _webPort = DefaultWebPort; }
+ }
+ static void SaveSettings()
+ {
+ try
+ {
+ using (XmlTextWriter writer = new XmlTextWriter(ConfigurationFile, System.Text.Encoding.UTF8))
+ {
+ writer.Formatting = Formatting.Indented;
+ writer.Indentation = 1;
+ writer.IndentChar = (char)9;
+ writer.WriteStartDocument(true);
+ writer.WriteStartElement("settings"); // <settings>
+
+ writer.WriteAttributeString("ServerHost", _serverHost);
+ writer.WriteAttributeString("RemoteSkin", _remoteSkin);
+ writer.WriteAttributeString("WebPort", _webPort.ToString());
+
+ writer.WriteEndElement(); // </settings>
+ writer.WriteEndDocument();
+ }
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex.ToString());
+ }
+ }
+
+ static void CommsFailure(object obj)
+ {
+ Exception ex = obj as Exception;
+
+ if (ex != null)
+ IrssLog.Error("Communications failure: {0}", ex.Message);
+ else
+ IrssLog.Error("Communications failure");
+
+ StopClient();
+
+ MessageBox.Show("Please report this error.", "Virtual Remote - Communications failure", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ static void Connected(object obj)
+ {
+ IrssLog.Info("Connected to server");
+
+ IrssMessage message = new IrssMessage(MessageType.RegisterClient, MessageFlags.Request);
+ _client.Send(message);
+ }
+ static void Disconnected(object obj)
+ {
+ IrssLog.Warn("Communications with server has been lost");
+
+ Thread.Sleep(1000);
+ }
+
+ static bool StartClient(IPEndPoint endPoint)
+ {
+ if (_client != null)
+ return false;
+
+ ClientMessageSink sink = new ClientMessageSink(ReceivedMessage);
+
+ _client = new Client(endPoint, sink);
+ _client.CommsFailureCallback = new WaitCallback(CommsFailure);
+ _client.ConnectCallback = new WaitCallback(Connected);
+ _client.DisconnectCallback = new WaitCallback(Disconnected);
+
+ if (_client.Start())
+ {
+ return true;
+ }
+ else
+ {
+ _client = null;
+ return false;
+ }
+ }
+ static void StopClient()
+ {
+ if (_client == null)
+ return;
+
+ _client.Dispose();
+ _client = null;
+ }
+
+ static void SendMessage(IrssMessage message)
+ {
+ if (message == null)
+ throw new ArgumentNullException("message");
+
+ if (_client != null)
+ _client.Send(message);
+ }
+
+ static void ReceivedMessage(IrssMessage received)
+ {
+ IrssLog.Debug("Received Message \"{0}\"", received.Type);
+
+ try
+ {
+ switch (received.Type)
+ {
+ case MessageType.RegisterClient:
+ if ((received.Flags & MessageFlags.Success) == MessageFlags.Success)
+ {
+ //_irServerInfo = IRServerInfo.FromBytes(received.DataAsBytes);
+ _registered = true;
+
+ IrssLog.Info("Registered to IR Server");
+ }
+ else if ((received.Flags & MessageFlags.Failure) == MessageFlags.Failure)
+ {
+ _registered = false;
+ IrssLog.Warn("IR Server refused to register");
+ }
+ break;
+
+ case MessageType.ServerShutdown:
+ IrssLog.Warn("IR Server Shutdown - Web Remote disabled until IR Server returns");
+ _registered = false;
+ break;
+
+ case MessageType.Error:
+ IrssLog.Error(received.GetDataAsString());
+ break;
+ }
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex.ToString());
+ }
+ }
+
+ }
+
+}
Added: trunk/plugins/IR Server Suite/Applications/Web Remote/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Web Remote/Properties/AssemblyInfo.cs (rev 0)
+++ trunk/plugins...
[truncated message content] |
|
From: <an...@us...> - 2008-01-09 16:09:03
|
Revision: 1230
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1230&view=rev
Author: and-81
Date: 2008-01-09 08:06:45 -0800 (Wed, 09 Jan 2008)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/IR Server Suite/Applications/Debug Client/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Applications/IR Blast/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs
trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.exe.manifest
trunk/plugins/IR Server Suite/Applications/IR Server/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs
trunk/plugins/IR Server Suite/Applications/Translator/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Applications/Tray Launcher/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Applications/Web Remote/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Common/IrssComms/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Common/MPUtils/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Documentation/new.html
trunk/plugins/IR Server Suite/IR Server Plugins/Ads Tech PTV-335 Receiver/AdsTechPTV335Receiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Ads Tech PTV-335 Receiver/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/Custom HID Receiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Direct Input Receiver/DirectInputReceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Direct Input Receiver/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/FusionRemoteReceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/Girder Plugin.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/IR Server Plugins/HCW Transceiver/Configure.Designer.cs
trunk/plugins/IR Server Suite/IR Server Plugins/HCW Transceiver/Configure.cs
trunk/plugins/IR Server Suite/IR Server Plugins/HCW Transceiver/HcwTransceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/HCW Transceiver/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/IRServerPluginBase.cs
trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/IRMan Receiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/IRTransTransceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug Receiver/IgorPlug Receiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug Receiver/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverReplacement.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverVista.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverXP.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/IR Server Plugins/RedEye Blaster/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/IR Server Plugins/RedEye Blaster/RedEye Blaster.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Serial IR Blaster/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Serial IR Blaster/Serial IR Blaster.cs
trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/USB-UIRT Transceiver.csproj
trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/UirtTransceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Wii Remote Receiver/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Wii Remote Receiver/Wii Remote Receiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Transceiver/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Transceiver/WinLirc Transceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Windows Message Receiver/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Windows Message Receiver/Windows Message Receiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/X10 Transceiver/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/IR Server Plugins/X10 Transceiver/X10Transceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/XBCDRC Receiver/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/IR Server Plugins/XBCDRC Receiver/XBCDRC Receiver.cs
trunk/plugins/IR Server Suite/IR Server Suite - Debug.nsi
trunk/plugins/IR Server Suite/IR Server Suite - Release.nsi
trunk/plugins/IR Server Suite/IR Server Suite.sln
trunk/plugins/IR Server Suite/Input Service/Input Service/InputService.cs
trunk/plugins/IR Server Suite/Input Service/Input Service/Program.cs
trunk/plugins/IR Server Suite/Input Service/Input Service/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Input Service Configuration.exe.manifest
trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/MPBlastZonePlugin.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2BlasterPlugin.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3BlasterPlugin.cs
trunk/plugins/IR Server Suite/Util Apps/IR File Tool/IrCode.cs
trunk/plugins/IR Server Suite/Util Apps/IR File Tool/IrDecoder.cs
trunk/plugins/IR Server Suite/Util Apps/IR File Tool/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Util Apps/Log File Multi-Viewer/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Util Apps/MacroConverter/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Util Apps/PVR150 Tuner/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Util Apps/SageSetup/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Util Apps/SageSetup/SageSetup.exe.manifest
trunk/plugins/MCEReplacement/MCEReplacement.cs
trunk/plugins/MCEReplacement/Properties/AssemblyInfo.cs
Removed Paths:
-------------
trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/NativeMethods.cs
Modified: trunk/plugins/IR Server Suite/Applications/Debug Client/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Debug Client/Properties/AssemblyInfo.cs 2008-01-08 21:59:08 UTC (rev 1229)
+++ trunk/plugins/IR Server Suite/Applications/Debug Client/Properties/AssemblyInfo.cs 2008-01-09 16:06:45 UTC (rev 1230)
@@ -33,8 +33,8 @@
// 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.4.1")]
-[assembly: AssemblyFileVersion("1.0.4.1")]
+[assembly: AssemblyVersion("1.0.4.2")]
+[assembly: AssemblyFileVersion("1.0.4.2")]
[assembly: CLSCompliant(true)]
[assembly: GuidAttribute("8eeb5fcb-322c-45ee-80a9-3d30cc08a48c")]
Modified: trunk/plugins/IR Server Suite/Applications/IR Blast/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Blast/Properties/AssemblyInfo.cs 2008-01-08 21:59:08 UTC (rev 1229)
+++ trunk/plugins/IR Server Suite/Applications/IR Blast/Properties/AssemblyInfo.cs 2008-01-09 16:06:45 UTC (rev 1230)
@@ -33,8 +33,8 @@
// 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.4.1")]
-[assembly: AssemblyFileVersion("1.0.4.1")]
+[assembly: AssemblyVersion("1.0.4.2")]
+[assembly: AssemblyFileVersion("1.0.4.2")]
[assembly: CLSCompliant(true)]
[assembly: GuidAttribute("5eeca936-da49-4952-ab3b-9f11ec57e4aa")]
Modified: trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Properties/AssemblyInfo.cs 2008-01-08 21:59:08 UTC (rev 1229)
+++ trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Properties/AssemblyInfo.cs 2008-01-09 16:06:45 UTC (rev 1230)
@@ -33,8 +33,8 @@
// 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.4.1")]
-[assembly: AssemblyFileVersion("1.0.4.1")]
+[assembly: AssemblyVersion("1.0.4.2")]
+[assembly: AssemblyFileVersion("1.0.4.2")]
[assembly: CLSCompliant(true)]
[assembly: GuidAttribute("81eb136b-cc74-4eed-976d-f96ebccd1ce4")]
Modified: trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2008-01-08 21:59:08 UTC (rev 1229)
+++ trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2008-01-09 16:06:45 UTC (rev 1230)
@@ -242,33 +242,28 @@
{
try
{
- if (plugin.Start())
- {
- IRemoteReceiver remoteReceiver = plugin as IRemoteReceiver;
- if (remoteReceiver != null)
- remoteReceiver.RemoteCallback += new RemoteHandler(RemoteHandlerCallback);
+ plugin.Start();
- IKeyboardReceiver keyboardReceiver = plugin as IKeyboardReceiver;
- if (keyboardReceiver != null)
- keyboardReceiver.KeyboardCallback += new KeyboardHandler(KeyboardHandlerCallback);
+ IRemoteReceiver remoteReceiver = plugin as IRemoteReceiver;
+ if (remoteReceiver != null)
+ remoteReceiver.RemoteCallback += new RemoteHandler(RemoteHandlerCallback);
- IMouseReceiver mouseReceiver = plugin as IMouseReceiver;
- if (mouseReceiver != null)
- mouseReceiver.MouseCallback += new MouseHandler(MouseHandlerCallback);
+ IKeyboardReceiver keyboardReceiver = plugin as IKeyboardReceiver;
+ if (keyboardReceiver != null)
+ keyboardReceiver.KeyboardCallback += new KeyboardHandler(KeyboardHandlerCallback);
- if (plugin.Name.Equals(_pluginNameTransmit, StringComparison.OrdinalIgnoreCase))
- {
- startedTransmit = true;
- IrssLog.Info("Transmit and Receive plugin started: \"{0}\"", plugin.Name);
- }
- else
- {
- IrssLog.Info("Receiver plugin started: \"{0}\"", plugin.Name);
- }
+ IMouseReceiver mouseReceiver = plugin as IMouseReceiver;
+ if (mouseReceiver != null)
+ mouseReceiver.MouseCallback += new MouseHandler(MouseHandlerCallback);
+
+ if (plugin.Name.Equals(_pluginNameTransmit, StringComparison.OrdinalIgnoreCase))
+ {
+ startedTransmit = true;
+ IrssLog.Info("Transmit and Receive plugin started: \"{0}\"", plugin.Name);
}
else
{
- IrssLog.Error("Failed to start receive plugin: \"{0}\"", plugin.Name);
+ IrssLog.Info("Receiver plugin started: \"{0}\"", plugin.Name);
}
}
catch (Exception ex)
@@ -291,10 +286,9 @@
{
try
{
- if (_pluginTransmit.Start())
- IrssLog.Info("Transmit plugin started: \"{0}\"", _pluginNameTransmit);
- else
- IrssLog.Error("Failed to start transmit plugin: \"{0}\"", _pluginNameTransmit);
+ _pluginTransmit.Start();
+
+ IrssLog.Info("Transmit plugin started: \"{0}\"", _pluginNameTransmit);
}
catch (Exception ex)
{
Modified: trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.exe.manifest
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.exe.manifest 2008-01-08 21:59:08 UTC (rev 1229)
+++ trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.exe.manifest 2008-01-09 16:06:45 UTC (rev 1230)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" >
- <assemblyIdentity version="1.0.4.0" processorArchitecture="X86" name="IRServer" type="win32" />
+ <assemblyIdentity version="1.0.4.2" processorArchitecture="X86" name="IRServer" type="win32" />
<description>Provides multiple connections for local and network access to a remote control transceiver</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Server/Properties/AssemblyInfo.cs 2008-01-08 21:59:08 UTC (rev 1229)
+++ trunk/plugins/IR Server Suite/Applications/IR Server/Properties/AssemblyInfo.cs 2008-01-09 16:06:45 UTC (rev 1230)
@@ -34,8 +34,8 @@
// 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.4.0")]
-[assembly: AssemblyFileVersion("1.0.4.0")]
+[assembly: AssemblyVersion("1.0.4.2")]
+[assembly: AssemblyFileVersion("1.0.4.2")]
[assembly: CLSCompliant(true)]
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs 2008-01-08 21:59:08 UTC (rev 1229)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs 2008-01-09 16:06:45 UTC (rev 1230)
@@ -1211,7 +1211,7 @@
}
private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
{
- MessageBox.Show(this, "Translator\nVersion 1.0.4.1 for IR Server Suite\nBy Aaron Dinnage, 2007", "About Translator", MessageBoxButtons.OK, MessageBoxIcon.Information);
+ MessageBox.Show(this, "Translator\nVersion 1.0.4.2 for IR Server Suite\nBy Aaron Dinnage, 2007", "About Translator", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
private void addProgramToolStripMenuItem_Click(object sender, EventArgs e)
Modified: trunk/plugins/IR Server Suite/Applications/Translator/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Translator/Properties/AssemblyInfo.cs 2008-01-08 21:59:08 UTC (rev 1229)
+++ trunk/plugins/IR Server Suite/Applications/Translator/Properties/AssemblyInfo.cs 2008-01-09 16:06:45 UTC (rev 1230)
@@ -33,8 +33,8 @@
// 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.4.1")]
-[assembly: AssemblyFileVersion("1.0.4.1")]
+[assembly: AssemblyVersion("1.0.4.2")]
+[assembly: AssemblyFileVersion("1.0.4.2")]
[assembly: CLSCompliant(true)]
Modified: trunk/plugins/IR Server Suite/Applications/Tray Launcher/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Tray Launcher/Properties/AssemblyInfo.cs 2008-01-08 21:59:08 UTC (rev 1229)
+++ trunk/plugins/IR Server Suite/Applications/Tray Launcher/Properties/AssemblyInfo.cs 2008-01-09 16:06:45 UTC (rev 1230)
@@ -33,8 +33,8 @@
// 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.4.1")]
-[assembly: AssemblyFileVersion("1.0.4.1")]
+[assembly: AssemblyVersion("1.0.4.2")]
+[assembly: AssemblyFileVersion("1.0.4.2")]
[assembly: CLSCompliant(true)]
[assembly: GuidAttribute("2011f0d4-cec8-43d2-8678-79f24cd6c517")]
Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Virtual Remote/Properties/AssemblyInfo.cs 2008-01-08 21:59:08 UTC (rev 1229)
+++ trunk/plugins/IR Server Suite/Applications/Virtual Remote/Properties/AssemblyInfo.cs 2008-01-09 16:06:45 UTC (rev 1230)
@@ -33,8 +33,8 @@
// 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.4.1")]
-[assembly: AssemblyFileVersion("1.0.4.1")]
+[assembly: AssemblyVersion("1.0.4.2")]
+[assembly: AssemblyFileVersion("1.0.4.2")]
[assembly: CLSCompliant(true)]
[assembly: GuidAttribute("b9084277-405c-48e6-80d1-c0d0e1dae27d")]
Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/Properties/AssemblyInfo.cs 2008-01-08 21:59:08 UTC (rev 1229)
+++ trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/Properties/AssemblyInfo.cs 2008-01-09 16:06:45 UTC (rev 1230)
@@ -30,7 +30,7 @@
// Build Number
// Revision
//
-[assembly: AssemblyVersion("1.0.4.1")]
-[assembly: AssemblyFileVersion("1.0.4.1")]
+[assembly: AssemblyVersion("1.0.4.2")]
+[assembly: AssemblyFileVersion("1.0.4.2")]
[assembly: CLSCompliant(true)]
\ No newline at end of file
Modified: trunk/plugins/IR Server Suite/Applications/Web Remote/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Web Remote/Properties/AssemblyInfo.cs 2008-01-08 21:59:08 UTC (rev 1229)
+++ trunk/plugins/IR Server Suite/Applications/Web Remote/Properties/AssemblyInfo.cs 2008-01-09 16:06:45 UTC (rev 1230)
@@ -29,5 +29,5 @@
// Build Number
// Revision
//
-[assembly: AssemblyVersion("1.0.4.1")]
-[assembly: AssemblyFileVersion("1.0.4.1")]
+[assembly: AssemblyVersion("1.0.4.2")]
+[assembly: AssemblyFileVersion("1.0.4.2")]
Modified: trunk/plugins/IR Server Suite/Common/IrssComms/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/Common/IrssComms/Properties/AssemblyInfo.cs 2008-01-08 21:59:08 UTC (rev 1229)
+++ trunk/plugins/IR Server Suite/Common/IrssComms/Properties/AssemblyInfo.cs 2008-01-09 16:06:45 UTC (rev 1230)
@@ -33,8 +33,8 @@
//
// 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.4.1")]
-[assembly: AssemblyFileVersion("1.0.4.1")]
+[assembly: AssemblyVersion("1.0.4.2")]
+[assembly: AssemblyFileVersion("1.0.4.2")]
[assembly: CLSCompliant(true)]
Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/Common/IrssUtils/Properties/AssemblyInfo.cs 2008-01-08 21:59:08 UTC (rev 1229)
+++ trunk/plugins/IR Server Suite/Common/IrssUtils/Properties/AssemblyInfo.cs 2008-01-09 16:06:45 UTC (rev 1230)
@@ -33,8 +33,8 @@
//
// 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.4.1")]
-[assembly: AssemblyFileVersion("1.0.4.1")]
+[assembly: AssemblyVersion("1.0.4.2")]
+[assembly: AssemblyFileVersion("1.0.4.2")]
[assembly: CLSCompliant(true)]
Modified: trunk/plugins/IR Server Suite/Common/MPUtils/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/Common/MPUtils/Properties/AssemblyInfo.cs 2008-01-08 21:59:08 UTC (rev 1229)
+++ trunk/plugins/IR Server Suite/Common/MPUtils/Properties/AssemblyInfo.cs 2008-01-09 16:06:45 UTC (rev 1230)
@@ -33,8 +33,8 @@
//
// 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.4.1")]
-[assembly: AssemblyFileVersion("1.0.4.1")]
+[assembly: AssemblyVersion("1.0.4.2")]
+[assembly: AssemblyFileVersion("1.0.4.2")]
[assembly: CLSCompliant(true)]
Modified: trunk/plugins/IR Server Suite/Documentation/new.html
===================================================================
--- trunk/plugins/IR Server Suite/Documentation/new.html 2008-01-08 21:59:08 UTC (rev 1229)
+++ trunk/plugins/IR Server Suite/Documentation/new.html 2008-01-09 16:06:45 UTC (rev 1230)
@@ -7,10 +7,12 @@
<P>Version 1.0.4.2
<UL>
<LI>MP Control plugin: Fixed Macro command for Multi-Mapping.</LI>
-<LI>MCE Transceiver: Fixed blasting bug that has existed since October.</LI>
+<LI>MCE Transceiver: Fixed XP and Replacement driver blasting bug that has existed since October.</LI>
<LI>AdsTech 335 Receiver: Fixed a bug that caused Input Service to crash roughly every 5 minutes.</LI>
<LI>Installer: New IR Server Suite installer. It looks more professional and you can now change the MediaPortal plugin install paths.</LI>
<LI>General: Fixed the "pause" macro command.</LI>
+<LI>MCE Transceiver: Fixed another XP and Vista suspend/resume bug. When will it all end? ;)</LI>
+<LI>IR Server plugins: Modified some method signitures.</LI>
</UL></P>
<BR>
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Ads Tech PTV-335 Receiver/AdsTechPTV335Receiver.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/Ads Tech PTV-335 Receiver/AdsTechPTV335Receiver.cs 2008-01-08 21:59:08 UTC (rev 1229)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/Ads Tech PTV-335 Receiver/AdsTechPTV335Receiver.cs 2008-01-09 16:06:45 UTC (rev 1230)
@@ -55,7 +55,7 @@
/// IR Server plugin version.
/// </summary>
/// <value>The version.</value>
- public override string Version { get { return "1.0.4.1"; } }
+ public override string Version { get { return "1.0.4.2"; } }
/// <summary>
/// The IR Server plugin's author.
/// </summary>
@@ -77,7 +77,7 @@
{
try
{
- return (Init() == 1);
+ return (Init() != 0);
}
catch
{
@@ -89,22 +89,13 @@
/// Start the IR Server plugin.
/// </summary>
/// <returns><c>true</c> if successful, otherwise <c>false</c>.</returns>
- public override bool Start()
+ public override void Start()
{
- try
- {
- int retVal = Init();
- if (retVal == 0)
- return false;
+ int retVal = Init();
+ if (retVal == 0)
+ throw new ApplicationException("Failed to initialize device access");
- StartReadThread();
-
- return true;
- }
- catch
- {
- return false;
- }
+ StartReadThread();
}
/// <summary>
/// Suspend the IR Server plugin when computer enters standby.
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Ads Tech PTV-335 Receiver/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/Ads Tech PTV-335 Receiver/Properties/AssemblyInfo.cs 2008-01-08 21:59:08 UTC (rev 1229)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/Ads Tech PTV-335 Receiver/Properties/AssemblyInfo.cs 2008-01-09 16:06:45 UTC (rev 1230)
@@ -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.0.4.1")]
-[assembly: AssemblyFileVersion("1.0.4.1")]
+[assembly: AssemblyVersion("1.0.4.2")]
+[assembly: AssemblyFileVersion("1.0.4.2")]
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/Custom HID Receiver.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/Custom HID Receiver.cs 2008-01-08 21:59:08 UTC (rev 1229)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/Custom HID Receiver.cs 2008-01-09 16:06:45 UTC (rev 1230)
@@ -80,7 +80,7 @@
/// IR Server plugin version.
/// </summary>
/// <value>The version.</value>
- public override string Version { get { return "1.0.4.1"; } }
+ public override string Version { get { return "1.0.4.2"; } }
/// <summary>
/// The IR Server plugin's author.
/// </summary>
@@ -100,21 +100,22 @@
/// </returns>
public override bool Detect()
{
+ // TODO: Add detection code.
return false;
}
/// <summary>
/// Start the IR Server plugin.
/// </summary>
- /// <returns><c>true</c> if successful, otherwise <c>false</c>.</returns>
- public override bool Start()
+ public override void Start()
{
_receiverWindow.ProcMsg += new ProcessMessage(ProcMessage);
_device.dwFlags = RawInput.RawInputDeviceFlags.InputSink;
_device.hwndTarget = _receiverWindow.Handle;
-
- return RegisterForRawInput(_device);
+
+ if (!RegisterForRawInput(_device))
+ throw new ApplicationException("Failed to register for HID Raw input");
}
/// <summary>
/// Suspend the IR Server plugin when computer enters standby.
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/Properties/AssemblyInfo.cs 2008-01-08 21:59:08 UTC (rev 1229)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/Properties/AssemblyInfo.cs 2008-01-09 16:06:45 UTC (rev 1230)
@@ -29,8 +29,8 @@
//
// 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.4.1")]
-[assembly: AssemblyFileVersion("1.0.4.1")]
+[assembly: AssemblyVersion("1.0.4.2")]
+[assembly: AssemblyFileVersion("1.0.4.2")]
[assembly: CLSCompliant(true)]
[assembly: GuidAttribute("A03753AF-FBBF-44e0-9964-144C48A4D2CF")]
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Direct Input Receiver/DirectInputReceiver.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/Direct Input Receiver/DirectInputReceiver.cs 2008-01-08 21:59:08 UTC (rev 1229)
+++ trunk/plugins/IR Server Suite/IR Server Plugins/Direct Input Receiver/DirectInputReceiver.cs 2008-01-09 16:06:45 UTC (rev 1230)
@@ -133,7 +133,7 @@
/// <summary>
/// IR Server plugin version.
/// </summary>
- public override string Version { get { return "1.0.4.1"; } }
+ public override string Version { get { return "1.0.4.2"; } }
/// <summary>
/// The IR Server plugin's author.
/// </summary>
@@ -151,6 +151,7 @@
/// </returns>
public override bool Detect()
{
+ // TODO: Add detection code.
return false;
}
@@ -158,7 +159,7 @@
/// Start the IR Server plugin.
/// </summary>
/// <returns>true if successful, otherwise false.</returns>
- public override bool Start()
+ public override void Start()
{
LoadSettings();
@@ -168,19 +169,22 @@
_diListener.Delay = 150;
_diListener.OnStateChange += new DirectInputListener.diStateChange(diListener_OnStateChange);
- return AcquireDevice();
+ if (!AcquireDevice())
+ throw new ApplicationException("Failed to acquire device");
}
/// <summary>
/// Suspend the IR Server plugin when computer enters standby.
/// </summary>
public override void Suspend()
{
+ Stop();
}
/// <summary>
/// Resume the IR Server plugin when the computer returns from standby.
/// </summary>
public override void Resume()
{
+ Start();
}
/// <summary>
/// Stop the IR Server plugin.
Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Direct Input Receiver/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/IR Server Suite/IR Server Plugins/Direct Input Receiver/Properties/AssemblyInfo.cs 2008-01-08 21:59:08 UTC (rev 1229)
+++ trunk/plugins/I...
[truncated message content] |
|
From: <an...@us...> - 2008-03-02 16:34:36
|
Revision: 1414
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1414&view=rev
Author: and-81
Date: 2008-03-02 08:34:31 -0800 (Sun, 02 Mar 2008)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/IR Server Suite/Applications/Abstractor/MainForm.cs
trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs
trunk/plugins/IR Server Suite/Applications/IR Blast/Program.cs
trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Program.cs
trunk/plugins/IR Server Suite/Applications/IR File Tool/FormMain.cs
trunk/plugins/IR Server Suite/Applications/IR File Tool/Program.cs
trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs
trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs
trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.cs
trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs
trunk/plugins/IR Server Suite/Applications/Translator/Program.cs
trunk/plugins/IR Server Suite/Applications/Translator/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Applications/Tray Launcher/Program.cs
trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote/Program.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote/RemoteButton.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote (Smartphone2003)/FormMain.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote (Smartphone2003)/FormMain.resx
trunk/plugins/IR Server Suite/Applications/Virtual Remote (Smartphone2003)/ServerAddress.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/MainForm.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/Program.cs
trunk/plugins/IR Server Suite/Applications/Web Remote/Program.cs
trunk/plugins/IR Server Suite/Applications/Web Remote/Setup.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/Common.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/BlastCommand.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/Forms/LearnIR.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/IrssLog.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/VariableList.cs
trunk/plugins/IR Server Suite/Documentation/new.html
trunk/plugins/IR Server Suite/IR Server Plugins/Keyboard Input/Keyboard Input.cs
trunk/plugins/IR Server Suite/IR Server Suite - Debug.nsi
trunk/plugins/IR Server Suite/IR Server Suite - Release.nsi
trunk/plugins/IR Server Suite/IR Server Suite.sln
trunk/plugins/IR Server Suite/Input Service/Input Service/InputService.cs
trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Program.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/SetupForm.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/MPBlastZonePlugin.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/MacroEditor.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/SetupForm.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/MacroEditor.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/SetupForm.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/StbSetup.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2BlasterPlugin.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/PluginSetup.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/StbSetup.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3BlasterPlugin.cs
trunk/plugins/MCEReplacement/Forms/LearnIR.cs
trunk/plugins/MCEReplacement/Forms/MacroEditor.cs
trunk/plugins/MCEReplacement/Forms/SetupForm.cs
trunk/plugins/MCEReplacement/Forms/StbSetup.cs
trunk/plugins/MCEReplacement/MCEReplacement.cs
Added Paths:
-----------
trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/
trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/Icon.ico
trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/Keyboard Input Relay.csproj
trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/Program.cs
trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/Properties/
trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/Properties/Resources.Designer.cs
trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/Properties/Resources.resx
trunk/plugins/IR Server Suite/IR Server Plugins/Keyboard Input/Icon.ico
Modified: trunk/plugins/IR Server Suite/Applications/Abstractor/MainForm.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Abstractor/MainForm.cs 2008-03-02 07:03:40 UTC (rev 1413)
+++ trunk/plugins/IR Server Suite/Applications/Abstractor/MainForm.cs 2008-03-02 16:34:31 UTC (rev 1414)
@@ -212,7 +212,7 @@
public MainForm()
{
IrssLog.LogLevel = IrssLog.Level.Debug;
- IrssLog.Open(Common.FolderIrssLogs + "Abstractor.log");
+ IrssLog.Open("Abstractor.log");
InitializeComponent();
Modified: trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs 2008-03-02 07:03:40 UTC (rev 1413)
+++ trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs 2008-03-02 16:34:31 UTC (rev 1414)
@@ -99,7 +99,7 @@
#region Constants
- static readonly string DebugIRFile = IrssUtils.Common.FolderIRCommands + "DebugClient.IR";
+ static readonly string DebugIRFile = Path.Combine(Common.FolderIRCommands, "DebugClient.IR");
#endregion
@@ -131,7 +131,7 @@
private void MainForm_Load(object sender, EventArgs e)
{
IrssLog.LogLevel = IrssLog.Level.Debug;
- IrssLog.Open(Common.FolderIrssLogs + "Debug Client.log");
+ IrssLog.Open("Debug Client.log");
_addStatusLine = new DelegateAddStatusLine(AddStatusLine);
Modified: trunk/plugins/IR Server Suite/Applications/IR Blast/Program.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Blast/Program.cs 2008-03-02 07:03:40 UTC (rev 1413)
+++ trunk/plugins/IR Server Suite/Applications/IR Blast/Program.cs 2008-03-02 16:34:31 UTC (rev 1414)
@@ -47,7 +47,7 @@
#else
IrssLog.LogLevel = IrssLog.Level.Info;
#endif
- IrssLog.Append(Common.FolderIrssLogs + "IR Blast.log");
+ IrssLog.Append("IR Blast.log");
ShowHeader();
@@ -141,7 +141,7 @@
}
else
{
- fileName = Common.FolderIRCommands + digit + Common.FileExtensionIR;
+ fileName = Path.Combine(Common.FolderIRCommands, digit + Common.FileExtensionIR);
BlastIR(fileName, _blastPort);
}
@@ -155,7 +155,7 @@
}
else
{
- fileName = Common.FolderIRCommands + command;
+ fileName = Path.Combine(Common.FolderIRCommands, command);
BlastIR(fileName, _blastPort);
}
Modified: trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Program.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Program.cs 2008-03-02 07:03:40 UTC (rev 1413)
+++ trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Program.cs 2008-03-02 16:34:31 UTC (rev 1414)
@@ -48,7 +48,7 @@
#else
IrssLog.LogLevel = IrssLog.Level.Info;
#endif
- IrssLog.Append(Common.FolderIrssLogs + "IR Blast (No Window).log");
+ IrssLog.Append("IR Blast (No Window).log");
try
{
@@ -140,7 +140,7 @@
}
else
{
- fileName = Common.FolderIRCommands + digit + Common.FileExtensionIR;
+ fileName = Path.Combine(Common.FolderIRCommands, digit + Common.FileExtensionIR);
BlastIR(fileName, _blastPort);
}
@@ -154,7 +154,7 @@
}
else
{
- fileName = Common.FolderIRCommands + command;
+ fileName = Path.Combine(Common.FolderIRCommands, command);
BlastIR(fileName, _blastPort);
}
Modified: trunk/plugins/IR Server Suite/Applications/IR File Tool/FormMain.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR File Tool/FormMain.cs 2008-03-02 07:03:40 UTC (rev 1413)
+++ trunk/plugins/IR Server Suite/Applications/IR File Tool/FormMain.cs 2008-03-02 16:34:31 UTC (rev 1414)
@@ -25,7 +25,7 @@
#region Constants
- static readonly string ConfigurationFile = Common.FolderAppData + "IR File Tool\\IR File Tool.xml";
+ static readonly string ConfigurationFile = Path.Combine(Common.FolderAppData, "IR File Tool\\IR File Tool.xml");
#endregion Constants
Modified: trunk/plugins/IR Server Suite/Applications/IR File Tool/Program.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR File Tool/Program.cs 2008-03-02 07:03:40 UTC (rev 1413)
+++ trunk/plugins/IR Server Suite/Applications/IR File Tool/Program.cs 2008-03-02 16:34:31 UTC (rev 1414)
@@ -24,7 +24,7 @@
#else
IrssLog.LogLevel = IrssLog.Level.Info;
#endif
- IrssLog.Open(Common.FolderIrssLogs + "IR File Tool.log");
+ IrssLog.Open("IR File Tool.log");
Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException);
Modified: trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2008-03-02 07:03:40 UTC (rev 1413)
+++ trunk/plugins/IR Server Suite/Applications/IR Server/IRServer.cs 2008-03-02 16:34:31 UTC (rev 1414)
@@ -51,7 +51,7 @@
#region Constants
- static readonly string ConfigurationFile = Common.FolderAppData + "IR Server\\IR Server.xml";
+ static readonly string ConfigurationFile = Path.Combine(Common.FolderAppData, "IR Server\\IR Server.xml");
#endregion Constants
Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs 2008-03-02 07:03:40 UTC (rev 1413)
+++ trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs 2008-03-02 16:34:31 UTC (rev 1414)
@@ -46,7 +46,7 @@
#else
IrssLog.LogLevel = IrssLog.Level.Info;
#endif
- IrssLog.Open(Common.FolderIrssLogs + "IR Server.log");
+ IrssLog.Open("IR Server.log");
Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException);
Property changes on: trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay
___________________________________________________________________
Name: svn:ignore
+ bin
obj
Added: trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/Icon.ico
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/Icon.ico
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/Keyboard Input Relay.csproj
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/Keyboard Input Relay.csproj (rev 0)
+++ trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/Keyboard Input Relay.csproj 2008-03-02 16:34:31 UTC (rev 1414)
@@ -0,0 +1,78 @@
+<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>{097F7027-77A1-4623-8D6C-3D2020769EFD}</ProjectGuid>
+ <OutputType>WinExe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>KeyboardInputRelay</RootNamespace>
+ <AssemblyName>KeyboardInputRelay</AssemblyName>
+ <ApplicationIcon>Icon.ico</ApplicationIcon>
+ <StartupObject>KeyboardInputRelay.Program</StartupObject>
+ </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>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <DocumentationFile>bin\Debug\KeyboardInputRelay.xml</DocumentationFile>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ </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.Drawing" />
+ <Reference Include="System.Windows.Forms" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Program.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Properties\Resources.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
+ <DependentUpon>Resources.resx</DependentUpon>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="Icon.ico" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\Common\IrssComms\IrssComms.csproj">
+ <Project>{BCAFDF45-70DD-46FD-8B98-880DDA585AD2}</Project>
+ <Name>IrssComms</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\Common\IrssUtils\IrssUtils.csproj">
+ <Project>{CA15769C-232E-4CA7-94FD-206A06CA3ABB}</Project>
+ <Name>IrssUtils</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="Properties\Resources.resx">
+ <SubType>Designer</SubType>
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file
Added: trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/Program.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/Program.cs (rev 0)
+++ trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/Program.cs 2008-03-02 16:34:31 UTC (rev 1414)
@@ -0,0 +1,529 @@
+using System;
+using System.ComponentModel;
+#if TRACE
+using System.Diagnostics;
+#endif
+using System.IO;
+using System.Net;
+using System.Net.Sockets;
+using System.Reflection;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Threading;
+using System.Windows.Forms;
+using System.Xml;
+
+using IrssComms;
+using IrssUtils;
+using IrssUtils.Forms;
+
+namespace KeyboardInputRelay
+{
+
+ static class Program
+ {
+
+ #region Constants
+
+ static readonly string ConfigurationFile = Path.Combine(Common.FolderAppData, "Keyboard Input Relay\\Keyboard Input Relay.xml");
+
+ #endregion Constants
+
+ #region Interop
+
+ [DllImport("user32.dll")]
+ static extern IntPtr SetWindowsHookEx(HookType code, HookDelegate func, IntPtr hInstance, int threadID);
+
+ [DllImport("user32.dll")]
+ static extern int UnhookWindowsHookEx(IntPtr hhook);
+
+ [DllImport("user32.dll")]
+ static extern int CallNextHookEx(IntPtr hhook, int code, int wParam, IntPtr lParam);
+
+ [DllImport("kernel32.dll")]
+ static extern IntPtr LoadLibrary(string lpFileName);
+
+ #endregion Interop
+
+ #region Delegates
+
+ delegate int HookDelegate(int code, int wParam, IntPtr lParam);
+
+ #endregion Delegates
+
+ #region Enumerations
+
+ enum HookType
+ {
+ WH_JOURNALRECORD = 0,
+ WH_JOURNALPLAYBACK = 1,
+ WH_KEYBOARD = 2,
+ WH_GETMESSAGE = 3,
+ WH_CALLWNDPROC = 4,
+ WH_CBT = 5,
+ WH_SYSMSGFILTER = 6,
+ WH_MOUSE = 7,
+ WH_HARDWARE = 8,
+ WH_DEBUG = 9,
+ WH_SHELL = 10,
+ WH_FOREGROUNDIDLE = 11,
+ WH_CALLWNDPROCRET = 12,
+ WH_KEYBOARD_LL = 13,
+ WH_MOUSE_LL = 14
+ }
+
+ enum AppCommands
+ {
+ None = 0,
+ BrowserBackward = 1,
+ BrowserForward = 2,
+ BrowserRefresh = 3,
+ BrowserStop = 4,
+ BrowserSearch = 5,
+ BrowserFavorites = 6,
+ BrowserHome = 7,
+ VolumeMute = 8,
+ VolumeDown = 9,
+ VolumeUp = 10,
+ MediaNextTrack = 11,
+ MediaPreviousTrack = 12,
+ MediaStop = 13,
+ MediaPlayPause = 14,
+ LaunchMail = 15,
+ LaunchMediaSelect = 16,
+ LaunchApp1 = 17,
+ LaunchApp2 = 18,
+ BassDown = 19,
+ BassBoost = 20,
+ BassUp = 21,
+ TrebleDown = 22,
+ TrebleUp = 23,
+ MicrophoneVolumeMute = 24,
+ MicrophoneVolumeDown = 25,
+ MicrophoneVolumeUp = 26,
+ Help = 27,
+ Find = 28,
+ New = 29,
+ Open = 30,
+ Close = 31,
+ Save = 32,
+ Print = 33,
+ Undo = 34,
+ Redo = 35,
+ Copy = 36,
+ Cut = 37,
+ Paste = 38,
+ ReplyToMail = 39,
+ ForwardMail = 40,
+ SendMail = 41,
+ SpellCheck = 42,
+ DictateOrCommandControlToggle = 43,
+ MicrophoneOnOffToggle = 44,
+ CorrectionList = 45,
+ MediaPlay = 46,
+ MediaPause = 47,
+ MediaRecord = 48,
+ MediaFastForward = 49,
+ MediaRewind = 50,
+ MediaChannelUp = 51,
+ MediaChannelDown = 52,
+ Delete = 53,
+ Flip3D = 54,
+ }
+
+ #endregion Enumerations
+
+ #region Structures
+
+ struct KeyboardHookStruct
+ {
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="KeyboardHookStruct"/> struct.
+ /// </summary>
+ /// <param name="lParam">The lParam to derive from.</param>
+ public KeyboardHookStruct(IntPtr lParam)
+ {
+ KeyboardHookStruct khs = (KeyboardHookStruct)Marshal.PtrToStructure(lParam, typeof(KeyboardHookStruct));
+
+ virtualKey = khs.virtualKey;
+ scanCode = khs.scanCode;
+ flags = khs.flags;
+ time = khs.time;
+ dwExtraInfo = khs.dwExtraInfo;
+ }
+
+ public int virtualKey;
+ public int scanCode;
+ public int flags;
+ public int time;
+ public int dwExtraInfo;
+ }
+
+ #endregion Structures
+
+ #region Variables
+
+ static NotifyIcon _notifyIcon;
+
+ static bool _stealAppCommands = true;
+
+ static IntPtr _hookHandle;
+ static HookDelegate _hookDelegate;
+ static IntPtr _libPtr;
+
+ static Client _client;
+ static bool _registered;
+ static string _serverHost;
+
+ #endregion Variables
+
+ /// <summary>
+ /// The main entry point for the application.
+ /// </summary>
+ [STAThread]
+ static void Main(string[] args)
+ {
+ Application.EnableVisualStyles();
+ Application.SetCompatibleTextRenderingDefault(false);
+
+#if DEBUG
+ IrssLog.LogLevel = IrssLog.Level.Debug;
+#else
+ IrssLog.LogLevel = IrssLog.Level.Info;
+#endif
+ IrssLog.Open("Keyboard Input Relay.log");
+
+ Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException);
+
+ SetupNotify();
+
+ LoadSettings();
+
+ bool clientStarted = false;
+
+ IPAddress serverIP = Client.GetIPFromName(_serverHost);
+ IPEndPoint endPoint = new IPEndPoint(serverIP, IrssComms.Server.DefaultPort);
+
+ try
+ {
+ clientStarted = StartClient(endPoint);
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex);
+ clientStarted = false;
+ }
+
+ if (clientStarted)
+ {
+ StartHook();
+
+ _notifyIcon.Visible = true;
+
+ Application.Run();
+
+ _notifyIcon.Visible = false;
+
+ StopHook();
+
+ StopClient();
+ }
+
+ Application.ThreadException -= new ThreadExceptionEventHandler(Application_ThreadException);
+
+ IrssLog.Close();
+ }
+
+ /// <summary>
+ /// Handles unhandled exceptions.
+ /// </summary>
+ /// <param name="sender">Sender.</param>
+ /// <param name="e">Event args.</param>
+ static void Application_ThreadException(object sender, ThreadExceptionEventArgs e)
+ {
+ IrssLog.Error(e.Exception);
+ }
+
+ static void LoadSettings()
+ {
+ XmlDocument doc = new XmlDocument();
+
+ try
+ {
+ doc.Load(ConfigurationFile);
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex);
+
+ _serverHost = "localhost";
+
+ return;
+ }
+
+ try { _serverHost = doc.DocumentElement.Attributes["ServerHost"].Value; } catch { _serverHost = "localhost"; }
+ }
+ static void SaveSettings()
+ {
+ try
+ {
+ using (XmlTextWriter writer = new XmlTextWriter(ConfigurationFile, Encoding.UTF8))
+ {
+ writer.Formatting = Formatting.Indented;
+ writer.Indentation = 1;
+ writer.IndentChar = (char)9;
+ writer.WriteStartDocument(true);
+ writer.WriteStartElement("settings"); // <settings>
+
+ writer.WriteAttributeString("ServerHost", _serverHost);
+
+ writer.WriteEndElement(); // </settings>
+ writer.WriteEndDocument();
+ }
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex);
+ }
+ }
+
+ static void CommsFailure(object obj)
+ {
+ Exception ex = obj as Exception;
+
+ if (ex != null)
+ IrssLog.Error("Communications failure: {0}", ex.Message);
+ else
+ IrssLog.Error("Communications failure");
+
+ _notifyIcon.Text = "Keyboard Input Relay - Serious Communications Failure";
+
+ StopClient();
+
+ MessageBox.Show("Please report this error.", "Keyboard Input Relay - Communications failure", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ static void Connected(object obj)
+ {
+ IrssLog.Info("Connected to server");
+
+ _notifyIcon.Text = "Keyboard Input Relay";
+
+ IrssMessage message = new IrssMessage(MessageType.RegisterClient, MessageFlags.Request);
+ _client.Send(message);
+ }
+ static void Disconnected(object obj)
+ {
+ IrssLog.Warn("Communications with server has been lost");
+
+ _notifyIcon.Text = "Keyboard Input Relay - Connecting ...";
+
+ Thread.Sleep(1000);
+ }
+
+ static bool StartClient(IPEndPoint endPoint)
+ {
+ if (_client != null)
+ return false;
+
+ ClientMessageSink sink = new ClientMessageSink(ReceivedMessage);
+
+ _client = new Client(endPoint, sink);
+ _client.CommsFailureCallback = new WaitCallback(CommsFailure);
+ _client.ConnectCallback = new WaitCallback(Connected);
+ _client.DisconnectCallback = new WaitCallback(Disconnected);
+
+ if (_client.Start())
+ {
+ return true;
+ }
+ else
+ {
+ _client = null;
+ return false;
+ }
+ }
+ static void StopClient()
+ {
+ if (_client == null)
+ return;
+
+ _client.Dispose();
+ _client = null;
+
+ _registered = false;
+ }
+
+ static void ReceivedMessage(IrssMessage received)
+ {
+ IrssLog.Debug("Received Message \"{0}\"", received.Type);
+
+ try
+ {
+ switch (received.Type)
+ {
+ case MessageType.RegisterClient:
+ if ((received.Flags & MessageFlags.Success) == MessageFlags.Success)
+ {
+ //_irServerInfo = IRServerInfo.FromBytes(received.DataAsBytes);
+ _registered = true;
+
+ IrssLog.Info("Registered to Input Service");
+ }
+ else if ((received.Flags & MessageFlags.Failure) == MessageFlags.Failure)
+ {
+ _registered = false;
+ IrssLog.Warn("Input Service refused to register");
+ }
+ break;
+
+ case MessageType.ServerShutdown:
+ IrssLog.Warn("Input Service Shutdown - Keyboard Input Relay disabled until Input Service returns");
+
+ _notifyIcon.Text = "Keyboard Input Relay - Connecting ...";
+
+ _registered = false;
+ break;
+
+ case MessageType.Error:
+ IrssLog.Error(received.GetDataAsString());
+ break;
+ }
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex);
+ }
+ }
+
+ static void SetupNotify()
+ {
+ // Setup notify icon ...
+ _notifyIcon = new NotifyIcon();
+ _notifyIcon.Icon = Properties.Resources.Icon;
+ _notifyIcon.Text = "Keyboard Input Relay - Connecting ...";
+
+ _notifyIcon.ContextMenuStrip = new ContextMenuStrip();
+ _notifyIcon.ContextMenuStrip.Items.Add("&Setup", null, new EventHandler(NotifyIcon_ClickSetup));
+ _notifyIcon.ContextMenuStrip.Items.Add("&Quit", null, new EventHandler(NotifyIcon_ClickQuit));
+
+ _notifyIcon.Visible = true;
+ }
+
+ static void NotifyIcon_ClickSetup(object sender, EventArgs e)
+ {
+ Setup();
+ }
+ static void NotifyIcon_ClickQuit(object sender, EventArgs e)
+ {
+ Application.Exit();
+ }
+
+ static void Setup()
+ {
+ ServerAddress serverAddress = new ServerAddress();
+ if (serverAddress.ShowDialog() == DialogResult.OK)
+ {
+ _serverHost = serverAddress.ServerHost;
+ SaveSettings();
+ }
+ }
+
+ static void StartHook()
+ {
+ _hookDelegate = new HookDelegate(InternalHookDelegate);
+ _libPtr = LoadLibrary("User32");
+ _hookHandle = SetWindowsHookEx(HookType.WH_KEYBOARD_LL, _hookDelegate, _libPtr, 0);
+ }
+ static void StopHook()
+ {
+ UnhookWindowsHookEx(_hookHandle);
+
+ _hookHandle = IntPtr.Zero;
+ _hookDelegate = null;
+ _libPtr = IntPtr.Zero;
+ }
+
+ static int InternalHookDelegate(int code, int wParam, IntPtr lParam)
+ {
+ try
+ {
+ if (code >= 0 && wParam == 256)
+ {
+ KeyboardHookStruct khs = new KeyboardHookStruct(lParam);
+ int keyCode = khs.virtualKey;
+
+ AppCommands appCommand = KeyCodeToAppCommand((Keys)khs.virtualKey);
+ if (appCommand == AppCommands.None)
+ {
+ if (khs.virtualKey == (int)Keys.LShiftKey || khs.virtualKey == (int)Keys.LControlKey ||
+ khs.virtualKey == (int)Keys.RShiftKey || khs.virtualKey == (int)Keys.RControlKey)
+ return CallNextHookEx(_hookHandle, code, wParam, lParam);
+
+ if ((Control.ModifierKeys & Keys.Shift) == Keys.Shift) keyCode |= 0x00100000;
+ if ((Control.ModifierKeys & Keys.Control) == Keys.Control) keyCode |= 0x01000000;
+ if ((Control.ModifierKeys & Keys.Alt) == Keys.Alt) keyCode |= 0x10000000;
+ }
+ else
+ {
+ keyCode |= (((int)appCommand) << 8);
+ }
+
+ if (_registered)
+ {
+ byte[] deviceNameBytes = Encoding.ASCII.GetBytes("Keyboard");
+ byte[] keyCodeBytes = Encoding.ASCII.GetBytes(String.Format("{0:X8}", keyCode));
+
+ byte[] bytes = new byte[8 + deviceNameBytes.Length + keyCodeBytes.Length];
+
+ BitConverter.GetBytes(deviceNameBytes.Length).CopyTo(bytes, 0);
+ deviceNameBytes.CopyTo(bytes, 4);
+ BitConverter.GetBytes(keyCodeBytes.Length).CopyTo(bytes, 4 + deviceNameBytes.Length);
+ keyCodeBytes.CopyTo(bytes, 8 + deviceNameBytes.Length);
+
+ IrssMessage message = new IrssMessage(MessageType.ForwardRemoteEvent, MessageFlags.Notify, bytes);
+ _client.Send(message);
+ }
+
+ if (_stealAppCommands && appCommand != AppCommands.None)
+ return 1;
+ }
+ }
+ catch (Exception ex)
+ {
+ IrssLog.Error(ex);
+ }
+
+ return CallNextHookEx(_hookHandle, code, wParam, lParam);
+ }
+
+ static AppCommands KeyCodeToAppCommand(Keys keyCode)
+ {
+ switch (keyCode)
+ {
+ case Keys.BrowserBack: return AppCommands.BrowserBackward;
+ case Keys.BrowserFavorites: return AppCommands.BrowserFavorites;
+ case Keys.BrowserForward: return AppCommands.BrowserForward;
+ case Keys.BrowserHome: return AppCommands.BrowserHome;
+ case Keys.BrowserRefresh: ...
[truncated message content] |
|
From: <an...@us...> - 2008-03-08 13:45:56
|
Revision: 1437
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1437&view=rev
Author: and-81
Date: 2008-03-08 05:45:51 -0800 (Sat, 08 Mar 2008)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/IR Server Suite/Applications/Abstractor/MainForm.cs
trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs
trunk/plugins/IR Server Suite/Applications/HCW PVR Tuner/Program.cs
trunk/plugins/IR Server Suite/Applications/IR Blast/Program.cs
trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Program.cs
trunk/plugins/IR Server Suite/Applications/IR File Tool/FormMain.cs
trunk/plugins/IR Server Suite/Applications/IR File Tool/IrCode.cs
trunk/plugins/IR Server Suite/Applications/IR File Tool/Pronto.cs
trunk/plugins/IR Server Suite/Applications/IR Server/Advanced.Designer.cs
trunk/plugins/IR Server Suite/Applications/IR Server/Advanced.cs
trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs
trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs
trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/Program.cs
trunk/plugins/IR Server Suite/Applications/SageSetup/FormMain.cs
trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs
trunk/plugins/IR Server Suite/Applications/Translator/Forms/EditProgramForm.cs
trunk/plugins/IR Server Suite/Applications/Translator/Forms/GetKeyCodeForm.cs
trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.cs
trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs
trunk/plugins/IR Server Suite/Applications/Translator/Forms/MenuForm.cs
trunk/plugins/IR Server Suite/Applications/Translator/Program.cs
trunk/plugins/IR Server Suite/Applications/Translator/Translator.csproj
trunk/plugins/IR Server Suite/Applications/Tray Launcher/GetKeyCodeForm.cs
trunk/plugins/IR Server Suite/Applications/Tray Launcher/Setup.cs
trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote/Program.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote (PocketPC2003)/Client.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote (PocketPC2003)/FormMain.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote (PocketPC2003)/IrssMessage.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote (PocketPC2003)/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote (PocketPC2003)/ServerAddress.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote (PocketPC2003)/Virtual Remote (PocketPC2003).csproj
trunk/plugins/IR Server Suite/Applications/Virtual Remote (Smartphone2003)/Client.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote (Smartphone2003)/FormMain.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote (Smartphone2003)/IrssMessage.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote (Smartphone2003)/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote (Smartphone2003)/ServerAddress.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote (Smartphone2003)/Virtual Remote (Smartphone2003).csproj
trunk/plugins/IR Server Suite/Applications/Virtual Remote (WinCE5)/Client.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote (WinCE5)/FormMain.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote (WinCE5)/IrssMessage.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote (WinCE5)/Properties/AssemblyInfo.cs
trunk/plugins/IR Server Suite/Applications/Virtual Remote (WinCE5)/Virtual Remote (WinCE5).csproj
trunk/plugins/IR Server Suite/Applications/Virtual Remote Skin Editor/MainForm.cs
trunk/plugins/IR Server Suite/Applications/Web Remote/Program.cs
trunk/plugins/IR Server Suite/Applications/Web Remote/Setup.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/Display.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/Exceptions/CommandExecutionException.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/Exceptions/CommandStructureException.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/Exceptions/MacroStructureException.cs
trunk/plugins/IR Server Suite/Common/IrssUtils/IrssMacro.cs
trunk/plugins/IR Server Suite/Common/MPUtils/Forms/GoToScreen.cs
trunk/plugins/IR Server Suite/Common/MPUtils/Forms/MPAction.cs
trunk/plugins/IR Server Suite/Common/MPUtils/Forms/MPMessage.cs
trunk/plugins/IR Server Suite/Common/MPUtils/MPCommon.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Ads Tech PTV-335 Receiver/AdsTechPTV335Receiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/AdvancedSettings.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/Custom HID Receiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/DeviceSelect.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Custom HID Receiver/RawInput.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Direct Input Receiver/DirectInputReceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/FusionRemoteReceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/Config.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/Girder Plugin.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/GirderPluginWrapper.cs
trunk/plugins/IR Server Suite/IR Server Plugins/HCW Receiver/Configure.cs
trunk/plugins/IR Server Suite/IR Server Plugins/HCW Receiver/IrRemoteWrapper.cs
trunk/plugins/IR Server Suite/IR Server Plugins/IR501 Receiver/IR501Receiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/IR507 Receiver/IR507Receiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/IR507 Receiver/RawInput.cs
trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/Configure.cs
trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/IRMan Receiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/Configure.cs
trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/IRTransTransceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/LiveDrive Receiver/Configure.cs
trunk/plugins/IR Server Suite/IR Server Plugins/MacMini Receiver/MacMini Receiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverReplacement.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverVista.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverXP.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/MicrosoftMceTransceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/RC102 Receiver/RC102Receiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Technotrend Receiver/Technotrend Receiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/Configure.cs
trunk/plugins/IR Server Suite/IR Server Plugins/USB-UIRT Transceiver/UirtTransceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Wii Remote Receiver/Setup.cs
trunk/plugins/IR Server Suite/IR Server Plugins/WiimoteLib/HIDImports.cs
trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Transceiver/Configure.cs
trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Transceiver/CreateIRFile.cs
trunk/plugins/IR Server Suite/IR Server Plugins/WinLirc Transceiver/WinLirc Transceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/Windows Message Receiver/Configure.cs
trunk/plugins/IR Server Suite/IR Server Plugins/X10 Transceiver/X10Transceiver.cs
trunk/plugins/IR Server Suite/IR Server Plugins/XBCDRC Receiver/XBCDRC Receiver.cs
trunk/plugins/IR Server Suite/Input Service/Input Service/InputService.cs
trunk/plugins/IR Server Suite/Input Service/Input Service/Program.cs
trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Advanced.Designer.cs
trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Advanced.cs
trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Config.cs
trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Configuration.csproj
trunk/plugins/IR Server Suite/Input Service/Input Service Configuration/Program.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/MacroEditor.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/Forms/SetupForm.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Blast Zone Plugin/MPBlastZonePlugin.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/MacroEditor.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/MultiMapNameBox.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/Forms/SetupForm.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/MP Control Plugin/MPControlPlugin.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/ExternalChannels.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/MacroEditor.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/SetupForm.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/Forms/StbSetup.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV2 Blaster Plugin/TV2BlasterPlugin.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/ExternalChannels.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/MacroEditor.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/PluginSetup.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/Forms/StbSetup.cs
trunk/plugins/IR Server Suite/MediaPortal Plugins/TV3 Blaster Plugin/TV3BlasterPlugin.cs
trunk/plugins/MCEReplacement/Forms/ExternalChannels.cs
trunk/plugins/MCEReplacement/Forms/LearnIR.cs
trunk/plugins/MCEReplacement/Forms/MacroEditor.cs
trunk/plugins/MCEReplacement/Forms/MultiMapNameBox.cs
trunk/plugins/MCEReplacement/Forms/SetupForm.cs
trunk/plugins/MCEReplacement/Forms/StbSetup.cs
trunk/plugins/MCEReplacement/MCEReplacement.cs
Modified: trunk/plugins/IR Server Suite/Applications/Abstractor/MainForm.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Abstractor/MainForm.cs 2008-03-08 10:05:03 UTC (rev 1436)
+++ trunk/plugins/IR Server Suite/Applications/Abstractor/MainForm.cs 2008-03-08 13:45:51 UTC (rev 1437)
@@ -23,6 +23,8 @@
public partial class MainForm : Form
{
+ #region Constants
+
/*
static readonly string[] AbstractButtons = new string[] {
@@ -101,7 +103,10 @@
static readonly string AbstractRemoteMapFolder = Path.Combine(Common.FolderAppData, "Input Service\\Abstract Remote Maps");
static readonly string AbstractRemoteSchemaFile = Path.Combine(Common.FolderAppData, "Input Service\\Abstract Remote Maps\\RemoteTable.xsd");
+ #endregion Constants
+ #region Enumerations
+
public enum AbstractButton
{
Up,
@@ -173,6 +178,7 @@
PageDown,
}
+ #endregion Enumerations
#region Variables
@@ -182,7 +188,7 @@
bool _registered;
- IRServerInfo _irServerInfo = new IRServerInfo();
+ //IRServerInfo _irServerInfo = new IRServerInfo();
string[] _devices;
string _selectedDevice;
@@ -215,6 +221,7 @@
textBoxRemoteName.Text = devices[0];
}
+ #region Constructor
public MainForm()
{
@@ -271,6 +278,9 @@
*/
}
+ #endregion Constructor
+
+
private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
{
buttonDisconnect_Click(null, null);
@@ -294,7 +304,7 @@
if ((received.Flags & MessageFlags.Success) == MessageFlags.Success)
{
_registered = true;
- _irServerInfo = IRServerInfo.FromBytes(received.GetDataAsBytes());
+ //_irServerInfo = IRServerInfo.FromBytes(received.GetDataAsBytes());
_client.Send(new IrssMessage(MessageType.ActiveReceivers, MessageFlags.Request));
_client.Send(new IrssMessage(MessageType.ActiveBlasters, MessageFlags.Request));
Modified: trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs 2008-03-08 10:05:03 UTC (rev 1436)
+++ trunk/plugins/IR Server Suite/Applications/Debug Client/MainForm.cs 2008-03-08 13:45:51 UTC (rev 1437)
@@ -2,7 +2,6 @@
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
-using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.IO;
Modified: trunk/plugins/IR Server Suite/Applications/HCW PVR Tuner/Program.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/HCW PVR Tuner/Program.cs 2008-03-08 10:05:03 UTC (rev 1436)
+++ trunk/plugins/IR Server Suite/Applications/HCW PVR Tuner/Program.cs 2008-03-08 13:45:51 UTC (rev 1437)
@@ -71,8 +71,6 @@
#endif
IrssLog.Append("Dbox Tuner.log");
- // TODO: Add standard IRSS logging ...
-
if (args.Length != 1)
{
Console.WriteLine("Usage:");
@@ -87,13 +85,13 @@
{
int channelNumber;
if (!int.TryParse(args[0], out channelNumber))
- throw new ApplicationException(String.Format("Failed to convert command line parameter ({0}) to channel number", args[0]));
+ throw new ArgumentException(String.Format("Failed to convert command line parameter ({0}) to channel number", args[0]));
Info("Attempting to tune channel {0} ...", channelNumber);
int returnValue = UIR_Open(0, 0);
if (returnValue == 0)
- throw new ApplicationException(String.Format("Failed to start device access ({0})", returnValue));
+ throw new InvalidOperationException(String.Format("Failed to start device access ({0})", returnValue));
else
deviceOpen = true;
@@ -112,18 +110,13 @@
}
else
{
- throw new ApplicationException(String.Format("Failed to retrieve device configuration ({0})", returnValue));
+ throw new InvalidOperationException(String.Format("Failed to retrieve device configuration ({0})", returnValue));
}
returnValue = UIR_GotoChannel(config.d, config.f, channelNumber);
if (returnValue == 0)
- throw new ApplicationException(String.Format("Failed to tune channel ({0})", returnValue));
+ throw new InvalidOperationException(String.Format("Failed to tune channel ({0})", returnValue));
}
- catch (ApplicationException ex)
- {
- Info("Error: {0}", ex.Message);
- return ReturnError;
- }
catch (Exception ex)
{
Info(ex.ToString());
Modified: trunk/plugins/IR Server Suite/Applications/IR Blast/Program.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Blast/Program.cs 2008-03-08 10:05:03 UTC (rev 1436)
+++ trunk/plugins/IR Server Suite/Applications/IR Blast/Program.cs 2008-03-08 13:45:51 UTC (rev 1437)
@@ -2,7 +2,6 @@
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
-using System.Data;
using System.IO;
using System.Net;
using System.Net.Sockets;
Modified: trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Program.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Program.cs 2008-03-08 10:05:03 UTC (rev 1436)
+++ trunk/plugins/IR Server Suite/Applications/IR Blast (No Window)/Program.cs 2008-03-08 13:45:51 UTC (rev 1437)
@@ -2,7 +2,6 @@
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
-using System.Data;
using System.IO;
using System.Net;
using System.Net.Sockets;
Modified: trunk/plugins/IR Server Suite/Applications/IR File Tool/FormMain.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR File Tool/FormMain.cs 2008-03-08 10:05:03 UTC (rev 1436)
+++ trunk/plugins/IR Server Suite/Applications/IR File Tool/FormMain.cs 2008-03-08 13:45:51 UTC (rev 1437)
@@ -68,7 +68,7 @@
else
this.Text = "IR File Tool - " + _fileName;
- textBoxPronto.Text = Encoding.ASCII.GetString(_code.ToByteArray(true));
+ textBoxPronto.Text = Encoding.ASCII.GetString(_code.ToByteArray());
switch (_code.Carrier)
{
@@ -543,7 +543,7 @@
this.Invoke(new UpdateWindowDel(UpdateWindow), new string[] { "Blasting ..." });
string port = comboBoxPort.Text;
- byte[] codeBytes = _code.ToByteArray(true);
+ byte[] codeBytes = _code.ToByteArray();
byte[] outData = new byte[4 + port.Length + codeBytes.Length];
Modified: trunk/plugins/IR Server Suite/Applications/IR File Tool/IrCode.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR File Tool/IrCode.cs 2008-03-08 10:05:03 UTC (rev 1436)
+++ trunk/plugins/IR Server Suite/Applications/IR File Tool/IrCode.cs 2008-03-08 13:45:51 UTC (rev 1437)
@@ -30,9 +30,9 @@
public const int CarrierFrequencyDefault = 36000;
/// <summary>
- /// How long the longest IR Code space should be (microseconds).
+ /// How long the longest IR Code space should be (in microseconds).
/// </summary>
- const int LongestSpace = -100000;
+ const int LongestSpace = -75000;
#endregion Constants
@@ -89,8 +89,8 @@
if (_timingData.Length == 0)
return false;
+ // Find long spaces and trim the IR code ...
List<int> newData = new List<int>();
-
foreach (int time in _timingData)
{
if (time <= LongestSpace)
@@ -152,34 +152,18 @@
/// <summary>
/// Creates a byte array representation of this IR Code.
/// </summary>
- /// <param name="asPronto">Set this parameter true to convert the IR Code into Pronto format.</param>
- /// <returns>Byte array representation.</returns>
- public byte[] ToByteArray(bool asPronto)
+ /// <returns>Byte array representation (internally it is in Pronto format).</returns>
+ public byte[] ToByteArray()
{
StringBuilder output = new StringBuilder();
- if (asPronto)
- {
- ushort[] prontoData = Pronto.ConvertIrCodeToProntoRaw(this);
+ ushort[] prontoData = Pronto.ConvertIrCodeToProntoRaw(this);
- for (int index = 0; index < prontoData.Length; index++)
- {
- output.Append(prontoData[index].ToString("X4"));
- if (index != prontoData.Length - 1)
- output.Append(' ');
- }
- }
- else // Native format (only benefit is a slightly more accurate Carrier Frequency)
+ for (int index = 0; index < prontoData.Length; index++)
{
- output.Append("MCE,");
- output.AppendFormat("{0},", _carrier);
-
- for (int index = 0; index < _timingData.Length; index++)
- {
- output.Append(_timingData[index]);
- if (index != _timingData.Length - 1)
- output.Append(',');
- }
+ output.Append(prontoData[index].ToString("X4"));
+ if (index != prontoData.Length - 1)
+ output.Append(' ');
}
return Encoding.ASCII.GetBytes(output.ToString());
@@ -219,37 +203,30 @@
if (len != 0)
timingData.Add(len * 50);
- // Seems some old files have excessively long delays in them .. this might fix that problem ...
IrCode newCode = new IrCode(timingData.ToArray());
- newCode.FinalizeData();
+ newCode.FinalizeData(); // Seems some old files have excessively long delays in them .. this might fix that problem ...
return newCode;
}
/// <summary>
- /// Create an IrCode object from Native file bytes.
+ /// Creates an IrCode object from Pronto format file bytes.
/// </summary>
/// <param name="data">IR file bytes.</param>
/// <returns>New IrCode object.</returns>
- static IrCode FromNativeData(string data)
+ static IrCode FromProntoData(byte[] data)
{
- if (String.IsNullOrEmpty(data))
- throw new ArgumentNullException("data");
+ string code = Encoding.ASCII.GetString(data);
- string[] elements = data.Split(new char[] { ',' });
+ string[] stringData = code.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
- if (elements.Length < 3)
- throw new ApplicationException("Invalid native IR file data");
+ ushort[] prontoData = new ushort[stringData.Length];
+ for (int i = 0; i < stringData.Length; i++)
+ prontoData[i] = ushort.Parse(stringData[i], System.Globalization.NumberStyles.HexNumber);
- IrCode newCode = new IrCode();
- newCode.Carrier = int.Parse(elements[1]);
+ IrCode newCode = Pronto.ConvertProntoDataToIrCode(prontoData);
+ newCode.FinalizeData(); // Seems some old files have excessively long delays in them .. this might fix that problem ...
- int[] timingData = new int[elements.Length - 2];
- for (int index = 2; index < elements.Length; index++)
- timingData[index - 2] = int.Parse(elements[index]);
-
- newCode.TimingData = timingData;
-
return newCode;
}
@@ -261,27 +238,9 @@
public static IrCode FromByteArray(byte[] data)
{
if (data[4] == ' ')
- {
- string code = Encoding.ASCII.GetString(data);
-
- string[] stringData = code.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
-
- ushort[] prontoData = new ushort[stringData.Length];
- for (int i = 0; i < stringData.Length; i++)
- prontoData[i] = ushort.Parse(stringData[i], System.Globalization.NumberStyles.HexNumber);
-
- return Pronto.ConvertProntoDataToIrCode(prontoData);
- }
- else if (data[0] == 'M' && data[1] == 'C' && data[2] == 'E')
- {
- string code = Encoding.ASCII.GetString(data);
-
- return FromNativeData(code);
- }
+ return FromProntoData(data);
else
- {
return FromOldData(data);
- }
}
#endregion Static Methods
Modified: trunk/plugins/IR Server Suite/Applications/IR File Tool/Pronto.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR File Tool/Pronto.cs 2008-03-08 10:05:03 UTC (rev 1436)
+++ trunk/plugins/IR Server Suite/Applications/IR File Tool/Pronto.cs 2008-03-08 13:45:51 UTC (rev 1437)
@@ -97,6 +97,11 @@
}
}
+ /// <summary>
+ /// Converts an IR Code represented in Pronto data to an IrCode object.
+ /// </summary>
+ /// <param name="prontoData">The Pronto data to convert.</param>
+ /// <returns>IrCode object of interpretted Pronto data.</returns>
public static IrCode ConvertProntoDataToIrCode(ushort[] prontoData)
{
if (prontoData == null || prontoData.Length == 0)
@@ -530,6 +535,24 @@
return new IrCode(ConvertFromProntoCarrier(prontoCarrier), timingData.ToArray());
}
+ /*
+ public static ushort[] ConvertIrCodeToPronto(IrCode irCode)
+ {
+ CodeType codeType;
+ Int64 value;
+
+ if (Decode(irCode, out codeType, out value))
+ return EncodePronto(codeType, value);
+ else
+ return null;
+ }
+ */
+
+ /// <summary>
+ /// Converts the ir code into Pronto raw format.
+ /// </summary>
+ /// <param name="irCode">The ir code to convert.</param>
+ /// <returns>Pronto data (raw format).</returns>
public static ushort[] ConvertIrCodeToProntoRaw(IrCode irCode)
{
List<ushort> prontoData = new List<ushort>();
@@ -580,11 +603,21 @@
return prontoData.ToArray();
}
+ /// <summary>
+ /// Converts from a Pronto format carrier frequency to an integer format.
+ /// </summary>
+ /// <param name="prontoCarrier">The Pronto format carrier.</param>
+ /// <returns>The carrier frequency as an integer number.</returns>
public static int ConvertFromProntoCarrier(ushort prontoCarrier)
{
return (int)(1000000 / (prontoCarrier * ProntoClock));
}
+ /// <summary>
+ /// Converts from an integer number carrier frequency to a Pronto carrier format.
+ /// </summary>
+ /// <param name="carrierFrequency">The integer carrier frequency.</param>
+ /// <returns>The carrier frequency in Pronto format.</returns>
public static ushort ConvertToProntoCarrier(int carrierFrequency)
{
return (ushort)(1000000 / (carrierFrequency * ProntoClock));
Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Advanced.Designer.cs
===================================================================
--- trunk/plugins/IR Server Suite/Applications/IR Server/Advanced.Designer.cs 2008-03-08 10:05:03 UTC (rev 1436)
+++ trunk/plugins/IR Server Suite/Applications/IR Server/Advanced.Designer.cs 2008-03-08 13:45:51 UTC (rev 1437)
@@ -39,8 +39,15 @@
this.buttonCancel = new System.Windows.Forms.Button();
this.buttonOK = new System.Windows.Forms.Button();
this.toolTips = new System.Windows.Forms.ToolTip(this.components);
+ this.groupBoxAbstractRemoteModel = new System.Windows.Forms.GroupBox();
+ this.buttonExclusions = new System.Windows.Forms.Button();
this.checkBoxAbstractRemoteMode = new System.Windows.Forms.CheckBox();
+ this.groupBoxPriority = new System.Windows.Forms.GroupBox();
+ this.labelPriority = new System.Windows.Forms.Label();
+ this.comboBoxPriority = new System.Windows.Forms.ComboBox();
this.groupBoxMode.SuspendLayout();
+ this.groupBoxAbstractRemoteModel.SuspendLayout();
+ this.groupBoxPriority.SuspendLayout();
this.SuspendLayout();
//
// groupBoxMode
@@ -126,10 +133,10 @@
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
- this.buttonCancel.Location = new System.Drawing.Point(328, 136);
+ this.buttonCancel.Location = new System.Drawing.Point(328, 272);
this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(64, 24);
- this.buttonCancel.TabIndex = 2;
+ this.buttonCancel.TabIndex = 4;
this.buttonCancel.Text = "Cancel";
this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
@@ -137,47 +144,109 @@
// buttonOK
//
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonOK.Location = new System.Drawing.Point(256, 136);
+ this.buttonOK.Location = new System.Drawing.Point(256, 272);
this.buttonOK.Name = "buttonOK";
this.buttonOK.Size = new System.Drawing.Size(64, 24);
- this.buttonOK.TabIndex = 1;
+ this.buttonOK.TabIndex = 3;
this.buttonOK.Text = "OK";
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
//
+ // groupBoxAbstractRemoteModel
+ //
+ this.groupBoxAbstractRemoteModel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.groupBoxAbstractRemoteModel.Controls.Add(this.buttonExclusions);
+ this.groupBoxAbstractRemoteModel.Controls.Add(this.checkBoxAbstractRemoteMode);
+ this.groupBoxAbstractRemoteModel.Location = new System.Drawing.Point(8, 136);
+ this.groupBoxAbstractRemoteModel.Name = "groupBoxAbstractRemoteModel";
+ this.groupBoxAbstractRemoteModel.Size = new System.Drawing.Size(384, 56);
+ this.groupBoxAbstractRemoteModel.TabIndex = 1;
+ this.groupBoxAbstractRemoteModel.TabStop = false;
+ this.groupBoxAbstractRemoteModel.Text = "Abstract Remote Model";
+ //
+ // buttonExclusions
+ //
+ this.buttonExclusions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonExclusions.Enabled = false;
+ this.buttonExclusions.Location = new System.Drawing.Point(296, 24);
+ this.buttonExclusions.Name = "buttonExclusions";
+ this.buttonExclusions.Size = new System.Drawing.Size(80, 24);
+ this.buttonExclusions.TabIndex = 1;
+ this.buttonExclusions.Text = "Exclusions";
+ this.toolTips.SetToolTip(this.buttonExclusions, "Configure Abstract Remote Model exclusions");
+ this.buttonExclusions.UseVisualStyleBackColor = true;
+ this.buttonExclusions.Click += new System.EventHandler(this.buttonExclusions_Click);
+ //
// checkBoxAbstractRemoteMode
//
- this.checkBoxAbstractRemoteMode.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.checkBoxAbstractRemoteMode.AutoSize = true;
- this.checkBoxAbstractRemoteMode.Location = new System.Drawing.Point(8, 136);
+ this.checkBoxAbstractRemoteMode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.checkBoxAbstractRemoteMode.Location = new System.Drawing.Point(16,...
[truncated message content] |
|
From: <fr...@us...> - 2008-04-27 06:51:12
|
Revision: 1731
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1731&view=rev
Author: framug
Date: 2008-04-26 23:51:10 -0700 (Sat, 26 Apr 2008)
Log Message:
-----------
- default xmltv path is client xmltv path when xmltv server plugin not configured.
- local copy reference dll = false
Modified Paths:
--------------
trunk/plugins/WebEPGfr/WebEPGfr.csproj
trunk/plugins/WebEPGfr/WebEPGfrSetup.cs
trunk/plugins/WebEPGfr/WebEPGfr_planification/WebEPGfr_planification.csproj
trunk/plugins/kazer/kazer.csproj
trunk/plugins/kazer/kazerSetup.cs
trunk/plugins/kazer/kazer_planification/kazer_planification.csproj
Modified: trunk/plugins/WebEPGfr/WebEPGfr.csproj
===================================================================
--- trunk/plugins/WebEPGfr/WebEPGfr.csproj 2008-04-27 06:48:08 UTC (rev 1730)
+++ trunk/plugins/WebEPGfr/WebEPGfr.csproj 2008-04-27 06:51:10 UTC (rev 1731)
@@ -33,22 +33,27 @@
<Reference Include="Core, Version=0.2.3.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\MediaPortal\Core\bin\Release\Core.dll</HintPath>
+ <Private>False</Private>
</Reference>
<Reference Include="Databases, Version=0.2.3.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\MediaPortal\Databases\bin\Release\Databases.dll</HintPath>
+ <Private>False</Private>
</Reference>
<Reference Include="Dialogs, Version=0.2.3.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\MediaPortal\Dialogs\bin\Release\Dialogs.dll</HintPath>
+ <Private>False</Private>
</Reference>
<Reference Include="Gentle.Common, Version=1.2.9.1285, Culture=neutral, PublicKeyToken=80b5de62e27be49b">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\TVEngine3\TVLibrary\TvPlugin\TvPlugin\bin\Release\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>..\..\TVEngine3\TVLibrary\TvPlugin\TvPlugin\bin\Release\Gentle.Framework.dll</HintPath>
+ <Private>False</Private>
</Reference>
<Reference Include="ICSharpCode.SharpZipLib, Version=0.84.0.0, Culture=neutral, PublicKeyToken=1b03e6acf1164f73">
<SpecificVersion>False</SpecificVersion>
@@ -63,14 +68,17 @@
<Reference Include="TvBusinessLayer, Version=0.9.1.15825, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\TVEngine3\TVLibrary\TvPlugin\TvPlugin\bin\Release\TvBusinessLayer.dll</HintPath>
+ <Private>False</Private>
</Reference>
<Reference Include="TVDatabase, Version=0.9.1.15825, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\TVEngine3\TVLibrary\TvPlugin\TvPlugin\bin\Release\TVDatabase.dll</HintPath>
+ <Private>False</Private>
</Reference>
<Reference Include="Utils, Version=0.9.1.16168, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\MediaPortal\Utils\bin\Release\Utils.dll</HintPath>
+ <Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
Modified: trunk/plugins/WebEPGfr/WebEPGfrSetup.cs
===================================================================
--- trunk/plugins/WebEPGfr/WebEPGfrSetup.cs 2008-04-27 06:48:08 UTC (rev 1730)
+++ trunk/plugins/WebEPGfr/WebEPGfrSetup.cs 2008-04-27 06:51:10 UTC (rev 1731)
@@ -70,7 +70,7 @@
{
_GrabberMethod = new InfosSuivantSites.Grabber();
InitializeComponent(); // g\xE9n\xE9r\xE9 par visual studio, ne pas toucher
-// On va lire le XML de configuration
+ // On va lire le XML de configuration
LireXMLConfig();
// On va initialiser des variables par d\xE9faut
Initialise_variables();
@@ -270,6 +270,12 @@
// Le fameux serveur tele
TvBusinessLayer layer = new TvBusinessLayer();
Repertoire_XMLTV.Text = layer.GetSetting("xmlTv", "").Value;
+ // Si on ne trouve rien, c'est que le plugin xmltv du TVServer n'est pas configure
+ if (Repertoire_XMLTV.Text == "")
+ {
+ // donc, je le force par defaut au repertoire du client ou est installe MediaPortal
+ Repertoire_XMLTV.Text = AppDomain.CurrentDomain.BaseDirectory + "xmltv"; ;
+ }
_Repertoire_XMLTV_MP = Repertoire_XMLTV.Text;
}
// Le nom du fichier guide est TVguide.xml par d\xE9faut, dans MediaPortal
Modified: trunk/plugins/WebEPGfr/WebEPGfr_planification/WebEPGfr_planification.csproj
===================================================================
--- trunk/plugins/WebEPGfr/WebEPGfr_planification/WebEPGfr_planification.csproj 2008-04-27 06:48:08 UTC (rev 1730)
+++ trunk/plugins/WebEPGfr/WebEPGfr_planification/WebEPGfr_planification.csproj 2008-04-27 06:51:10 UTC (rev 1731)
@@ -31,6 +31,7 @@
<Reference Include="Core, Version=0.9.1.6436, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\MediaPortal\Core\bin\Release\Core.dll</HintPath>
+ <Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
@@ -38,6 +39,7 @@
<Reference Include="Utils, Version=2.2.4.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\MediaPortal\Utils\bin\Release\Utils.dll</HintPath>
+ <Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
@@ -50,6 +52,7 @@
<ProjectReference Include="..\WebEPGfr.csproj">
<Project>{1F927022-1A44-432D-B98B-82ECBF9765A7}</Project>
<Name>WebEPGfr</Name>
+ <Private>False</Private>
</ProjectReference>
</ItemGroup>
<ItemGroup>
Modified: trunk/plugins/kazer/kazer.csproj
===================================================================
--- trunk/plugins/kazer/kazer.csproj 2008-04-27 06:48:08 UTC (rev 1730)
+++ trunk/plugins/kazer/kazer.csproj 2008-04-27 06:51:10 UTC (rev 1731)
@@ -32,22 +32,27 @@
<Reference Include="Core, Version=0.2.3.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\MediaPortal\Core\bin\Release\Core.dll</HintPath>
+ <Private>False</Private>
</Reference>
<Reference Include="Databases, Version=0.2.3.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\MediaPortal\Databases\bin\Release\Databases.dll</HintPath>
+ <Private>False</Private>
</Reference>
<Reference Include="Dialogs, Version=0.2.3.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\MediaPortal\Dialogs\bin\Release\Dialogs.dll</HintPath>
+ <Private>False</Private>
</Reference>
<Reference Include="Gentle.Common, Version=1.2.9.1285, Culture=neutral, PublicKeyToken=80b5de62e27be49b">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\TVEngine3\TVLibrary\TVLibrary\bin\Release\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>..\..\TVEngine3\TVLibrary\TVLibrary\bin\Release\Gentle.Framework.dll</HintPath>
+ <Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
@@ -58,14 +63,17 @@
<Reference Include="TvBusinessLayer, Version=0.9.1.15825, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\TVEngine3\TVLibrary\TVLibrary\bin\Release\TvBusinessLayer.dll</HintPath>
+ <Private>False</Private>
</Reference>
<Reference Include="TVDatabase, Version=0.9.1.15825, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\TVEngine3\TVLibrary\TVLibrary\bin\Release\TVDatabase.dll</HintPath>
+ <Private>False</Private>
</Reference>
<Reference Include="Utils, Version=2.2.4.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\MediaPortal\Utils\bin\Release\Utils.dll</HintPath>
+ <Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
Modified: trunk/plugins/kazer/kazerSetup.cs
===================================================================
--- trunk/plugins/kazer/kazerSetup.cs 2008-04-27 06:48:08 UTC (rev 1730)
+++ trunk/plugins/kazer/kazerSetup.cs 2008-04-27 06:51:10 UTC (rev 1731)
@@ -274,6 +274,12 @@
// Le fameux serveur tele
TvBusinessLayer layer = new TvBusinessLayer();
Repertoire_XMLTV.Text = layer.GetSetting("xmlTv", "").Value;
+ // Si on ne trouve rien, c'est que le plugin xmltv du TVServer n'est pas configure
+ if (Repertoire_XMLTV.Text == "")
+ {
+ // donc, je le force par defaut au repertoire du client ou est installe MediaPortal
+ Repertoire_XMLTV.Text = AppDomain.CurrentDomain.BaseDirectory + "xmltv"; ;
+ }
_Repertoire_XMLTV_MP = Repertoire_XMLTV.Text;
}
Modified: trunk/plugins/kazer/kazer_planification/kazer_planification.csproj
===================================================================
--- trunk/plugins/kazer/kazer_planification/kazer_planification.csproj 2008-04-27 06:48:08 UTC (rev 1730)
+++ trunk/plugins/kazer/kazer_planification/kazer_planification.csproj 2008-04-27 06:51:10 UTC (rev 1731)
@@ -31,10 +31,12 @@
<Reference Include="Core, Version=0.2.3.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\MediaPortal\Core\bin\Release\Core.dll</HintPath>
+ <Private>False</Private>
</Reference>
<Reference Include="kazer, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\bin\Release\kazer.dll</HintPath>
+ <Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
@@ -42,6 +44,7 @@
<Reference Include="Utils, Version=2.2.4.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\MediaPortal\Utils\bin\Release\Utils.dll</HintPath>
+ <Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <Ju...@us...> - 2008-05-24 17:08:37
|
Revision: 1808
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1808&view=rev
Author: Jupek
Date: 2008-05-24 10:08:34 -0700 (Sat, 24 May 2008)
Log Message:
-----------
Added Paths:
-----------
trunk/plugins/YleAreena/
trunk/plugins/YleAreena/AreenaMedia.cs
trunk/plugins/YleAreena/AreenaUtility.cs
trunk/plugins/YleAreena/GUIAreena.cs
trunk/plugins/YleAreena/GUIAreenaPlugin.cs
trunk/plugins/YleAreena/GUIAreenaSetupForm.Designer.cs
trunk/plugins/YleAreena/GUIAreenaSetupForm.cs
trunk/plugins/YleAreena/GUIAreenaSetupForm.resx
trunk/plugins/YleAreena/Properties/
trunk/plugins/YleAreena/Properties/AssemblyInfo.cs
trunk/plugins/YleAreena/Skin/
trunk/plugins/YleAreena/Skin/YLEAreena.xml
trunk/plugins/YleAreena/YleAreena.csproj
trunk/plugins/YleAreena/YleAreena.sln
trunk/plugins/YleAreena/YleAreena.suo
trunk/plugins/YleAreena/installation_notes.txt
Added: trunk/plugins/YleAreena/AreenaMedia.cs
===================================================================
--- trunk/plugins/YleAreena/AreenaMedia.cs (rev 0)
+++ trunk/plugins/YleAreena/AreenaMedia.cs 2008-05-24 17:08:34 UTC (rev 1808)
@@ -0,0 +1,447 @@
+#region Copyright (C) 2008 Faithflame Productions
+
+/*
+ * Copyright (C) 2008 Faithflame Productions
+ * http://www.faithflame.net
+ *
+ * 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.Net;
+using System.Xml;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Threading;
+using MediaPortal.Player;
+using MediaPortal.GUI.Library;
+
+namespace MediaPortal.YleAreena
+{
+ /// <summary>
+ /// Summary description for Yle Areena media
+ /// </summary>
+ public class AreenaMedia
+ {
+ public const string videoURLTemplate = "http://www.yle.fi/java/areena/dispatcher/{0}.asx?bitrate=1000000";
+ public static string TempXML = string.Empty;
+ public static string TempHTML = string.Empty;
+
+ public static string[] ClipName = new string[2000];
+ public static string[] ClipURL = new string[2000];
+ public static string[] ClipID = new string[2000];
+ public static string[] ClipPicture = new string[2000]; // strings for section items
+ public static string ProgramInfo = string.Empty;
+ public static string ProgramPoster = string.Empty;
+ public static string PosterUrl = string.Empty;
+
+ // mediaportal.xml
+ public static string server = string.Empty;
+
+ /// <summary>
+ /// Make needed changes to HTML so it work as XML
+ /// </summary>
+ /// <param name="html"></param>
+ /// <returns></returns>
+ private static string convert2XML(string html)
+ {
+ string xmldoc = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>";
+
+ html = html.Replace(" ", "");
+
+ html = html.Replace("&", " ");
+ html = html.Replace("<br>", " ");
+
+ //check img tags that those are okay
+ int start = 0;
+ int end = 0;
+
+ start = html.IndexOf("<img");
+
+ if (start > 0)
+ do
+ {
+ end = html.IndexOf(">", start + 1);
+ if (html.Substring(end-1,1) != "/")
+ html = html.Substring(0,end) + "/" + html.Substring(end);
+
+ start = html.IndexOf("<img",start+1);
+ } while (start > 0);
+
+
+
+ return xmldoc + html;
+ }
+
+ /// <summary>
+ /// Search right part of the HTML
+ /// </summary>
+ /// <param name="tempHTML">Input HTML</param>
+ /// <param name="part">start of the part to be search</param>
+ /// <param name="searchStart">start index</param>
+ /// <returns></returns>
+ private static string searchHTMLSection(string tempHTML, string part, ref int searchStart)
+ {
+ int start = 0;
+ int searchTagPosition = 0;
+ int tagOpen = 1;
+ string tag = "";
+ string HTMLSection = "";
+
+ start = tempHTML.IndexOf(part, searchStart);
+
+ if (start > 0)
+ {
+ searchTagPosition = tempHTML.IndexOf(" ",start);
+ tag = tempHTML.Substring(start+1, searchTagPosition - start-1);
+
+ do
+ {
+ searchTagPosition = tempHTML.IndexOf(tag, searchTagPosition+1);
+
+ if (tempHTML.Substring(searchTagPosition - 1, 1) == "/")
+ tagOpen = tagOpen - 1;
+ else
+ tagOpen = tagOpen + 1;
+
+ if (tagOpen > 200)
+ return ""; //safety break if we fail for some reason
+
+ } while (tagOpen > 0);
+
+ searchTagPosition = tempHTML.IndexOf(">", searchTagPosition +1);
+
+ HTMLSection = tempHTML.Substring(start, searchTagPosition - start+1);
+
+ }
+ searchStart = searchTagPosition + 1;
+
+ return HTMLSection;
+ }
+
+
+ /// <summary>
+ /// Search programlists for common parts on the main page of the service
+ /// </summary>
+ /// <param name="htmlurl">HTML URL</param>
+ /// <param name="part">Section header</param>
+ public static void GetProgramList(string htmlurl, string part)
+ {
+
+ Array.Clear(ClipName, 0, 2000);
+ Array.Clear(ClipURL, 0, 2000);
+ Array.Clear(ClipPicture, 0, 2000);
+ Array.Clear(ClipID, 0, 2000);
+
+ AreenaUtility AU = new AreenaUtility();
+ AU.GetWebPage(htmlurl, out TempHTML);
+
+
+ if (TempHTML == null || TempHTML == string.Empty)
+ return;
+
+ bool sectionFound = false;
+ XmlDocument XmlDoc = new XmlDocument();
+ int searchStart = 0;
+ string sectionTempHTML = "";
+
+ //search right section
+ do
+ {
+
+ sectionTempHTML = searchHTMLSection(TempHTML, "<div class=\"insert list clip-details \">", ref searchStart);
+
+ if (sectionTempHTML == string.Empty)
+ return;
+
+ TempXML = convert2XML(sectionTempHTML);
+
+ XmlDoc.LoadXml(TempXML);
+ if (XmlDoc.SelectSingleNode("/div/h2").InnerText == part)
+ sectionFound = true;
+
+ } while (!sectionFound);
+
+
+ XmlNodeList items = XmlDoc.SelectNodes("/div/ul")[0].ChildNodes;
+ int i = 0;
+ string itemHref = "";
+
+ foreach (XmlNode item in items)
+ {
+
+ XmlNodeList iteminfo = item.ChildNodes;
+
+ foreach (XmlNode info in iteminfo)
+ {
+ switch (info.Attributes["class"].Value)
+ {
+ case "clip-info thumbnail":
+ {
+ ClipPicture[i] = info.ChildNodes[0].ChildNodes[0].Attributes["src"].Value;
+ break;
+ }
+
+ case "clip-info title":
+ {
+ ClipName[i] = ClipName[i] + " " + info.InnerText;
+ break;
+ }
+
+ case "clip-info link-to-media":
+ {
+ ClipName[i] = ClipName[i] + " " + info.InnerText;
+ itemHref = info.ChildNodes[0].Attributes["href"].Value;
+ ClipID[i] = itemHref.Substring(itemHref.LastIndexOf("=")+1);
+ ClipURL[i] = string.Format(videoURLTemplate,ClipID[i]);
+ break;
+ }
+
+ case "clip-info datetime":
+ {
+ ClipName[i] = ClipName[i] + " (" + info.InnerText + ")";
+ break;
+ }
+
+ default:
+ break;
+ }
+ }
+ ClipName[i] = ClipName[i].TrimStart(null);
+ i++;
+
+ }
+
+ }
+
+ /// <summary>
+ /// Search program list from that all programs
+ /// </summary>
+ /// <param name="htmlurl">URL to be used</param>
+ public static void GetProgramList(string htmlurl)
+ {
+
+ Array.Clear(ClipName, 0, 2000);
+ Array.Clear(ClipURL, 0, 2000);
+ Array.Clear(ClipPicture, 0, 2000);
+ Array.Clear(ClipID, 0, 2000);
+
+ string baseURL = "";
+ baseURL = htmlurl.Substring(0, htmlurl.IndexOf("/", 8));
+
+
+ AreenaUtility AU = new AreenaUtility();
+ AU.GetWebPage(htmlurl, out TempHTML);
+
+ if (TempHTML == null || TempHTML == string.Empty)
+ return;
+
+ XmlDocument XmlDoc = new XmlDocument();
+ int searchStart = 0;
+ string sectionTempHTML = "";
+
+ sectionTempHTML = searchHTMLSection(TempHTML, "<table class=\"productlist stripe\">", ref searchStart);
+
+ if (sectionTempHTML == string.Empty)
+ return;
+
+ TempXML = convert2XML(sectionTempHTML);
+
+ XmlDoc.LoadXml(TempXML);
+
+ XmlNodeList items = XmlDoc.SelectNodes("/table/tbody")[0].ChildNodes;
+ int i = 0;
+ string itemHref = "";
+
+ foreach (XmlNode item in items)
+ {
+
+ XmlNodeList iteminfo = item.ChildNodes;
+
+ foreach (XmlNode info in iteminfo)
+ {
+ switch (info.Attributes["class"].Value)
+ {
+ case "product":
+ {
+ ClipName[i] = info.InnerText;
+ itemHref = info.ChildNodes[0].Attributes["href"].Value;
+ ClipID[i] = itemHref.Substring(itemHref.LastIndexOf("=") + 1);
+ ClipURL[i] = baseURL + itemHref;
+ break;
+ }
+
+ default:
+ break;
+ }
+ }
+ i++;
+
+ }
+
+ }
+
+ /// <summary>
+ /// Get program's recorded list + info
+ /// </summary>
+ /// <param name="htmlurl">URL to be used</param>
+ public static void GetProgramListandInfo(string htmlurl)
+ {
+
+ try
+ {
+
+ ProgramInfo = string.Empty;
+ ProgramPoster = string.Empty;
+
+ Array.Clear(ClipName, 0, 2000);
+ Array.Clear(ClipURL, 0, 2000);
+ Array.Clear(ClipPicture, 0, 2000);
+ Array.Clear(ClipID, 0, 2000);
+
+ AreenaUtility AU = new AreenaUtility();
+ string sectionTempHTML = "";
+ int searchStart = 0;
+ XmlDocument XmlDoc = new XmlDocument();
+
+ AU.GetWebPage(htmlurl, out TempHTML);
+
+ if (TempHTML == null || TempHTML == string.Empty)
+ return;
+
+ sectionTempHTML = searchHTMLSection(TempHTML, "<div class=\"insert highlight visio-box image-on-left \">", ref searchStart);
+
+ if (sectionTempHTML != string.Empty)
+ {
+ TempXML = convert2XML(sectionTempHTML);
+
+ XmlDoc.LoadXml(TempXML);
+
+ try
+ {
+ ProgramInfo = XmlDoc.SelectNodes("/div/div/h4")[0].InnerText;
+ ProgramInfo = ProgramInfo + "\n\n" + XmlDoc.SelectNodes("/div/div/p")[0].InnerText;
+ ProgramPoster = XmlDoc.SelectNodes("/div/img")[0].Attributes["src"].Value;
+ }
+ catch (Exception ex)
+ {
+ //if error happens please continue...
+ }
+ }
+
+ searchStart = 0;
+
+ sectionTempHTML = searchHTMLSection(TempHTML, "<div class=\"paging\">", ref searchStart);
+
+ if (sectionTempHTML == string.Empty)
+ return;
+
+ TempXML = convert2XML(sectionTempHTML);
+
+ XmlDoc.LoadXml(TempXML);
+
+ char[] delimiters = { ' ' };
+
+ int pagecount = XmlDoc.SelectNodes("/div/div/div")[0].InnerText.Replace("\t", "").Replace("\n", "").Trim().Split(delimiters).Length;
+
+ int i = 0;
+
+ for (int page = 1; page < pagecount + 1; page++)
+ {
+
+ AU.GetWebPage(htmlurl + "&s=" + page.ToString(), out TempHTML);
+
+ if (TempHTML == null || TempHTML == string.Empty)
+ return;
+
+ searchStart = 0;
+
+ sectionTempHTML = searchHTMLSection(TempHTML, "<div class=\"insert list clip-details simplier\">", ref searchStart);
+
+ if (sectionTempHTML == string.Empty)
+ return;
+
+ TempXML = convert2XML(sectionTempHTML);
+
+ XmlDoc.LoadXml(TempXML);
+
+ XmlNodeList items = XmlDoc.SelectNodes("/div/ul")[0].ChildNodes;
+ string itemHref = "";
+
+ foreach (XmlNode item in items)
+ {
+
+ XmlNodeList iteminfo = item.ChildNodes;
+
+ foreach (XmlNode info in iteminfo)
+ {
+ switch (info.Attributes["class"].Value)
+ {
+ case "clip-info thumbnail":
+ {
+ ClipPicture[i] = info.ChildNodes[0].ChildNodes[0].Attributes["src"].Value;
+ break;
+ }
+
+ case "clip-info title":
+ {
+ ClipName[i] = ClipName[i] + " " + info.InnerText;
+ break;
+ }
+
+ case "clip-info link-to-media":
+ {
+ ClipName[i] = ClipName[i] + " " + info.InnerText;
+ itemHref = info.ChildNodes[0].Attributes["href"].Value;
+ ClipID[i] = itemHref.Substring(itemHref.LastIndexOf("=") + 1);
+ ClipURL[i] = string.Format(videoURLTemplate, ClipID[i]);
+ break;
+ }
+
+ case "clip-info datetime":
+ {
+ ClipName[i] = ClipName[i] + " (" + info.InnerText + ")";
+ break;
+ }
+
+ default:
+ break;
+ }
+ }
+ ClipName[i] = ClipName[i].TrimStart(null);
+ i++;
+
+ }
+
+ }
+
+ }
+ catch (Exception ex)
+ {
+ throw ex;
+ }
+
+ }
+
+ public AreenaMedia()
+ {
+
+ }
+ }
+}
\ No newline at end of file
Added: trunk/plugins/YleAreena/AreenaUtility.cs
===================================================================
--- trunk/plugins/YleAreena/AreenaUtility.cs (rev 0)
+++ trunk/plugins/YleAreena/AreenaUtility.cs 2008-05-24 17:08:34 UTC (rev 1808)
@@ -0,0 +1,132 @@
+#region Copyright (C) 2008 Faithflame Productions
+
+/*
+ * Copyright (C) 2008 Faithflame Productions
+ * http://www.faithflame.net
+ *
+ * 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.Net;
+using System.Text;
+using System.Threading;
+using System.ComponentModel;
+using MediaPortal.GUI.Library;
+using MediaPortal.Util;
+
+namespace MediaPortal.YleAreena
+{
+ /// <summary>
+ /// Summary description for AreenaUtility. Almost a copy from TrailersUtility.cs (from GUITrailers plugin)
+ /// </summary>
+ public class AreenaUtility
+ {
+ string _downloadedText = string.Empty;
+
+ public void GetWebPage(string url, out string HTMLDownload) // Get url and put in string
+ {
+ if (_workerCompleted)
+ {
+ _workerCompleted = false;
+
+ BackgroundWorker worker = new BackgroundWorker();
+
+ worker.DoWork += new DoWorkEventHandler(DownloadWorker);
+ worker.RunWorkerAsync(url);
+
+ using (WaitCursor cursor = new WaitCursor())
+ {
+ while (_workerCompleted == false)
+ GUIWindowManager.Process();
+ }
+
+ HTMLDownload = _downloadedText;
+
+ _downloadedText = null;
+ }
+ else
+ {
+ HTMLDownload = string.Empty;
+ }
+ }
+
+ public void DownloadWorker(object sender, DoWorkEventArgs e)
+ {
+ Thread.CurrentThread.Name = "Areena";
+ WebClient wc = new WebClient();
+
+ try
+ {
+ byte[] HTMLBuffer;
+
+ HTMLBuffer = wc.DownloadData((string)e.Argument);
+
+ _downloadedText = Encoding.UTF8.GetString(HTMLBuffer);
+ }
+ catch (Exception ex)
+ {
+
+ Log.Info("YleAreena.DownloadWorker: {0}", ex.Message);
+ }
+ finally
+ {
+ wc.Dispose();
+ }
+
+ _workerCompleted = true;
+ }
+
+ public static bool _workerCompleted = true;
+ public static bool interupted = false;
+
+ public void DownloadIcon(string downloadurl, string programID)
+ {
+ if (!System.IO.File.Exists(System.IO.Path.Combine(Thumbs.Trailers, programID + ".jpg")))
+ {
+ using (WaitCursor cursor = new WaitCursor())
+ {
+ try
+ {
+ // Download Poster
+ WebClient wc = new WebClient();
+ Util.Utils.DownLoadAndCacheImage(downloadurl, System.IO.Path.Combine(Thumbs.Trailers, programID + ".jpg"));
+ //wc.DownloadFile(downloadurl, Config.GetFile(Config.Dir.Thumbs, "MPTemp -" + moviename + ".jpg"));
+
+ while (System.IO.File.Exists(System.IO.Path.Combine(Thumbs.Trailers, programID + ".jpg")) != true)
+ {
+ Thread.Sleep(50);
+ GUIWindowManager.Process();
+ }
+
+ }
+ catch (Exception ex)
+ {
+ Log.Warn("AreenaUtility: an error occured downloading icon for {0} - {1}", programID, ex.Message);
+ }
+
+ }
+ }
+ }
+
+ public AreenaUtility()
+ {
+ }
+ }
+}
\ No newline at end of file
Added: trunk/plugins/YleAreena/GUIAreena.cs
===================================================================
--- trunk/plugins/YleAreena/GUIAreena.cs (rev 0)
+++ trunk/plugins/YleAreena/GUIAreena.cs 2008-05-24 17:08:34 UTC (rev 1808)
@@ -0,0 +1,528 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Windows.Forms;
+using MediaPortal.GUI.Library;
+using MediaPortal.Util;
+using MediaPortal.Dialogs;
+using MediaPortal.Player;
+using MediaPortal.Playlists;
+
+namespace MediaPortal.YleAreena
+{
+ public class GUIAreena : GUIWindow
+ {
+ #region SkinControlAttributes
+ [SkinControlAttribute(3)] protected GUISelectButtonControl btnletter = null;
+ [SkinControlAttribute(4)] protected GUIListControl listview = null;
+ [SkinControlAttribute(24)] protected GUIImage poster = null;
+ [SkinControlAttribute(25)] protected GUIImage programPoster = null;
+ [SkinControlAttribute(26)] protected GUITextScrollUpControl programDesc = null;
+ #endregion
+ #region Variables
+
+ int Prev_SelectedItem = 0;
+ string currentletter = "";
+ string backgroundposter = null;
+
+ string[] LMovieUrl = new string[2000]; // strings for letterbutton movies
+ string[] LMovieName = new string[2000];
+ string[] LMovieID = new string[2000];
+
+ bool mainview = false;
+ bool letterview = false;
+ bool searchview = false;
+ bool programView = false;
+
+ public enum pageMode
+ {
+ LetterView,
+ MainView,
+ ProgramView,
+ SearchView
+ }
+
+ pageMode prevMode = pageMode.MainView;
+ string[] MainListMenu = new String[15]; //Decause the number of menu item is dynamic.
+
+ #endregion
+ #region Override functions
+
+ public override int GetID
+ {
+ get
+ {
+ return 800000;
+ }
+ set
+ {
+ base.GetID = value;
+ }
+ }
+ public override bool Init()
+ {
+ return Load(GUIGraphicsContext.Skin + @"\YLEAreena.xml");
+ }
+
+ protected override void OnClicked(int controlId, GUIControl control, MediaPortal.GUI.Library.Action.ActionType actionType) // For when a button is pressed
+ {
+ if (control == btnletter)
+ OnButtonTwo();
+ if (control == listview)
+ {
+ GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_ITEM_SELECTED, GetID, 0, controlId, 0, 0, null);
+ OnMessage(msg);
+ int itemIndex = (int)msg.Param1;
+ if (actionType == Action.ActionType.ACTION_SELECT_ITEM)
+ {
+ OnClick(itemIndex);
+ }
+ }
+ base.OnClicked(controlId, control, actionType);
+ }
+ public override void OnAction(Action action)
+ {
+ if (action.wID == Action.ActionType.ACTION_PREVIOUS_MENU && mainview != true)
+ {
+ if (AreenaUtility._workerCompleted == false)
+ {
+ AreenaUtility._workerCompleted = true;
+ AreenaUtility.interupted = true;
+ ShowLabelsFalse();
+ }
+ OnClick(0);
+ return;
+ }
+
+ base.OnAction(action);
+
+ if (programView == true)
+ {
+ if (listview.SelectedListItemIndex > 0)
+ ShowPoster(AreenaMedia.ClipPicture[listview.SelectedListItemIndex-1],"Areena_" + AreenaMedia.ClipID[listview.SelectedListItemIndex-1]);
+ }
+
+ }
+
+ protected override void OnPageDestroy(int newWindowId)
+ {
+ base.OnPageDestroy(newWindowId);
+ }
+
+ protected override void OnPageLoad()
+ {
+ base.OnPageLoad();
+ btnletter.RestoreSelection = false;
+ btnletter.AddSubItem("#");
+ for (char k = 'A'; k <= 'Z'; k++)
+ {
+ btnletter.AddSubItem(k.ToString());
+ }
+ LoadSettings();
+
+ ShowLabelsFalse();
+ GUIPropertyManager.SetProperty("#title", "");
+ if (backgroundposter == null)
+ backgroundposter = poster.FileName;
+ poster.SetFileName(GUIGraphicsContext.Skin + @"\media\" + backgroundposter);
+ ShowMainListView();
+ listview.Focus = true;
+ }
+ protected override void OnPreviousWindow()
+ {
+ base.OnPreviousWindow();
+ }
+
+ #endregion
+
+ #region Button/Click functions
+
+ private string GetSelectedListViewItemText()
+ {
+ string strLabel1 = "", strLabel2 = "", strThumb = "";
+ listview.GetSelectedItem(ref strLabel1, ref strLabel2, ref strThumb);
+ return strLabel1;
+ }
+
+ private void OnButtonTwo()
+ {
+ searchview = false;
+ letterview = true;
+ ShowLetterListView(AreenaMedia.ClipName,AreenaMedia.ClipURL,AreenaMedia.ClipID);
+ }
+
+
+ private void OnClick(int itemindex) // // When something is pressed in the listview
+ {
+
+ try
+ {
+ if (mainview == true)
+ {
+ if (itemindex == 0) // Newest news
+ {
+ mainview = false;
+ AreenaMedia.GetProgramList("http://areena.yle.fi/", "Uusimmat Tv-uutisetTv-uutiset 20.30");
+ ShowListView(AreenaMedia.ClipName, 800002);
+ programView = true;
+ prevMode = pageMode.MainView;
+ }
+ else if (itemindex == 1) // Newest
+ {
+ mainview = false;
+ AreenaMedia.GetProgramList("http://areena.yle.fi/", "Uusimmat");
+ ShowListView(AreenaMedia.ClipName, 800003);
+ programView = true;
+ prevMode = pageMode.MainView;
+ }
+ else if (itemindex == 2) //all
+ {
+ mainview = false;
+ AreenaMedia.GetProgramList("http://areena.yle.fi/selaa");
+ ShowListView(AreenaMedia.ClipName, 800005);
+ searchview = true;
+ btnletter.Visible = true;
+ prevMode = pageMode.MainView;
+ }
+
+ }
+ else if (programView == true)
+ {
+ if (itemindex == 0) //back to main page
+ {
+ if (prevMode == pageMode.MainView)
+ {
+ mainview = true;
+ ShowMainListView();
+ poster.Visible = false;
+ }
+ else
+ {
+ searchview = true;
+ ShowLabelsFalse();
+ btnletter.Visible = true;
+ AreenaMedia.GetProgramList("http://areena.yle.fi/selaa");
+ ShowListView(AreenaMedia.ClipName, 800005);
+ }
+
+ programView = false;
+ prevMode = pageMode.ProgramView;
+ }
+ else
+ {
+ PlayMedia(AreenaMedia.ClipURL[itemindex-1], GetSelectedListViewItemText());
+ programView = false;
+ mainview = true;
+ prevMode = pageMode.ProgramView;
+ }
+
+ }
+ else if (searchview == true)
+ {
+ if (itemindex == 0) //back to main page
+ {
+ mainview = true;
+ searchview = false;
+ ShowLabelsFalse();
+ ShowMainListView();
+ btnletter.Visible = false;
+ prevMode = pageMode.SearchView;
+ }
+ else
+ {
+ string programID = AreenaMedia.ClipID[listview.SelectedListItemIndex - 1];
+ AreenaMedia.GetProgramListandInfo(AreenaMedia.ClipURL[itemindex - 1]);
+ ShowProgramPoster(AreenaMedia.ProgramPoster, "Areena_" + programID);
+ GUIPropertyManager.SetProperty("#programinfo", AreenaMedia.ProgramInfo);
+ ShowListView(AreenaMedia.ClipName, 800004);
+
+ if (AreenaMedia.ProgramPoster != string.Empty)
+ programPoster.Visible = true;
+
+ if (AreenaMedia.ProgramInfo != string.Empty)
+ programDesc.Visible = true;
+
+ programView = true;
+ btnletter.Visible = false;
+ prevMode = pageMode.SearchView;
+
+ }
+ }
+ else if (letterview == true)
+ {
+ if (itemindex == 0) //back to main page
+ {
+ mainview = true;
+ letterview = false;
+ ShowLabelsFalse();
+ ShowMainListView();
+ btnletter.Visible = false;
+ prevMode = pageMode.LetterView;
+ }
+ else
+ {
+ string programID = LMovieID[listview.SelectedListItemIndex - 1];
+ AreenaMedia.GetProgramListandInfo(LMovieUrl[itemindex - 1]);
+ ShowProgramPoster(AreenaMedia.ProgramPoster, "Areena_" + programID);
+ GUIPropertyManager.SetProperty("#programinfo", AreenaMedia.ProgramInfo);
+ ShowListView(AreenaMedia.ClipName, 800004);
+
+ if (AreenaMedia.ProgramPoster != string.Empty)
+ programPoster.Visible = true;
+
+ if (AreenaMedia.Pr...
[truncated message content] |