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/IPTV@UT.csproj 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...n trunk/plugins/IPTV@UT/IP...@UT...o 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/IPTV@UT.csproj =================================================================== --- trunk/plugins/IPTV@UT/IPTV@UT/IPTV@UT.csproj (rev 0) +++ trunk/plugins/IPTV@UT/IPTV@UT/IPTV@UT.csproj 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> + <AssemblyName>IPTV</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.2524.28381, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\trunk\mediaportal\xbmc\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> + </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" /> + </ItemGroup> + <ItemGroup> + <Compile Include="ConfigurationForm.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="ConfigurationForm.Designer.cs"> + <DependentUpon>ConfigurationForm.cs</DependentUpon> + </Compile> + <Compile Include="IPTV.cs" /> + <Compile Include="PlayListVLCIO.cs" /> + <Compile Include="PlayListVLCItem.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="ShowWaitCursor.cs" /> + <Compile Include="IPTVPlugin.cs" /> + </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="ConfigurationForm.resx"> + <SubType>Designer</SubType> + <DependentUpon>ConfigurationForm.cs</DependentUpon> + </EmbeddedResource> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file Property changes on: trunk/plugins/IPTV@UT/IPTV@UT/IPTV@UT.csproj ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/plugins/IPTV@UT/IPTV@UT/IPTVPlugin.cs =================================================================== --- trunk/plugins/IPTV@UT/IPTV@UT/IPTVPlugin.cs (rev 0) +++ trunk/plugins/IPTV@UT/IPTV@UT/IPTVPlugin.cs 2007-01-29 21:35:54 UTC (rev 47) @@ -0,0 +1,120 @@ +#region Copyright (C) 2005-2006 Team MediaPortal + +/* + * Copyright (C) 2005-2006 Team MediaPortal + * http://www.team-mediaportal.com + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This Program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +#endregion + +using System; +using System.ComponentModel; +using System.Windows.Forms; +using System.Net; + +using MediaPortal.GUI.Library; + +namespace MediaPortal.GUI.IPTV +{ + public class IPTVPlugin : ISetupForm, IShowPlugin + { + // Returns the name of the plugin which is shown in the plugin menu + public string PluginName() + { + return "My IPTV"; + } + + // Returns the description of the plugin is shown in the plugin menu + public string Description() + { + return "View digital TV channels from an M3U playlist (uses VideoLan external player)"; + } + + // Returns the author of the plugin which is shown in the plugin menu + public string Author() + { + return "Moiristo"; + } + + // show the setup dialog + public void ShowPlugin() + { + ConfigurationForm form = new ConfigurationForm(); + form.ShowDialog(); + } + + // Indicates whether plugin can be enabled/disabled + public bool CanEnable() + { + return true; + } + + // get ID of windowplugin belonging to this setup + public int GetWindowId() + { + return 7500; + } + + // 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 true; + } + + /// <summary> + /// If the plugin should have its own button on the main menu of Mediaportal then it + /// should return true to this method, otherwise if it should not be on home + /// it should return false + /// </summary> + /// <param name="strButtonText">text the button should have</param> + /// <param name="strButtonImage">image for the button, or empty for default</param> + /// <param name="strButtonImageFocus">image for the button, or empty for default</param> + /// <param name="strPictureImage">subpicture for the button or empty for none</param> + /// <returns>true : plugin needs its own button on home + /// false : plugin does not need its own button on home</returns> + public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) + { + string buttonText = GUIPropertyManager.GetProperty("#name"); + if (buttonText.Equals("")) buttonText = PluginName(); + + strButtonText = buttonText; + strButtonImage = String.Empty; + strButtonImageFocus = String.Empty; + strPictureImage = "hover_my tv.png"; + return true; + } + + #region IShowPlugin Members + + public bool ShowDefaultHome() + { + return true; + } + + #endregion + + } +} + + Property changes on: trunk/plugins/IPTV@UT/IPTV@UT/IPTVPlugin.cs ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/plugins/IPTV@UT/IPTV@UT/PlayListVLCIO.cs =================================================================== --- trunk/plugins/IPTV@UT/IPTV@UT/PlayListVLCIO.cs (rev 0) +++ trunk/plugins/IPTV@UT/IPTV@UT/PlayListVLCIO.cs 2007-01-29 21:35:54 UTC (rev 47) @@ -0,0 +1,176 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.IO; +using MediaPortal.Util; +using MediaPortal.Playlists; +using MediaPortal.GUI.Library; + +namespace MediaPortal.GUI.IPTV +{ + public class PlayListVLCIO : IPlayListIO + { + const string M3U_START_MARKER = "#EXTM3U"; + const string M3U_INFO_MARKER = "#EXTINF"; + const string M3U_COMMENT_MARKER = "##"; + const string VLC_OPT_MARKER = "#EXTVLCOPT"; + + public PlayList playlist; + private StreamReader file; + private string basePath; + + public PlayListVLCIO() + { + } + + public bool Load(PlayList incomingPlaylist, string playlistFileName) + { + Log.Info("MyIPTV: Loading " + playlistFileName); + if (playlistFileName == null) + return false; + playlist = incomingPlaylist; + playlist.Clear(); + + try + { + playlist.Name = Path.GetFileName(playlistFileName); + basePath = Path.GetDirectoryName(Path.GetFullPath(playlistFileName)); + + using (file = new StreamReader(playlistFileName)) + { + if (file == null) + return false; + + string line = file.ReadLine(); + if (line == null || line.Length == 0) + return false; + + string trimmedLine = line.Trim(); + + if (trimmedLine != M3U_START_MARKER) + { + //This is probably not a valid M3u file + return false; + } + + Boolean parseChannel = false; + PlayListVLCItem currentItem = null; + while ((line = file.ReadLine()) != null) + { + trimmedLine = line.Trim(); + + if (trimmedLine.StartsWith(M3U_COMMENT_MARKER) || trimmedLine.Equals("")) + { + //Just ignore this + } + else if (trimmedLine.StartsWith(M3U_INFO_MARKER)) + { + parseChannel = true; + string channelName = null; + int lDuration = 0; + + if (ExtractM3uInfo(trimmedLine, ref channelName, ref lDuration)) + { + currentItem = new PlayListVLCItem(channelName, lDuration); + currentItem.Type = PlayListItem.PlayListItemType.VideoStream; + } + } + else if (trimmedLine.StartsWith(VLC_OPT_MARKER)) + { + if (!parseChannel || currentItem == null) + { + //No EXTINF tag found, give default name + parseChannel = true; + currentItem = new PlayListVLCItem("Stream " + playlist.Count, -1); + currentItem.Type = PlayListItem.PlayListItemType.VideoStream; + } + + string option = null; + if (ExtractVLCInfo(trimmedLine, ref option)) + { + currentItem.AddOption(option); + } + } + else + { + //Stream found? + if (!parseChannel || currentItem == null) + { + //No EXTINF tag or EXTVLCOPT found, give default name & no parameters + currentItem = new PlayListVLCItem("Stream " + playlist.Count, -1); + currentItem.Type = PlayListItem.PlayListItemType.VideoStream; + } + + //(TODO: Validate that this really is stream data and not some rubbish) + //Filename = StreamName in this case + currentItem.FileName = trimmedLine; + + //Add it to the playlist + playlist.Add(currentItem); + + //Finally, tell that we just ended parsing a channel + parseChannel = false; + } + } + } + } + catch (Exception ex) + { + Log.Info("MyIPTV: Exception loading playlist {0} err:{1} stack:{2}", playlistFileName, ex.Message, ex.StackTrace); + return false; + } + return true; + } + + private static bool ExtractM3uInfo(string trimmedLine, ref string channelName, ref int lDuration) + { + //bool successfull; + int iColon = (int)trimmedLine.IndexOf(":"); + int iComma = (int)trimmedLine.IndexOf(","); + if (iColon >= 0 && iComma >= 0 && iComma > iColon) + { + iColon++; + string duration = trimmedLine.Substring(iColon, iComma - iColon); + iComma++; + channelName = trimmedLine.Substring(iComma); + lDuration = System.Int32.Parse(duration); + return true; + } + return false; + } + + private static bool ExtractVLCInfo(string trimmedLine, ref string option) + { + //bool successfull; + int iColon = (int)trimmedLine.IndexOf(":"); + if (iColon >= 0) + { + iColon++; + option = trimmedLine.Substring(iColon); + return true; + } + return false; + } + + public void Save(PlayList playlist, string fileName) + { + try + { + using (StreamWriter writer = new StreamWriter(fileName, false)) + { + writer.WriteLine(M3U_START_MARKER); + + foreach (PlayListItem item in playlist) + { + writer.WriteLine("{0}:{1},{2}", M3U_INFO_MARKER, item.Duration, item.Description); + writer.WriteLine("{0}", item.FileName); + } + } + } + catch (Exception e) + { + Log.Info("MyIPTV: Failed to save a playlist {0}. err: {1} stack: {2}", fileName, e.Message, e.StackTrace); + } + } + } +} Property changes on: trunk/plugins/IPTV@UT/IPTV@UT/PlayListVLCIO.cs ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/plugins/IPTV@UT/IPTV@UT/PlayListVLCItem.cs =================================================================== --- trunk/plugins/IPTV@UT/IPTV@UT/PlayListVLCItem.cs (rev 0) +++ trunk/plugins/IPTV@UT/IPTV@UT/PlayListVLCItem.cs 2007-01-29 21:35:54 UTC (rev 47) @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Text; +using MediaPortal.Playlists; + +namespace MediaPortal.GUI.IPTV +{ + class PlayListVLCItem : PlayListItem + { + protected List<string> _options = new List<string>(); + + public PlayListVLCItem(string description, int duration) + { + if (description == null) + return; + _description = description; + _duration = duration; + } + + public List<string> Options + { + get { return _options; } + set + { + if (value == null) + return; + _options = value; + } + } + + public void AddOption(string option) + { + Options.Add(option); + } + + } +} Property changes on: trunk/plugins/IPTV@UT/IPTV@UT/PlayListVLCItem.cs ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/plugins/IPTV@UT/IPTV@UT/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IPTV@UT/IPTV@UT/Properties/AssemblyInfo.cs (rev 0) +++ trunk/plugins/IPTV@UT/IPTV@UT/Properties/AssemblyInfo.cs 2007-01-29 21:35:54 UTC (rev 47) @@ -0,0 +1,35 @@ +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("IPTV")] +[assembly: AssemblyDescription("IPTV plugin (using VLC) for MediaPortal")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("UT")] +[assembly: AssemblyProduct("IPTV")] +[assembly: AssemblyCopyright("Copyright © UT 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("c1930e93-c8e6-486d-bde0-a6faf4753e69")] + +// 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.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] Property changes on: trunk/plugins/IPTV@UT/IPTV@UT/Properties/AssemblyInfo.cs ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/plugins/IPTV@UT/IPTV@UT/ShowWaitCursor.cs =================================================================== --- trunk/plugins/IPTV@UT/IPTV@UT/ShowWaitCursor.cs (rev 0) +++ trunk/plugins/IPTV@UT/IPTV@UT/ShowWaitCursor.cs 2007-01-29 21:35:54 UTC (rev 47) @@ -0,0 +1,139 @@ +using System; +using System.IO; +using System.Net; +using System.Collections.Generic; +using System.ComponentModel; +using System.Text; +using System.Threading; +using MediaPortal.Dialogs; +using MediaPortal.GUI.Library; + +namespace MediaPortal.GUI.IPTV +{ + public class ShowWaitCursor + { + private string result = String.Empty; + private string workUrl = String.Empty; + private bool _workerCompleted = true; + private bool Cookies = false; + private string agent = "Mozilla/4.0 (compatible; MSIE 6.0; WindowsNT 5.0; .NET CLR 1 .1.4322)"; + private string postType = "application/x-www-form-urlencoded"; + private string secondUrl = String.Empty; + private HttpWebRequest firstRequest = null; + private HttpWebResponse firstResponse = null; + private Stream recstream = null; + + public string GetUrl(string url) + { + workUrl = url; + + 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(); + } + } + return result; + } + + public string GetUrl(string url, bool useCookies) + { + Cookies = useCookies; + secondUrl = url; + + 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(); + } + } + return result; + } + + public void DownloadWorker(object sender, DoWorkEventArgs e) + { + if (Cookies==false) + { + firstRequest = (HttpWebRequest)WebRequest.Create(workUrl); + firstRequest.UserAgent = agent; + firstRequest.ContentType = postType; + firstRequest.CookieContainer = new CookieContainer(); + firstResponse = (HttpWebResponse) + firstRequest.GetResponse(); + recstream = firstResponse.GetResponseStream(); + } + if (Cookies == true) + { + HttpWebRequest secondRequest = (HttpWebRequest)WebRequest.Create(secondUrl); + secondRequest.UserAgent = agent; + secondRequest.ContentType = postType; + secondRequest.CookieContainer = new CookieContainer(); + CookieCollection cookies = firstResponse.Cookies; + secondRequest.CookieContainer.Add(cookies); + + HttpWebResponse secondResponse = (HttpWebResponse)secondRequest.GetResponse(); + recstream = secondResponse.GetResponseStream(); + //secondResponse.Close(); + } + StringBuilder sb = new StringBuilder(); + + byte[] buf = new byte[8192]; + + string tempstring = null; + int count = 0; + + do + { + count = recstream.Read(buf, 0, buf.Length); + if (count != 0) + { + tempstring = Encoding.UTF8.GetString(buf, 0, count); + sb.Append(tempstring); + } + } + while (count > 0); + + result = sb.ToString(); + Cookies = false; + //recstream.Close(); + + _workerCompleted = true; + } + + public string DownloadImage(string url) + { + try + { + WebClient wc = new WebClient(); + string filename = url.Substring(url.LastIndexOf("/") + 1); + wc.DownloadFile(url, @"thumbs\MPTemp-" + filename); + while (System.IO.File.Exists(@"thumbs\MPTemp-" + filename) != true) + GUIWindowManager.Process(); + return @"thumbs\MPTemp-" + filename; + } + catch (Exception) + { + return string.Empty; + } + } + + } +} Property changes on: trunk/plugins/IPTV@UT/IPTV@UT/ShowWaitCursor.cs ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/plugins/IPTV@UT/IP...@UT...n =================================================================== --- trunk/plugins/IPTV@UT/IP...@UT...n (rev 0) +++ trunk/plugins/IPTV@UT/IP...@UT...n 2007-01-29 21:35:54 UTC (rev 47) @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IPTV@UT", "IPTV@UT\IPTV@UT.csproj", "{FB58017D-6946-49EB-A0B7-F446BCA01A72}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {FB58017D-6946-49EB-A0B7-F446BCA01A72}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FB58017D-6946-49EB-A0B7-F446BCA01A72}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FB58017D-6946-49EB-A0B7-F446BCA01A72}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FB58017D-6946-49EB-A0B7-F446BCA01A72}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal Property changes on: trunk/plugins/IPTV@UT/IP...@UT...n ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/plugins/IPTV@UT/IP...@UT...o =================================================================== (Binary files differ) Property changes on: trunk/plugins/IPTV@UT/IP...@UT...o ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/IPTV@UT/[ Default Skin ]/MP_0.2.1/MyIPTV.xml =================================================================== --- trunk/plugins/IPTV@UT/[ Default Skin ]/MP_0.2.1/MyIPTV.xml (rev 0) +++ trunk/plugins/IPTV@UT/[ Default Skin ]/MP_0.2.1/MyIPTV.xml 2007-01-29 21:35:54 UTC (rev 47) @@ -0,0 +1,89 @@ +<window> + <id>7500</id> + + <defaultcontrol>2</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>group</type> + <layout>StackLayout</layout> + <description>group element</description> + + <posX>60</posX> + <posY>97</posY> + <control> + <description>Load Playlist button</description> + <type>button</type> + <id>2</id> + <label>Load...</label> + <onup>17</onup> + <ondown>3</ondown> + <onright>99</onright> + </control> + </control> + + <control> + <description>TV background</description> + + <type>image</type> + + <id>1</id> + + <posX>281</posX> + + <posY>87</posY> + + <width>396</width> + + <height>335</height> + + <texture>tv_background.png</texture> + </control> + + <control> + <description>video window</description> + + <type>videowindow</type> + + <id>99</id> + + <posX>300</posX> + + <posY>107</posY> + + <width>350</width> + + <height>260</height> + + <onleft>2</onleft> + + <onright>2</onright> + + <action>18</action> + + <textureFocus>tv_green_border.png</textureFocus> + </control> + + <control> + <description>Current Channelname</description> + <type>fadelabel</type> + <id>13</id> + <posX>300</posX> + <posY>435</posY> + <width>350</width> + <label>#IPTV.View.channel</label> + <font>font13</font> + <align>center</align> + <textcolor>white</textcolor> + + </control> + </controls> +</window> \ No newline at end of file Property changes on: trunk/plugins/IPTV@UT/[ Default Skin ]/MP_0.2.1/MyIPTV.xml ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/plugins/IPTV@UT/[ Default Skin ]/MP_0.2.1_SVN/MyIPTV.xml =================================================================== --- trunk/plugins/IPTV@UT/[ Default Skin ]/MP_0.2.1_SVN/MyIPTV.xml (rev 0) +++ trunk/plugins/IPTV@UT/[ Default Skin ]/MP_0.2.1_SVN/MyIPTV.xml 2007-01-29 21:35:54 UTC (rev 47) @@ -0,0 +1,97 @@ +<window> + <id>7500</id> + + <defaultcontrol>2</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>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> + <layout>StackLayout</layout> + <description>group element</description> + + <posX>60</posX> + <posY>97</posY> + <control> + <description>Load Playlist button</description> + <type>button</type> + <id>2</id> + <label>Load...</label> + <onup>17</onup> + <ondown>3</ondown> + <onright>99</onright> + </control> + </control> + + <control> + <description>TV background</description> + + <type>image</type> + + <id>1</id> + + <posX>281</posX> + + <posY>87</posY> + + <width>396</width> + + <height>335</height> + + <texture>tv_background.png</texture> + <animation effect="fade" time="250">WindowOpen</animation> + <animation effect="fade" time="500">WindowClose</animation> + </control> + + <control> + <description>video window</description> + + <type>videowindow</type> + + <id>99</id> + + <posX>300</posX> + + <posY>107</posY> + + <width>350</width> + + <height>260</height> + + <onleft>2</onleft> + + <onright>2</onright> + + <action>18</action> + + <textureFocus>tv_green_border.png</textureFocus> + <animation effect="fade" time="250">WindowOpen</animation> + <animation effect="fade" time="500">WindowClose</animation> + </control> + + <control> + <description>Current Channelname</description> + <type>fadelabel</type> + <id>13</id> + <posX>300</posX> + <posY>435</posY> + <width>350</width> + <label>#IPTV.View.channel</label> + <font>font13</font> + <align>center</align> + <textcolor>white</textcolor> + + </control> + </controls> +</window> \ No newline at end of file Property changes on: trunk/plugins/IPTV@UT/[ Default Skin ]/MP_0.2.1_SVN/MyIPTV.xml ___________________________________________________________________ Name: svn:eol-style + native Added: trunk/plugins/IPTV@UT/[ Project Mayhem 3 ]/MyIPTV.xml =================================================================== --- trunk/plugins/IPTV@UT/[ Project Mayhem 3 ]/MyIPTV.xml (rev 0) +++ trunk/plugins/IPTV@UT/[ Project Mayhem 3 ]/MyIPTV.xml 2007-01-29 21:35:54 UTC (rev 47) @@ -0,0 +1,115 @@ +<window> + <id>7500</id> + + <defaultcontrol>2</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> + <description>background image</description> + + <type>image</type> + + <id>1</id> + + <posX>0</posX> + + <posY>0</posY> + + <width>720</width> + + <height>576</height> + + <texture>background-xlink16x9.png</texture> + </control> + + <control> + <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> + <layout>StackLayout</layout> + ... [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> - <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 Deleted: trunk/plugins/TV3ExtChannelChanger/ExternalProgram.Designer.cs =================================================================== --- trunk/plugins/TV3ExtChannelChanger/ExternalProgram.Designer.cs 2007-01-30 02:53:54 UTC (rev 51) +++ trunk/plugins/TV3ExtChannelChanger/ExternalProgram.Designer.cs 2007-01-30 02:58:31 UTC (rev 52) @@ -1,279 +0,0 @@ -namespace TvEngine -{ - partial class ExternalProgram - { - /// <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.textBoxProgram = new System.Windows.Forms.TextBox(); - this.labelProgram = new System.Windows.Forms.Label(); - this.buttonProgam = new System.Windows.Forms.Button(); - this.buttonStartup = new System.Windows.Forms.Button(); - this.labelStartup = new System.Windows.Forms.Label(); - this.textBoxStartup = new System.Windows.Forms.TextBox(); - this.buttonOK = new System.Windows.Forms.Button(); - this.buttonCancel = new System.Windows.Forms.Button(); - this.labelParameters = new System.Windows.Forms.Label(); - this.textBoxParameters = new System.Windows.Forms.TextBox(); - this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); - this.folderBrowserDialog = new System.Windows.Forms.FolderBrowserDialog(); - this.labelWindowStyle = new System.Windows.Forms.Label(); - this.comboBoxWindowStyle = new System.Windows.Forms.ComboBox(); - this.buttonParamQuestion = new System.Windows.Forms.Button(); - this.checkBoxShellExecute = new System.Windows.Forms.CheckBox(); - this.checkBoxWaitForExit = new System.Windows.Forms.CheckBox(); - this.buttonTest = new System.Windows.Forms.Button(); - this.checkBoxNoWindow = new System.Windows.Forms.CheckBox(); - this.SuspendLayout(); - // - // textBoxProgram - // - this.textBoxProgram.Location = new System.Drawing.Point(8, 24); - this.textBoxProgram.Name = "textBoxProgram"; - this.textBoxProgram.Size = new System.Drawing.Size(288, 20); - this.textBoxProgram.TabIndex = 1; - // - // labelProgram - // - this.labelProgram.Location = new System.Drawing.Point(8, 8); - this.labelProgram.Name = "labelProgram"; - this.labelProgram.Size = new System.Drawing.Size(288, 16); - this.labelProgram.TabIndex = 0; - this.labelProgram.Text = "Program:"; - this.labelProgram.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // buttonProgam - // - this.buttonProgam.Location = new System.Drawing.Point(304, 24); - this.buttonProgam.Name = "buttonProgam"; - this.buttonProgam.Size = new System.Drawing.Size(24, 20); - this.buttonProgam.TabIndex = 2; - this.buttonProgam.Text = "..."; - this.buttonProgam.UseVisualStyleBackColor = true; - this.buttonProgam.Click += new System.EventHandler(this.buttonProgam_Click); - // - // buttonStartup - // - this.buttonStartup.Location = new System.Drawing.Point(304, 72); - this.buttonStartup.Name = "buttonStartup"; - this.buttonStartup.Size = new System.Drawing.Size(24, 20); - this.buttonStartup.TabIndex = 5; - this.buttonStartup.Text = "..."; - this.buttonStartup.UseVisualStyleBackColor = true; - this.buttonStartup.Click += new System.EventHandler(this.buttonStartup_Click); - // - // labelStartup - // - this.labelStartup.Location = new System.Drawing.Point(8, 56); - this.labelStartup.Name = "labelStartup"; - this.labelStartup.Size = new System.Drawing.Size(288, 16); - this.labelStartup.TabIndex = 3; - this.labelStartup.Text = "Startup Folder:"; - this.labelStartup.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // textBoxStartup - // - this.textBoxStartup.Location = new System.Drawing.Point(8, 72); - this.textBoxStartup.Name = "textBoxStartup"; - this.textBoxStartup.Size = new System.Drawing.Size(288, 20); - this.textBoxStartup.TabIndex = 4; - // - // buttonOK - // - this.buttonOK.Location = new System.Drawing.Point(208, 216); - this.buttonOK.Name = "buttonOK"; - this.buttonOK.Size = new System.Drawing.Size(56, 24); - this.buttonOK.TabIndex = 15; - this.buttonOK.Text = "OK"; - this.buttonOK.UseVisualStyleBackColor = true; - this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); - // - // buttonCancel - // - this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.buttonCancel.Location = new System.Drawing.Point(272, 216); - this.buttonCancel.Name = "buttonCancel"; - this.buttonCancel.Size = new System.Drawing.Size(56, 24); - this.buttonCancel.TabIndex = 16; - this.buttonCancel.Text = "Cancel"; - this.buttonCancel.UseVisualStyleBackColor = true; - this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); - // - // labelParameters - // - this.labelParameters.Location = new System.Drawing.Point(8, 104); - this.labelParameters.Name = "labelParameters"; - this.labelParameters.Size = new System.Drawing.Size(288, 16); - this.labelParameters.TabIndex = 6; - this.labelParameters.Text = "Parameters:"; - this.labelParameters.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // textBoxParameters - // - this.textBoxParameters.Location = new System.Drawing.Point(8, 120); - this.textBoxParameters.Name = "textBoxParameters"; - this.textBoxParameters.Size = new System.Drawing.Size(288, 20); - this.textBoxParameters.TabIndex = 7; - // - // openFileDialog - // - this.openFileDialog.Filter = "All files|*.*"; - this.openFileDialog.Title = "Select Program Executable"; - // - // folderBrowserDialog - // - this.folderBrowserDialog.Description = "Select the startup folder for the program to run from"; - // - // labelWindowStyle - // - this.labelWindowStyle.Location = new System.Drawing.Point(8, 152); - this.labelWindowStyle.Name = "labelWindowStyle"; - this.labelWindowStyle.Size = new System.Drawing.Size(96, 21); - this.labelWindowStyle.TabIndex = 9; - this.labelWindowStyle.Text = "Window Style:"; - this.labelWindowStyle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // comboBoxWindowStyle - // - this.comboBoxWindowStyle.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.comboBoxWindowStyle.FormattingEnabled = true; - this.comboBoxWindowStyle.Location = new System.Drawing.Point(104, 152); - this.comboBoxWindowStyle.MaxDropDownItems = 4; - this.comboBoxWindowStyle.Name = "comboBoxWindowStyle"; - this.comboBoxWindowStyle.Size = new System.Drawing.Size(88, 21); - this.comboBoxWindowStyle.TabIndex = 10; - // - // buttonParamQuestion - // - this.buttonParamQuestion.Location = new System.Drawing.Point(304, 120); - this.buttonParamQuestion.Name = "buttonParamQuestion"; - this.buttonParamQuestion.Size = new System.Drawing.Size(24, 20); - this.buttonParamQuestion.TabIndex = 8; - this.buttonParamQuestion.Text = "?"; - this.buttonParamQuestion.UseVisualStyleBackColor = true; - this.buttonParamQuestion.Click += new System.EventHandler(this.buttonParamQuestion_Click); - // - // checkBoxShellExecute - // - this.checkBoxShellExecute.AutoSize = true; - this.checkBoxShellExecute.Location = new System.Drawing.Point(8, 184); - this.checkBoxShellExecute.Name = "checkBoxShellExecute"; - this.checkBoxShellExecute.Size = new System.Drawing.Size(153, 17); - this.checkBoxShellExecute.TabIndex = 12; - this.checkBoxShellExecute.Text = "Startup using ShellExecute"; - this.checkBoxShellExecute.UseVisualStyleBackColor = true; - // - // checkBoxWaitForExit - // - this.checkBoxWaitForExit.AutoSize = true; - this.checkBoxWaitForExit.Location = new System.Drawing.Point(208, 184); - this.checkBoxWaitForExit.Name = "checkBoxWaitForExit"; - this.checkBoxWaitForExit.Size = new System.Drawing.Size(82, 17); - this.checkBoxWaitForExit.TabIndex = 13; - this.checkBoxWaitForExit.Text = "Wait for exit"; - this.checkBoxWaitForExit.UseVisualStyleBackColor = true; - // - // buttonTest - // - this.buttonTest.Location = new System.Drawing.Point(8, 216); - this.buttonTest.Name = "buttonTest"; - this.buttonTest.Size = new System.Drawing.Size(56, 24); - this.buttonTest.TabIndex = 14; - this.buttonTest.Text = "Test"; - this.buttonTest.UseVisualStyleBackColor = true; - this.buttonTest.Click += new System.EventHandler(this.buttonTest_Click); - // - // checkBoxNoWindow - // - this.checkBoxNoWindow.Location = new System.Drawing.Point(208, 152); - this.checkBoxNoWindow.Name = "checkBoxNoWindow"; - this.checkBoxNoWindow.Size = new System.Drawing.Size(96, 21); - this.checkBoxNoWindow.TabIndex = 11; - this.checkBoxNoWindow.Text = "No window"; - this.checkBoxNoWindow.UseVisualStyleBackColor = true; - // - // ExternalProgram - // - 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(336, 249); - this.ControlBox = false; - this.Controls.Add(this.checkBoxNoWindow); - this.Controls.Add(this.buttonTest); - this.Controls.Add(this.checkBoxWaitForExit); - this.Controls.Add(this.checkBoxShellExecute); - this.Controls.Add(this.buttonParamQuestion); - this.Controls.Add(this.comboBoxWindowStyle); - this.Controls.Add(this.labelWindowStyle); - this.Controls.Add(this.labelParameters); - this.Controls.Add(this.textBoxParameters); - this.Controls.Add(this.buttonCancel); - this.Controls.Add(this.buttonOK); - this.Controls.Add(this.buttonStartup); - this.Controls.Add(this.labelStartup); - this.Controls.Add(this.textBoxStartup); - this.Controls.Add(this.buttonProgam); - this.Controls.Add(this.labelProgram); - this.Controls.Add(this.textBoxProgram); - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "ExternalProgram"; - this.ShowIcon = false; - this.ShowInTaskbar = false; - this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "External Program Details"; - this.Load += new System.EventHandler(this.ExternalProgram_Load); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.TextBox textBoxProgram; - private System.Windows.Forms.Label labelProgram; - private System.Windows.Forms.Button buttonProgam; - private System.Windows.Forms.Button buttonStartup; - private System.Windows.Forms.Label labelStartup; - private System.Windows.Forms.TextBox textBoxStartup; - private System.Windows.Forms.Button buttonOK; - private System.Windows.Forms.Button buttonCancel; - private System.Windows.Forms.Label labelParameters; - private System.Windows.Forms.TextBox textBoxParameters; - private System.Windows.Forms.OpenFileDialog openFileDialog; - private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog; - private System.Windows.Forms.Label labelWindowStyle; - private System.Windows.Forms.ComboBox comboBoxWindowStyle; - private System.Windows.Forms.Button buttonParamQuestion; - private System.Windows.Forms.CheckBox checkBoxShellExecute; - private System.Windows.Forms.CheckBox checkBoxWaitForExit; - private System.Windows.Forms.Button buttonTest; - private System.Windows.Forms.CheckBox checkBoxNoWindow; - } -} \ No newline at end of file Deleted: trunk/plugins/TV3ExtChannelChanger/ExternalProgram.cs =================================================================== --- trunk/plugins/TV3ExtChannelChanger/ExternalProgram.cs 2007-01-30 02:53:54 UTC (rev 51) +++ trunk/plugins/TV3ExtChannelChanger/ExternalProgram.cs 2007-01-30 02:58:31 UTC (rev 52) @@ -1,162 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Diagnostics; -using System.Drawing; -using System.Text; -using System.Windows.Forms; - -using TvLibrary.Log; - -namespace TvEngine -{ - - public partial class ExternalProgram : Form - { - - #region Variables - - string _parametersMessage = ""; - - #endregion Variables - - #region Properties - - public string CommandString - { - get - { - return string.Format("{0}|{1}|{2}|{3}|{4}|{5}|{6}", - textBoxProgram.Text, - textBoxStartup.Text, - textBoxParameters.Text, - (string)comboBoxWindowStyle.SelectedItem, - checkBoxNoWindow.Checked.ToString(), - checkBoxShellExecute.Checked.ToString(), - checkBoxWaitForExit.Checked.ToString()); - } - } - - #endregion Properties - - #region Constructors - - public ExternalProgram() : this(null, "") { } - public ExternalProgram(string parametersMessage) : this(null, parametersMessage) { } - public ExternalProgram(string[] commands) : this(commands, "") { } - public ExternalProgram(string[] commands, string parametersMessage) - { - InitializeComponent(); - - _parametersMessage = parametersMessage; - - comboBoxWindowStyle.Items.Clear(); - comboBoxWindowStyle.Items.AddRange(Enum.GetNames(typeof(ProcessWindowStyle))); - - if (commands != null) - { - textBoxProgram.Text = commands[0]; - textBoxStartup.Text = commands[1]; - textBoxParameters.Text = commands[2]; - - checkBoxNoWindow.Checked = bool.Parse(commands[4]); - checkBoxShellExecute.Checked = bool.Parse(commands[5]); - checkBoxWaitForExit.Checked = bool.Parse(commands[6]); - - comboBoxWindowStyle.SelectedItem = ((ProcessWindowStyle)Enum.Parse(typeof(ProcessWindowStyle), commands[3])).ToString(); - } - else - { - comboBoxWindowStyle.SelectedIndex = 0; - } - } - - #endregion Constructors - - private void ExternalProgram_Load(object sender, EventArgs e) - { - if (_parametersMessage.Trim().Length == 0) - buttonParamQuestion.Visible = false; - } - - - private void buttonProgam_Click(object sender, EventArgs e) - { - if (openFileDialog.ShowDialog(this) == DialogResult.OK) - { - textBoxProgram.Text = openFileDialog.FileName; - - if (textBoxStartup.Text.Trim().Length == 0) - { - textBoxStartup.Text = System.IO.Path.GetDirectoryName(openFileDialog.FileName); - } - } - } - - private void buttonStartup_Click(object sender, EventArgs e) - { - if (folderBrowserDialog.ShowDialog(this) == DialogResult.OK) - { - textBoxProgram.Text = folderBrowserDialog.SelectedPath; - } - } - - private void buttonOK_Click(object sender, EventArgs e) - { - if (textBoxProgram.Text.Trim().Length == 0) - { - MessageBox.Show(this, "You must specify a program to run", "Missing program name", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); - return; - } - - this.DialogResult = DialogResult.OK; - this.Close(); - } - - private void buttonCancel_Click(object sender, EventArgs e) - { - this.DialogResult = DialogResult.Cancel; - this.Close(); - } - - private void buttonParamQuestion_Click(object sender, EventArgs e) - { - MessageBox.Show(this, _parametersMessage, "Parameters", MessageBoxButtons.OK, MessageBoxIcon.Information); - } - - private void buttonTest_Click(object sender, EventArgs e) - { - if (textBoxProgram.Text.Trim().Length == 0) - { - MessageBox.Show(this, "You must specify a program to run", "Missing program name", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); - return; - } - - try - { - Process process = new Process(); - process.StartInfo.FileName = textBoxProgram.Text; - process.StartInfo.WorkingDirectory = textBoxStartup.Text; - process.StartInfo.Arguments = textBoxParameters.Text; - process.StartInfo.WindowStyle = (ProcessWindowStyle)Enum.Parse(typeof(ProcessWindowStyle), (string)comboBoxWindowStyle.SelectedItem); - process.StartInfo.CreateNoWindow = checkBoxNoWindow.Checked; - process.StartInfo.UseShellExecute = checkBoxShellExecute.Checked; - - if (TV3ExtChannelChanger.LogVerbose) - Log.Info("TV3ExtChannelChanger: Launching external program {0}", textBoxProgram.Text); - - process.Start(); - - if (checkBoxWaitForExit.Checked) // Wait for exit - process.WaitForExit(); - } - catch (Exception ex) - { - Log.Error("TV3ExtChannelChanger: {0}", ex.Message); - } - } - - } - -} Deleted: trunk/plugins/TV3ExtChannelChanger/ExternalProgram.resx =================================================================== --- trunk/plugins/TV3ExtChannelChanger/ExternalProgram.resx 2007-01-30 02:53:54 UTC (rev 51) +++ trunk/plugins/TV3ExtChannelChanger/ExternalProgram.resx 2007-01-30 02:58:31 UTC (rev 52) @@ -1,126 +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> - <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="openFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>17, 17</value> - </metadata> - <metadata name="folderBrowserDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>144, 17</value> - </metadata> -</root> \ No newline at end of file Added: trunk/plugins/TV3ExtChannelChanger/Forms/ExternalChannels.cs =================================================================== --- trunk/plugins/TV3ExtChannelChanger/Forms/ExternalChannels.cs (rev 0) +++ trunk/plugins/TV3ExtChannelChanger/Forms/ExternalChannels.cs 2007-01-30 02:58:31 UTC (rev 52) @@ -0,0 +1,229 @@ +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 ... [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)); + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleted(e); + if ((this.CatalogRowDeleted != null)) { + this.CatalogRowDeleted(this, new CatalogRowChangeEvent(((CatalogRow)(e.Row)), e.Action)); + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleting(e); + if ((this.CatalogRowDeleting != null)) { + this.CatalogRowDeleting(this, new CatalogRowChangeEvent(((CatalogRow)(e.Row)), e.Action)); + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public void RemoveCatalogRow(CatalogRow row) { + this.Rows.Remove(row); + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public static System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(System.Xml.Schema.XmlSchemaSet xs) { + System.Xml.Schema.XmlSchemaComplexType type = new System.Xml.Schema.XmlSchemaComplexType(); + System.Xml.Schema.XmlSchemaSequence sequence = new System.Xml.Schema.XmlSchemaSequence(); + AntMovieCatalog ds = new AntMovieCatalog(); + xs.Add(ds.GetSchemaSerializable()); + System.Xml.Schema.XmlSchemaAny any1 = new System.Xml.Schema.XmlSchemaAny(); + any1.Namespace = "http://www.w3.org/2001/XMLSchema"; + any1.MinOccurs = new decimal(0); + any1.MaxOccurs = decimal.MaxValue; + any1.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any1); + System.Xml.Schema.XmlSchemaAny any2 = new System.Xml.Schema.XmlSchemaAny(); + any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; + any2.MinOccurs = new decimal(1); + any2.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any2); + System.Xml.Schema.XmlSchemaAttribute attribute1 = new System.Xml.Schema.XmlSchemaAttribute(); + attribute1.Name = "namespace"; + attribute1.FixedValue = ds.Namespace; + type.Attributes.Add(attribute1); + System.Xml.Schema.XmlSchemaAttribute attribute2 = new System.Xml.Schema.XmlSchemaAttribute(); + attribute2.Name = "tableTypeName"; + attribute2.FixedValue = "CatalogDataTable"; + type.Attributes.Add(attribute2); + type.Particle = sequence; + return type; + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] + [System.Serializable()] + [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class ContentsDataTable : System.Data.DataTable, System.Collections.IEnumerable { + + private System.Data.DataColumn columnContents_Id; + + private System.Data.DataColumn columnCatalog_Id; + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public ContentsDataTable() { + this.TableName = "Contents"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + internal ContentsDataTable(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 ContentsDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : + base(info, context) { + this.InitVars(); + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public System.Data.DataColumn Contents_IdColumn { + get { + return this.columnContents_Id; + } + } + + [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 ContentsRow this[int index] { + get { + return ((ContentsRow)(this.Rows[index])); + } + } + + public event ContentsRowChangeEventHandler ContentsRowChanging; + + public event ContentsRowChangeEventHandler ContentsRowChanged; + + public event ContentsRowChangeEventHandler ContentsRowDeleting; + + public event ContentsRowChangeEventHandler ContentsRowDeleted; + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public void AddContentsRow(ContentsRow row) { + this.Rows.Add(row); + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public ContentsRow AddContentsRow(CatalogRow parentCatalogRowByCatalog_Contents) { + ContentsRow rowContentsRow = ((ContentsRow)(this.NewRow())); + rowContentsRow.ItemArray = new object[] { + null, + parentCatalogRowByCatalog_Contents[2]}; + this.Rows.Add(rowContentsRow); + return rowContentsRow; + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public virtual System.Collections.IEnumerator GetEnumerator() { + return this.Rows.GetEnumerator(); + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public override System.Data.DataTable Clone() { + ContentsDataTable cln = ((ContentsDataTable)(base.Clone())); + cln.InitVars(); + return cln; + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected override System.Data.DataTable CreateInstance() { + return new ContentsDataTable(); + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + internal void InitVars() { + this.columnContents_Id = base.Columns["Contents_Id"]; + this.columnCatalog_Id = base.Columns["Catalog_Id"]; + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + private void InitClass() { + this.columnContents_Id = new System.Data.DataColumn("Contents_Id", typeof(int), null, System.Data.MappingType.Hidden); + base.Columns.Add(this.columnContents_Id); + 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.columnContents_Id}, true)); + this.columnContents_Id.AutoIncrement = true; + this.columnContents_Id.AllowDBNull = false; + this.columnContents_Id.Unique = true; + this.columnContents_Id.Namespace = ""; + this.columnCatalog_Id.Namespace = ""; + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public ContentsRow NewContentsRow() { + return ((ContentsRow)(this.NewRow())); + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected override System.Data.DataRow NewRowFromBuilder(System.Data.DataRowBuilder builder) { + return new ContentsRow(builder); + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected override System.Type GetRowType() { + return typeof(ContentsRow); + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected override void OnRowChanged(System.Data.DataRowChangeEventArgs e) { + base.OnRowChanged(e); + if ((this.ContentsRowChanged != null)) { + this.ContentsRowChanged(this, new ContentsRowChangeEvent(((ContentsRow)(e.Row)), e.Action)); + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected override void OnRowChanging(System.Data.DataRowChangeEventArgs e) { + base.OnRowChanging(e); + if ((this.ContentsRowChanging != null)) { + this.ContentsRowChanging(this, new ContentsRowChangeEvent(((ContentsRow)(e.Row)), e.Action)); + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected override void OnRowDeleted(System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleted(e); + if ((this.ContentsRowDeleted != null)) { + this.ContentsRowDeleted(this, new ContentsRowChangeEvent(((ContentsRow)(e.Row)), e.Action)); + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected override void OnRowDeleting(System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleting(e); + if ((this.ContentsRowDeleting != null)) { + this.ContentsRowDeleting(this, new ContentsRowChangeEvent(((ContentsRow)(e.Row)), e.Action)); + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public void RemoveContentsRow(ContentsRow row) { + this.Rows.Remove(row); + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public static System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(System.Xml.Schema.XmlSchemaSet xs) { + System.Xml.Schema.XmlSchemaComplexType type = new System.Xml.Schema.XmlSchemaComplexType(); + System.Xml.Schema.XmlSchemaSequence sequence = new System.Xml.Schema.XmlSchemaSequence(); + AntMovieCatalog ds = new AntMovieCatalog(); + xs.Add(ds.GetSchemaSerializable()); + System.Xml.Schema.XmlSchemaAny any1 = new System.Xml.Schema.XmlSchemaAny(); + any1.Namespace = "http://www.w3.org/2001/XMLSchema"; + any1.MinOccurs = new decimal(0); + any1.MaxOccurs = decimal.MaxValue; + any1.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any1); + System.Xml.Schema.XmlSchemaAny any2 = new System.Xml.Schema.XmlSchemaAny(); + any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; + any2.MinOccurs = new decimal(1); + any2.ProcessContents = System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any2); + System.Xml.Schema.XmlSchemaAttribute attribute1 = new System.Xml.Schema.XmlSchemaAttribute(); + attribute1.Name = "namespace"; + attribute1.FixedValue = ds.Namespace; + type.Attributes.Add(attribute1); + System.Xml.Schema.XmlSchemaAttribute attribute2 = new System.Xml.Schema.XmlSchemaAttribute(); + attribute2.Name = "tableTypeName"; + attribute2.FixedValue = "ContentsDataTable"; + type.Attributes.Add(attribute2); + type.Particle = sequence; + return type; + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] + [System.Serializable()] + [System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class MovieDataTable : System.Data.DataTable, System.Collections.IEnumerable { + + private System.Data.DataColumn columnNumber; + + private System.Data.DataColumn columnChecked; + + private System.Data.DataColumn columnMediaLabel; + + private System.Data.DataColumn columnMediaType; + + private System.Data.DataColumn columnSource; + + private System.Data.DataColumn columnDate; + + private System.Data.DataColumn columnBorrower; + + private System.Data.DataColumn columnRating; + + private System.Data.DataColumn columnOriginalTitle; + + private System.Data.DataColumn columnTranslatedTitle; + + private System.Data.DataColumn columnFormattedTitle; + + private System.Data.DataColumn columnDirector; + + private System.Data.DataColumn columnProducer; + + private System.Data.DataColumn columnCountry; + + private System.Data.DataColumn columnCategory; + + private System.Data.DataColumn columnYear; + + private System.Data.DataColumn columnLength; + + private System.Data.DataColumn columnActors; + + private System.Data.DataColumn columnURL; + + private System.Data.DataColumn columnDescription; + + private System.Data.DataColumn columnComments; + + private System.Data.DataColumn columnVideoFormat; + + private System.Data.DataColumn columnVideoBitrate; + + private System.Data.DataColumn columnAudioFormat; + + private System.Data.DataColumn columnAudioBitrate; + + private System.Data.DataColumn columnResolution; + + private System.Data.DataColumn columnFramerate; + + private System.Data.DataColumn columnLanguages; + + private System.Data.DataColumn columnSubtitles; + + private System.Data.DataColumn columnDateAdded; + + private System.Data.DataColumn columnSize; + + private System.Data.DataColumn columnDisks; + + private System.Data.DataColumn columnPicture; + + private System.Data.DataColumn columnContents_Id; + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public MovieDataTable() : + this(false) { + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + internal MovieDataTable(bool initExpressions) { + this.TableName = "Movie"; + this.BeginInit(); + this.InitClass(); + if ((initExpressions == true)) { + this.InitExpressions(); + } + this.EndInit(); + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + internal MovieDataTable(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 MovieDataTable(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : + base(info, context) { + this.InitVars(); + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public System.Data.DataColumn NumberColumn { + get { + return this.columnNumber; + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public System.Data.DataColumn CheckedColumn { + get { + return this.columnChecked; + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public System.Data.DataColumn MediaLabelColumn { + get { + return this.columnMediaLabel; + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public System.Data.DataColumn MediaTypeColumn { + get { + return this.columnMediaType; + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public System.Data.DataColumn SourceColumn { + get { + return this.columnSource; + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public System.Data.DataColumn DateColumn { + get { + return this.columnDate; + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public System.Data.DataColumn BorrowerColumn { + get { + return this.columnBorrower; + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public System.Data.DataColumn RatingColumn { + get { + return this.columnRating; + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public System.Data.DataColumn OriginalTitleColumn { + get { + return this.columnOriginalTitle; + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public System.Data.DataColumn TranslatedTitleColumn { + get { + return this.columnTranslatedTitle; + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public System.Data.DataColumn FormattedTitleColumn { + get { + return this.columnFormattedTitle; + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public System.Data.DataColumn DirectorColumn { + get { + return this.columnDirector; + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public System.Data.DataColumn ProducerColumn { + get { + return this.columnProducer; + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public System.Data.DataColumn CountryColumn { + get { + return this.columnCountry; + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public System.Data.DataColumn CategoryColumn { + get { + return this.columnCategory; + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public System.Data.DataColumn YearColumn { + get { + return this.columnYear; + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public System.Data.DataColumn LengthColumn { + get { + return this.columnLength; + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public System.Data.DataColumn ActorsColumn { + get { + return this.columnActors; + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public System.Data.DataColumn URLColumn { + get { + return this.columnURL; + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public System.Data.DataColumn DescriptionColumn { + get { + return this.columnDescription; + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public System.Data.DataColumn CommentsColumn { + get { + return this.columnComments; + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public System.Data.DataColumn VideoFormatColumn { + get { + return this.columnVideoFormat; + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public System.Data.DataColumn VideoBitrateColumn { + get { + return this.columnVideoBitrate; + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public System.Data.DataColumn AudioFormatColumn { + get { + return this.columnAudioFormat; + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public System.Data.DataColumn AudioBitrateColumn { + get { + return this.columnAudioBitrate; + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public System.Data.DataColumn ResolutionColumn { + get { + return this.columnResolution; + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public System.Data.DataColumn FramerateColumn { + get { + return this.columnFramerate; + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public System.Data.DataColumn LanguagesColumn { + get { + return this.columnLanguages; + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public System.Data.DataColumn SubtitlesColumn { + get { + return this.columnSubtitles; + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public System.Data.DataColumn DateAddedColumn { + get { + return this.columnDateAdded; + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public System.Data.DataColumn SizeColumn { + get { + return this.columnSize; + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public System.Data.DataColumn DisksColumn { + get { + return this.columnDisks; + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public System.Data.DataColumn PictureColumn { + get { + return this.columnPicture; + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public System.Data.DataColumn Contents_IdColumn { + get { + return this.columnContents_Id; + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.ComponentModel.Browsable(false)] + public int Count { + get { + return this.Rows.Count; + } + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public MovieRow this[int index] { + get { + return ((MovieRow)(this.Rows[index])); + } + } + + public event MovieRowChangeEventHandler MovieRowChanging; + + public event MovieRowChangeEventHandler MovieRowChanged; + + public event MovieRowChangeEventHandler MovieRowDeleting; + + public event MovieRowChangeEventHandler MovieRowDeleted; + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public void AddMovieRow(MovieRow row) { + this.Rows.Add(row); + } + + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + public MovieRow AddMovieRow( + int Number, + string Checked, + string MediaLabel, + string MediaType, + string Source, + string Date, + string Borrower, + decimal Rating, + string OriginalTitle, + string TranslatedTitle, + string FormattedTitle, + string Director, + string Producer, + string Country, + string Category, + string Year, + string Length, + string Actors, + string URL, + string Description, + string Comments, + string VideoFormat, + string VideoBitrate, + string AudioFormat, + string AudioBitrate, + string Resolution, + string Framerate, + string Languages, + string Subtitles, + System.DateTime DateAdded, + string Size, + string Disks, + string Picture, + ContentsRow parentContentsRowByContents_Movie) { + MovieRow rowMovieRow = ((MovieRow)(this.NewRow())); + rowMovieRow.ItemArray = new object[] { + Number, + Checked, + MediaLabel, + MediaType, + Source, + Date, + Borrower, + Rating, + OriginalTitle, + TranslatedTitle, + FormattedTitle, + Director, + Producer, + Country, + Category, + Year, + Length, + Actors, + URL, + Description, + Comments, + VideoFormat, + VideoBitrate, + AudioFormat, + AudioBitrate, + Resolution, + Framerate, + Languages, + Subtitles, + DateAdded, + Size, + Disks, + Picture, + parentContentsRowByContents_Movie[0]}; + this.Rows.Add(rowMovieRow); + return rowMovieRow; + } + ... [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_fan1i",0); + sensors[num].sname=Convert.ToString(MBMInfo.Sensor(sensors[num].sensorNum).ssName); + sensors[num].alarm=xmlreader.GetValueAsBool("status","status_fan1al",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(1952)+" 1:"; + sensors[num].last=GUILocalizeStrings.Get(1976); + sensors[num++].sensorType=(int)SensorTypes.Fan; + } + if (xmlreader.GetValueAsBool("status","status_fan2",false)) + { + sensors[num].name="fan2"; + sensors[num].sensorNum=xmlreader.GetValueAsInt("status","status_fan2i",0); + sensors[num].sname=Convert.ToString(MBMInfo.Sensor(sensors[num].sensorNum).ssName); + sensors[num].alarm=xmlreader.GetValueAsBool("status","status_fan2al",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(1952)+" 2:"; + sensors[num].last=GUILocalizeStrings.Get(1976); + sensors[num++].sensorType=(int)SensorTypes.Fan; + } + if (xmlreader.GetValueAsBool("status","status_fan3",false)) + { + sensors[num].name="fan3"; + sensors[num].sensorNum=xmlreader.GetValueAsInt("status","status_fan3i",0); + sensors[num].sname=Convert.ToString(MBMInfo.Sensor(sensors[num].sensorNum).ssName); + sensors[num].alarm=xmlreader.GetValueAsBool("status","status_fan3al",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(1952)+" 3:"; + sensors[num].last=GUILocalizeStrings.Get(1976); + sensors[num++].sensorType=(int)SensorTypes.Fan; + } + if (xmlreader.GetValueAsBool("status","status_volt1",false)) + { + sensors[num].name="volt1"; + sensors[num].sensorNum=xmlreader.GetValueAsInt("status","status_volt1i",0); + sensors[num].sname=Convert.ToString(MBMInfo.Sensor(sensors[num].sensorNum).ssName); + sensors[num].alarm=xmlreader.GetValueAsBool("status","status_volt1al",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(1959)+" 1:"; + sensors[num].last=GUILocalizeStrings.Get(1960); + sensors[num++].sensorType=(int)SensorTypes.Volt; + } + if (xmlreader.GetValueAsBool("status","status_volt2",false)) + { + sensors[num].name="volt2"; + sensors[num].sensorNum=xmlreader.GetValueAsInt("status","status_volt2i",0); + sensors[num].sname=Convert.ToString(MBMInfo.Sensor(sensors[num].sensorNum).ssName); + sensors[num].alarm=xmlreader.GetValueAsBool("status","status_volt2al",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(1959)+" 2:"; + sensors[num].last=GUILocalizeStrings.Get(1960); + sensors[num++].sensorType=(int)SensorTypes.Volt; + } + if (xmlreader.GetValueAsBool("status","status_volt3",false)) + { + sensors[num].name="volt3"; + sensors[num].sensorNum=xmlreader.GetValueAsInt("status","status_volt3i",0); + sensors[num].sname=Convert.ToString(MBMInfo.Sensor(sensors[num].sensorNum).ssName); + sensors[num].alarm=xmlreader.GetValueAsBool("status","status_volt3al",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(1959)+" 3:"; + sensors[num].last=GUILocalizeStrings.Get(1960); + sensors[num++].sensorType=(int)SensorTypes.Volt; + } + if (xmlreader.GetValueAsBool("status","status_mhz1",false)) + { + sensors[num].name="mhz1"; + sensors[num].sensorNum=xmlreader.GetValueAsInt("status","status_mhz1i",0); + sensors[num].sname=Convert.ToString(MBMInfo.Sensor(sensors[num].sensorNum).ssName); + sensors[num].alarm=xmlreader.GetValueAsBool("status","status_mhz1al",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(1961); + sensors[num].last="Mhz"; + sensors[num++].sensorType=(int)SensorTypes.Mhz; + } + if (xmlreader.GetValueAsBool("status","status_perc1",false)) + { + sensors[num].name="perc1"; + sensors[num].sensorNum=xmlreader.GetValueAsInt("status","status_perc1i",0); + sensors[num].sname=Convert.ToString(MBMInfo.Sensor(sensors[num].sensorNum).ssName); + sensors[num].alarm=xmlreader.GetValueAsBool("status","status_perc1al",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(1958); + sensors[num].last="%"; + sensors[num++].sensorType=(int)SensorTypes.Percentage; + } + } + numSensors=num; + } + } + #endregion + } +} Added: trunk/plugins/My Status/GUIStatusDetails.cs =================================================================== --- trunk/plugins/My Status/GUIStatusDetails.cs (rev 0) +++ trunk/plugins/My Status/GUIStatusDetails.cs 2007-01-31 06:18:14 UTC (rev 58) @@ -0,0 +1,97 @@ +/* + * 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.Management; +using System.Collections; +using System.Windows.Forms; +using MediaPortal.GUI.Library; +using MediaPortal.Dialogs; +using mbm5.MBMInfo; +#endregion + +namespace MediaPortal.GUI.GUIStatus { + public class GUIStatusDetails : GUIWindow { + public static int WINDOW_STATUS_DETAILS = 756; + + private mbmSharedData MBMInfo=new mbmSharedData(); + + #region Private Enumerations + enum Controls { + CONTROL_BACK = 2, + CONTROL_ALARM = 3 + }; + #endregion + + #region Constructor + public GUIStatusDetails() { + // + // TODO: Add constructor logic here + // + GetID=GUIStatusDetails.WINDOW_STATUS_DETAILS; + } + #endregion + + #region Overrides + public override bool Init() { + return Load (GUIGraphicsContext.Skin+@"\mystatusdetails.xml"); + } + + public override void OnAction(Action action) { + if (action.wID == Action.ActionType.ACTION_CLOSE_DIALOG ||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: { + base.OnMessage(message); + ((GUIToggleButtonControl)GetControl((int)Controls.CONTROL_ALARM)).Selected = GUIStatus.IsAlarm(); + return true; + } + case GUIMessage.MessageType.GUI_MSG_CLICKED: + //get sender control + base.OnMessage(message); + int iControl=message.SenderControlId; + if (iControl==(int)Controls.CONTROL_BACK) { + SaveSettings(); + GUIWindowManager.ShowPreviousWindow(); + return true; + } + return true; + } + return base.OnMessage(message); + } + + private void SaveSettings() { + using(MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings("MediaPortal.xml")) { + xmlwriter.SetValueAsBool("status","status_"+GUIStatus.GetName()+"al",((GUIToggleButtonControl)GetControl((int)Controls.CONTROL_ALARM)).Selected); + GUIStatus.SetAlarm(((GUIToggleButtonControl)GetControl((int)Controls.CONTROL_ALARM)).Selected); + } + } + } + #endregion +} Added: trunk/plugins/My Status/GUIStatusPrefs.cs =================================================================== --- trunk/plugins/My Status/GUIStatusPrefs.cs (rev 0) +++ trunk/plugins/My Status/GUIStatusPrefs.cs 2007-01-31 06:18:14 UTC (rev 58) @@ -0,0 +1,197 @@ +/* + * 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.Management; +using System.Collections; +using System.Windows.Forms; +using MediaPortal.Util; +using MediaPortal.Player; +using MediaPortal.GUI.Library; +using MediaPortal.Dialogs; +using mbm5.MBMInfo; +#endregion + +namespace MediaPortal.GUI.GUIStatus { + /// <summary> + /// Summary description for GUIStatusPrefs. + /// </summary> + public class GUIStatusPrefs : GUIWindow + { + public static int WINDOW_STATUS_PREFS = 757; + + #region Private Enumerations + enum Controls { + CONTROL_BACK = 2, + CONTROL_TEST = 3, + CONTROL_SPIN = 4, + CONTROL_SHUT = 5, + CONTROL_LIST = 10 + }; + #endregion + + #region Private Variables + private string soundFolder = string.Empty; + private string sound = string.Empty; + private int spin; + private GUIListItem selectedItem; + #endregion + + #region Constructor + public GUIStatusPrefs() { + // + // TODO: Add constructor logic here + // + GetID=GUIStatusPrefs.WINDOW_STATUS_PREFS; + } + #endregion + + #region Overrides + public override bool Init() { + return Load (GUIGraphicsContext.Skin+@"\mystatusprefs.xml"); + } + + public override void OnAction(Action action) { + if (action.wID == Action.ActionType.ACTION_CLOSE_DIALOG ||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: { + base.OnMessage(message); + LoadSettings(); + LoadListControl(); + GUISpinControl cntlYieldInterval=GetControl((int)Controls.CONTROL_SPIN) as GUISpinControl; + if (cntlYieldInterval!=null) { + for (int i=1; i <= 100; i++) cntlYieldInterval.AddLabel("",i); + cntlYieldInterval.Value=1; + } + cntlYieldInterval.Value=GUIStatus.GetInterval(); + ((GUIToggleButtonControl)GetControl((int)Controls.CONTROL_SHUT)).Selected = GUIStatus.IsShutdown(); + return true; + } + case GUIMessage.MessageType.GUI_MSG_CLICKED: + //get sender control + base.OnMessage(message); + int iControl=message.SenderControlId; + if (iControl==(int)Controls.CONTROL_SPIN) { + GUISpinControl cntlYieldInt=GetControl((int)Controls.CONTROL_SPIN) as GUISpinControl; + int iInterval=(cntlYieldInt.Value)+1; + GUIStatus.SetInterval(iInterval); + spin=iInterval; + } + if (iControl==(int)Controls.CONTROL_BACK) { + GUIStatus.SetShutdown(((GUIToggleButtonControl)GetControl((int)Controls.CONTROL_SHUT)).Selected); + SaveSettings(); + GUIWindowManager.ShowPreviousWindow(); + return true; + } + if (iControl==(int)Controls.CONTROL_TEST) { + Play(); + return true; + } + if (iControl==(int)Controls.CONTROL_LIST) { + 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,iControl); + if (item!=null) { + sound = item.Label; + item.IconImage = "check-box.png"; + if(selectedItem != null) { + selectedItem.IconImage = string.Empty; + selectedItem=item; + } + GUIControl.RefreshControl(GetID,(int)Controls.CONTROL_LIST); + } + } + GUIControl.FocusControl(GetID, iControl); + return true; + } + return true; + } + return base.OnMessage(message); + } + #endregion + + #region Private Methods + /// <summary> + /// Loads the list control with the type of sound selected + /// </summary> + /// + private void LoadListControl() { + //clear the list + GUIControl.ClearControl(GetID,(int)Controls.CONTROL_LIST); + VirtualDirectory Directory; + ArrayList itemlist; + Directory = new VirtualDirectory(); + Directory.SetExtensions(Util.Utils.AudioExtensions); + itemlist = Directory.GetDirectory(soundFolder); + + foreach (GUIListItem item in itemlist) { + if(!item.IsFolder) { + GUIListItem pItem = new GUIListItem(item.FileInfo.Name); + if(pItem.Label == sound) { + pItem.IconImage = "check-box.png"; + selectedItem = pItem; + } + GUIControl.AddListItemControl(GetID,(int)Controls.CONTROL_LIST,pItem); + } + } + string strObjects =String.Format("{0} {1}",GUIControl.GetItemCount(GetID,(int)Controls.CONTROL_LIST).ToString(), GUILocalizeStrings.Get(632)); + GUIPropertyManager.SetProperty("#itemcount",strObjects); + } + + private void Play() { + try { + g_Player.Play(soundFolder + "\\" + sound); + g_Player.Volume=99; + } + catch { + } + } + + private void SaveSettings() { + using(MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings("MediaPortal.xml")) { + xmlwriter.SetValueAsBool("status","status_shutdown",((GUIToggleButtonControl)GetControl((int)Controls.CONTROL_SHUT)).Selected); + xmlwriter.SetValue("status","status_sound",sound); + xmlwriter.SetValue("status","status_sound_delay",spin); + } + } + + private void LoadSettings() { + using(MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml")) { + soundFolder=xmlreader.GetValueAsString("status","status_sound_folder",""); + sound=xmlreader.GetValueAsString("status","status_sound",""); + } + } + #endregion + + } +} Added: trunk/plugins/My Status/My Status.csproj =================================================================== --- trunk/plugins/My Status/My Status.csproj (rev 0) +++ trunk/plugins/My Status/My Status.csproj 2007-01-31 06:18:14 UTC (rev 58) @@ -0,0 +1,77 @@ +<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>{55786500-26B8-412B-B5AB-6B965CE1218F}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>MediaPortal.GUI.GUIStatus</RootNamespace> + <AssemblyName>My Status</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.2582.36060, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>D:\sources mp\xbmc\bin\Release\Core.dll</HintPath> + </Reference> + <Reference Include="Dialogs, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>D:\sources mp\xbmc\bin\Release\plugins\windows\Dialogs.dll</HintPath> + </Reference> + <Reference Include="mbm5, Version=1.0.1778.42739, Culture=neutral"> + <SpecificVersion>False</SpecificVersion> + <HintPath>.\mbm5.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Management" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + <Reference Include="Utils, Version=1.0.2582.36059, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>D:\sources mp\xbmc\bin\Release\Utils.dll</HintPath> + </Reference> + </ItemGroup> + <ItemGroup> + <Compile Include="GUIStatus.cs" /> + <Compile Include="GUIStatusDetails.cs" /> + <Compile Include="GUIStatusPrefs.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="SetupForm.cs"> + <SubType>Form</SubType> + </Compile> + </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="SetupForm.resx"> + <DependentUpon>SetupForm.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/My Status/My Status.sln =================================================================== --- trunk/plugins/My Status/My Status.sln (rev 0) +++ trunk/plugins/My Status/My Status.sln 2007-01-31 06:18:14 UTC (rev 58) @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual C# Express 2005 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "My Status", "My Status.csproj", "{55786500-26B8-412B-B5AB-6B965CE1218F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {55786500-26B8-412B-B5AB-6B965CE1218F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {55786500-26B8-412B-B5AB-6B965CE1218F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {55786500-26B8-412B-B5AB-6B965CE1218F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {55786500-26B8-412B-B5AB-6B965CE1218F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal Added: trunk/plugins/My Status/My Status.suo =================================================================== (Binary files differ) Property changes on: trunk/plugins/My Status/My Status.suo ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/My Status/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/My Status/Properties/AssemblyInfo.cs (rev 0) +++ trunk/plugins/My Status/Properties/AssemblyInfo.cs 2007-01-31 06:18:14 UTC (rev 58) @@ -0,0 +1,35 @@ +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("GUIStatus")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("GUIStatus")] +[assembly: AssemblyCopyright("Copyright © 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("0aa10a66-969d-4542-840b-7a82b7cd69ad")] + +// 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.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] Added: trunk/plugins/My Status/SetupForm.cs =================================================================== --- trunk/plugins/My Status/SetupForm.cs (rev 0) +++ trunk/plugins/My Status/SetupForm.cs 2007-01-31 06:18:14 UTC (rev 58) @@ -0,0 +1,1533 @@ +#region Copyright (C) 2005-2006 Team MediaPortal + +/* + * Copyright (C) 2005-2006 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.Drawing; +using System.Collections; +using System.Management; +using System.ComponentModel; +using System.Windows.Forms; +using MediaPortal.GUI.Library; +using mbm5.MBMInfo; + +namespace GUIStatus +{ + /// <summary> + /// Summary description for SetupForm. + /// </summary> + public class SetupForm : System.Windows.Forms.Form, ISetupForm, IShowPlugin + { + private int[] aFan = { 0, 0, 0, 0 }; + private int[] aMhz = { 0, 0, 0, 0 }; + private int[] aPercentage = { 0, 0, 0, 0 }; + private int[] aTemperature = { 0, 0, 0, 0 }; + private int[] aVolt = { 0, 0, 0, 0, 0, 0, 0, 0 }; + private int statusVer = 1; + private bool isMbm = false; + private mbmSharedData MBMInfo = new mbmSharedData(); + private MediaPortal.UserInterface.Controls.MPLabel label1; + private MediaPortal.UserInterface.Controls.MPLabel label2; + private MediaPortal.UserInterface.Controls.MPLabel label3; + private MediaPortal.UserInterface.Controls.MPLabel label4; + private MediaPortal.UserInterface.Controls.MPLabel label5; + private MediaPortal.UserInterface.Controls.MPLabel label6; + private MediaPortal.UserInterface.Controls.MPLabel label9; + private MediaPortal.UserInterface.Controls.MPLabel label10; + private MediaPortal.UserInterface.Controls.MPLabel label11; + private MediaPortal.UserInterface.Controls.MPLabel label12; + private MediaPortal.UserInterface.Controls.MPGroupBox groupBox1; + private MediaPortal.UserInterface.Controls.MPButton button1; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox1; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox2; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox3; + private MediaPortal.UserInterface.Controls.MPLabel label7; + private MediaPortal.UserInterface.Controls.MPLabel label8; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox4; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox5; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox6; + private MediaPortal.UserInterface.Controls.MPLabel label13; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox7; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox8; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox9; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox10; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox11; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox12; + private MediaPortal.UserInterface.Controls.MPLabel label14; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox15; + private MediaPortal.UserInterface.Controls.MPLabel label15; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox13; + private MediaPortal.UserInterface.Controls.MPButton button2; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox14; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox16; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox17; + private MediaPortal.UserInterface.Controls.MPGroupBox groupBox2; + private MediaPortal.UserInterface.Controls.MPTextBox textBox1; + private MediaPortal.UserInterface.Controls.MPLabel label16; + private MediaPortal.UserInterface.Controls.MPButton button3; + private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1; + private MediaPortal.UserInterface.Controls.MPLabel label17; + private MediaPortal.UserInterface.Controls.MPTextBox textBox2; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox18; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox19; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox20; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox21; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox22; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox23; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox24; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox25; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox26; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox27; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox28; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox29; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox30; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox31; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox32; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox33; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox34; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox35; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox36; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox37; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox38; + private MediaPortal.UserInterface.Controls.MPLabel label18; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox39; + private MediaPortal.UserInterface.Controls.MPLabel label19; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox40; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox41; + private MediaPortal.UserInterface.Controls.MPLabel label20; + private MediaPortal.UserInterface.Controls.MPComboBox comboBox1; + private MediaPortal.UserInterface.Controls.MPGroupBox groupBox3; + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.Container components = null; + + public SetupForm() + { + // + // Required for Windows Form Designer support + // + InitializeComponent(); + LoadSettings(); + // + // TODO... [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=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>8.0.50727</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{083BEF5E-D67F-49E4-8B98-783294A095BD}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>MediaPortal.GUI.GUIExplorer</RootNamespace> + <AssemblyName>My Explorer</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.2582.33626, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>D:\sources mp\Core\bin\Release\Core.dll</HintPath> + </Reference> + <Reference Include="Dialogs, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>D:\sources mp\WindowPlugins\bin\Release\Dialogs.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + <Reference Include="Utils, Version=1.0.2582.33625, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>D:\sources mp\Core\bin\Release\Utils.dll</HintPath> + </Reference> + </ItemGroup> + <ItemGroup> + <Compile Include="GUIExplorer.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="SetupForm.cs"> + <SubType>Form</SubType> + </Compile> + </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="SetupForm.resx"> + <DependentUpon>SetupForm.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/My Explorer/My Explorer.sln =================================================================== --- trunk/plugins/My Explorer/My Explorer.sln (rev 0) +++ trunk/plugins/My Explorer/My Explorer.sln 2007-01-31 19:32:51 UTC (rev 61) @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual C# Express 2005 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "My Explorer", "My Explorer.csproj", "{083BEF5E-D67F-49E4-8B98-783294A095BD}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {083BEF5E-D67F-49E4-8B98-783294A095BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {083BEF5E-D67F-49E4-8B98-783294A095BD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {083BEF5E-D67F-49E4-8B98-783294A095BD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {083BEF5E-D67F-49E4-8B98-783294A095BD}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal Added: trunk/plugins/My Explorer/My Explorer.suo =================================================================== (Binary files differ) Property changes on: trunk/plugins/My Explorer/My Explorer.suo ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/My Explorer/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/My Explorer/Properties/AssemblyInfo.cs (rev 0) +++ trunk/plugins/My Explorer/Properties/AssemblyInfo.cs 2007-01-31 19:32:51 UTC (rev 61) @@ -0,0 +1,35 @@ +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("My Explorer")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("My Explorer")] +[assembly: AssemblyCopyright("Copyright © 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("e1e38504-09ec-4c73-88b0-ec159a7db045")] + +// 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.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] Added: trunk/plugins/My Explorer/SetupForm.cs =================================================================== --- trunk/plugins/My Explorer/SetupForm.cs (rev 0) +++ trunk/plugins/My Explorer/SetupForm.cs 2007-01-31 19:32:51 UTC (rev 61) @@ -0,0 +1,388 @@ +#region Copyright (C) 2005-2006 Team MediaPortal + +/* + * Copyright (C) 2005-2006 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.Drawing; +using System.Collections; +using System.ComponentModel; +using System.Windows.Forms; +using MediaPortal.GUI.Library; + +namespace GUIExplorer +{ + /// <summary> + /// Summary description for SetupForm. + /// </summary> + public class SetupForm : System.Windows.Forms.Form, ISetupForm, IShowPlugin + { + private MediaPortal.UserInterface.Controls.MPLabel label1; + private MediaPortal.UserInterface.Controls.MPLabel label2; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox2; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox3; + private MediaPortal.UserInterface.Controls.MPLabel label3; + private MediaPortal.UserInterface.Controls.MPLabel label4; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox4; + private MediaPortal.UserInterface.Controls.MPTextBox textBox1; + private MediaPortal.UserInterface.Controls.MPLabel label5; + private MediaPortal.UserInterface.Controls.MPButton button1; + private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1; + private MediaPortal.UserInterface.Controls.MPButton button2; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBox1; + + public SetupForm() + { + // + // Required for Windows Form Designer support + // + InitializeComponent(); + LoadSettings(); + // + // TODO: Add any constructor code after InitializeComponent call + // + } + + /// <summary> + /// Clean up any resources being used. + /// </summary> + protected override void Dispose(bool disposing) + { + if (disposing) + { + } + 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.label1 = new MediaPortal.UserInterface.Controls.MPLabel(); + this.checkBox1 = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.label2 = new MediaPortal.UserInterface.Controls.MPLabel(); + this.checkBox2 = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.checkBox3 = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.label3 = new MediaPortal.UserInterface.Controls.MPLabel(); + this.label4 = new MediaPortal.UserInterface.Controls.MPLabel(); + this.checkBox4 = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.textBox1 = new MediaPortal.UserInterface.Controls.MPTextBox(); + this.label5 = new MediaPortal.UserInterface.Controls.MPLabel(); + this.button1 = new MediaPortal.UserInterface.Controls.MPButton(); + this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog(); + this.button2 = new MediaPortal.UserInterface.Controls.MPButton(); + this.SuspendLayout(); + // + // label1 + // + this.label1.Location = new System.Drawing.Point(16, 24); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(168, 16); + this.label1.TabIndex = 0; + this.label1.Text = "Show only Shares (Destination)"; + // + // checkBox1 + // + this.checkBox1.AutoSize = true; + this.checkBox1.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.checkBox1.Location = new System.Drawing.Point(264, 16); + this.checkBox1.Name = "checkBox1"; + this.checkBox1.Size = new System.Drawing.Size(13, 12); + this.checkBox1.TabIndex = 1; + this.checkBox1.UseVisualStyleBackColor = true; + // + // label2 + // + this.label2.Location = new System.Drawing.Point(16, 48); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(152, 23); + this.label2.TabIndex = 2; + this.label2.Text = "Enable Delete Function"; + // + // checkBox2 + // + this.checkBox2.AutoSize = true; + this.checkBox2.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.checkBox2.Location = new System.Drawing.Point(264, 40); + this.checkBox2.Name = "checkBox2"; + this.checkBox2.Size = new System.Drawing.Size(13, 12); + this.checkBox2.TabIndex = 3; + this.checkBox2.UseVisualStyleBackColor = true; + // + // checkBox3 + // + this.checkBox3.AutoSize = true; + this.checkBox3.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.checkBox3.Location = new System.Drawing.Point(264, 64); + this.checkBox3.Name = "checkBox3"; + this.checkBox3.Size = new System.Drawing.Size(13, 12); + this.checkBox3.TabIndex = 4; + this.checkBox3.UseVisualStyleBackColor = true; + // + // label3 + // + this.label3.Location = new System.Drawing.Point(16, 72); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(160, 24); + this.label3.TabIndex = 5; + this.label3.Text = "Delete Files immediately "; + // + // label4 + // + this.label4.Location = new System.Drawing.Point(16, 96); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(256, 23); + this.label4.TabIndex = 6; + this.label4.Text = "Delete moves files to Temp Folder (like Trashcan)"; + // + // checkBox4 + // + this.checkBox4.AutoSize = true; + this.checkBox4.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.checkBox4.Location = new System.Drawing.Point(264, 88); + this.checkBox4.Name = "checkBox4"; + this.checkBox4.Size = new System.Drawing.Size(13, 12); + this.checkBox4.TabIndex = 7; + this.checkBox4.UseVisualStyleBackColor = true; + // + // textBox1 + // + this.textBox1.BorderColor = System.Drawing.Color.Empty; + this.textBox1.Location = new System.Drawing.Point(264, 120); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(216, 20); + this.textBox1.TabIndex = 8; + // + // label5 + // + this.label5.Location = new System.Drawing.Point(16, 120); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(176, 23); + this.label5.TabIndex = 9; + this.label5.Text = "Temp Folder"; + // + // button1 + // + this.button1.Location = new System.Drawing.Point(496, 120); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(32, 24); + this.button1.TabIndex = 10; + this.button1.Text = "..."; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // button2 + // + this.button2.Location = new System.Drawing.Point(472, 176); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(56, 24); + this.button2.TabIndex = 11; + this.button2.Text = "OK"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // SetupForm + // + this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); + this.ClientSize = new System.Drawing.Size(552, 214); + this.Controls.Add(this.button2); + this.Controls.Add(this.button1); + this.Controls.Add(this.label5); + this.Controls.Add(this.textBox1); + this.Controls.Add(this.checkBox4); + this.Controls.Add(this.label4); + this.Controls.Add(this.label3); + this.Controls.Add(this.checkBox3); + this.Controls.Add(this.checkBox2); + this.Controls.Add(this.label2); + this.Controls.Add(this.checkBox1); + this.Controls.Add(this.label1); + this.Name = "SetupForm"; + this.Text = "SetupForm"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + #endregion + + #region plugin vars + + public string PluginName() + { + return "My Explorer"; + } + + public string Description() + { + return "Browse your files with MediaPortal"; + } + + public string Author() + { + return "Gucky62"; + } + + public void ShowPlugin() + { + ShowDialog(); + } + + public bool DefaultEnabled() + { + return false; + } + + public bool CanEnable() + { + return true; + } + + public bool HasSetup() + { + return true; + } + + public int GetWindowId() + { + return 770; + } + + /// <summary> + /// If the plugin should have its own button on the home screen then it + /// should return true to this method, otherwise if it should not be on home + /// it should return false + /// </summary> + /// <param name="strButtonText">text the button should have</param> + /// <param name="strButtonImage">image for the button, or empty for default</param> + /// <param name="strButtonImageFocus">image for the button, or empty for default</param> + /// <param name="strPictureImage">subpicture for the button or empty for none</param> + /// <returns>true : plugin needs its own button on home + /// false : plugin does not need its own button on home</returns> + public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) + { + strButtonText = GUILocalizeStrings.Get(2200); + strButtonImage = ""; + strButtonImageFocus = ""; + strPictureImage = ""; + return true; + } + + #endregion + + #region IShowPlugin Members + + public bool ShowDefaultHome() + { + return false; + } + + #endregion + + private void button1_Click(object sender, System.EventArgs e) + { + using (folderBrowserDialog1 = new FolderBrowserDialog()) + { + folderBrowserDialog1.Description = "Select the folder where delete file will be stored"; + folderBrowserDialog1.ShowNewFolderButton = true; + folderBrowserDialog1.SelectedPath = textBox1.Text; + DialogResult dialogResult = folderBrowserDialog1.ShowDialog(this); + + if (dialogResult == DialogResult.OK) + { + textBox1.Text = folderBrowserDialog1.SelectedPath; + } + } + } + + private void LoadSettings() + { + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml")) + { + textBox1.Text = xmlreader.GetValueAsString("myexplorer", "temp_folder", ""); + checkBox1.Checked = xmlreader.GetValueAsBool("myexplorer", "show_only_shares", false); + checkBox2.Checked = xmlreader.GetValueAsBool("myexplorer", "enable_delete", false); + checkBox3.Checked = xmlreader.GetValueAsBool("myexplorer", "delete_immediately", false); + checkBox4.Checked = xmlreader.GetValueAsBool("myexplorer", "delete_temp", false); + } + } + + private void SaveSettings() + { + using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings("MediaPortal.xml")) + { + xmlwriter.SetValue("myexplorer", "temp_folder", textBox1.Text); + xmlwriter.SetValueAsBool("myexplorer", "show_only_shares", checkBox1.Checked); + xmlwriter.SetValueAsBool("myexplorer", "enable_delete", checkBox2.Checked); + if (checkBox2.Checked == true) + { + xmlwriter.SetValueAsBool("myexplorer", "delete_immediately", checkBox3.Checked); + if (checkBox3.Checked == true) + { + xmlwriter.SetValueAsBool("myexplorer", "delete_temp", false); + } + else + { + xmlwriter.SetValueAsBool("myexplorer", "delete_temp", checkBox4.Checked); + } + } + else + { + xmlwriter.SetValueAsBool("myexplorer", "delete_immediately", false); + xmlwriter.SetValueAsBool("myexplorer", "delete_temp", false); + } + } + } + + private void button2_Click(object sender, System.EventArgs e) + { + if (checkBox4.Checked == true) + { + if (textBox1.Text == "") + { + MessageBox.Show("Please select a temp path!"); + } + else + { + SaveSettings(); + this.Visible = false; + } + } + else + { + if (checkBox2.Checked == true && checkBox3.Checked == false && checkBox4.Checked == false) + { + MessageBox.Show("Please a Option: \n(Delete Files immediately)\n or \n(Delete moves files to Temp Folder)"); + } + else + { + SaveSettings(); + this.Visible = false; + } + } + } + + } +} Added: trunk/plugins/My Explorer/SetupForm.resx =================================================================== --- trunk/plugins/My Explorer/SetupForm.resx (rev 0) +++ trunk/plugins/My Explorer/SetupForm.resx 2007-01-31 19:32:51 UTC (rev 61) @@ -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="folderBrowserDialog1.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/My Explorer/bin/Release/Core.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/My Explorer/bin/Release/Core.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/My Explorer/bin/Release/Dialogs.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/My Explorer/bin/Release/Dialogs.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/My Explorer/bin/Release/My Explorer.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/My Explorer/bin/Release/My Explorer.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/My Explorer/bin/Release/My Explorer.pdb =================================================================== (Binary files differ) Property changes on: trunk/plugins/My Explorer/bin/Release/My Explorer.pdb ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/My Explorer/bin/Release/Utils.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/My Explorer/bin/Release/Utils.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream 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: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_game.Status == (int)GameStatus.Running) + { + m_game.TakeBackMove(); + GUIPropertyManager.SetProperty("#cm_score", m_game.Score.ToString()); + } + } + + } +} Added: trunk/plugins/My clickmania/ClickManiaSetup.cs =================================================================== --- trunk/plugins/My clickmania/ClickManiaSetup.cs (rev 0) +++ trunk/plugins/My clickmania/ClickManiaSetup.cs 2007-01-31 19:35:13 UTC (rev 62) @@ -0,0 +1,46 @@ +using System; +using System.Collections; +using System.ComponentModel; +using System.Drawing; +using System.Windows.Forms; + +namespace MyClickMania +{ + public partial class ClickManiaSetup : Form + { + public ClickManiaSetup() + { + InitializeComponent(); + } + + private void ClickManiaSetup_Load(object sender, EventArgs e) + { + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml")) + { + textBox1.Text = xmlreader.GetValueAsString("clickmania", "pluginName", PluginName()); + textBox2.Text = xmlreader.GetValueAsString("clickmania", "Title", "Click Mania"); + } + } + private void ButOK_Click(object sender, EventArgs e) + { + if (textBox1.Text.Length == 0) + { + System.Windows.Forms.MessageBox.Show("The Plugin's Name is Mandatory !"); + textBox1.Focus(); + return; + } + if (textBox2.Text.Length == 0) + { + System.Windows.Forms.MessageBox.Show("The Game's Title is Mandatory !"); + textBox2.Focus(); + return; + } + using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings("MediaPortal.xml")) + { + xmlwriter.SetValue("clickmania", "pluginName", textBox1.Text.ToString()); + xmlwriter.SetValue("clickmania", "Title", textBox2.Text.ToString()); + } + this.Close(); + } + } +} Added: trunk/plugins/My clickmania/ClickManiaSetup.designer.cs =================================================================== --- trunk/plugins/My clickmania/ClickManiaSetup.designer.cs (rev 0) +++ trunk/plugins/My clickmania/ClickManiaSetup.designer.cs 2007-01-31 19:35:13 UTC (rev 62) @@ -0,0 +1,186 @@ +using System; +using System.Collections; +using System.ComponentModel; +using System.Drawing; +using System.Windows.Forms; +using MediaPortal.GUI.Library; +using System.IO; + +namespace MyClickMania +{ + partial class ClickManiaSetup + { + /// <summary> + /// Variable nécessaire au concepteur. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Nettoyage des ressources utilisées. + /// </summary> + /// <param name="disposing">true si les ressources managées doivent être supprimées ; sinon, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + public string PluginName() + { + return "My ClickMania"; + } + + public string Description() + { + return "ClickMania for MediaPortal"; + } + + public string Author() + { + return "Bavarian"; + } + + public void ShowPlugin() + { + ShowDialog(); + } + public bool DefaultEnabled() + { + return false; + } + public bool CanEnable() + { + return true; + } + + public bool HasSetup() + { + return true; + } + public int GetWindowId() + { + return 5555; + } + /// <summary> + /// If the plugin should have its own button on the home screen then it + /// should return true to this method, otherwise if it should not be on home + /// it should return false + /// </summary> + /// <param name="strButtonText">text the button should have</param> + /// <param name="strButtonImage">image for the button, or empty for default</param> + /// <param name="strButtonImageFocus">image for the button, or empty for default</param> + /// <param name="strPictureImage">subpicture for the button or empty for none</param> + /// <returns>true : plugin needs its own button on home + /// false : plugin does not need its own button on home</returns> + public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) + { + + strButtonText = GUILocalizeStrings.Get(50); + if (strButtonText == "") + { + strButtonText = "MyClickMania"; + } + strButtonImage = ""; + strButtonImageFocus = ""; + strPictureImage = "hover_My videostack.png"; + return true; + } + #region Code généré par le Concepteur Windows Form + + /// <summary> + /// Méthode requise pour la prise en charge du concepteur - ne modifiez pas + /// le contenu de cette méthode avec l'éditeur de code. + /// </summary> + private void InitializeComponent() + { + this.ButOK = new System.Windows.Forms.Button(); + this.label10 = new System.Windows.Forms.Label(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.label11 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.textBox2 = new System.Windows.Forms.TextBox(); + this.SuspendLayout(); + // + // ButOK + // + this.ButOK.Location = new System.Drawing.Point(387, 55); + this.ButOK.Name = "ButOK"; + this.ButOK.Size = new System.Drawing.Size(64, 31); + this.ButOK.TabIndex = 33; + this.ButOK.Text = "OK"; + this.ButOK.UseVisualStyleBackColor = true; + this.ButOK.Click += new System.EventHandler(this.ButOK_Click); + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(391, 29); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(60, 13); + this.label10.TabIndex = 34; + this.label10.Text = "Version 1.1"; + // + // textBox1 + // + this.textBox1.Location = new System.Drawing.Point(134, 29); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(108, 20); + this.textBox1.TabIndex = 35; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Location = new System.Drawing.Point(45, 32); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(67, 13); + this.label11.TabIndex = 36; + this.label11.Text = "Plugin Name"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(45, 69); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(65, 13); + this.label1.TabIndex = 38; + this.label1.Text = "Game's Title"; + // + // textBox2 + // + this.textBox2.Location = new System.Drawing.Point(134, 66); + this.textBox2.Name = "textBox2"; + this.textBox2.Size = new System.Drawing.Size(108, 20); + this.textBox2.TabIndex = 37; + // + // ClickManiaSetup + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(524, 132); + this.Controls.Add(this.label1); + this.Controls.Add(this.textBox2); + this.Controls.Add(this.label11); + this.Controls.Add(this.textBox1); + this.Controls.Add(this.label10); + this.Controls.Add(this.ButOK); + this.Name = "ClickManiaSetup"; + this.Text = "ClickManiaSetup"; + this.Load += new System.EventHandler(this.ClickManiaSetup_Load); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button ButOK; + private Label label10; + private TextBox textBox1; + private Label label11; + private Label label1; + private TextBox textBox2; + + } +} \ No newline at end of file Added: trunk/plugins/My clickmania/ClickManiaSetup.resx =================================================================== --- trunk/plugins/My clickmania/ClickManiaSetup.resx (rev 0) +++ trunk/plugins/My clickmania/ClickManiaSetup.resx 2007-01-31 19:35:13 UTC (rev 62) @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file Added: trunk/plugins/My clickmania/GUIClickMania.csproj =================================================================== --- trunk/plugins/My clickmania/GUIClickMania.csproj (rev 0) +++ trunk/plugins/My clickmania/GUIClickMania.csproj 2007-01-31 19:35:13 UTC (rev 62) @@ -0,0 +1,148 @@ +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <ProjectType>Local</ProjectType> + <ProductVersion>8.0.50727</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{AC53379F-3218-4C18-B0D8-052BF9ABC107}</ProjectGuid> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ApplicationIcon> + </ApplicationIcon> + <AssemblyKeyContainerName> + </AssemblyKeyContainerName> + <AssemblyName>GUIClickMania</AssemblyName> + <AssemblyOriginatorKeyFile> + </AssemblyOriginatorKeyFile> + <DefaultClientScript>JScript</DefaultClientScript> + <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> + <DefaultTargetSchema>IE50</DefaultTargetSchema> + <DelaySign>false</DelaySign> + <OutputType>Library</OutputType> + <RootNamespace>GUIClickMania</RootNamespace> + <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent> + <StartupObject> + </StartupObject> + <FileUpgradeFlags> + </FileUpgradeFlags> + <UpgradeBackupLocation> + </UpgradeBackupLocation> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <OutputPath>bin\Debug\</OutputPath> + <AllowUnsafeBlocks>false</AllowUnsafeBlocks> + <BaseAddress>285212672</BaseAddress> + <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> + <ConfigurationOverrideFile> + </ConfigurationOverrideFile> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DocumentationFile> + </DocumentationFile> + <DebugSymbols>true</DebugSymbols> + <FileAlignment>4096</FileAlignment> + <NoStdLib>false</NoStdLib> + <NoWarn> + </NoWarn> + <Optimize>false</Optimize> + <RegisterForComInterop>false</RegisterForComInterop> + <RemoveIntegerChecks>false</RemoveIntegerChecks> + <TreatWarningsAsErrors>false</TreatWarningsAsErrors> + <WarningLevel>4</WarningLevel> + <DebugType>full</DebugType> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <OutputPath>bin\Release\</OutputPath> + <AllowUnsafeBlocks>false</AllowUnsafeBlocks> + <BaseAddress>285212672</BaseAddress> + <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> + <ConfigurationOverrideFile> + </ConfigurationOverrideFile> + <DefineConstants>TRACE</DefineConstants> + <DocumentationFile> + </DocumentationFile> + <DebugSymbols>false</DebugSymbols> + <FileAlignment>4096</FileAlignment> + <NoStdLib>false</NoStdLib> + <NoWarn> + </NoWarn> + <Optimize>true</Optimize> + <RegisterForComInterop>false</RegisterForComInterop> + <RemoveIntegerChecks>false</RemoveIntegerChecks> + <TreatWarningsAsErrors>false</TreatWarningsAsErrors> + <WarningLevel>4</WarningLevel> + <DebugType>none</DebugType> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> + <ItemGroup> + <Reference Include="Core, Version=1.0.2585.31249, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>D:\sources mp\Core\bin\Release\Core.dll</HintPath> + </Reference> + <Reference Include="Dialogs, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>D:\sources mp\WindowPlugins\bin\Release\Dialogs.dll</HintPath> + </Reference> + <Reference Include="Microsoft.DirectX"> + <Name>Microsoft.DirectX</Name> + <HintPath>C:\WINDOWS\Microsoft.NET\DirectX for Managed Code\1.0.2902.0\Microsoft.DirectX.dll</HintPath> + <AssemblyFolderKey>hklm\dn\dx_1.0.2902.0</AssemblyFolderKey> + </Reference> + <Reference Include="Microsoft.DirectX.Direct3D"> + <Name>Microsoft.DirectX.Direct3D</Name> + <HintPath>C:\WINDOWS\Microsoft.NET\DirectX for Managed Code\1.0.2902.0\Microsoft.DirectX.Direct3D.dll</HintPath> + <AssemblyFolderKey>hklm\dn\dx_1.0.2902.0</AssemblyFolderKey> + </Reference> + <Reference Include="System"> + <Name>System</Name> + </Reference> + <Reference Include="System.Data"> + <Name>System.Data</Name> + </Reference> + <Reference Include="System.Drawing"> + <Name>System.Drawing</Name> + </Reference> + <Reference Include="System.Windows.Forms"> + <Name>System.Windows.Forms</Name> + </Reference> + <Reference Include="System.Xml"> + <Name>System.XML</Name> + </Reference> + <Reference Include="Utils, Version=1.0.2585.31248, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>D:\sources mp\Utils\bin\Release\Utils.dll</HintPath> + </Reference> + </ItemGroup> + <ItemGroup> + <Compile Include="AssemblyInfo.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="ClickMania.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="ClickManiaControl.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="ClickManiaSetup.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="ClickManiaSetup.designer.cs"> + <DependentUpon>ClickManiaSetup.cs</DependentUpon> + </Compile> + <Compile Include="myClickMania.cs"> + <SubType>Code</SubType> + </Compile> + </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="ClickManiaSetup.resx"> + <DependentUpon>ClickManiaSetup.cs</DependentUpon> + <SubType>Designer</SubType> + </EmbeddedResource> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <PropertyGroup> + <PreBuildEvent> + </PreBuildEvent> + <PostBuildEvent> + </PostBuildEvent> + </PropertyGroup> +</Project> \ No newline at end of file Added: trunk/plugins/My clickmania/GUIClickMania.csproj.user =================================================================== --- trunk/plugins/My clickmania/GUIClickMania.csproj.user (rev 0) +++ trunk/plugins/My clickmania/GUIClickMania.csproj.user 2007-01-31 19:35:13 UTC (rev 62) @@ -0,0 +1,57 @@ +<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <LastOpenVersion>7.10.3077</LastOpenVersion> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ReferencePath>D:\SourceCode\mediaportal\xbmc\bin\Release\plugins\windows\;D:\SourceCode\mediaportal\xbmc\bin\Release\</ReferencePath> + <CopyProjectDestinationFolder> + </CopyProjectDestinationFolder> + <CopyProjectUncPath> + </CopyProjectUncPath> + <CopyProjectOption>0</CopyProjectOption> + <ProjectView>ProjectFiles</ProjectView> + <ProjectTrust>0</ProjectTrust> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <EnableASPDebugging>false</EnableASPDebugging> + <EnableASPXDebugging>false</EnableASPXDebugging> + <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging> + <EnableSQLServerDebugging>false</EnableSQLServerDebugging> + <RemoteDebugEnabled>false</RemoteDebugEnabled> + <RemoteDebugMachine> + </RemoteDebugMachine> + <StartAction>Project</StartAction> + <StartArguments> + </StartArguments> + <StartPage> + </StartPage> + <StartProgram> + </StartProgram> + <StartURL> + </StartURL> + <StartWorkingDirectory> + </StartWorkingDirectory> + <StartWithIE>false</StartWithIE> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <EnableASPDebugging>false</EnableASPDebugging> + <EnableASPXDebugging>false</EnableASPXDebugging> + <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging> + <EnableSQLServerDebugging>false</EnableSQLServerDebugging> + <RemoteDebugEnabled>false</RemoteDebugEnabled> + <RemoteDebugMachine> + </RemoteDebugMachine> + <StartAction>Project</StartAction> + <StartArguments> + </StartArguments> + <StartPage> + </StartPage> + <StartProgram> + </StartProgram> + <StartURL> + </StartURL> + <StartWorkingDirectory> + </StartWorkingDirectory> + <StartWithIE>true</StartWithIE> + </PropertyGroup> +</Project> \ No newline at end of file Added: trunk/plugins/My clickmania/GUIClickMania.sln =================================================================== --- trunk/plugins/My clickmania/GUIClickMania.sln (rev 0) +++ trunk/plugins/My clickmania/GUIClickMania.sln 2007-01-31 19:35:13 UTC (rev 62) @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual C# Express 2005 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GUIClickMania", "GUIClickMania.csproj", "{AC53379F-3218-4C18-B0D8-052BF9ABC107}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {AC53379F-3218-4C18-B0D8-052BF9ABC107}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AC53379F-3218-4C18-B0D8-052BF9ABC107}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AC53379F-3218-4C18-B0D8-052BF9ABC107}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AC53379F-3218-4C18-B0D8-052BF9ABC107}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal Added: trunk/plugins/My clickmania/GUIClickMania.suo =================================================================== (Binary files differ) Property changes on: trunk/plugins/My clickmania/GUIClickMania.suo ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/My clickmania/UpgradeLog.XML =================================================================== --- trunk/plugins/My clickmania/UpgradeLog.XML (rev 0) +++ trunk/plugins/My clickmania/UpgradeLog.XML 2007-01-31 19:35:13 UTC (rev 62) @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?xml-stylesheet type='text/xsl' href='_UpgradeReport_Files/UpgradeReport.xslt'?> +<UpgradeLog> +<Properties><Property Name="Solution" Value="GUIClickMania"> +</Property><Property Name="Fichier solution" Value="C:\mediaportal_plugin\MyClickMania\GUIClickMania.sln"> +</Property><Property Name="Fichier d'options utilisateur" Value="C:\mediaportal_plugin\MyClickMania\GUIClickMania.suo"> +</Property><Property Name="Date" Value="samedi 30 décembre 2006"> +</Property><Property Name="Time" Value="10:58"> +</Property></Properties><Event ErrorLevel="0" Project="" Source="GUIClickMania.sln" Description="Fichier correctement sauvegardé en tant que C:\mediaportal_plugin\MyClickMania\Backup\GUIClickMania.sln"> +</Event><Event ErrorLevel="0" Project="" Source="GUIClickMania.suo" Description="Fichier correctement sauvegardé en tant que C:\mediaportal_plugin\MyClickMania\Backup\GUIClickMania.suo"> +</Event><Event ErrorLevel="0" Project="GUIClickMania" Source="GUIClickMania.csproj" Description="Fichier projet correctement sauvegardé en tant que C:\mediaportal_plugin\MyClickMania\Backup\GUIClickMania.csproj"> +</Event><Event ErrorLevel="0" Project="GUIClickMania" Source="GUIClickMania.csproj.user" Description="Fichier utilisateur de projet correctement sauvegardé en tant que C:\mediaportal_plugin\MyClickMania\Backup\GUIClickMania.csproj.user"> +</Event><Event ErrorLevel="0" Project="GUIClickMania" Source="AssemblyInfo.cs" Description="Fichier correctement sauvegardé en tant que C:\mediaportal_plugin\MyClickMania\Backup\AssemblyInfo.cs"> +</Event><Event ErrorLevel="0" Project="GUIClickMania" Source="ClickMania.cs" Description="Fichier correctement sauvegardé en tant que C:\mediaportal_plugin\MyClickMania\Backup\ClickMania.cs"> +</Event><Event ErrorLevel="0" Project="GUIClickMania" Source="ClickManiaControl.cs" Description="Fichier correctement sauvegardé en tant que C:\mediaportal_plugin\MyClickMania\Backup\ClickManiaControl.cs"> +</Event><Event ErrorLevel="0" Project="GUIClickMania" Source="myClickMania.cs" Description="Fichier correctement sauvegardé en tant que C:\mediaportal_plugin\MyClickMania\Backup\myClickMania.cs"> +</Event><Event ErrorLevel="0" Project="GUIClickMania" Source="GUIClickMania.csproj" Description="Projet correctement converti"> +</Event><Event ErrorLevel="3" Project="GUIClickMania" Source="GUIClickMania.csproj" Description="Converted"> +</Event><Event ErrorLevel="0" Project="" Source="GUIClickMania.sln" Description="Solution correctement convertie"> +</Event><Event ErrorLevel="3" Project="" Source="GUIClickMania.sln" Description="Converted"> +</Event><Event ErrorLevel="0" Project="GUIClickMania" Source="GUIClickMania.csproj" Description="Analyse terminée : la mise à niveau n'est pas requise pour les fichiers projet."> +</Event></UpgradeLog> Added: trunk/plugins/My clickmania/bin/Release/Core.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/My clickmania/bin/Release/Core.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/My clickmania/bin/Release/Dialogs.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/My clickmania/bin/Release/Dialogs.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/My clickmania/bin/Release/GUIClickMania.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/My clickmania/bin/Release/GUIClickMania.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/My clickmania/bin/Release/Utils.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/My clickmania/bin/Release/Utils.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/My clickmania/myClickMania.cs =================================================================== --- trunk/plugins/My clickmania/myClickMania.cs (rev 0) +++ t... [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> + <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_textpreview.xml =================================================================== --- trunk/plugins/file explorer/Release/Skin/Project X/explorer_textpreview.xml (rev 0) +++ trunk/plugins/file explorer/Release/Skin/Project X/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/Source/AssemblyInfo.cs =================================================================== --- trunk/plugins/file explorer/Source/AssemblyInfo.cs (rev 0) +++ trunk/plugins/file explorer/Source/AssemblyInfo.cs 2007-01-31 19:51:26 UTC (rev 63) @@ -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("Explorer")] +[assembly: AssemblyDescription("File Explorer")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Sinus Arts")] +[assembly: AssemblyProduct("Explorer")] +[assembly: AssemblyCopyright("2006 Andreas Groß")] +[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("0.1.0.0")] Added: trunk/plugins/file explorer/Source/Compression/Compression.dsp =================================================================== --- trunk/plugins/file explorer/Source/Compression/Compression.dsp (rev 0) +++ trunk/plugins/file explorer/Source/Compression/Compression.dsp 2007-01-31 19:51:26 UTC (rev 63) @@ -0,0 +1,113 @@ +# Microsoft Developer Studio Project File - Name="Compression" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** NICHT BEARBEITEN ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=Compression - Win32 Debug +!MESSAGE Dies ist kein g\xFCltiges Makefile. Zum Erstellen dieses Projekts mit NMAKE +!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und f\xFChren Sie den Befehl +!MESSAGE +!MESSAGE NMAKE /f "Compression.mak". +!MESSAGE +!MESSAGE Sie k\xF6nnen beim Ausf\xFChren von NMAKE eine Konfiguration angeben +!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: +!MESSAGE +!MESSAGE NMAKE /f "Compression.mak" CFG="Compression - Win32 Debug" +!MESSAGE +!MESSAGE F\xFCr die Konfiguration stehen zur Auswahl: +!MESSAGE +!MESSAGE "Compression - Win32 Release" (basierend auf "Win32 (x86) Dynamic-Link Library") +!MESSAGE "Compression - Win32 Debug" (basierend auf "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "Compression - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPRESSION_EXPORTS" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPRESSION_EXPORTS" /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x407 /d "NDEBUG" +# ADD RSC /l 0x407 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 + +!ELSEIF "$(CFG)" == "Compression - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPRESSION_EXPORTS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPRESSION_EXPORTS" /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x407 /d "_DEBUG" +# ADD RSC /l 0x407 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "Compression - Win32 Release" +# Name "Compression - Win32 Debug" +# Begin Group "Quellcodedateien" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\export.cpp +# End Source File +# Begin Source File + +SOURCE=.\main.cpp +# End Source File +# End Group +# Begin Group "Header-Dateien" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\export.h +# End Source File +# End Group +# Begin Group "Ressourcendateien" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project Added: trunk/plugins/file explorer/Source/Compression/Compression.dsw =================================================================== --- trunk/plugins/file explorer/Source/Compression/Compression.dsw (rev 0) +++ trunk/plugins/file explorer/Source/Compression/Compression.dsw 2007-01-31 19:51:26 UTC (rev 63) @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNUNG: DIESE ARBEITSBEREICHSDATEI DARF NICHT BEARBEITET ODER GEL\xD6SCHT WERDEN! + +############################################################################### + +Project: "Compression"=".\Compression.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + Added: trunk/plugins/file explorer/Source/Compression/Compression.ncb =================================================================== (Binary files differ) Property changes on: trunk/plugins/file explorer/Source/Compression/Compression.ncb ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/file explorer/Source/Compression/Compression.opt =================================================================== (Binary files differ) Property changes on: trunk/plugins/file explorer/Source/Compression/Compression.opt ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/file explorer/Source/Compression/Compression.plg =================================================================== --- trunk/plugins/file explorer/Source/Compression/Compression.plg (rev 0) +++ trunk/plugins/file explorer/Source/Compression/Compression.plg 2007-01-31 19:51:26 UTC (rev 63) @@ -0,0 +1,36 @@ +<html> +<body> +<pre> +<h1>Erstellungsprotokoll</h1> +<h3> +--------------------Konfiguration: Compression - Win32 Release-------------------- +</h3> +<h3>Befehlszeilen</h3> +Erstellen der tempor\xE4ren Datei "C:\DOKUME~1\Admin\LOKALE~1\Temp\RSP185.tmp" mit Inhalten +[ +/nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "COMPRESSION_EXPORTS" /Fp"Release/Compression.pch" /YX /Fo"Release/" /Fd"Release/" /FD /c +"e:\Eigene Dateien\SharpDevelop Projects\MediaPortal PlugIns\Explorer\Compression\export.cpp" +"e:\Eigene Dateien\SharpDevelop Projects\MediaPortal PlugIns\Explorer\Compression\main.cpp" +] +Creating command line "cl.exe @C:\DOKUME~1\Admin\LOKALE~1\Temp\RSP185.tmp" +Erstellen der tempor\xE4ren Datei "C:\DOKUME~1\Admin\LOKALE~1\Temp\RSP186.tmp" mit Inhalten +[ +kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:no /pdb:"Release/Compression.pdb" /machine:I386 /out:"Release/Compression.dll" /implib:"Release/Compression.lib" +".\Release\export.obj" +".\Release\main.obj" +] +Erstellen der Befehlzeile "link.exe @C:\DOKUME~1\Admin\LOKALE~1\Temp\RSP186.tmp" +<h3>Ausgabefenster</h3> +Kompilierung l\xE4uft... +export.cpp +main.cpp +Linker-Vorgang l\xE4uft... + Bibliothek Release/Compression.lib und Objekt Release/Compression.exp wird erstellt + + + +<h3>Ergebnisse</h3> +Compression.dll - 0 Fehler, 0 Warnung(en) +</pre> +</body> +</html> Added: trunk/plugins/file explorer/Source/Compression/export.cpp =================================================================== --- trunk/plugins/file explorer/Source/Compression/export.cpp (rev 0) +++ trunk/plugins/file explorer/Source/Compression/export.cpp 2007-01-31 19:51:26 UTC (rev 63) @@ -0,0 +1,69 @@ +/* export.cpp + * + * + * File created on: 07.08.2006 + * Version : 0.1 + * + * + * Copyright (C) 2006 Andreas Gro\xDF (contact: sin...@gm...) + * + * 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 of the License, 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 this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + +#include "export.h" +#include <windows.h> +#include <winioctl.h> + + +EXPORT bool CompressFile(char* file) +{ + HANDLE hFile = CreateFile(file, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); + if (hFile == INVALID_HANDLE_VALUE) + { + return false; + } + + USHORT usCompression = COMPRESSION_FORMAT_DEFAULT; + DWORD dwReturned = 0; + if (DeviceIoControl(hFile, FSCTL_SET_COMPRESSION, &usCompression, sizeof(USHORT), NULL, 0, &dwReturned, NULL) == 0) + { + CloseHandle(hFile); + return false; + } + + CloseHandle(hFile); + return true; +} + +EXPORT bool UncompressFile(char* file) +{ + HANDLE hFile = CreateFile(file, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); + if (hFile == INVALID_HANDLE_VALUE) + { + return false; + } + + USHORT usCompression = COMPRESSION_FORMAT_NONE; + DWORD dwReturned = 0; + if (DeviceIoControl(hFile, FSCTL_SET_COMPRESSION, &usCompression, sizeof(USHORT), NULL, 0, &dwReturned, NULL) == 0) + { + CloseHandle(hFile); + return false; + } + + CloseHandle(hFile); + return true; +} Added: trunk/plugins/file explorer/Source/Compression/export.h =================================================================== --- trunk/plugins/file explorer/Source/Compression/export.h (rev 0) +++ trunk/plugins/file explorer/Source/Compression/export.h 2007-01-31 19:51:26 UTC (rev 63) @@ -0,0 +1,33 @@ +/* export.h + * + * + * File created on: 07.08.2006 + * Version : 0.1 + * + * + * Copyright (C) 2006 Andreas Gro\xDF (contact: sin...@gm...) + * + * 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 of the License, 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 this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + +#define EXPORT __declspec(dllexport) + + +extern "C" +{ + EXPORT bool CompressFile(char* file); + EXPORT bool UncompressFile(char* file); +} \ No newline at end of file Added: trunk/plugins/file explorer/Source/Compression/main.cpp =================================================================== --- trunk/plugins/file explorer/Source/Compression/main.cpp (rev 0) +++ trunk/plugins/file explorer/Source/Compression/main.cpp 2007-01-31 19:51:26 UTC (rev 63) @@ -0,0 +1,32 @@ +/* main.cpp + * + * + * File created on: 07.08.2006 + * Version : 0.1 + * + * + * Copyright (C) 2006 Andreas Gro\xDF (contact: sin...@gm...) + * + * 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 of the License, 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 this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + +#include <windows.h> + + +BOOL APIENTRY DllMain(HMODULE hModule, DWORD dwReasonForCall, LPVOID pvReserved) +{ + return TRUE; +} Added: trunk/plugins/file explorer/Source/Constants.cs =================================================================== --- trunk/plugins/file explorer/Source/Constants.cs (rev 0) +++ trunk/plugins/file explorer/Source/Constants.cs 2007-01-31 19:51:26 UTC (rev 63) @@ -0,0 +1,110 @@ +/* Constants.cs + * + * + * File created on: 17.07.2006 + * Version : 0.1 + * + * + * Copyright (C) 2006 Andreas Groß (contact: sin...@gm...) + * + * 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 of the License, 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 this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + +using System; + +namespace Explorer +{ + /// <summary> + /// Description of Constants. + /// </summary> + public static class Constants + { + #region PlugIn Info constants + public struct PlugInInfo + { + /// <summary> + /// Name of PlugIn. + /// </summary> + public static readonly string NAME = "File Explorer"; + + /// <summary> + /// Description of PlugIn. + /// </summary> + public static readonly string DESCRIPTION = "File Explorer"; + + /// <summary> + /// Author of PlugIn. + /// </summary> + public static readonly string AUTHOR = "Andreas Groß"; + } + #endregion + + #region Window IDs + public struct WindowIDs + { + /// <summary> + /// The main windows id. + /// </summary> + public static readonly int MAIN = 557311; + public static readonly int TEXTVIEWER = 557312; + public static readonly int MUSICVIEWER = 557313; + public static readonly int STREAMINGVIEWER = 557314; + public static readonly int PICTUREVIEWER = 557315; + public static readonly int DIALOGOPERATION = 557316; + } + #endregion + + #region CotnrolIDs + public struct ControlIDs + { + public static readonly int LISTBOX_LEFT = 3; + public static readonly int LISTBOX_RIGHT = 4; + } + #endregion + + #region SetupForm + public struct SetupForm + { + public static readonly string[] valueNames = + {"Extensions", "Trashbin", "AllFiles", "SystemFiles", "SystemDirs"}; + + public static readonly string[] valueDescriptions = + {"Show file extensions", "Copy files to trashcan instead of deleting them", + "Show all files", "Show system files", "Show system directories" }; + + public static readonly bool[] valueStandards = {true, true, false, false, false}; + } + #endregion + + #region DriveTypes + public struct DriveTypes + { + public static readonly int REMOVEABLE = 2; + public static readonly int FIXED = 3; + public static readonly int REMOTEDISK = 4; + public static readonly int CD_DVD = 5; + public static readonly int RAMDISK = 6; + } + #endregion + + #region ViewerExtensions + public struct ViewerExtensions + { + public static readonly string[] TextPreviewExtensions = {".txt", ".ini", ".inf", ".bat", ".cs", ".cpp", ".xml", ".h", ".hpp", ".bas", ".vb", ".asm"}; + } + #endregion + } +} Added: trunk/plugins/file explorer/Source/Dialogs/GUIDialogOperation.cs =================================================================== --- trunk/plugins/file explorer/Source/Dialogs/GUIDialogOperation.cs (rev 0) +++ trunk/plugins/file explorer/Source/Dialogs/GUIDialogOperation.cs 2007-01-31 19:51:26 UTC (rev 63) @@ -0,0 +1,401 @@ +/* GUIDialogOperation.cs + * + * + * File created on: 27.07.2006 + * Version : 0.1 + * + * + * Copyright (C) 2006 Andreas Groß (contact: sin...@gm...) + * + * 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 of the License, 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 this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + +using System; +using MediaPortal.GUI.Library; +using System.Threading; + +namespace Explorer.Dialogs +{ + /// <summary> + /// This class shows a dialog which shows information about + /// operations done by DrivesView class. + /// </summary> + public class GUIDialogOperation : GUIWindow, IRenderLayer + { + #region enum DialogType + /// <summary> + /// Available dialogtypes. + /// </summary> + public enum DialogType : int + { + COPY = 0, + MOVE = 1, + DELETE = 2, + ENCRYPT = 3, + DECRYPT = 4, + COMPRESS = 5, + UNCOMPRESS = 6, + HIDE = 7, + UNHIDE = 8, + READONLY_FLAG_ADD = 9, + READONLY_FLAG_REMOVE = 10, + AUDIO_PLAYLIST_CREATE = 11, + VIDEO_PLAYLIST_CREATE = 12, + AUDIO_PLAYLIST_ADD = 13, + VIDEO_PLAYLIST_ADD = 14 + }; + #endregion + + #region vars + private int parentID; + private bool running = false; + + private DialogType type = 0; + + private string file = string.Empty; + private string to = string.Empty; + + private Thread processThread = null; + #endregion + + #region skin vars + [SkinControlAttribute(2)] private GUILabelControl lblHeading = null; + [SkinControlAttribute(3)] private GUILabelControl lblText1 = null; + [SkinControlAttribute(4)] private GUILabelControl lblText2 = null; + #endregion + + #region public members + /// <summary> + /// Shows the dialog and waits until the user has closed it. + /// </summary> + /// <param name="parentID">Parentwindow id.</param> + public void DoModal(int parentID) + { + this.parentID = parentID; + + GUIWindow win = GUIWindowManager.GetWindow(parentID); + + GUIWindowManager.IsSwitchingToNewWindow = true; + GUIWindowManager.RouteToWindow(GetID); + + // activate this window + GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_WINDOW_INIT, GetID, 0, 0, 0, 0, null); + OnMessage(msg); + + GUIWindowManager.IsSwitchingToNewWindow = false; + + running = true; + while (running && GUIGraphicsContext.CurrentState == GUIGraphicsContext.State.RUNNING) + { + GUIWindowManager.Process(); + } + } + + /// <summary> + /// Shows the dialog. + /// </summary> + /// <param name="parentID">Parentwindow id.</param> + public void Show(int parentID) + { + this.parentID = parentID; + + GUIWindow win = GUIWindowManager.GetWindow(parentID); + + GUIWindowManager.IsSwitchingToNewWindow = true; + GUIWindowManager.RouteToWindow(GetID); + + // activate this window + GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_WINDOW_INIT, GetID, 0, 0, 0, 0, null); + OnMessage(msg); + + GUIWindowManager.IsSwitchingToNewWindow = false; + GUIWindowManager.Process(); + + running = true; + + processThread = new Thread(new ThreadStart(this.ProcessThread)); + processThread.Start(); + } + + /// <summary> + /// Closes the dialog. Only available if the dialog was shown using Show(). + /// </summary> + public void Close() + { + this.OnAction(new Action(Action.ActionType.ACTION_CLOSE_DIALOG, 0, 0)); + } + + /// <summary> + /// Sets/returns the dialogtype. + /// </summary> + public DialogType Type + { + get { return type; } + set { SetType(value); } + } + + /// <summary> + /// Sets the dialogtype. + /// </summary> + /// <param name="type">Dialogtype.</param> + public void SetType(DialogType type) + { + this.type = type; + + switch (type) + { + case DialogType.AUDIO_PLAYLIST_CREATE: + lblHeading.Label = "Create Audio Playlist"; + lblText1.Label = "Adding File: "; + lblText2.Label = "Path: "; + break; + case DialogType.COMPRESS: + lblHeading.Label = "Compressing"; + lblText1.Label = "Compressing File: "; + lblText2.Label = "Path: "; + break; + case DialogType.COPY: + lblHeading.Label = "Copy"; + lblText1.Label = "File: "; + lblText2.Label = "To: "; + break; + case DialogType.DECRYPT: + lblHeading.Label = "Decrypting"; + lblText1.Label = "File: "; + lblText2.Label = "Path: "; + break; + case DialogType.DELETE: + lblHeading.Label = "Delete"; + lblText1.Label = "File: "; + lblText2.Label = "Path: "; + break; + case DialogType.ENCRYPT: + lblHeading.Label = "Encrypting"; + lblText1.Label = "File: "; + lblText2.Label = "Path: "; + break; + case DialogType.HIDE: + lblHeading.Label = "Hide"; + lblText1.Label = "File: "; + lblText2.Label = "Path: "; + break; + case DialogType.MOVE: + lblHeading.Label = "Move"; + lblText1.Label = "File: "; + lblText2.Label = "To: "; + break; + case DialogType.READONLY_FLAG_ADD: + lblHeading.Label = "Set readonly flag"; + lblText1.Label = "File: "; + lblText2.Label = "Path: "; + break; + case DialogType.READONLY_FLAG_REMOVE: + lblHeading.Label = "Remove readonly flag"; + lblText1.Label = "File: "; + lblText2.Label = "Path: "; + break; + case DialogType.UNCOMPRESS: + lblHeading.Label = "Uncompressing"; + lblText1.Label = "File: "; + lblText2.Label = "Path: "; + break; + case DialogType.UNHIDE: + lblHeading.Label = "Unhide"; + lblText1.Label = "File: "; + lblText2.Label = "Path: "; + break; + case DialogType.VIDEO_PLAYLIST_CREATE: + lblHeading.Label = "Create Video Playlist"; + lblText1.Label = "Adding File: "; + lblText2.Label = "Path: "; + break; + case DialogType.AUDIO_PLAYLIST_ADD: + lblHeading.Label = "Add to Audio Playlist"; + lblText1.Label = "Reading files . . . "; + lblText2.Label = string.Empty; + break; + case DialogType.VIDEO_PLAYLIST_ADD: + lblHeading.Label = "Add to Video Playlist"; + lblText1.Label = "Reading files . . . "; + lblText2.Label = string.Empty; + break; + } + } + + public void SetCurrentFile(string file) + { + SuspendThread(); + this.file = file; + lblText1.Label = "File: " + file; + ResumeThread(); + } + + public void SetToPath(string path) + { + SuspendThread(); + if (path.Length > 30) + { + path = path.Substring(0, 3) + "..\\" + GetFilename(path); + } + this.to = path; + lblText2.Label = "To: " + path; + ResumeThread(); + } + + public void SetPath(string path) + { + SuspendThread(); + if (path.Length > 30) + { + path = path.Substring(0, 3) + "..\\" + GetFilename(path); + } + lblText2.Label = "Path: " + path; + ResumeThread(); + } + + /// <summary> + /// Adds text to the dialog's first label. + /// </summary> + /// <param name="text">Text</param> + public void SetText(string text) + { + SuspendThread(); + lblText1.Label = text; + lblText2.Label = string.Empty; + ResumeThread(); + } + + /// <summary> + /// Adds text to the dialog's first and second label. + /// </summary> + /// <param name="text1">Text for label 1.</param> + /// <param name="text2">Text for label 2.</param> + public void SetText(string text1, string text2) + { + SuspendThread(); + lblText1.Label = text1; + lblText1.Label = text2; + ResumeThread(); + } + #endregion + + #region private members + private void ProcessThread() + { + while (running) + { + GUIWindowManager.Process(); + } + } + + private void SuspendThread() + { + processThread.Suspend(); + } + + private void ResumeThread() + { + processThread.Resume(); + } + + private string GetFilename(string filePath) + { + int index = filePath.LastIndexOf("\\"); + + if (index == -1) + { + index = filePath.LastIndexOf("/"); + } + + if (index == -1) + { + return filePath; + } + + return filePath.Substring(index + 1); + } + #endregion + + #region Overrides + public override int GetID + { + get { return Constants.WindowIDs.DIALOGOPERATION; } + set { base.GetID = value; } + } + + public override bool Init() + { + return Load(GUIGraphicsContext.Skin + "\\explorer_dialog.xml"); + } + + public override void OnAction(Action action) + { + if (action.wID == Action.ActionType.ACTION_CLOSE_DIALOG || action.wID == Action.ActionType.ACTION_PREVIOUS_MENU) + { + GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_WINDOW_DEINIT, GetID, 0, 0, 0, 0, null); + OnMessage(msg); + + return; + } + + base.OnAction(action); + } + + public override bool OnMessage(GUIMessage message) + { + if (message.Message == GUIMessage.MessageType.GUI_MSG_WINDOW_DEINIT) + { + GUIWindowManager.IsSwitchingToNewWindow = true; + + lock (this) + { + FreeResources(); + DeInitControls(); + GUILayerManager.UnRegisterLayer(this); + ... [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 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file Added: trunk/plugins/MultiShortcut/MultiShortcut/MultiShortcut.cs =================================================================== --- trunk/plugins/MultiShortcut/MultiShortcut/MultiShortcut.cs (rev 0) +++ trunk/plugins/MultiShortcut/MultiShortcut/MultiShortcut.cs 2007-01-31 21:34:49 UTC (rev 67) @@ -0,0 +1,375 @@ +// THIS IS NOTHING MORE THAN A HACK! +using System; +using System.Collections.Generic; +using System.Text; +using System.Diagnostics; +using System.Reflection; +using System.IO; +using System.Runtime.InteropServices; +using System.Threading; + +using System.ComponentModel; + +using MediaPortal.GUI.Library; +using MediaPortal.Dialogs; +using MediaPortal.Util; + +namespace MediaPortal.MultiShortcut +{ + public class MultiShortcut: GUIWindow, ISetupForm, IShowPlugin + { + #region ISetupForm Members + + protected internal int m_ID = -1; + protected internal string m_Name = String.Empty; + + protected internal string m_ExeFile = String.Empty; + protected internal string m_ProgFile = String.Empty; + protected internal string m_Arguments = String.Empty; + + protected internal string m_Picture = String.Empty; + protected internal string m_ButtonImg = String.Empty; + protected internal string m_ButtonImgF = String.Empty; + protected internal string m_Caption = String.Empty; + protected internal bool m_HandleMPWindow = false; + + int m_MP_WindowHWND = 0; + + public MultiShortcut() + { + m_Name = System.Reflection.Assembly.GetExecutingAssembly().Location; + string[] nameParts = m_Name.Split('\\'); + m_Name = nameParts[nameParts.Length - 1]; + nameParts = m_Name.Split('.'); + if (nameParts.Length > 0) + { + m_Name = nameParts[0]; + m_ID = FindID(ref m_Name); + } + + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml")) + { + m_ExeFile = xmlreader.GetValueAsString(m_Name, "exefile", string.Empty); + m_Arguments = xmlreader.GetValueAsString(m_Name, "arguments", string.Empty); + m_Picture = xmlreader.GetValueAsString(m_Name, "picture", string.Empty); + m_ButtonImg = xmlreader.GetValueAsString(m_Name, "buttonimage", string.Empty); + m_ButtonImgF = xmlreader.GetValueAsString(m_Name, "buttonimagefocus", string.Empty); + m_Caption = xmlreader.GetValueAsString(m_Name, "caption", string.Empty); + m_ID = xmlreader.GetValueAsInt(m_Name, "pluginid", -1); + m_HandleMPWindow = xmlreader.GetValueAsInt(m_Name, "handlempwindow", 1) == 0; + + if (m_ExeFile.Length > 0) + { + string[] parts = m_ExeFile.Split('\\'); + if (parts.Length > 0) m_ProgFile = parts[parts.Length - 1]; + } + } + + if (m_ID < 0) + { + List<int> lst = new List<int>(25); + + foreach (object o in PluginManager.GUIPlugins) + lst.Add(((ISetupForm)o).GetWindowId()); + + foreach (object o in PluginManager.NonGUIPlugins) + lst.Add(((ISetupForm)o).GetWindowId()); + + foreach (object o in PluginManager.WakeablePlugins) + lst.Add(((ISetupForm)o).GetWindowId()); + + Random rd = new Random((int)DateTime.Now.Ticks); + int id = rd.Next(1000, 9000); + while (IsInList(lst, id)) id = rd.Next(1000,9000); + + m_ID = id; + } + + using (MediaPortal.Profile.Settings xmlwrite = new MediaPortal.Profile.Settings("MediaPortal.xml")) + { + xmlwrite.SetValue(m_Name, "pluginid", m_ID); + } + } + + private bool IsInList(List<int> lst, int id) + { + foreach(int i in lst) + if (i == id) return true; + + return false; + } + + private int FindID(ref string name) + { + int i = name.LastIndexOf('_'); + if (i < 0) + return -1; + else + { + try + { + int newID = Convert.ToInt32(name.Substring(i + 1)); + name = name.Substring(0, i); + return newID; + } + catch (Exception e) + { +//fmu Log.Write(e); + Log.Error(e); + return -1; + } + } + } + + public string Author() + { + return "kuerb"; + } + + public bool CanEnable() + { + return true; + } + + public bool DefaultEnabled() + { + return true; + } + + public string Description() + { + return "Adds button to homepage (dynamic id!)"; + } + + public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) + { + strButtonText = m_Caption.Length > 0 ? m_Caption : "-no name-"; + strButtonImage = m_ButtonImg; + strButtonImageFocus = m_ButtonImgF; + strPictureImage = m_Picture; + return true; + } + + public int GetWindowId() + { + return m_ID; + } + + public bool HasSetup() + { + return true; + } + + public string PluginName() + { + return String.Format(m_Name); + } + + public void ShowPlugin() + { + Config cf = new Config(); + cf.SetPropertyGrid(new ConfigWrapper(this)); + + + if (cf.ShowDialog() == System.Windows.Forms.DialogResult.OK) + { + using (MediaPortal.Profile.Settings xmlwrite = new MediaPortal.Profile.Settings("MediaPortal.xml")) + { + xmlwrite.SetValue(m_Name, "exefile", m_ExeFile); + xmlwrite.SetValue(m_Name, "arguments", m_Arguments); + xmlwrite.SetValue(m_Name, "picture", m_Picture); + xmlwrite.SetValue(m_Name, "buttonimage", m_ButtonImg); + xmlwrite.SetValue(m_Name, "buttonimagefocus", m_ButtonImgF); + xmlwrite.SetValue(m_Name, "caption", m_Caption); + xmlwrite.SetValue(m_Name, "pluginid", m_ID); + xmlwrite.SetValue(m_Name, "handlempwindow", m_HandleMPWindow ? 0 : 1); + } + } + } + + #endregion + + #region GUIWindow + + public override int GetID + { + get { return m_ID; } + set {} + } + + public override bool Init() + { + return false; + } + + protected override void OnPageLoad() + { + + if (m_ExeFile == string.Empty || !File.Exists(m_ExeFile)) + { + GUIDialogOK dlg = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK); + dlg.SetHeading("Could not start program!"); + dlg.SetLine(1, String.Format("ConfigSection: [{0}]",m_Name)); + dlg.DoModal(GUIWindowManager.ActiveWindow); + } + else + RunProgram(m_ExeFile, m_Arguments); + + GUIWindowManager.ShowPreviousWindow(); + } + + private void RunProgram(string exeName, string argsLine) + { + ProcessStartInfo psI = new ProcessStartInfo(exeName, argsLine); + Process newProcess = new Process(); + + try + { + newProcess.StartInfo.FileName = exeName; + newProcess.StartInfo.Arguments = argsLine; + newProcess.StartInfo.UseShellExecute = true; + newProcess.EnableRaisingEvents = true; + if (newProcess.Start()) + { + if (m_HandleMPWindow) + { + m_MP_WindowHWND = Win32Wrapper.FindWindow(null, "MediaPortal - "); + if (m_MP_WindowHWND > 0) + { + Win32Wrapper.ShowWindow(m_MP_WindowHWND, Win32Wrapper.SW_HIDE); + /* next two lines not yet need. + Thread.Sleep(2000); + Win32Wrapper.SetWindowPos(newProcess.MainWindowHandle, Win32Wrapper.HWND_TOPMOST, 0, 0, 0, 0, Win32Wrapper.SWP_NOSIZE | Win32Wrapper.SWP_NOMOVE); + */ + newProcess.Exited += new EventHandler(newProcess_Exited); + } + } + } + + } + catch (Exception e) + { + throw e; + } + } + + void newProcess_Exited(object sender, EventArgs e) + { + Win32Wrapper.ShowWindow(m_MP_WindowHWND, Win32Wrapper.SW_SHOWDEFAULT); + } + + #endregion + + #region IShowPlugin Members + + public bool ShowDefaultHome() + { + return true; + } + + #endregion + } + + internal class ConfigWrapper + { + MultiShortcut m_MS = null; + + public ConfigWrapper(MultiShortcut ms) + { + m_MS = ms; + } + + [Category("Program")] + public string Exefile + { + get { return m_MS.m_ExeFile; } + set { m_MS.m_ExeFile = value; } + } + + [Category("Program")] + public string Arguments + { + get { return m_MS.m_Arguments; } + set { m_MS.m_Arguments = value; } + } + + [Category("Program")] + public bool HideMPWhileExecuting + { + get { return m_MS.m_HandleMPWindow; } + set { m_MS.m_HandleMPWindow = value; } + } + + [Category("Homescreen")] + public string Picture + { + get { return m_MS.m_Picture; } + set { m_MS.m_Picture = value; } + } + + [Category("Homescreen")] + public string ButtonImage + { + get { return m_MS.m_ButtonImg; } + set { m_MS.m_ButtonImg = value; } + } + + [Category("Homescreen")] + public string ButtonImageFocus + { + get { return m_MS.m_ButtonImgF; } + set { m_MS.m_ButtonImgF = value; } + } + + [Category("Homescreen")] + public string ButtonCaption + { + get { return m_MS.m_Caption; } + set { m_MS.m_Caption = value; } + } + } + + internal class Win32Wrapper + { + public const int GWL_STYLE = -16; + public const int GWL_EXSTYLE = -20; + + public const uint SWP_NOSIZE = 0x0001; + public const uint SWP_NOMOVE = 0x0002; + public const uint SWP_NOZORDER = 0x0004; + public const uint SWP_NOREDRAW = 0x0008; + public const uint SWP_NOACTIVATE = 0x0010; + public const uint SWP_FRAMECHANGED = 0x0020; + public const uint SWP_SHOWWINDOW = 0x0040; + public const uint SWP_HIDEWINDOW = 0x0080; + public const uint SWP_NOCOPYBITS = 0x0100; + public const uint SWP_NOOWNERZORDER = 0x0200; + public const uint SWP_NOSENDCHANGING = 0x0400; + public const int SW_HIDE = 0; + public const int SW_SHOWDEFAULT = 10; + + public const int HWND_TOPMOST = -1; + + [DllImport("User32", ExactSpelling = true)] + public static extern int SetWindowPos(IntPtr hWnd, int hWndInsertAfter, + int x, int y, int cx, int cy, uint uFlags); + + public const int WM_SYSCOMMAND = 0x0112; + public const int BM_CLICK = 0x00F5; + + + + [DllImport("user32.dll")] + public static extern int FindWindow( + string lpClassName, // class name + string lpWindowName // window name + ); + + [DllImport("User32", EntryPoint = "SetForegroundWindow")] + public static extern bool SetForegroundWindow(int hWnd); + + [DllImport("User32", ExactSpelling = true)] + public static extern bool ShowWindow(int hWnd, int nCmdShow); + + } +} Added: trunk/plugins/MultiShortcut/MultiShortcut/MultiShortcut.csproj =================================================================== --- trunk/plugins/MultiShortcut/MultiShortcut/MultiShortcut.csproj (rev 0) +++ trunk/plugins/MultiShortcut/MultiShortcut/MultiShortcut.csproj 2007-01-31 21:34:49 UTC (rev 67) @@ -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>{7CBDA33F-E11F-400B-8B3F-ABB0B54462AC}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>MultiShortcut</RootNamespace> + <AssemblyName>MultiShortcut00</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="Databases, Version=1.0.2587.38186, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\..\MediaPortal\Databases\bin\Release\Databases.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="System.Xml" /> + <Reference Include="Utils, Version=1.0.2587.38184, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\..\MediaPortal\Utils\bin\Release\Utils.dll</HintPath> + </Reference> + </ItemGroup> + <ItemGroup> + <Compile Include="Config.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="Config.Designer.cs"> + <DependentUpon>Config.cs</DependentUpon> + </Compile> + <Compile Include="MultiShortcut.cs"> + </Compile> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="Config.resx"> + <SubType>Designer</SubType> + <DependentUpon>Config.cs</DependentUpon> + </EmbeddedResource> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file Added: trunk/plugins/MultiShortcut/MultiShortcut/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MultiShortcut/MultiShortcut/Properties/AssemblyInfo.cs (rev 0) +++ trunk/plugins/MultiShortcut/MultiShortcut/Properties/AssemblyInfo.cs 2007-01-31 21:34:49 UTC (rev 67) @@ -0,0 +1,35 @@ +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("MultiShortcut")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("lr-software")] +[assembly: AssemblyProduct("MultiShortcut")] +[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("6fc5722f-e54a-4fef-8ff5-70ff897c0ccd")] + +// 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.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] Added: trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/AxInterop.WMPLib.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/AxInterop.WMPLib.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/Bass.Net.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/Bass.Net.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/BassRegistration.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/BassRegistration.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/Core.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/Core.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/Databases.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/Databases.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/Dialogs.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/Dialogs.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/DirectShowLib.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/DirectShowLib.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/ICSharpCode.SharpZipLib.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/ICSharpCode.SharpZipLib.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/Interop.SHDocVw.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/Interop.SHDocVw.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/Interop.WMPLib.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/Interop.WMPLib.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/MediaPortal.Support.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/MediaPortal.Support.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/MediaPortal.Support.pdb =================================================================== (Binary files differ) Property changes on: trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/MediaPortal.Support.pdb ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/MultiShortcut00.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/MultiShortcut00.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/MultiShortcut00.pdb =================================================================== (Binary files differ) Property changes on: trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/MultiShortcut00.pdb ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/Utils.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/Utils.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/edtftpnet-1.2.2.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/MultiShortcut/MultiShortcut/bin/Release/edtftpnet-1.2.2.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MultiShortcut/TestServer/Program.cs =================================================================== --- trunk/plugins/MultiShortcut/TestServer/Program.cs (rev 0) +++ trunk/plugins/MultiShortcut/TestServer/Program.cs 2007-01-31 21:34:49 UTC (rev 67) @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Text; + +using MediaPortal.GUI.Library; +using MediaPortal.Util; + +using MediaPortal.MultiShortcut; + + +namespace TestServer +{ + class Program + { + static void Main(string[] args) + { + MultiShortcut ms = new MultiShortcut(); + MultiShortcut ms2 = new MultiShortcut(); + //ms.RunProgram(@"c:\windows\notepad.exe", String.Empty); + + Console.ReadKey(); + } + } +} Added: trunk/plugins/MultiShortcut/TestServer/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MultiShortcut/TestServer/Properties/AssemblyInfo.cs (rev 0) +++ trunk/plugins/MultiShortcut/TestServer/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("TestServer")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("lr-software")] +[assembly: AssemblyProduct("TestServer")] +[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("33c0939b-dc1d-41ed-be34-d3cf04a41197")] + +// Version information fo... [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.procesToolStripMenuItem, + this.subtitleToolStripMenuItem, + this.tagReadersToolStripMenuItem, + this.externalPlayersToolStripMenuItem}); + this.windowPluginToolStripMenuItem.Name = "windowPluginToolStripMenuItem"; + this.windowPluginToolStripMenuItem.Size = new System.Drawing.Size(132, 22); + this.windowPluginToolStripMenuItem.Text = "Plugin"; + // + // windowToolStripMenuItem + // + this.windowToolStripMenuItem.Name = "windowToolStripMenuItem"; + this.windowToolStripMenuItem.Size = new System.Drawing.Size(160, 22); + this.windowToolStripMenuItem.Text = "Window"; + this.windowToolStripMenuItem.Click += new System.EventHandler(this.windowToolStripMenuItem_Click); + // + // procesToolStripMenuItem + // + this.procesToolStripMenuItem.Name = "procesToolStripMenuItem"; + this.procesToolStripMenuItem.Size = new System.Drawing.Size(160, 22); + this.procesToolStripMenuItem.Text = "Process"; + this.procesToolStripMenuItem.Click += new System.EventHandler(this.procesToolStripMenuItem_Click); + // + // subtitleToolStripMenuItem + // + this.subtitleToolStripMenuItem.Name = "subtitleToolStripMenuItem"; + this.subtitleToolStripMenuItem.Size = new System.Drawing.Size(160, 22); + this.subtitleToolStripMenuItem.Text = "Subtitle"; + this.subtitleToolStripMenuItem.Click += new System.EventHandler(this.subtitleToolStripMenuItem_Click); + // + // tagReadersToolStripMenuItem + // + this.tagReadersToolStripMenuItem.Name = "tagReadersToolStripMenuItem"; + this.tagReadersToolStripMenuItem.Size = new System.Drawing.Size(160, 22); + this.tagReadersToolStripMenuItem.Text = "TagReaders"; + this.tagReadersToolStripMenuItem.Click += new System.EventHandler(this.tagReadersToolStripMenuItem_Click); + // + // externalPlayersToolStripMenuItem + // + this.externalPlayersToolStripMenuItem.Name = "externalPlayersToolStripMenuItem"; + this.externalPlayersToolStripMenuItem.Size = new System.Drawing.Size(160, 22); + this.externalPlayersToolStripMenuItem.Text = "ExternalPlayers"; + this.externalPlayersToolStripMenuItem.Click += new System.EventHandler(this.externalPlayersToolStripMenuItem_Click); + // + // skinToolStripMenuItem + // + this.skinToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.componentToolStripMenuItem, + this.mediaToolStripMenuItem, + this.fullToolStripMenuItem}); + this.skinToolStripMenuItem.Name = "skinToolStripMenuItem"; + this.skinToolStripMenuItem.Size = new System.Drawing.Size(132, 22); + this.skinToolStripMenuItem.Text = "Skin"; + // + // componentToolStripMenuItem + // + this.componentToolStripMenuItem.Name = "componentToolStripMenuItem"; + this.componentToolStripMenuItem.Size = new System.Drawing.Size(140, 22); + this.componentToolStripMenuItem.Text = "Component"; + this.componentToolStripMenuItem.Click += new System.EventHandler(this.componentToolStripMenuItem_Click); + // + // mediaToolStripMenuItem + // + this.mediaToolStripMenuItem.Name = "mediaToolStripMenuItem"; + this.mediaToolStripMenuItem.Size = new System.Drawing.Size(140, 22); + this.mediaToolStripMenuItem.Text = "Media"; + this.mediaToolStripMenuItem.Click += new System.EventHandler(this.mediaToolStripMenuItem_Click); + // + // fullToolStripMenuItem + // + this.fullToolStripMenuItem.Name = "fullToolStripMenuItem"; + this.fullToolStripMenuItem.Size = new System.Drawing.Size(140, 22); + this.fullToolStripMenuItem.Text = "Full"; + this.fullToolStripMenuItem.Visible = false; + // + // languageToolStripMenuItem + // + this.languageToolStripMenuItem.Name = "languageToolStripMenuItem"; + this.languageToolStripMenuItem.Size = new System.Drawing.Size(132, 22); + this.languageToolStripMenuItem.Text = "Language"; + this.languageToolStripMenuItem.Click += new System.EventHandler(this.languageToolStripMenuItem_Click); + // + // bossview + // + this.bossview.CheckBoxes = true; + this.bossview.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader1, + this.columnHeader2, + this.columnHeader3, + this.columnHeader4, + this.columnHeader5}); + this.bossview.ContextMenuStrip = this.contextMenuStrip1; + this.bossview.FullRowSelect = true; + this.bossview.GridLines = true; + this.bossview.Location = new System.Drawing.Point(12, 40); + this.bossview.Name = "bossview"; + this.bossview.Size = new System.Drawing.Size(663, 267); + this.bossview.TabIndex = 2; + this.bossview.UseCompatibleStateImageBehavior = false; + this.bossview.View = System.Windows.Forms.View.Details; + // + // columnHeader1 + // + this.columnHeader1.Text = "File"; + this.columnHeader1.Width = 116; + // + // columnHeader2 + // + this.columnHeader2.Text = "Type"; + this.columnHeader2.Width = 115; + // + // columnHeader3 + // + this.columnHeader3.Text = "Subtype"; + this.columnHeader3.Width = 108; + // + // columnHeader4 + // + this.columnHeader4.Text = "Path"; + this.columnHeader4.Width = 170; + // + // columnHeader5 + // + this.columnHeader5.Text = "Id"; + // + // contextMenuStrip1 + // + this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripComboBox1}); + this.contextMenuStrip1.Name = "contextMenuStrip1"; + this.contextMenuStrip1.Size = new System.Drawing.Size(153, 48); + // + // toolStripComboBox1 + // + this.toolStripComboBox1.Name = "toolStripComboBox1"; + this.toolStripComboBox1.Size = new System.Drawing.Size(152, 22); + this.toolStripComboBox1.Text = "Remove"; + this.toolStripComboBox1.Click += new System.EventHandler(this.toolStripComboBox1_Click); + // + // openFileDialog1 + // + this.openFileDialog1.Filter = "\"Dll files|*.dll|All files|*.*\""; + // + // saveFileDialog1 + // + this.saveFileDialog1.DefaultExt = "xml"; + // + // groupBox1 + // + this.groupBox1.Location = new System.Drawing.Point(213, 322); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(450, 97); + this.groupBox1.TabIndex = 3; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Properties"; + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(675, 431); + this.Controls.Add(this.bossview); + this.Controls.Add(this.groupBox1); + this.Controls.Add(this.menuStrip1); + this.MainMenuStrip = this.menuStrip1; + this.Name = "Form1"; + this.Text = "Form1"; + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); + this.contextMenuStrip1.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.MenuStrip menuStrip1; + private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem newToolStripMenuItem; + private System.Windows.Forms.ListView bossview; + private System.Windows.Forms.ColumnHeader columnHeader1; + private System.Windows.Forms.ColumnHeader columnHeader2; + private System.Windows.Forms.ColumnHeader columnHeader3; + private System.Windows.Forms.ContextMenuStrip contextMenuStrip1; + private System.Windows.Forms.ToolStripMenuItem addToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem windowPluginToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem windowToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem procesToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem subtitleToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem tagReadersToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem externalPlayersToolStripMenuItem; + private System.Windows.Forms.ColumnHeader columnHeader4; + private System.Windows.Forms.ToolStripMenuItem skinToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem componentToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem mediaToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem fullToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem openProiectToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem sToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem saveProiectAsToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; + private System.Windows.Forms.ToolStripMenuItem optionsToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; + private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem; + private System.Windows.Forms.OpenFileDialog openFileDialog1; + private System.Windows.Forms.ColumnHeader columnHeader5; + private System.Windows.Forms.SaveFileDialog saveFileDialog1; + private System.Windows.Forms.ToolStripMenuItem languageToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem buildToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem toolStripComboBox1; + private System.Windows.Forms.GroupBox groupBox1; + } +} + Added: trunk/plugins/mpinstaler/MPInstaler/Form1.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Form1.cs (rev 0) +++ trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-01-31 22:14:04 UTC (rev 68) @@ -0,0 +1,249 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; +using System.Xml; +using System.IO; +using ICSharpCode.SharpZipLib.Zip; + +namespace MPInstaler +{ + public partial class Form1 : Form + { + private MPinstalerStruct _struct = new MPinstalerStruct(); + public Form1() + { + InitializeComponent(); + } + + private void button1_Click(object sender, EventArgs e) + { + } + + private void sToolStripMenuItem_Click(object sender, EventArgs e) + { + Stream myStream; + + if (saveFileDialog1.ShowDialog(this) == DialogResult.OK) + { + if ((myStream = saveFileDialog1.OpenFile()) != null) + { + // Code to write the stream goes here. + XmlDocument doc = new XmlDocument(); + XmlWriter writer = null; + _struct.AddFileList(bossview); + try + { + // Create an XmlWriterSettings object with the correct options. + XmlWriterSettings settings = new XmlWriterSettings(); + string st = string.Empty; + settings.Indent = true; + settings.IndentChars = ("\t"); + settings.OmitXmlDeclaration = true; + // Create the XmlWriter object and write some content. + writer = XmlWriter.Create(myStream, settings); + writer.WriteStartElement("MPinstaler"); + writer.WriteElementString("ver", "1.00.000"); + writer.WriteStartElement("FileList"); + for (int i = 0; i < _struct.FileList.Count; i++) + { + MPIFileList it=(MPIFileList)_struct.FileList[i]; + writer.WriteStartElement("File"); + writer.WriteElementString("FileName",Path.GetFileName(it.FileName)); + writer.WriteElementString("Type", it.Type); + writer.WriteElementString("SubType", it.SubType); + writer.WriteElementString("Path", Path.GetDirectoryName(it.FileName)); + writer.WriteElementString("Id", it.ID); + writer.WriteEndElement(); + st = st + bossview.Items[i].SubItems[3].Text + @"\" + bossview.Items[i].Text + ";"; + } + writer.WriteEndElement(); + writer.WriteStartElement("Option"); + writer.WriteElementString("BuildFileName", _struct.BuildFileName); + writer.WriteEndElement(); + writer.WriteEndElement(); + writer.Flush(); + + //------------------------------------- + //------------------------------------- + } + finally + { + if (writer != null) + writer.Close(); + } + myStream.Close(); + + } + + } + + } + + private void windowToolStripMenuItem_Click(object sender, EventArgs e) + { + addplugin(1); + } + + private void addplugin(int type) + { + /* + 1 - 10 PLUGINS + 1 - window + 2 - process + 3 - subtitle + 4 - tagreader + 5 - external player + */ + string fil; + openFileDialog1.Filter = "Dll files|*.dll|All files|*.*"; + if (openFileDialog1.ShowDialog(this) == DialogResult.OK) + { + fil = openFileDialog1.FileName; + switch (type) + { + case 1: + addrow(Path.GetFileName(fil), MPinstalerStruct.PLUGIN_TYPE, MPinstalerStruct.PLUGIN_WINDOW_SUBTYPE, Path.GetDirectoryName(fil), "01010"); + break; + case 2: + addrow(Path.GetFileName(fil), MPinstalerStruct.PLUGIN_TYPE, MPinstalerStruct.PLUGIN_PROCESS_SUBTYPE, Path.GetDirectoryName(fil), "01020"); + break; + case 3: + addrow(Path.GetFileName(fil), MPinstalerStruct.PLUGIN_TYPE, MPinstalerStruct.PLUGIN_SUBTITLE_SUBTYPE, Path.GetDirectoryName(fil), "01030"); + break; + case 4: + addrow(Path.GetFileName(fil), MPinstalerStruct.PLUGIN_TYPE, MPinstalerStruct.PLUGIN_TAGREADER_SUBTYPE, Path.GetDirectoryName(fil), "01040"); + break; + case 5: + addrow(Path.GetFileName(fil), MPinstalerStruct.PLUGIN_TYPE, MPinstalerStruct.PLUGIN_PLAYER_SUBTYPE, Path.GetDirectoryName(fil), "01050"); + break; + default: + break; + } + } + } + + private void addskin(int type) + { +// string fil; + openFileDialog1.Filter = "xml files|*.xml|png files|*.png|bmp files|*.bmp|All files|*.*"; + openFileDialog1.Multiselect = true; + if (openFileDialog1.ShowDialog(this) == DialogResult.OK) + { + foreach(string fil in openFileDialog1.FileNames) + switch (type) + { + case 1: addrow(Path.GetFileName(fil), MPinstalerStruct.SKIN_TYPE, MPinstalerStruct.SKIN_XML_SUBTYPE, Path.GetDirectoryName(fil), "02010"); + break; + case 2: addrow(Path.GetFileName(fil), MPinstalerStruct.SKIN_MEDIA_TYPE, MPinstalerStruct.SKIN_XML_SUBTYPE, Path.GetDirectoryName(fil), "02020"); + break; + default: + break; + } + } + } + + private void subtitleToolStripMenuItem_Click(object sender, EventArgs e) + { + addplugin(3); + } + + private void procesToolStripMenuItem_Click(object sender, EventArgs e) + { + addplugin(2); + } + + private void tagReadersToolStripMenuItem_Click(object sender, EventArgs e) + { + addplugin(4); + } + + private void externalPlayersToolStripMenuItem_Click(object sender, EventArgs e) + { + addplugin(5); + } + + private void addrow(string file, string type, string subtype, string path, string id) + { + ListViewItem item1 = new ListViewItem(file, 0); + item1.SubItems.Add(type); + item1.SubItems.Add(subtype); + item1.SubItems.Add(path); + item1.SubItems.Add(id); + bossview.Items.AddRange(new ListViewItem[] { item1 }); + } + + private void openProiectToolStripMenuItem_Click(object sender, EventArgs e) + { + string fil; + openFileDialog1.Filter = "XML files|*.xml|All files|*.*"; + if (openFileDialog1.ShowDialog(this) == DialogResult.OK) + { + fil = openFileDialog1.FileName; + XmlDocument doc = new XmlDocument(); + doc.Load(fil); + XmlNode ver = doc.DocumentElement.SelectSingleNode("/MPinstaler"); + bossview.Items.Clear(); + XmlNodeList fileList = ver.SelectNodes("FileList/File"); + foreach (XmlNode nodefile in fileList) + { + addrow(nodefile.SelectSingleNode("FileName").InnerText, + nodefile.SelectSingleNode("Type").InnerText, + nodefile.SelectSingleNode("SubType").InnerText, + nodefile.SelectSingleNode("Path").InnerText, + nodefile.SelectSingleNode("Id").InnerText); + } + _struct.BuildFileName=ver.SelectSingleNode("Option/BuildFileName").InnerText; + } + _struct.AddFileList(bossview); + } + + private void languageToolStripMenuItem_Click(object sender, EventArgs e) + { + Form2 StrForm = new Form2(); + StrForm.ShowDialog(); + } + + private void optionsToolStripMenuItem_Click(object sender, EventArgs e) + { + OptionForm opForm = new OptionForm(); + opForm.ShowDialog(); + } + + private void buildToolStripMenuItem_Click(object sender, EventArgs e) + { + Build_dialog buildfrm = new Build_dialog(this._struct); + buildfrm.ShowDialog(); + this._struct = buildfrm._struct; + } + + private void newToolStripMenuItem_Click(object sender, EventArgs e) + { + bossview.Items.Clear(); + _struct.Clear(); + } + + private void componentToolStripMenuItem_Click(object sender, EventArgs e) + { + addskin(1); + } + + private void mediaToolStripMenuItem_Click(object sender, EventArgs e) + { + addskin(2); + } + + private void toolStripComboBox1_Click(object sender, EventArgs e) + { + for (int i = 0; i < bossview.Items.Count; i++) + if (bossview.Items[i].Selected) bossview.Items.RemoveAt(i); + } + + + + + } +} \ No newline at end of file Added: trunk/plugins/mpinstaler/MPInstaler/Form1.resx =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Form1.resx (rev 0) +++ trunk/plugins/mpinstaler/MPInstaler/Form1.resx 2007-01-31 22:14:04 UTC (rev 68) @@ -0,0 +1,132 @@ +<?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="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>126, 17</value> + </metadata> + <metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>271, 17</value> + </metadata> + <metadata name="saveFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>401, 17</value> + </metadata> +</root> \ No newline at end of file Added: trunk/plugins/mpinstaler/MPInstaler/Form2.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Form2.Designer.cs (rev 0) +++ trunk/plugins/mpinstaler/MPInstaler/Form2.Designer.cs 2007-01-31 22:14:04 UTC (rev 68) @@ -0,0 +1,136 @@ +namespace MPInstaler +{ + partial class Form2 + { + /// <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.button1 = new System.Windows.Forms.Button(); + this.button2 = new System.Windows.Forms.Button(); + this.comboBox1 = new System.Windows.Forms.ComboBox(); + this.listView1 = new System.Windows.Forms.ListView(); + this.columnHeader1 = new System.Windows.Forms.ColumnHeader(); + this.columnHeader2 = new System.Windows.Forms.ColumnHeader(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.textBox2 = new System.Windows.Forms.TextBox(); + this.SuspendLayout(); + // + // button1 + // + this.button1.Location = new System.Drawing.Point(80, 289); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(65, 23); + this.button1.TabIndex = 0; + this.button1.Text = "Add"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // button2 + // + this.button2.Location = new System.Drawing.Point(186, 289); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(75, 23); + this.button2.TabIndex = 1; + this.button2.Text = "Remove"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // comboBox1 + // + this.comboBox1.FormattingEnabled = true; + this.comboBox1.Location = new System.Drawing.Point(12, 22); + this.comboBox1.Name = "comboBox1"; + this.comboBox1.Size = new System.Drawing.Size(372, 21); + this.comboBox1.TabIndex = 2; + // + // listView1 + // + this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader1, + this.columnHeader2}); + this.listView1.FullRowSelect = true; + this.listView1.GridLines = true; + this.listView1.Location = new System.Drawing.Point(12, 68); + this.listView1.Name = "listView1"; + this.listView1.Size = new System.Drawing.Size(372, 179); + this.listView1.TabIndex = 3; + this.listView1.UseCompatibleStateImageBehavior = false; + this.listView1.View = System.Windows.Forms.View.Details; + this.listView1.SelectedIndexChanged += new System.EventHandler(this.listView1_SelectedIndexChanged); + // + // columnHeader1 + // + this.columnHeader1.Text = "Id"; + // + // columnHeader2 + // + this.columnHeader2.Text = "Value"; + this.columnHeader2.Width = 308; + // + // textBox1 + // + this.textBox1.Location = new System.Drawing.Point(12, 253); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(62, 20); + this.textBox1.TabIndex = 4; + // + // textBox2 + // + this.textBox2.Location = new System.Drawing.Point(80, 253); + this.textBox2.Name = "textBox2"; + this.textBox2.Size = n... [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); > + // > + // saveProiectAsToolStripMenuItem > + // > + this.saveProiectAsToolStripMenuItem.Name =3D > "saveProiectAsToolStripMenuItem"; > + this.saveProiectAsToolStripMenuItem.Size =3D new > System.Drawing.Size(168, 22); > + this.saveProiectAsToolStripMenuItem.Text =3D "Save Proiect A= s.."; > + // > + // buildToolStripMenuItem > + // > + this.buildToolStripMenuItem.Name =3D "buildToolStripMenuItem= "; > + this.buildToolStripMenuItem.Size =3D new System.Drawing.Size= (168, > 22); > + this.buildToolStripMenuItem.Text =3D "Build"; > + this.buildToolStripMenuItem.Click +=3D new > System.EventHandler(this.buildToolStripMenuItem_Click); > + // > + // toolStripSeparator1 > + // > + this.toolStripSeparator1.Name =3D "toolStripSeparator1"; > + this.toolStripSeparator1.Size =3D new System.Drawing.Size(16= 5, > 6); > + // > + // optionsToolStripMenuItem > + // > + this.optionsToolStripMenuItem.Name =3D > "optionsToolStripMenuItem"; > + this.optionsToolStripMenuItem.Size =3D new > System.Drawing.Size(168, 22); > + this.optionsToolStripMenuItem.Text =3D "Options"; > + this.optionsToolStripMenuItem.Click +=3D new > System.EventHandler(this.optionsToolStripMenuItem_Click); > + // > + // toolStripSeparator2 > + // > + this.toolStripSeparator2.Name =3D "toolStripSeparator2"; > + this.toolStripSeparator2.Size =3D new System.Drawing.Size(16= 5, > 6); > + // > + // exitToolStripMenuItem > + // > + this.exitToolStripMenuItem.Name =3D "exitToolStripMenuItem"; > + this.exitToolStripMenuItem.Size =3D new System.Drawing.Size(= 168, > 22); > + this.exitToolStripMenuItem.Text =3D "Exit"; > + // > + // addToolStripMenuItem > + // > + this.addToolStripMenuItem.DropDownItems.AddRange(new > System.Windows.Forms.ToolStripItem[] { > + this.windowPluginToolStripMenuItem, > + this.skinToolStripMenuItem, > + this.languageToolStripMenuItem}); > + this.addToolStripMenuItem.Name =3D "addToolStripMenuItem"; > + this.addToolStripMenuItem.Size =3D new System.Drawing.Size(3= 8, > 20); > + this.addToolStripMenuItem.Text =3D "Add"; > + // > + // windowPluginToolStripMenuItem > + // > + this.windowPluginToolStripMenuItem.DropDownItems.AddRange(ne= w > System.Windows.Forms.ToolStripItem[] { > + this.windowToolStripMenuItem, > + this.procesToolStripMenuItem, > + this.subtitleToolStripMenuItem, > + this.tagReadersToolStripMenuItem, > + this.externalPlayersToolStripMenuItem}); > + this.windowPluginToolStripMenuItem.Name =3D > "windowPluginToolStripMenuItem"; > + this.windowPluginToolStripMenuItem.Size =3D new > System.Drawing.Size(132, 22); > + this.windowPluginToolStripMenuItem.Text =3D "Plugin"; > + // > + // windowToolStripMenuItem > + // > + this.windowToolStripMenuItem.Name =3D "windowToolStripMenuIt= em"; > + this.windowToolStripMenuItem.Size =3D new > System.Drawing.Size(160, 22); > + this.windowToolStripMenuItem.Text =3D "Window"; > + this.windowToolStripMenuItem.Click +=3D new > System.EventHandler(this.windowToolStripMenuItem_Click); > + // > + // procesToolStripMenuItem > + // > + this.procesToolStripMenuItem.Name =3D "procesToolStripMenuIt= em"; > + this.procesToolStripMenuItem.Size =3D new > System.Drawing.Size(160, 22); > + this.procesToolStripMenuItem.Text =3D "Process"; > + this.procesToolStripMenuItem.Click +=3D new > System.EventHandler(this.procesToolStripMenuItem_Click); > + // > + // subtitleToolStripMenuItem > + // > + this.subtitleToolStripMenuItem.Name =3D > "subtitleToolStripMenuItem"; > + this.subtitleToolStripMenuItem.Size =3D new > System.Drawing.Size(160, 22); > + this.subtitleToolStripMenuItem.Text =3D "Subtitle"; > + this.subtitleToolStripMenuItem.Click +=3D new > System.EventHandler(this.subtitleToolStripMenuItem_Click); > + // > + // tagReadersToolStripMenuItem > + // > + this.tagReadersToolStripMenuItem.Name =3D > "tagReadersToolStripMenuItem"; > + this.tagReadersToolStripMenuItem.Size =3D new > System.Drawing.Size(160, 22); > + this.tagReadersToolStripMenuItem.Text =3D "TagReaders"; > + this.tagReadersToolStripMenuItem.Click +=3D new > System.EventHandler(this.tagReadersToolStripMenuItem_Click); > + // > + // externalPlayersToolStripMenuItem > + // > + this.externalPlayersToolStripMenuItem.Name =3D > "externalPlayersToolStripMenuItem"; > + this.externalPlayersToolStripMenuItem.Size =3D new > System.Drawing.Size(160, 22); > + this.externalPlayersToolStripMenuItem.Text =3D "ExternalPlay= ers"; > + this.externalPlayersToolStripMenuItem.Click +=3D new > System.EventHandler(this.externalPlayersToolStripMenuItem_Click); > + // > + // skinToolStripMenuItem > + // > + this.skinToolStripMenuItem.DropDownItems.AddRange(new > System.Windows.Forms.ToolStripItem[] { > + this.componentToolStripMenuItem, > + this.mediaToolStripMenuItem, > + this.fullToolStripMenuItem}); > + this.skinToolStripMenuItem.Name =3D "skinToolStripMenuItem"; > + this.skinToolStripMenuItem.Size =3D new System.Drawing.Size(= 132, > 22); > + this.skinToolStripMenuItem.Text =3D "Skin"; > + // > + // componentToolStripMenuItem > + // > + this.componentToolStripMenuItem.Name =3D > "componentToolStripMenuItem"; > + this.componentToolStripMenuItem.Size =3D new > System.Drawing.Size(140, 22); > + this.componentToolStripMenuItem.Text =3D "Component"; > + this.componentToolStripMenuItem.Click +=3D new > System.EventHandler(this.componentToolStripMenuItem_Click); > + // > + // mediaToolStripMenuItem > + // > + this.mediaToolStripMenuItem.Name =3D "mediaToolStripMenuItem= "; > + this.mediaToolStripMenuItem.Size =3D new System.Drawing.Size= (140, > 22); > + this.mediaToolStripMenuItem.Text =3D "Media"; > + this.mediaToolStripMenuItem.Click +=3D new > System.EventHandler(this.mediaToolStripMenuItem_Click); > + // > + // fullToolStripMenuItem > + // > + this.fullToolStripMenuItem.Name =3D "fullToolStripMenuItem"; > + this.fullToolStripMenuItem.Size =3D new System.Drawing.Size(= 140, > 22); > + this.fullToolStripMenuItem.Text =3D "Full"; > + this.fullToolStripMenuItem.Visible =3D false; > + // > + // languageToolStripMenuItem > + // > + this.languageToolStripMenuItem.Name =3D > "languageToolStripMenuItem"; > + this.languageToolStripMenuItem.Size =3D new > System.Drawing.Size(132, 22); > + this.languageToolStripMenuItem.Text =3D "Language"; > + this.languageToolStripMenuItem.Click +=3D new > System.EventHandler(this.languageToolStripMenuItem_Click); > + // > + // bossview > + // > + this.bossview.CheckBoxes =3D true; > + this.bossview.Columns.AddRange(new > System.Windows.Forms.ColumnHeader[] { > + this.columnHeader1, > + this.columnHeader2, > + this.columnHeader3, > + this.columnHeader4, > + this.columnHeader5}); > + this.bossview.ContextMenuStrip =3D this.contextMenuStrip1; > + this.bossview.FullRowSelect =3D true; > + this.bossview.GridLines =3D true; > + this.bossview.Location =3D new System.Drawing.Point(12, 40); > + this.bossview.Name =3D "bossview"; > + this.bossview.Size =3D new System.Drawing.Size(663, 267); > + this.bossview.TabIndex =3D 2; > + this.bossview.UseCompatibleStateImageBehavior =3D false; > + this.bossview.View =3D System.Windows.Forms.View.Details; > + // > + // columnHeader1 > + // > + this.columnHeader1.Text =3D "File"; > + this.columnHeader1.Width =3D 116; > + // > + // columnHeader2 > + // > + this.columnHeader2.Text =3D "Type"; > + this.columnHeader2.Width =3D 115; > + // > + // columnHeader3 > + // > + this.columnHeader3.Text =3D "Subtype"; > + this.columnHeader3.Width =3D 108; > + // > + // columnHeader4 > + // > + this.columnHeader4.Text =3D "Path"; > + this.columnHeader4.Width =3D 170; > + // > + // columnHeader5 > + // > + this.columnHeader5.Text =3D "Id"; > + // > + // contextMenuStrip1 > + // > + this.contextMenuStrip1.Items.AddRange(new > System.Windows.Forms.ToolStripItem[] { > + this.toolStripComboBox1}); > + this.contextMenuStrip1.Name =3D "contextMenuStrip1"; > + this.contextMenuStrip1.Size =3D new System.Drawing.Size(153,= 48); > + // > + // toolStripComboBox1 > + // > + this.toolStripComboBox1.Name =3D "toolStripComboBox1"; > + this.toolStripComboBox1.Size =3D new System.Drawing.Size(152= , > 22); > + this.toolStripComboBox1.Text =3D "Remove"; > + this.toolStripComboBox1.Click +=3D new > System.EventHandler(this.toolStripComboBox1_Click); > + // > + // openFileDialog1 > + // > + this.openFileDialog1.Filter =3D "\"Dll files|*.dll|All > files|*.*\""; > + // > + // saveFileDialog1 > + // > + this.saveFileDialog1.DefaultExt =3D "xml"; > + // > + // groupBox1 > + // > + this.groupBox1.Location =3D new System.Drawing.Point(213, 32= 2); > + this.groupBox1.Name =3D "groupBox1"; > + this.groupBox1.Size =3D new System.Drawing.Size(450, 97); > + this.groupBox1.TabIndex =3D 3; > + this.groupBox1.TabStop =3D false; > + this.groupBox1.Text =3D "Properties"; > + // > + // Form1 > + // > + this.AutoScaleDimensions =3D new System.Drawing.SizeF(6F, 13= F); > + this.AutoScaleMode =3D System.Windows.Forms.AutoScaleMode.Fo= nt; > + this.ClientSize =3D new System.Drawing.Size(675, 431); > + this.Controls.Add(this.bossview); > + this.Controls.Add(this.groupBox1); > + this.Controls.Add(this.menuStrip1); > + this.MainMenuStrip =3D this.menuStrip1; > + this.Name =3D "Form1"; > + this.Text =3D "Form1"; > + this.menuStrip1.ResumeLayout(false); > + this.menuStrip1.PerformLayout(); > + this.contextMenuStrip1.ResumeLayout(false); > + this.ResumeLayout(false); > + this.PerformLayout(); > + > + } > + > + #endregion > + > + private System.Windows.Forms.MenuStrip menuStrip1; > + private System.Windows.Forms.ToolStripMenuItem > fileToolStripMenuItem; > + private System.Windows.Forms.ToolStripMenuItem > newToolStripMenuItem; > + private System.Windows.Forms.ListView bossview; > + private System.Windows.Forms.ColumnHeader columnHeader1; > + private System.Windows.Forms.ColumnHeader columnHeader2; > + private System.Windows.Forms.ColumnHeader columnHeader3; > + private System.Windows.Forms.ContextMenuStrip contextMenuStrip1; > + private System.Windows.Forms.ToolStripMenuItem > addToolStripMenuItem; > + private System.Windows.Forms.ToolStripMenuItem > windowPluginToolStripMenuItem; > + private System.Windows.Forms.ToolStripMenuItem > windowToolStripMenuItem; > + private System.Windows.Forms.ToolStripMenuItem > procesToolStripMenuItem; > + private System.Windows.Forms.ToolStripMenuItem > subtitleToolStripMenuItem; > + private System.Windows.Forms.ToolStripMenuItem > tagReadersToolStripMenuItem; > + private System.Windows.Forms.ToolStripMenuItem > externalPlayersToolStripMenuItem; > + private System.Windows.Forms.ColumnHeader columnHeader4; > + private System.Windows.Forms.ToolStripMenuItem > skinToolStripMenuItem; > + private System.Windows.Forms.ToolStripMenuItem > componentToolStripMenuItem; > + private System.Windows.Forms.ToolStripMenuItem > mediaToolStripMenuItem; > + private System.Windows.Forms.ToolStripMenuItem > fullToolStripMenuItem; > + private System.Windows.Forms.ToolStripMenuItem > openProiectToolStripMenuItem; > + private System.Windows.Forms.ToolStripMenuItem > sToolStripMenuItem; > + private System.Windows.Forms.ToolStripMenuItem > saveProiectAsToolStripMenuItem; > + private System.Windows.Forms.ToolStripSeparator > toolStripSeparator1; > + private System.Windows.Forms.ToolStripMenuItem > optionsToolStripMenuItem; > + private System.Windows.Forms.ToolStripSeparator > toolStripSeparator2; > + private System.Windows.Forms.ToolStripMenuItem > exitToolStripMenuItem; > + private System.Windows.Forms.OpenFileDialog openFileDialog1; > + private System.Windows.Forms.ColumnHeader columnHeader5; > + private System.Windows.Forms.SaveFileDialog saveFileDialog1; > + private System.Windows.Forms.ToolStripMenuItem > languageToolStripMenuItem; > + private System.Windows.Forms.ToolStripMenuItem > buildToolStripMenuItem; > + private System.Windows.Forms.ToolStripMenuItem toolStripComboBox= 1; > + private System.Windows.Forms.GroupBox groupBox1; > + } > +} > + > > Added: trunk/plugins/mpinstaler/MPInstaler/Form1.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.cs > (rev 0) > +++ trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-01-31 22:14:04 UT= C > (rev 68) > @@ -0,0 +1,249 @@ > +using System; > +using System.Collections.Generic; > +using System.ComponentModel; > +using System.Data; > +using System.Drawing; > +using System.Text; > +using System.Windows.Forms; > +using System.Xml; > +using System.IO; > +using ICSharpCode.SharpZipLib.Zip; > + > +namespace MPInstaler > +{ > + public partial class Form1 : Form > + { > + private MPinstalerStruct _struct =3D new MPinstalerStruct(); > + public Form1() > + { > + InitializeComponent(); > + } > + > + private void button1_Click(object sender, EventArgs e) > + { > + } > + > + private void sToolStripMenuItem_Click(object sender, EventArgs e) > + { > + Stream myStream; > + > + if (saveFileDialog1.ShowDialog(this) =3D=3D DialogResult.OK) > + { > + if ((myStream =3D saveFileDialog1.OpenFile()) !=3D null) > + { > + // Code to write the stream goes here. > + XmlDocument doc =3D new XmlDocument(); > + XmlWriter writer =3D null; > + _struct.AddFileList(bossview); > + try > + { > + // Create an XmlWriterSettings object with the correct > options. > + XmlWriterSettings settings =3D new XmlWriterSettings(); > + string st =3D string.Empty; > + settings.Indent =3D true; > + settings.IndentChars =3D ("\t"); > + settings.OmitXmlDeclaration =3D true; > + // Create the XmlWriter object and write some content. > + writer =3D XmlWriter.Create(myStream, settings); > + writer.WriteStartElement("MPinstaler"); > + writer.WriteElementString("ver", "1.00.000"); > + writer.WriteStartElement("FileList"); > + for (int i =3D 0; i < _struct.FileList.Count; i++) > + { > + MPIFileList it=3D(MPIFileList)_struct.FileList[i]; > + writer.WriteStartElement("File"); > + > writer.WriteElementString("FileName",Path.GetFileName(it.FileName)); > + writer.WriteElementString("Type", it.Type); > + writer.WriteElementString("SubType", it.SubType); > + writer.WriteElementString("Path", > Path.GetDirectoryName(it.FileName)); > + writer.WriteElementString("Id", it.ID); > + writer.WriteEndElement(); > + st =3D st + bossview.Items[i].SubItems[3].Text + @"\" + > bossview.Items[i].Text + ";"; > + } > + writer.WriteEndElement(); > + writer.WriteStartElement("Option"); > + writer.WriteElementString("BuildFileName", > _struct.BuildFileName); > + writer.WriteEndElement(); > + writer.WriteEndElement(); > + writer.Flush(); > + > + //------------------------------------- > + //------------------------------------- > + } > + finally > + { > + if (writer !=3D null) > + writer.Close(); > + } > + myStream.Close(); > + > + } > + > + } > + > + } > + > + private void windowToolStripMenuItem_Click(object sender, EventArg= s > e) > + { > + addplugin(1); > + } > + > + private void addplugin(int type) > + { > + /* > + 1 - 10 PLUGINS > + 1 - window > + 2 - process > + 3 - subtitle > + 4 - tagreader > + 5 - external player > + */ > + string fil; > + openFileDialog1.Filter =3D "Dll files|*.dll|All files|*.*"; > + if (openFileDialog1.ShowDialog(this) =3D=3D DialogResult.OK) > + { > + fil =3D openFileDialog1.FileName; > + switch (type) > + { > + case 1: > + addrow(Path.GetFileName(fil), MPinstalerStruct.PLUGIN_TYPE= , > MPinstalerStruct.PLUGIN_WINDOW_SUBTYPE, Path.GetDirectoryName(fil), > "01010"); > + break; > + case 2: > + addrow(Path.GetFileName(fil), MPinstalerStruct.PLUGIN_TYPE= , > MPinstalerStruct.PLUGIN_PROCESS_SUBTYPE, Path.GetDirectoryName(fil), > "01020"); > + break; > + case 3: > + addrow(Path.GetFileName(fil), MPinstalerStruct.PLUGIN_TYPE= , > MPinstalerStruct.PLUGIN_SUBTITLE_SUBTYPE, Path.GetDirectoryName(fil), > "01030"); > + break; > + case 4: > + addrow(Path.GetFileName(fil), MPinstalerStruct.PLUGIN_TYPE= , > MPinstalerStruct.PLUGIN_TAGREADER_SUBTYPE, Path.GetDirectoryName(fil), > "01040"); > + break; > + case 5: > + addrow(Path.GetFileName(fil), MPinstalerStruct.PLUGIN_TYPE= , > MPinstalerStruct.PLUGIN_PLAYER_SUBTYPE, Path.GetDirectoryName(fil), > "01050"); > + break; > + default: > + break; > + } > + } > + } > + > + private void addskin(int type) > + { > +// string fil; > + openFileDialog1.Filter =3D "xml files|*.xml|png files|*.png|bmp > files|*.bmp|All files|*.*"; > + openFileDialog1.Multiselect =3D true; > + if (openFileDialog1.ShowDialog(this) =3D=3D DialogResult.OK) > + { > + foreach(string fil in openFileDialog1.FileNames) > + switch (type) > + { > + case 1: addrow(Path.GetFileName(fil), > MPinstalerStruct.SKIN_TYPE, MPinstalerStruct.SKIN_XML_SUBTYPE, > Path.GetDirectoryName(fil), "02010"); > + break; > + case 2: addrow(Path.GetFileName(fil), > MPinstalerStruct.SKIN_MEDIA_TYPE, MPinstalerStruct.SKIN_XML_SUBTYPE, > Path.GetDirectoryName(fil), "02020"); > + break; > + default: > + break; > + } > + } > + } > + > + private void subtitleToolStripMenuItem_Click(object sender, EventA= rgs > e) > + { > + addplugin(3); > + } > + > + private void procesToolStripMenuItem_Click(object sender, EventArg= s > e) > + { > + addplugin(2); > + } > + > + private void tagReadersToolStripMenuItem_Click(object sender, > EventArgs e) > + { > + addplugin(4); > + } > + > + private void externalPlayersToolStripMenuItem_Click(object sender, > EventArgs e) > + { > + addplugin(5); > + } > + > + private void addrow(string file, string type, string subtype, stri= ng > path, string id) > + { > + ListViewItem item1 =3D new ListViewItem(file, 0); > + item1.SubItems.Add(type); > + item1.SubItems.Add(subtype); > + item1.SubItems.Add(path); > + item1.SubItems.Add(id); > + bossview.Items.AddRange(new ListViewItem[] { item1 }); > + } > + > + private void openProiectToolStripMenuItem_Click(object sender, > EventArgs e) > + { > + string fil; > + openFileDialog1.Filter =3D "XML files|*.xml|All files|*.*"; > + if (openFileDialog1.ShowDialog(this) =3D=3D DialogResult.OK) > + { > + fil =3D openFileDialog1.FileName; > + XmlDocument doc =3D new XmlDocument(); > + doc.Load(fil); > + XmlNode ver =3D > doc.DocumentElement.SelectSingleNode("/MPinstaler"); > + bossview.Items.Clear(); > + XmlNodeList fileList =3D ver.SelectNodes("FileList/File"); > + foreach (XmlNode nodefile in fileList) > + { > + addrow(nodefile.SelectSingleNode("FileName").InnerText, > + nodefile.SelectSingleNode("Type").InnerText, > + nodefile.SelectSingleNode("SubType").InnerText, > + nodefile.SelectSingleNode("Path").InnerText, > + nodefile.SelectSingleNode("Id").InnerText); > + } > + > _struct.BuildFileName=3Dver.SelectSingleNode("Option/BuildFileName").In= nerText; > + } > + _struct.AddFileList(bossview); > + } > + > + private void languageToolStripMenuItem_Click(object sender, EventA= rgs > e) > + { > + Form2 StrForm =3D new Form2(); > + StrForm.ShowDialog(); > + } > + > + private void optionsToolStripMenuItem_Click(object sender, EventAr= gs > e) > + { > + OptionForm opForm =3D new OptionForm(); > + opForm.ShowDialog(); > + } > + > + private void buildToolStripMenuItem_Click(object sender, EventArgs= e) > + { > + Build_dialog buildfrm =3D new Build_dialog(this._struct); > + buildfrm.ShowDialog(); > + this._struct =3D buildfrm._struct; > + } > + > + private void newToolStripMenuItem_Click(object sender, EventArgs e= ) > + { > + bossview.Items.Clear(); > + _struct.Clear(); > + } > + > + private void componentToolStripMenuItem_Click(object sender, > EventArgs e) > + { > + addskin(1); > + } > + > + private void mediaToolStripMenuItem_Click(object sender, EventArgs= e) > + { > + addskin(2); > + } > + > + private void toolStripComboBox1_Click(object sender, EventArgs e) > + { > + for (int i =3D 0; i < bossview.Items.Count; i++) > + if (bossview.Items[i].Selected) bossview.Items.RemoveAt(i); > + } > + > + > + > + > + } > +} > \ No newline at end of file > > Added: trunk/plugins/mpinstaler/MPInstaler/Form1.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/Form1.resx > (rev 0) > +++ trunk/plugins/mpinstaler/MPInstaler/Form1.resx 2007-01-31 22:14:04 = UTC > (rev 68) > @@ -0,0 +1,132 @@ > +<?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"menuStrip1.TrayLocation" type=3D"System.Drawing.Po= int, > System.Drawing, Version=3D2.0.0.0, Culture=3Dneutral, > PublicKeyToken=3Db03f5f7f11d50a3a"> > + <value>17, 17</value> > + </metadata> > + <metadata name=3D"contextMenuStrip1.TrayLocation" > type=3D"System.Dr... [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/IPTV@UT.csproj trunk/plugins/IPTV@UT/IPTV@UT/IPTVPlugin.cs trunk/plugins/IPTV@UT/IP...@UT...o 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/IPTV@UT.csproj =================================================================== --- trunk/plugins/IPTV@UT/IPTV@UT/IPTV@UT.csproj 2007-01-31 22:29:16 UTC (rev 69) +++ trunk/plugins/IPTV@UT/IPTV@UT/IPTV@UT.csproj 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...o =================================================================== (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 System.Text; + +namespace MediaPortal.GUI.WebBrowser +{ + /// <summary> + /// Windows INI File Helper Class + /// </summary> + public class IniFile + { + public string path; + + [DllImport("kernel32")] + private static extern long WritePrivateProfileString(string section, + string key,string val,string filePath); + [DllImport("kernel32")] + private static extern int GetPrivateProfileString(string section, + string key,string def, StringBuilder retVal, + int size,string filePath); + + /// <summary> + /// INIFile Constructor. + /// </summary> + /// <PARAM name="INIPath"></PARAM> + public IniFile(string INIPath) + { + path = INIPath; + } + /// <summary> + /// Write Data to the INI File + /// </summary> + /// <PARAM name="Section"></PARAM> + /// Section name + /// <PARAM name="Key"></PARAM> + /// Key Name + /// <PARAM name="Value"></PARAM> + /// Value Name + public void IniWriteValue(string Section,string Key,string Value) + { + WritePrivateProfileString(Section,Key,Value,this.path); + } + + /// <summary> + /// Read Data Value From the Ini File + /// </summary> + /// <PARAM name="Section"></PARAM> + /// <PARAM name="Key"></PARAM> + /// <PARAM name="Path"></PARAM> + /// <returns></returns> + public string IniReadValue(string Section,string Key) + { + StringBuilder temp = new StringBuilder(255); + int i = GetPrivateProfileString(Section, Key, "", temp, 255, this.path); + return temp.ToString(); + } + } +} Added: trunk/plugins/WebBrowser/MOZILLACONTROLLib.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/WebBrowser/MOZILLACONTROLLib.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/WebBrowser/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/WebBrowser/Properties/AssemblyInfo.cs (rev 0) +++ trunk/plugins/WebBrowser/Properties/AssemblyInfo.cs 2007-02-02 07:47:21 UTC (rev 79) @@ -0,0 +1,35 @@ +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("GUIWebBrowser")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("GUIWebBrowser")] +[assembly: AssemblyCopyright("Copyright © 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("e3f43670-40d9-47a7-8b28-3129c45f0238")] + +// 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.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] Added: trunk/plugins/WebBrowser/Readme.txt =================================================================== --- trunk/plugins/WebBrowser/Readme.txt (rev 0) +++ trunk/plugins/WebBrowser/Readme.txt 2007-02-02 07:47:21 UTC (rev 79) @@ -0,0 +1,14 @@ +Plugin originally developed by Devo + +This plugin requires Mozilla ActiveX Control version 1.7.12 + +Homepage link: http://www.iol.ie/~locka/mozilla/control.htm +Download link: http://www.iol.ie/~locka/mozilla/MozillaControl1712.exe + +The following DLLs need to be placed in the Plugins\Windows directory of the installed MediaPortal for the plugin to work: + +MOZILLACONTROLLib.dll +AxMOZILLACONTROLLib.dll +WebBrowser.dll (output when the project is built) + +Skin files are already in the main MP distribution. If that ever changes, they will be added to this SVN instead. \ No newline at end of file Added: trunk/plugins/WebBrowser/WebBrowserControl.Designer.cs =================================================================== --- trunk/plugins/WebBrowser/WebBrowserControl.Designer.cs (rev 0) +++ trunk/plugins/WebBrowser/WebBrowserControl.Designer.cs 2007-02-02 07:47:21 UTC (rev 79) @@ -0,0 +1,88 @@ +#region Copyright (C) 2005-2007 Team MediaPortal + +/* + * Copyright (C) 2005-2007 Team MediaPortal + * http://www.team-mediaportal.com + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This Program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +#endregion + +namespace MediaPortal.GUI.WebBrowser +{ + partial class WebBrowserControl + { + /// <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 Component 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() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WebBrowserControl)); + this.axMozillaBrowser1 = new AxMOZILLACONTROLLib.AxMozillaBrowser(); + ((System.ComponentModel.ISupportInitialize)(this.axMozillaBrowser1)).BeginInit(); + this.SuspendLayout(); + // + // axMozillaBrowser1 + // + this.axMozillaBrowser1.Enabled = true; + this.axMozillaBrowser1.Location = new System.Drawing.Point(0, 0); + this.axMozillaBrowser1.Margin = new System.Windows.Forms.Padding(0); + this.axMozillaBrowser1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axMozillaBrowser1.OcxState"))); + this.axMozillaBrowser1.Size = new System.Drawing.Size(720, 473); + this.axMozillaBrowser1.TabIndex = 0; + // + // WebBrowserControl + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.axMozillaBrowser1); + this.Margin = new System.Windows.Forms.Padding(0); + this.Name = "WebBrowserControl"; + this.Size = new System.Drawing.Size(720, 473); + this.Layout += new System.Windows.Forms.LayoutEventHandler(this.WebBrowserControl_Layout); + ((System.ComponentModel.ISupportInitialize)(this.axMozillaBrowser1)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private AxMOZILLACONTROLLib.AxMozillaBrowser axMozillaBrowser1; + } +} Added: trunk/plugins/WebBrowser/WebBrowserControl.cs =================================================================== --- trunk/plugins/WebBrowser/WebBrowserControl.cs (rev 0) +++ trunk/plugins/WebBrowser/WebBrowserControl.cs 2007-02-02 07:47:21 UTC (rev 79) @@ -0,0 +1,231 @@ +#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.ComponentModel; +using System.Drawing; +using System.Data; +using System.Text; +using System.Windows.Forms; +using MediaPortal.GUI.Library; + +namespace MediaPortal.GUI.WebBrowser +{ + public sealed partial class WebBrowserControl : UserControl + { + static readonly WebBrowserControl instance = new WebBrowserControl(); + private const int TOP = 55; + private const int LEFT = 4; + private const int HEIGHT = 493; + private Common.MenuState _CurrentMenuState; + + /// <summary> + /// Enumeration for refresh constants + /// </summary> + public enum RefreshConstants + { + REFRESH_NORMAL = 0, + REFRESH_IFEXPIRED = 1, + REFRESH_CONTINUE = 2, + REFRESH_COMPLETELY = 3 + } + + #region Constructor + /// <summary> + /// WebBrowserControl contstructor + /// </summary> + private WebBrowserControl() + { + try + { + + InitializeComponent(); + this.Top = 55; + this.Left = 4; + if (Common.HomePage.Length != 0) + Browser.Navigate(Common.HomePage); + } + catch + { + Log.Error("Unable to load the web browser plugin, verify that Mozilla ActiveX Control is installed"); + } + } + #endregion + + #region Properties + /// <summary> + /// Gets the Mozilla web browser control + /// </summary> + public AxMOZILLACONTROLLib.AxMozillaBrowser Browser + { + get { return axMozillaBrowser1; } + } + /// <summary> + /// Gets the instance. + /// </summary> + /// <value>The instance.</value> + public static WebBrowserControl Instance + { + get + { + return instance; + } + } + #endregion + + #region Private Methods + /// <summary> + /// Rescales & Reszies the browser and control when MediaPortal changes its size + /// </summary> + private void ResizeBrowser() + { + //rescale & resize control + int left = LEFT; + int top = TOP; + int right = this.Right; + int bottom = this.Bottom; + + GUIGraphicsContext.ScaleRectToScreenResolution(ref left, ref top, ref right, ref bottom); + this.Left = left; + this.Top = top; + ScaleVertical(); + ScaleHorizontal(); + } + + /// <summary> + /// Scale y position for current resolution + /// </summary> + private void ScaleVertical() + { + float fSkinHeight = (float)GUIGraphicsContext.SkinSize.Height; ; + float fPercentY = ((float)GUIGraphicsContext.Height) / fSkinHeight; + this.Height = (int)Math.Round(((float)HEIGHT) * fPercentY); + this.Browser.Height = this.Height; + } + + /// <summary> + /// Scale y position for current resolution + /// </summary> + private void ScaleHorizontal() + { + this.Width = GUIGraphicsContext.Width - 4; + this.Browser.Width = this.Width; + } + + /// <summary> + /// Handles the Layout event of the WebBrowserControl control. + /// </summary> + /// <param name="sender">The source of the event.</param> + /// <param name="e">The <see cref="System.Windows.Forms.LayoutEventArgs"/> instance containing the event data.</param> + private void WebBrowserControl_Layout(object sender, LayoutEventArgs e) + { + ResizeBrowser(); + } + #endregion + + #region Public Methods + /// <summary> + /// Toggles the menu between the web browser and the web browser topbar. + /// </summary> + public void ToggleMenu() + { + if (_CurrentMenuState == Common.MenuState.Browser) + { + this.Enabled = false; + GUIGraphicsContext.form.Focus(); + GUIControl.FocusControl(GUIWebBrowser.WINDOW_WEB_BROWSER, (int)GUIWebBrowser.Controls.UrlButton); + _CurrentMenuState = Common.MenuState.TopBar; + } + else + { + this.Enabled = true; + _CurrentMenuState = Common.MenuState.Browser; + } + } + + /// <summary> + /// Refreshes the browser page. + /// </summary> + public void RefreshBrowser() + { + object refreshType = RefreshConstants.REFRESH_COMPLETELY; + this.Browser.Refresh2(ref refreshType); + } + + /// <summary> + /// Navigates to a url + /// </summary> + /// <param name="url">url</param> + public static void OpenUrl(string url) + { + //impliment method to navigate to a url from other controls. + } + #endregion + + #region Protected Methods + /// <summary> + /// Caputures key presses at a lower level than the windows form keypress event. + /// </summary> + /// <param name="msg">A <see cref="T:System.Windows.Forms.Message"/>, passed by reference, that represents the window message to process.</param> + /// <param name="keyData">One of the <see cref="T:System.Windows.Forms.Keys"/> values that represents the key to process.</param> + /// <returns> + /// <see langword="true"/> if the character was processed by + /// the control; otherwise, <see langword="false"/> . + /// </returns> + protected override bool ProcessCmdKey(ref Message msg, Keys keyData) + { + const int WM_KEYDOWN = 0x100; + const int WM_SYSKEYDOWN = 0x104; + bool handled = false; + + if ((msg.Msg == WM_KEYDOWN) || (msg.Msg == WM_SYSKEYDOWN)) + { + switch (keyData) + { + case Keys.F9: //Toggles Menu + ToggleMenu(); + handled = true; + break; + case Keys.F3: //Favorites + GUIWindowManager.ActivateWindow(GUIFavorites.WINDOW_FAVORITES); + handled = true; + break; + case Keys.Escape: //Return to previous screen. + GUIWindowManager.ShowPreviousWindow(); + handled = true; + break; + } + } + + if (!handled) + handled = base.ProcessCmdKey(ref msg, keyData); + + return handled; + } + #endregion + + } +} Added: trunk/plugins/WebBrowser/WebBrowserControl.resx =================================================================== --- trunk/plugins/WebBrowser/WebBrowserControl.resx (rev 0) +++ trunk/plugins/WebBrowser/WebBrowserControl.resx 2007-02-02 07:47:21 UTC (rev 79) @@ -0,0 +1,128 @@ +<?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> + <data name="axMozillaBrowser1.OcxState" mimetype="application/x-microsoft.net.object.binary.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w + LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACFTeXN0 + ZW0uV2luZG93cy5Gb3Jtcy5BeEhvc3QrU3RhdGUBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAAIQAAAAIB + AAAAAQAAAAAAAAAAAAAAAAwAAAAAAwAA2BMAANgTAAAL +</value> + </data> +</root> \ No newline at end of file Added: trunk/plugins/WebBrowser/WebBrowserSetup.Designer.cs =================================================================== --- trunk/plugins/WebBrowser/WebBrowserSetup.Designer.cs (rev 0) +++ trunk/plugins/WebBrowser/WebBrowserSetup.Designer.cs 2007-02-02 07:47:21 UTC (rev 79) @@ -0,0 +1,163 @@ +#region Copyright (C) 2005-2007 Team MediaPortal + +/* + * Copyright (C) 2005-2007 Team MediaPortal + * http://www.team-mediaportal.com + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This Program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +#endregion + +namespace MediaPortal.GUI.WebBrowser +{ + partial class WebBrowserSetup + { + /// <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() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WebBrowserSetup)); + this.Ok = new MediaPortal.UserInterface.Controls.MPButton(); + this.Cancel = new MediaPortal.UserInterface.Controls.MPButton(); + this.folderBrowserDialog = new System.Windows.Forms.FolderBrowserDialog(); + this.PickFavoritesFolder = new MediaPortal.UserInterface.Controls.MPButton(); + this.FavoritesFolder = new MediaPortal.UserInterface.Controls.MPTextBox(); + this.label1 = new MediaPortal.UserInterface.Controls.MPLabel(); + this.HomePage = new MediaPortal.UserInterface.Controls.MPTextBox(); + this.label2 = new MediaPortal.UserInterface.Controls.MPLabel(); + this.SuspendLayout(); + // + // Ok + // + this.Ok.Location = new System.Drawing.Point(234, 64); + this.Ok.Name = "Ok"; + this.Ok.Size = new System.Drawing.Size(75, 23); + this.Ok.TabIndex = 0; + this.Ok.Text = "&Ok"; + this.Ok.Click += new System.EventHandler(this.Ok_Click); + // + // Cancel + // + this.Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.Cancel.Location = new System.Drawing.Point(315, 64); + this.Cancel.Name = "Cancel"; + this.Cancel.Size = new System.Drawing.Size(75, 23); + this.Cancel.TabIndex = 1; + this.Cancel.Text = "&Cancel"; + this.Cancel.Click += new System.EventHandler(this.Cancel_Click); + // + // folderBrowserDialog + // + this.folderBrowserDialog.RootFolder = System.Environment.SpecialFolder.Favorites; + // + // PickFavoritesFolder + // + this.PickFavoritesFolder.Location = new System.Drawing.Point(315, 9); + this.PickFavoritesFolder.Name = "PickFavoritesFolder"; + this.PickFavoritesFolder.Size = new System.Drawing.Size(75, 23); + this.PickFavoritesFolder.TabIndex = 2; + this.PickFavoritesFolder.Text = "Browse..."; + this.PickFavoritesFolder.Click += new System.EventHandler(this.PickFavoritesFolder_Click); + // + // FavoritesFolder + // + this.FavoritesFolder.Location = new System.Drawing.Point(103, 12); + this.FavoritesFolder.Name = "FavoritesFolder"; + this.FavoritesFolder.Size = new System.Drawing.Size(206, 20); + this.FavoritesFolder.TabIndex = 3; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(12, 15); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(85, 13); + this.label1.TabIndex = 4; + this.label1.Text = "Favorites Folder:"; + // + // HomePage + // + this.HomePage.Location = new System.Drawing.Point(103, 38); + this.HomePage.Name = "HomePage"; + this.HomePage.Size = new System.Drawing.Size(206, 20); + this.HomePage.TabIndex = 6; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(12, 41); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(66, 13); + this.label2.TabIndex = 5; + this.label2.Text = "Home Page:"; + // + // WebBrowserSetup + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.ClientSize = new System.Drawing.Size(384, 85); + this.Controls.Add(this.HomePage); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.Controls.Add(this.FavoritesFolder); + this.Controls.Add(this.PickFavoritesFolder); + this.Controls.Add(this.Cancel); + this.Controls.Add(this.Ok); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "WebBrowserSetup"; + this.Text = "Web Browser Setup"; + this.Load += new System.EventHandler(this.WebBrowserSetup_Load); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private MediaPortal.UserInterface.Controls.MPButton Ok; + private MediaPortal.UserInterface.Controls.MPButton Cancel; + private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog; + private MediaPortal.UserInterface.Controls.MPButton PickFavoritesFolder; + private MediaPortal.UserInterface.Controls.MPTextBox FavoritesFolder; + private MediaPortal.UserInterface.Controls.MPLabel label1; + privat... [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"); - ntxtProxyUserNode = xmld.SelectSingleNode("/settings/proxydetails/proxyuser"); - ntxtProxyPassNode = xmld.SelectSingleNode("/settings/proxydetails/proxypassword"); - ntxtProxyIPAddressNode = xmld.SelectSingleNode("/settings/proxydetails/proxyipaddress"); - ntxtProxyPortNode = xmld.SelectSingleNode("/settings/proxydetails/proxyport"); - - nchkBoxUseProxyNode.InnerText = chkBoxUseProxy.Checked.ToString(); - nchkBoxUseDefaultProxyNode.InnerText = chkBoxUseDefaultProxy.Checked.ToString(); - ntxtProxyUserNode.InnerText = txtProxyUser.Text; - ntxtProxyPassNode.InnerText = txtProxyPass.Text; - ntxtProxyIPAddressNode.InnerText = txtProxyIPAddress.Text; - ntxtProxyPortNode.InnerText = txtProxyPort.Text; - - xmld.Save("iptvsettings.xml"); - this.Close(); - } - - void BtnCancelClick(object sender, System.EventArgs e) - { - this.Close(); - } - - #region ISetupForm Members - - public bool CanEnable() - { - return true; - } - - public string Description() - { - return "Plugin for viewing Internet TV"; - } - - public bool DefaultEnabled() - { - return true; - } - - public int GetWindowId() - { - return 5699; - } - - 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 string Author() - { - return "overture/juan pablo"; - } - - public string PluginName() - { - return "My IPTV"; - } - - public bool HasSetup() - { - return true; - } - - public void ShowPlugin() - { - IPTVsetup iptvSetup = new IPTVsetup(); - iptvSetup.ShowDialog(); - iptvSetup.Dispose(); - } - - #endregion - - - void BtnRemoveClick(object sender, System.EventArgs e) - { - SetupManager setupManager = new SetupManager(); - setupManager.LoadXMLDoc(); - setupManager.RemoveItem(checkedListBox1.Text); - checkedListBox1.Items.Clear(); - setupManager.GetPluginDetails(); - setupManager.LoadPluginItems(checkedListBox1); - } - - void BtnAddNewPlugClick(object sender, System.EventArgs e) - { - PluginsAddNew newplug = new PluginsAddNew(checkedListBox1); - newplug.ShowDialog(); - newplug.Dispose(); - } - - void CheckedListBox1SelectedIndexChanged(object sender, System.EventArgs e) - { - } - } -} Deleted: trunk/plugins/IPTVsetup.resx =================================================================== --- trunk/plugins/IPTVsetup.resx 2007-03-16 19:07:02 UTC (rev 190) +++ trunk/plugins/IPTVsetup.resx 2007-03-16 20:07:38 UTC (rev 191) @@ -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> - <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 Deleted: trunk/plugins/ReflectionManager.cs =================================================================== --- trunk/plugins/ReflectionManager.cs 2007-03-16 19:07:02 UTC (rev 190) +++ trunk/plugins/ReflectionManager.cs 2007-03-16 20:07:38 UTC (rev 191) @@ -1,161 +0,0 @@ -using System; -using System.Reflection; -using SnapperInterface; - -namespace ReflectionManager -{ - /// <summary> - /// Controls runtime instances of the mini plugins. - /// </summary> - public class ReflectionControl - { - private object oInstance; - private Assembly theSnapInAsm = null; - - #region Default Constructor - - /// <summary> - /// Default Constructor - /// </summary> - public ReflectionControl() - { - } - - #endregion - - #region Properties - - /// <summary> - /// Property of a given type instance. - /// </summary> - public object ObjInstance - { - get { return this.oInstance; } - } - - #endregion - - #region Public Methods - - /// <summary> - /// Used to load an external assembley. - /// </summary> - /// <param name="path">Path to the assembly.</param> - /// <returns>bool</returns> - public bool LoadExternalModule(string path) - { - try - { - // Dynamically load the selected assembly. - this.theSnapInAsm = Assembly.LoadFrom(path); - } - catch - { - // If any error at all takes place, just return false. - return false; - } - - return true; - } - - /// <summary> - /// Creates an instance of a specified type. - /// </summary> - /// <param name="sFullName">Name of the type i.e. "Namespace.Class"</param> - /// <returns>Instance of the type object.</returns> - public object GetInstanceOfType(string sFullName) - { - // Get all types in assembly. - Type[] theTypes = theSnapInAsm.GetTypes(); - // See if a type implements ... - for (int i = 0; i < theTypes.Length; i++) - { - object[] theAtts = theTypes[i].GetCustomAttributes(false); - for(int j = 0;j< theAtts.Length;j++) - { - if(theAtts[j] is MiniIPTVPluginAttribute) - { - MiniIPTVPluginAttribute pa = theAtts[j] as MiniIPTVPluginAttribute; - // Use late binding to create the type. - this.oInstance = theSnapInAsm.CreateInstance(sFullName); - } - } - } - return this.oInstance; - } - - - /// <summary> - /// Checks if the DLL contains a compatiple type - /// </summary> - /// <returns>bool true or false</returns> - public bool CheckValidType() - { - bool ans = false; - int ctr = 0; - // Get all types in assembly. - Type[] theTypes = theSnapInAsm.GetTypes(); - - // Loop through each type in the assembly - for (int i = 0; i < theTypes.Length; i++) - { - // Get custom attributes for a given type - object[] theAtts = theTypes[i].GetCustomAttributes(false); - - // Loop through each attribute supported by the given type. - for(int j = 0;j< theAtts.Length;j++) - { - if(theAtts[j] is MiniIPTVPluginAttribute) - { - // Increment ctr for each type that supports - // the MiniIPTVPluginAttribute. - ctr++; - } - } - - } - - // If the MiniIPTVPluginAttribute is supported in any type - // in a given assembly then return true so the DLL - // is reported to be plugable. - if(ctr>0) - { - // At least one type supports the MiniIPTVPluginAttribute - ans = true; - } - else - { - // Zero types support the MiniIPTVPluginAttribute - ans = false; - } - - return ans; - } - - /// <summary> - /// Gets the custom attribute(s) of a plugin type. - /// </summary> - /// <param name="sTypeName">Name of the type i.e. "Namespace.Class"</param> - public void GetCustomAttributes(out string sTypeName) - { - sTypeName = ""; - - // Get all types in assembly. - Type[] theTypes = theSnapInAsm.GetTypes(); - // See if a type implements ... - for (int i = 0; i < theTypes.Length; i++) - { - object[] theAtts = theTypes[i].GetCustomAttributes(true); - for(int j = 0;j< theAtts.Length;j++) - { - if(theAtts[j] is MiniIPTVPluginAttribute) - { - MiniIPTVPluginAttribute pa = theAtts[j] as MiniIPTVPluginAttribute; - sTypeName = pa.TypeName; - } - } - } - } - #endregion - } -} Deleted: trunk/plugins/SetupManager.cs =================================================================== --- trunk/plugins/SetupManager.cs 2007-03-16 19:07:02 UTC (rev 190) +++ trunk/plugins/SetupManager.cs 2007-03-16 20:07:38 UTC (rev 191) @@ -1,279 +0,0 @@ -using System; -using System.Xml; -using System.Windows.Forms; -using System.Drawing; -using ReflectionManager; -using SnapperInterface; - -namespace myIPTV -{ - /// <summary> - /// Performs working tasks for this assembly. - /// </summary> - public class SetupManager - { - private string[] sDesc; - private string[] sDescP; - private string[] sState; - private XmlDocument xmld; - private string sTypeName; - - #region Default Constructor - - /// <summary> - /// Default Constructor - /// </summary> - public SetupManager() - { - } - - #endregion - - #region Internal Methods - - /// <summary> - /// Load the IPTVMiniPluginDLLs.xml to an XmlDocument - /// </summary> - internal void LoadXMLDoc() - { - this.xmld = new XmlDocument(); - try - { - this.xmld.Load("IPTVMiniPluginDLLs.xml"); - } - catch(Exception ex) - { - MessageBox.Show(ex.Message); - } - } - - /// <summary> - /// Get the require details from the IPTVMiniPluginDLLs.xml file. - /// </summary> - internal void GetParams() - { - XmlNodeList nodeList = null; - this.sDesc = new string[10]; - int i=0; - - nodeList = this.xmld.SelectNodes("/interface/type"); - - foreach(XmlNode n in nodeList) - { - XmlNode StatusAtt = n.SelectSingleNode("dll/@state"); - XmlNode NameAtt = n.SelectSingleNode("dll/@name"); - - if(StatusAtt.InnerXml.ToLower()=="on") - { - this.sDesc[i] = NameAtt.InnerXml; - i++; - } - } - } - - - internal void GetPluginDetails() - { - XmlNodeList nodeList = null; - this.sDescP = new string[10]; - this.sState = new string[10]; - int i=0; - - nodeList = this.xmld.SelectNodes("/interface/type"); - - foreach(XmlNode n in nodeList) - { - XmlNode StatusAtt = n.SelectSingleNode("dll/@state"); - XmlNode NameAtt = n.SelectSingleNode("dll/@name"); - - this.sDescP[i] = NameAtt.InnerXml; - this.sState[i] = StatusAtt.InnerXml; - i++; - } - } - - /// <summary> - /// Load details into the ListBox on the NewItems form. - /// </summary> - /// <param name="listBox">ListBox from the NewItems form</param> - internal void LoadNewItem(ListBox listBox) - { - foreach(string s in this.sDesc) - { - if(s!=null) - { - listBox.Items.Add(s.ToString()); - } - } - } - - internal void LoadPluginItems(CheckedListBox chklistBox) - { - for(int i=0;i<10;i++) - { - if(this.sDescP[i]!=null) - { - if(this.sState[i].ToLower()=="on") - { - chklistBox.Items.Add(this.sDescP[i],CheckState.Checked); - } - else if(this.sState[i].ToLower()=="off") - { - chklistBox.Items.Add(this.sDescP[i],CheckState.Unchecked); - } - else - { - chklistBox.Items.Add(this.sDescP[i],CheckState.Indeterminate); - } - } - } - } - - internal void SavePluginItems(CheckedListBox chklistBox) - { - int itemIndex = 0; - foreach(string item in chklistBox.Items) - { - this.sDesc = new string[10]; - string sNewState = null; - XmlNode nodeInner = null; - XmlNode nodeStatus = null; - - nodeInner = this.xmld.SelectSingleNode("/interface/type/dll[@name='" + item.ToString().Trim() + "']"); - nodeStatus = this.xmld.SelectSingleNode("/interface/type/dll[@name='" + item.ToString().Trim() + "']/@state"); - - if(chklistBox.GetItemCheckState(itemIndex).ToString().ToLower()=="checked") - { - sNewState = "On"; - } - else if (chklistBox.GetItemCheckState(itemIndex).ToString().ToLower()=="unchecked") - { - sNewState = "Off"; - } - - nodeStatus.Value = sNewState; - this.xmld.Save("IPTVMiniPluginDLLs.xml"); - itemIndex++; - } - } - - internal void InsertNewItem(string sFilePath,string sDesc,bool sState) - { - XmlNode root = null; - root = this.xmld.SelectSingleNode("/interface"); - - //Create new nodes - XmlElement eleType = this.xmld.CreateElement("type"); - XmlElement eleDLL = this.xmld.CreateElement("dll"); - eleDLL.InnerText = sFilePath; - - XmlAttribute attState = this.xmld.CreateAttribute("state"); - if(sState) - { attState.InnerText = "On";} - else if(!sState) - { attState.InnerText = "Off";} - eleDLL.SetAttributeNode(attState); - - XmlAttribute attName = this.xmld.CreateAttribute("name"); - attName.InnerText = sDesc; - eleDLL.SetAttributeNode(attName); - - root.AppendChild(eleType); - eleType.InsertBefore(eleDLL,eleType.FirstChild); - - this.xmld.Save("IPTVMiniPluginDLLs.xml"); - } - - internal void RemoveItem(string sSelected) - { - if(sSelected!="") - { - XmlNode node = null; - XmlNode childnode = null; - node = this.xmld.SelectSingleNode("/interface"); - childnode = node.SelectSingleNode("type[dll/@name='" + sSelected + "']"); - node.RemoveChild(childnode); - this.xmld.Save("IPTVMiniPluginDLLs.xml"); - } - } - - internal string[,] GetChannelArray() - { - XmlNodeList nodeList = this.xmld.SelectNodes("/interface/type"); - string[,] sAllChannelDetails; - sAllChannelDetails = new string[4000,6]; // [Rows,Columns] - int iLastArrayIndex = 0; // Default Start Index - - foreach(XmlNode n in nodeList) - { - XmlNode nodeState = n.SelectSingleNode("dll/@state"); - XmlNode nodeDLL = n.SelectSingleNode("dll"); - - //Load Assembs. - ReflectionControl dir = new ReflectionControl(); - bool ans = dir.LoadExternalModule(nodeDLL.InnerXml); - if(ans) - { - dir.GetCustomAttributes(out sTypeName); - object o = dir.GetInstanceOfType(sTypeName); - IMiniIPTVPlugin iplug = o as IMiniIPTVPlugin; - string[,] sChannelDetails = iplug.IPTVChannel(); - sChannelDetails.CopyTo(sAllChannelDetails, iLastArrayIndex); - iLastArrayIndex = sChannelDetails.Length; - } - else - { - MessageBox.Show("ERROR: DLL Failed to load for '" + nodeDLL.InnerXml + "'.\n\nCheck that the DLL specified in the \n'IPTVMiniPluginDLLs.xml' file is correct."); - } - } - return sAllChannelDetails; - } - - internal string GetAuthor(string sDLL) - { - string sAuthor = "unknown"; // Default Author - ReflectionControl dir = new ReflectionControl(); - bool ans = dir.LoadExternalModule(sDLL); - if(ans) - { - dir.GetCustomAttributes(out sTypeName); - object o = dir.GetInstanceOfType(sTypeName); - IMiniIPTVPlugin iplug = o as IMiniIPTVPlugin; - sAuthor = iplug.Author(); - } - else - { - MessageBox.Show("ERROR: DLL Failed to load for '" + sDLL + "'.\n\nCheck that the DLL specified in the \n'IPTVMiniPluginDLLs.xml' file is correct."); - } - return sAuthor; - } - - internal bool TestNewItem(string sFilePath,string sDesc,bool sState) - { - bool ans = false; - if(sFilePath!="" && sDesc!="") - { - //Load Assem. - ReflectionControl dir = new ReflectionControl(); - ans = dir.LoadExternalModule(sFilePath); - if(ans) - { - if(!dir.CheckValidType()) - { - ans = false; - MessageBox.Show("ERROR: This DLL is not a valid IPTV Mini Plugin"); - } - } - else - { - MessageBox.Show("ERROR: DLL Failed to load for '" + sDesc + "'.\n\nThis file may not be a valid DLL File."); - } - dir = null; - } - return ans; - } - - #endregion - - } -} Deleted: trunk/plugins/SnapperInterface.cs =================================================================== --- trunk/plugins/SnapperInterface.cs 2007-03-16 19:07:02 UTC (rev 190) +++ trunk/plugins/SnapperInterface.cs 2007-03-16 20:07:38 UTC (rev 191) @@ -1,59 +0,0 @@ -using System; -using System.Windows.Forms; - -namespace SnapperInterface -{ - #region IMiniIPTVPlugin Interface - /// <summary> - /// IMiniIPTVPlugin Interface - for plugging in IPTV providing data. - /// </summary> - public interface IMiniIPTVPlugin - { - /// <summary> - /// Should return a multi-dimensional array return in this order (string channelname, string channelDescription, string genre, string language, string country, string streamURL) - /// </summary> - /// <returns>A multi-dimensional array</returns> - string[,] IPTVChannel(); - string Author(); - } - - #endregion - - #region Plugin Attribute - - /// <summary> - /// MiniIPTVPluginAttribute will be used by classes which - /// support the IMiniIPTVPlugin interface...and thus which are - /// pluggable into the extendable application. - /// </summary> - [AttributeUsage(AttributeTargets.Class)] - public class MiniIPTVPluginAttribute : System.Attribute - { - private string typeName; - - /// <summary> - /// TypeName public property. - /// </summary> - public string TypeName - { - get { return typeName; } - set { typeName = value; } - } - - /// <summary> - /// Custom consturctor for PluginAttribute. - /// </summary> - /// <param name="typeName">TypeName is the full type name of the plugin i.e. formatted "Namespace.Class"</param> - public MiniIPTVPluginAttribute(string typeName) - { - this.typeName = typeName; - } - - /// <summary> - /// Default Constructor - /// </summary> - public MiniIPTVPluginAttribute() {} - } - - #endregion -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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 largest Open Source development site. |
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); } @@ -108,6 +106,10 @@ { // Ignore Bad Image Format Exceptions, just keep checking for IR Server Plugins } + catch (TypeLoadException) + { + // Ignore Type Load Exceptions, just keep checking for IR Server Plugins + } catch (Exception ex) { MessageBox.Show(ex.ToString(), "IR Server Plugin Error"); @@ -119,15 +121,13 @@ #if TRACE catch (Exception ex) { - Trace.WriteLine(ex.ToString()); - return null; - } + Trace.WriteLine("IRServer: " + ex.ToString()); #else catch { +#endif return null; } -#endif } /// <summary> @@ -135,22 +135,88 @@ /// </summary> /// <param name="pluginName">Name of plugin to instantiate.</param> /// <returns>Plugin instance.</returns> - internal static IRServerPlugin GetPlugin(string pluginName) + internal static IRServerPluginBase GetPlugin(string pluginName) { if (String.IsNullOrEmpty(pluginName)) throw new ArgumentNullException("pluginName"); - IRServerPlugin[] serverPlugins = AvailablePlugins(); + IRServerPluginBase[] serverPlugins = AvailablePlugins(); if (serverPlugins == null) throw new FileNotFoundException("No available plugins found"); - foreach (IRServerPlugin plugin in serverPlugins) + foreach (IRServerPluginBase plugin in serverPlugins) if (plugin.Name.Equals(pluginName, StringComparison.InvariantCultureIgnoreCase)) return plugin; return null; } + /// <summary> + /// Retreives a list of detected Receiver plugins. + /// </summary> + /// <returns>String array of plugin names.</returns> + internal static string[] DetectReceivers() + { + try + { + IRServerPluginBase[] plugins = AvailablePlugins(); + + List<string> receivers = new List<string>(); + + foreach (IRServerPluginBase plugin in plugins) + if ((plugin is IRemoteReceiver || plugin is IKeyboardReceiver || plugin is IMouseReceiver) && plugin.Detect()) + receivers.Add(plugin.Name); + + if (receivers.Count > 0) + return receivers.ToArray(); + } +#if TRACE + catch (Exception ex) + { + Trace.WriteLine("IRServer: " + ex.ToString()); + } +#else + catch + { + } +#endif + + return null; + } + + /// <summary> + /// Retreives a list of detected Blaster plugins. + /// </summary> + /// <returns>String array of plugin names.</returns> + internal static string[] DetectBlasters() + { + try + { + IRServerPluginBase[] plugins = Program.AvailablePlugins(); + + List<string> blasters = new List<string>(); + + foreach (IRServerPluginBase plugin in plugins) + if (plugin is ITransmitIR && plugin.Detect()) + blasters.Add(plugin.Name); + + if (blasters.Count > 0) + return blasters.ToArray(); + } +#if TRACE + catch (Exception ex) + { + Trace.WriteLine("IRServer: " + ex.ToString()); + } +#else + catch + { + } +#endif + + return null; + } + } } Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs 2007-10-01 13:08:52 UTC (rev 966) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs 2007-10-02 05:45:04 UTC (rev 967) @@ -580,7 +580,7 @@ private void buttonNewMacro_Click(object sender, EventArgs e) { - MacroEditor macroEditor = new MacroEditor(true, String.Empty); + MacroEditor macroEditor = new MacroEditor(); macroEditor.ShowDialog(this); SetupMacroList(); Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/EditProgramForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/EditProgramForm.cs 2007-10-01 13:08:52 UTC (rev 966) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/EditProgramForm.cs 2007-10-02 05:45:04 UTC (rev 967) @@ -150,7 +150,7 @@ } catch (Exception ex) { - IrssLog.Error("Test Application: {0}", ex.Message); + IrssLog.Error("Test Application: {0}", ex.ToString()); } } Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.cs 2007-10-01 13:08:52 UTC (rev 966) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.cs 2007-10-02 05:45:04 UTC (rev 967) @@ -20,22 +20,38 @@ #region Constructor - public MacroEditor(bool newMacro, string name) + /// <summary> + /// Creates a Macro Editor windows form. + /// </summary> + public MacroEditor() { InitializeComponent(); + + textBoxName.Text = "New"; + textBoxName.Enabled = true; + } - textBoxName.Text = name; - textBoxName.Enabled = newMacro; + /// <summary> + /// Creates a Macro Editor windows form. + /// </summary> + /// <param name="name">The name of an existing macro.</param> + public MacroEditor(string name) + : this() + { + if (String.IsNullOrEmpty(name)) + throw new ArgumentNullException("name"); - if (!newMacro) - { - string fileName = Program.FolderMacros + name + Common.FileExtensionMacro; - ReadFromFile(fileName); - } + textBoxName.Text = name; + textBoxName.Enabled = false; + + string fileName = Program.FolderMacros + name + Common.FileExtensionMacro; + ReadFromFile(fileName); } #endregion Constructor + #region Implementation + void RefreshCommandList() { comboBoxCommands.Items.Clear(); @@ -57,6 +73,10 @@ comboBoxCommands.Items.AddRange(irList); } + /// <summary> + /// Write the macro in the listBox to a macro name provided. + /// </summary> + /// <param name="fileName">Name of Macro to write (macro name, not file path).</param> void WriteToFile(string fileName) { try @@ -150,6 +170,11 @@ IrssLog.Error(ex.ToString()); } } + + /// <summary> + /// Read a macro into the listBox from the macro name provided. + /// </summary> + /// <param name="fileName">Name of Macro to read (macro name, not file path).</param> void ReadFromFile(string fileName) { try @@ -157,6 +182,8 @@ XmlDocument doc = new XmlDocument(); doc.Load(fileName); + listBoxMacro.Items.Clear(); + XmlNodeList commandSequence = doc.DocumentElement.SelectNodes("action"); string commandProperty; @@ -237,36 +264,26 @@ if (selected == Common.UITextRun) { ExternalProgram externalProgram = new ExternalProgram(false); - - if (externalProgram.ShowDialog(this) == DialogResult.Cancel) - return; - - listBoxMacro.Items.Add(Common.CmdPrefixRun + externalProgram.CommandString); + if (externalProgram.ShowDialog(this) == DialogResult.OK) + listBoxMacro.Items.Add(Common.CmdPrefixRun + externalProgram.CommandString); } else if (selected == Common.UITextPause) { - IrssUtils.Forms.PauseTime pauseTime = new IrssUtils.Forms.PauseTime(); - - if (pauseTime.ShowDialog(this) == DialogResult.Cancel) - return; - - listBoxMacro.Items.Add(Common.CmdPrefixPause + pauseTime.Time.ToString()); + PauseTime pauseTime = new PauseTime(); + if (pauseTime.ShowDialog(this) == DialogResult.OK) + listBoxMacro.Items.Add(Common.CmdPrefixPause + pauseTime.Time.ToString()); } else if (selected == Common.UITextSerial) { SerialCommand serialCommand = new SerialCommand(); - if (serialCommand.ShowDialog(this) == DialogResult.Cancel) - return; - - listBoxMacro.Items.Add(Common.CmdPrefixSerial + serialCommand.CommandString); + if (serialCommand.ShowDialog(this) == DialogResult.OK) + listBoxMacro.Items.Add(Common.CmdPrefixSerial + serialCommand.CommandString); } else if (selected == Common.UITextWindowMsg) { MessageCommand messageCommand = new MessageCommand(); - if (messageCommand.ShowDialog(this) == DialogResult.Cancel) - return; - - listBoxMacro.Items.Add(Common.CmdPrefixWindowMsg + messageCommand.CommandString); + if (messageCommand.ShowDialog(this) == DialogResult.OK) + listBoxMacro.Items.Add(Common.CmdPrefixWindowMsg + messageCommand.CommandString); } else if (selected == Common.UITextTcpMsg) { @@ -279,18 +296,14 @@ else if (selected == Common.UITextKeys) { KeysCommand keysCommand = new KeysCommand(); - if (keysCommand.ShowDialog(this) == DialogResult.Cancel) - return; - - listBoxMacro.Items.Add(Common.CmdPrefixKeys + keysCommand.CommandString); + if (keysCommand.ShowDialog(this) == DialogResult.OK) + listBoxMacro.Items.Add(Common.CmdPrefixKeys + keysCommand.CommandString); } else if (selected == Common.UITextEject) { EjectCommand ejectCommand = new EjectCommand(); - if (ejectCommand.ShowDialog(this) == DialogResult.Cancel) - return; - - listBoxMacro.Items.Add(Common.CmdPrefixEject + ejectCommand.CommandString); + if (ejectCommand.ShowDialog(this) == DialogResult.OK) + listBoxMacro.Items.Add(Common.CmdPrefixEject + ejectCommand.CommandString); } else if (selected == Common.UITextStandby) { @@ -308,7 +321,7 @@ { listBoxMacro.Items.Add(Common.CmdPrefixShutdown); } - else + else if (selected.StartsWith(Common.CmdPrefixBlast)) { BlastCommand blastCommand = new BlastCommand( new BlastIrDelegate(Program.BlastIR), @@ -316,11 +329,13 @@ Program.TransceiverInformation.Ports, selected.Substring(Common.CmdPrefixBlast.Length)); - if (blastCommand.ShowDialog(this) == DialogResult.Cancel) - return; - - listBoxMacro.Items.Add(Common.CmdPrefixBlast + blastCommand.CommandString); + if (blastCommand.ShowDialog(this) == DialogResult.OK) + listBoxMacro.Items.Add(Common.CmdPrefixBlast + blastCommand.CommandString); } + else + { + throw new ApplicationException(String.Format("Unknown command in macro command list \"{0}\"", selected)); + } } private void buttonMoveUp_Click(object sender, EventArgs e) @@ -409,8 +424,7 @@ if (selected.StartsWith(Common.CmdPrefixPause)) { - IrssUtils.Forms.PauseTime pauseTime = new IrssUtils.Forms.PauseTime(int.Parse(selected.Substring(Common.CmdPrefixPause.Length))); - + PauseTime pauseTime = new PauseTime(int.Parse(selected.Substring(Common.CmdPrefixPause.Length))); if (pauseTime.ShowDialog(this) == DialogResult.Cancel) return; @@ -422,6 +436,7 @@ else if (selected.StartsWith(Common.CmdPrefixRun)) { string[] commands = Common.SplitRunCommand(selected.Substring(Common.CmdPrefixRun.Length)); + ExternalProgram executeProgram = new ExternalProgram(commands, false); if (executeProgram.ShowDialog(this) == DialogResult.Cancel) return; @@ -434,6 +449,7 @@ else if (selected.StartsWith(Common.CmdPrefixSerial)) { string[] commands = Common.SplitSerialCommand(selected.Substring(Common.CmdPrefixSerial.Length)); + SerialCommand serialCommand = new SerialCommand(commands); if (serialCommand.ShowDialog(this) == DialogResult.Cancel) return; @@ -446,6 +462,7 @@ else if (selected.StartsWith(Common.CmdPrefixWindowMsg)) { string[] commands = Common.SplitWindowMessageCommand(selected.Substring(Common.CmdPrefixWindowMsg.Length)); + MessageCommand messageCommand = new MessageCommand(commands); if (messageCommand.ShowDialog(this) == DialogResult.Cancel) return; @@ -509,6 +526,8 @@ } } + #endregion Implementation + } } Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs 2007-10-01 13:08:52 UTC (rev 966) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs 2007-10-02 05:45:04 UTC (rev 967) @@ -270,7 +270,7 @@ } else { - MessageBox.Show(this, "File not found: " + command + Common.FileExtensionIR, "File missing", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); + MessageBox.Show(this, "File not found: " + fileName, "IR file missing", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); RefreshIRList(); } } @@ -284,12 +284,12 @@ if (File.Exists(fileName)) { - MacroEditor macroEditor = new MacroEditor(false, command); + MacroEditor macroEditor = new MacroEditor(command); macroEditor.ShowDialog(this); } else { - MessageBox.Show(this, "File not found: " + command + Common.FileExtensionMacro, "File missing", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); + MessageBox.Show(this, "File not found: " + fileName, "Macro file missing", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); RefreshMacroList(); } } @@ -668,13 +668,13 @@ } else { - MessageBox.Show(this, "File not found: " + fileName, "File missing", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); + MessageBox.Show(this, "File not found: " + fileName, "IR file missing", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } } private void buttonNewMacro_Click(object sender, EventArgs e) { - MacroEditor macroEditor = new MacroEditor(true, String.Empty); + MacroEditor macroEditor = new MacroEditor(); macroEditor.ShowDialog(this); RefreshMacroList(); @@ -700,7 +700,7 @@ } else { - MessageBox.Show(this, "File not found: " + fileName, "File missing", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); + MessageBox.Show(this, "File not found: " + fileName, "Macro file missing", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } } private void buttonTestMacro_Click(object sender, EventArgs e) Modified: trunk/plugins/IR Server Suite/Applications/Translator/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2007-10-01 13:08:52 UTC (rev 966) +++ trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2007-10-02 05:45:04 UTC (rev 967) @@ -847,7 +847,7 @@ catch (Exception ex) { _learnIRFilename = null; - IrssLog.Error(ex.Message); + IrssLog.Error(ex.ToString()); } } @@ -1160,7 +1160,7 @@ catch (Exception ex) { _learnIRFilename = null; - IrssLog.Error(ex.Message); + IrssLog.Error(ex.ToString()); return false; } Modified: trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray.cs 2007-10-01 13:08:52 UTC (rev 966) +++ trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray.cs 2007-10-02 05:45:04 UTC (rev 967) @@ -44,6 +44,8 @@ NotifyIcon _notifyIcon; + bool _inConfiguration = false; + #endregion Variables #region Properties @@ -109,12 +111,12 @@ } bool clientStarted = false; - - IPAddress serverIP = Client.GetIPFromName(_serverHost); - IPEndPoint endPoint = new IPEndPoint(serverIP, IrssComms.Server.DefaultPort); try { + IPAddress serverIP = Client.GetIPFromName(_serverHost); + IPEndPoint endPoint = new IPEndPoint(serverIP, IrssComms.Server.DefaultPort); + clientStarted = StartClient(endPoint); } catch (Exception ex) @@ -336,7 +338,6 @@ break; } - // If another module of the program has registered to receive messages too ... if (_handleMessage != null) _handleMessage(received); } @@ -384,17 +385,27 @@ { IrssLog.Info("Setup"); + _inConfiguration = true; + if (Configure()) { Stop(); Thread.Sleep(500); Start(); } + + _inConfiguration = false; } void ClickLaunch(object sender, EventArgs e) { IrssLog.Info("Launch"); + if (_inConfiguration) + { + IrssLog.Info("In Configuration"); + return; + } + try { // Check for multiple instances @@ -411,18 +422,23 @@ return; } } - catch { } + catch (Exception ex) + { + IrssLog.Error(ex.ToString()); + } } // Launch program Process launch = new Process(); launch.StartInfo.FileName = _programFile; launch.StartInfo.UseShellExecute = false; + launch.StartInfo.WindowStyle = ProcessWindowStyle.Normal; + launch.StartInfo.UseShellExecute = true; launch.Start(); } catch (Exception ex) { - IrssLog.Error(ex.Message); + IrssLog.Error(ex.ToString()); MessageBox.Show(ex.Message, "Tray Launcher", MessageBoxButtons.OK, MessageBoxIcon.Error); } } @@ -430,6 +446,12 @@ { IrssLog.Info("Quit"); + if (_inConfiguration) + { + IrssLog.Info("In Configuration"); + return; + } + Stop(); Application.Exit(); Modified: trunk/plugins/IR Server Suite/Common/IrssComms/ClientManager.cs =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssComms/ClientManager.cs 2007-10-01 13:08:52 UTC (rev 966) +++ trunk/plugins/IR Server Suite/Common/IrssComms/ClientManager.cs 2007-10-02 05:45:04 UTC (rev 967) @@ -24,8 +24,23 @@ Socket _connection; + WaitCallback _disconnectCallback; + #endregion Variables + #region Properties + + /// <summary> + /// Gets or Sets the Disconnect callback. + /// </summary> + public WaitCallback DisconnectCallback + { + get { return _disconnectCallback; } + set { _disconnectCallback = value; } + } + + #endregion Properties + #region Constructor internal ClientManager(Socket connection, ServerMessageSink sink) @@ -80,9 +95,14 @@ _processReceiveThread = false; - _connection.Close(); - _connection = null; + if (_connection != null) + { + _connection.Close(100); + _connection = null; + } + _messageSink = null; + //_receiveThread.Abort(); //_receiveThread.Join(); _receiveThread = null; @@ -114,7 +134,7 @@ { bytesRead = _connection.Receive(buffer, buffer.Length, SocketFlags.None); if (bytesRead != buffer.Length) - break; // TODO: Inform server to remove clientmanager from list? (Low) + break; int readSize = BitConverter.ToInt32(buffer, 0); readSize = IPAddress.NetworkToHostOrder(readSize); @@ -127,7 +147,9 @@ IrssMessage message = IrssMessage.FromBytes(packet); MessageManagerCombo combo = new MessageManagerCombo(message, this); - _messageSink(combo); + + if (_messageSink != null) + _messageSink(combo); } } #if TRACE @@ -140,6 +162,16 @@ { } #endif + finally + { + if (_connection != null) + { + _connection.Close(100); + _connection = null; + } + + _disconnectCallback(this); + } } #endregion Implementation Modified: trunk/plugins/IR Server Suite/Common/IrssComms/GenericPCQueue.cs =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssComms/GenericPCQueue.cs 2007-10-01 13:08:52 UTC (rev 966) +++ trunk/plugins/IR Server Suite/Common/IrssComms/GenericPCQueue.cs 2007-10-02 05:45:04 UTC (rev 967) @@ -104,8 +104,8 @@ // Create the worker thread ... _workerThread = new Thread(new ThreadStart(WorkerThread)); + _workerThread.Name = "IrssComms.GenericPCQueue"; _workerThread.IsBackground = true; - _workerThread.Name = "IrssComms.GenericPCQueue"; _workerThread.Start(); } Modified: trunk/plugins/IR Server Suite/Common/IrssComms/IrssMessage.cs =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssComms/IrssMessage.cs 2007-10-01 13:08:52 UTC (rev 966) +++ trunk/plugins/IR Server Suite/Common/IrssComms/IrssMessage.cs 2007-10-02 05:45:04 UTC (rev 967) @@ -33,6 +33,13 @@ ForwardRemoteEvent, ForwardKeyboardEvent, ForwardMouseEvent, + + AvailableReceivers, + AvailableBlasters, + ActiveReceivers, + ActiveBlasters, + DetectedReceivers, + DetectedBlasters, } [Flags] Modified: trunk/plugins/IR Server Suite/Common/IrssComms/Server.cs =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssComms/Server.cs 2007-10-01 13:08:52 UTC (rev 966) +++ trunk/plugins/IR Server Suite/Common/IrssComms/Server.cs 2007-10-02 05:45:04 UTC (rev 967) @@ -53,8 +53,23 @@ GenericPCQueue<MessageManagerCombo> _messageQueue; + WaitCallback _clientDisconnectCallback; + #endregion Variables + #region Properties + + /// <summary> + /// Gets or Sets the Client Disconnect callback. + /// </summary> + public WaitCallback ClientDisconnectCallback + { + get { return _clientDisconnectCallback; } + set { _clientDisconnectCallback = value; } + } + + #endregion Properties + #region Constructor /// <summary> @@ -148,8 +163,8 @@ catch { _processConnectionThread = false; - _serverSocket = null; - _clientManagers = null; + _serverSocket = null; + _clientManagers = null; _connectionThread = null; throw; @@ -205,7 +220,7 @@ } catch (SocketException) { - _clientManagers.Remove(sendTo); + ClientDisconnect(sendTo); return false; } } @@ -220,6 +235,25 @@ _messageSink(combo); } + void ClientDisconnect(object obj) + { + ClientManager clientManager = obj as ClientManager; + + if (clientManager != null) + { + lock (_clientManagers) + { + if (_clientManagers.Contains(clientManager)) + _clientManagers.Remove(clientManager); + } + + if (_clientDisconnectCallback != null) + _clientDisconnectCallback(clientManager); + + clientManager.Dispose(); + } + } + void ConnectionThread() { try @@ -231,6 +265,7 @@ Socket socket = _serverSocket.Accept(); ClientManager manager = new ClientManager(socket, clientManagerMessageSink); + manager.DisconnectCallback = new WaitCallback(ClientDisconnect); lock (_clientManagers) _clientManagers.Add(manager); Modified: trunk/plugins/IR Server Suite/Common/IrssUtils/IrssLog.cs =================================================================== --- trunk/plugins/IR Server Suite/Common/IrssUtils/IrssLog.cs 2007-10-01 13:08:52 UTC (rev 966) +++ trunk/plugins/IR Server Suite/Common/IrssUtils/IrssLog.cs 2007-10-02 05:45:04 UTC (rev 967) @@ -195,6 +195,9 @@ { string message = DateTime.Now.ToString() + " - Error:\t" + String.Format(format, args); _streamWriter.WriteLine(message); +#if TRACE + Trace.WriteLine(message); +#endif } } @@ -209,6 +212,9 @@ { string message = DateTime.Now.ToString() + " - Warn: \t" + String.Format(format, args); _streamWriter.WriteLine(message); +#if TRACE + Trace.WriteLine(message); +#endif } } @@ -223,6 +229,9 @@ { string message = DateTime.Now.ToString() + " - Info: \t" + String.Format(format, args); _streamWriter.WriteLine(message); +#if TRACE + Trace.WriteLine(message); +#endif } } @@ -237,6 +246,9 @@ { string message = DateTime.Now.ToString() + " - Debug:\t" + String.Format(format, args); _streamWriter.WriteLine(message); +#if TRACE + Trace.WriteLine(message); +#endif } } Modified: trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/FusionRemoteReceiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/FusionRemoteReceiver.cs 2007-10-01 13:08:52 UTC (rev 966) +++ trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/FusionRemoteReceiver.cs 2007-10-02 05:45:04 UTC (rev 967) @@ -17,7 +17,7 @@ namespace FusionRemoteReceiver { - public class FusionRemoteReceiver : IRServerPlugin, IRemoteReceiver + public class FusionRemoteReceiver : IRServerPluginBase, IRemoteReceiver { #region Constants @@ -202,6 +202,16 @@ public override string Author { get { return "and-81"; } } public override string Description { get { return "DViCO FusionREMOTE Receiver"; } } + public override bool Detect() + { + Guid hidGuid = new Guid(); + HidD_GetHidGuid(ref hidGuid); + + string devicePath = FindDevice(hidGuid, DeviceID); + + return (devicePath != null); + } + public override bool Start() { try @@ -217,15 +227,13 @@ #if TRACE catch (Exception ex) { - Trace.WriteLine(ex.ToString()); - return false; - } + Trace.WriteLine("FusionRemoteReceiver: " + ex.ToString()); #else catch { +#endif return false; } -#endif } public override void Suspend() { Added: 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/IConfigure.cs (rev 0) +++ trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/IConfigure.cs 2007-10-02 05:45:04 UTC (rev 967) @@ -0,0 +1,19 @@ +using System; + +namespace IRServerPluginInterface +{ + + /// <summary> + /// Plugins that implement this interface are configurable. + /// </summary> + public interface IConfigure + { + + /// <summary> + /// Configure the IR Server plugin. + /// </summary> + void Configure(); + + } + +} Added: 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/IKeyboardReceiver.cs (rev 0) +++ trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/IKeyboardReceiver.cs 2007-10-02 05:45:04 UTC (rev 967) @@ -0,0 +1,30 @@ +using System; + +namespace IRServerPluginInterface +{ + + #region Delegates + + /// <summary> + /// IR Server callback for keyboard key press handling. + /// </summary> + /// <param name="vKey">Virtual key code.</param> + /// <param name="keyUp">.</param> + public delegate void KeyboardHandler(int vKey, bool keyUp); + + #endregion Delegates + + /// <summary> + /// Plugins that implement this interface can receive keyboard button presses. + /// </summary> + public interface IKeyboardReceiver + { + + /// <summary> + /// Callback for keyboard presses. + /// </summary> + KeyboardHandler KeyboardCallback { get; set; } + + } + +} Added: 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/ILearnIR.cs (rev 0) +++ trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/ILearnIR.cs 2007-10-02 05:45:04 UTC (rev 967) @@ -0,0 +1,44 @@ +using System; + +namespace IRServerPluginInterface +{ + + #region Enumerations + + /// <summary> + /// Provides information about the status of learning an infrared command. + /// </summary> + public enum LearnStatus + { + /// <summary> + /// Failed to learn infrared command. + /// </summary> + Failure, + /// <summary> + /// Succeeded in learning infrared command. + /// </summary> + Success, + /// <summary> + /// Infrared command learning timed out. + /// </summary> + Timeout, + } + + #endregion Enumerations + + /// <summary> + /// Plugins that implement this interface can learn IR commands. + /// </summary> + public interface ILearnIR + { + + /// <summary> + /// Learn an infrared command. + /// </summary> + /// <param name="data">New infrared command.</param> + /// <returns>Tells the calling code if the learn was Successful, Failed or Timed Out.</returns> + LearnStatus Learn(out byte[] data); + + } + +} Added: 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/IMouseReceiver.cs (rev 0) +++ trunk/plugins/IR Server Suite/IR Server 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/IR Server Suite/Applications/Web Remote/Properties/AssemblyInfo.cs 2007-12-02 09:17:53 UTC (rev 1115) @@ -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("Web Remote")] +[assembly: AssemblyDescription("Web interface for Virtual Remote")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Web Remote")] +[assembly: AssemblyCopyright("Aaron Dinnage")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("c21b2341-e3ef-4bba-b9f9-da4985047419")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.3.5")] +[assembly: AssemblyFileVersion("1.0.3.5")] Added: trunk/plugins/IR Server Suite/Applications/Web Remote/RemoteButton.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Web Remote/RemoteButton.cs (rev 0) +++ trunk/plugins/IR Server Suite/Applications/Web Remote/RemoteButton.cs 2007-12-02 09:17:53 UTC (rev 1115) @@ -0,0 +1,64 @@ +using System; +using System.Windows.Forms; + +namespace WebRemote +{ + + struct RemoteButton + { + + #region Variables + + string _name; + string _code; + Keys _shortcut; + int _top; + int _left; + int _width; + int _height; + + #endregion Variables + + #region Properties + + public string Name + { + get { return _name; } + set { _name = value; } + } + public string Code + { + get { return _code; } + set { _code = value; } + } + public Keys Shortcut + { + get { return _shortcut; } + set { _shortcut = value; } + } + public int Top + { + get { return _top; } + set { _top = value; } + } + public int Left + { + get { return _left; } + set { _left = value; } + } + public int Width + { + get { return _width; } + set { _width = value; } + } + public int Height + { + get { return _height; } + set { _height = value; } + } + + #endregion Properties + + } + +} Added: trunk/plugins/IR Server Suite/Applications/Web Remote/Setup.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Web Remote/Setup.Designer.cs (rev 0) +++ trunk/plugins/IR Server Suite/Applications/Web Remote/Setup.Designer.cs 2007-12-02 09:17:53 UTC (rev 1115) @@ -0,0 +1,188 @@ +namespace WebRemote +{ + partial class Setup + { + /// <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() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Setup)); + this.buttonOK = new System.Windows.Forms.Button(); + this.buttonCancel = new System.Windows.Forms.Button(); + this.groupBoxServerHost = new System.Windows.Forms.GroupBox(); + this.comboBoxComputer = new System.Windows.Forms.ComboBox(); + this.groupBoxWebServer = new System.Windows.Forms.GroupBox(); + this.numericUpDownWebPort = new System.Windows.Forms.NumericUpDown(); + this.labelPort = new System.Windows.Forms.Label(); + this.labelSkin = new System.Windows.Forms.Label(); + this.comboBoxSkin = new System.Windows.Forms.ComboBox(); + this.groupBoxServerHost.SuspendLayout(); + this.groupBoxWebServer.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownWebPort)).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(152, 168); + this.buttonOK.Name = "buttonOK"; + this.buttonOK.Size = new System.Drawing.Size(56, 24); + this.buttonOK.TabIndex = 2; + this.buttonOK.Text = "OK"; + this.buttonOK.UseVisualStyleBackColor = true; + this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); + // + // 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(216, 168); + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.Size = new System.Drawing.Size(56, 24); + this.buttonCancel.TabIndex = 3; + this.buttonCancel.Text = "Cancel"; + this.buttonCancel.UseVisualStyleBackColor = true; + this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); + // + // groupBoxServerHost + // + this.groupBoxServerHost.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBoxServerHost.Controls.Add(this.comboBoxComputer); + this.groupBoxServerHost.Location = new System.Drawing.Point(8, 8); + this.groupBoxServerHost.Name = "groupBoxServerHost"; + this.groupBoxServerHost.Size = new System.Drawing.Size(264, 56); + this.groupBoxServerHost.TabIndex = 0; + this.groupBoxServerHost.TabStop = false; + this.groupBoxServerHost.Text = "IR Server host"; + // + // comboBoxComputer + // + this.comboBoxComputer.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.comboBoxComputer.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest; + this.comboBoxComputer.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + this.comboBoxComputer.FormattingEnabled = true; + this.comboBoxComputer.Location = new System.Drawing.Point(8, 24); + this.comboBoxComputer.Name = "comboBoxComputer"; + this.comboBoxComputer.Size = new System.Drawing.Size(248, 21); + this.comboBoxComputer.TabIndex = 0; + // + // groupBoxWebServer + // + this.groupBoxWebServer.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBoxWebServer.Controls.Add(this.numericUpDownWebPort); + this.groupBoxWebServer.Controls.Add(this.labelPort); + this.groupBoxWebServer.Controls.Add(this.labelSkin); + this.groupBoxWebServer.Controls.Add(this.comboBoxSkin); + this.groupBoxWebServer.Location = new System.Drawing.Point(8, 72); + this.groupBoxWebServer.Name = "groupBoxWebServer"; + this.groupBoxWebServer.Size = new System.Drawing.Size(264, 88); + this.groupBoxWebServer.TabIndex = 1; + this.groupBoxWebServer.TabStop = false; + this.groupBoxWebServer.Text = "Web Server"; + // + // numericUpDownWebPort + // + this.numericUpDownWebPort.Location = new System.Drawing.Point(88, 24); + this.numericUpDownWebPort.Maximum = new decimal(new int[] { + 65535, + 0, + 0, + 0}); + this.numericUpDownWebPort.Name = "numericUpDownWebPort"; + this.numericUpDownWebPort.Size = new System.Drawing.Size(72, 20); + this.numericUpDownWebPort.TabIndex = 1; + this.numericUpDownWebPort.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // labelPort + // + this.labelPort.Location = new System.Drawing.Point(8, 24); + this.labelPort.Name = "labelPort"; + this.labelPort.Size = new System.Drawing.Size(80, 20); + this.labelPort.TabIndex = 0; + this.labelPort.Text = "Server Port:"; + this.labelPort.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labelSkin + // + this.labelSkin.Location = new System.Drawing.Point(8, 53); + this.labelSkin.Name = "labelSkin"; + this.labelSkin.Size = new System.Drawing.Size(80, 24); + this.labelSkin.TabIndex = 2; + this.labelSkin.Text = "Skin:"; + this.labelSkin.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // comboBoxSkin + // + this.comboBoxSkin.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.comboBoxSkin.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest; + this.comboBoxSkin.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + this.comboBoxSkin.FormattingEnabled = true; + this.comboBoxSkin.Location = new System.Drawing.Point(88, 56); + this.comboBoxSkin.Name = "comboBoxSkin"; + this.comboBoxSkin.Size = new System.Drawing.Size(168, 21); + this.comboBoxSkin.TabIndex = 3; + // + // Setup + // + 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(280, 207); + this.Controls.Add(this.groupBoxWebServer); + this.Controls.Add(this.groupBoxServerHost); + this.Controls.Add(this.buttonCancel); + this.Controls.Add(this.buttonOK); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.MinimumSize = new System.Drawing.Size(288, 234); + this.Name = "Setup"; + this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; + this.Text = "Web Remote Setup"; + this.groupBoxServerHost.ResumeLayout(false); + this.groupBoxWebServer.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownWebPort)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button buttonOK; + private System.Windows.Forms.Button buttonCancel; + private System.Windows.Forms.GroupBox groupBoxServerHost; + private System.Windows.Forms.ComboBox comboBoxComputer; + private System.Windows.Forms.GroupBox groupBoxWebServer; + private System.Windows.Forms.NumericUpDown numericUpDownWebPort; + private System.Windows.Forms.Label labelPort; + private System.Windows.Forms.Label labelSkin; + private System.Windows.Forms.ComboBox comboBoxSkin; + } +} \ No newline at end of file Added: trunk/plugins/IR Server Suite/Applications/Web Remote/Setup.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Web Remote/Setup.cs (rev 0) +++ trunk/plugins/IR Server Suite/Applications/Web Remote/Setup.cs 2007-12-02 09:17:53 UTC (rev 1115) @@ -0,0 +1,114 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Text; +using System.Windows.Forms; + +using IrssUtils; + +namespace WebRemote +{ + + /// <summary> + /// Setup Form. + /// </summary> + public partial class Setup : Form + { + + #region Properties + + /// <summary> + /// Gets or sets the server host. + /// </summary> + /// <value>The server host.</value> + public string ServerHost + { + get { return comboBoxComputer.Text; } + set { comboBoxComputer.Text = value; } + } + + /// <summary> + /// Gets or sets the remote skin. + /// </summary> + /// <value>The remote skin.</value> + public string RemoteSkin + { + get { return comboBoxSkin.Text; } + set { comboBoxSkin.Text = value; } + } + + /// <summary> + /// Gets or sets the web server port. + /// </summary> + /// <value>The web server port.</value> + public int WebPort + { + get { return Decimal.ToInt32(numericUpDownWebPort.Value); } + set { numericUpDownWebPort.Value = new Decimal(value); } + } + + #endregion Properties + + #region Constructor + + public Setup() + { + InitializeComponent(); + + UpdateComputerList(); + + UpdateSkinList(); + } + + #endregion Constructor + + #region Implementation + + void UpdateComputerList() + { + comboBoxComputer.Items.Clear(); + comboBoxComputer.Items.Add("localhost"); + + List<string> networkPCs = Network.GetComputers(false); + if (networkPCs != null) + comboBoxComputer.Items.AddRange(networkPCs.ToArray()); + } + + void UpdateSkinList() + { + try + { + string[] skins = Directory.GetFiles(Program.InstallFolder + "\\Skins\\", "*.png", SearchOption.TopDirectoryOnly); + for (int index = 0; index < skins.Length; index++) + skins[index] = Path.GetFileNameWithoutExtension(skins[index]); + + comboBoxSkin.Items.Clear(); + comboBoxSkin.Items.AddRange(skins); + + comboBoxSkin.SelectedItem = Program.RemoteSkin; + } + catch (Exception ex) + { + IrssLog.Error(ex.Message); + } + } + + #endregion Implementation + + private void buttonOK_Click(object sender, EventArgs e) + { + this.DialogResult = DialogResult.OK; + this.Close(); + } + private void buttonCancel_Click(object sender, EventArgs e) + { + this.DialogResult = DialogResult.Cancel; + this.Close(); + } + + } + +} Added: trunk/plugins/IR Server Suite/Applications/Web Remote/Setup.resx =================================================================== --- trunk/plugins/IR Server Suite/Applications/Web Remote/Setup.resx (rev 0) +++ trunk/plugins/IR Server Suite/Applications/Web Remote/Setup.resx 2007-12-02 09:17:53 UTC (rev 1115) @@ -0,0 +1,186 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> + <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAABAAIAICAAAAEACACoCAAAJgAAABAQAAABAAgAaAUAAM4IAAAoAAAAIAAAAEAAAAABAAgAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAP+BhQD/f4MA/4OHAP+DhgD/e38A/36CAP+BhAD/fYEA/3p+AP+A + hAD/goYA/3l9AP9vcwD/ZGgA/2VpAP9ucgD/foEA/3yAAP9zdwD/aGwA/2JnAP+FiAD/dXkA/2xwAP9w + dQD/mJsA/7W3AP/IygD/0dMA/9/gAP/h4gD/4+QA/+DhAP/W1wD/yssA/8TGAP+mqQD/am4A/3F1AP90 + eAD/oKMA/7q8AP/T1AD/8vIA/7/BAP+ipQD/h4sA/3h8AP+hpAD/29wA//39AP/l5gD/09UA/8XHAP+3 + uQD/s7UA/7GzAP+2uAD/x8kA/8zNAP/V1gD/9/cA/9zdAP+MkAD/cnYA/3d7AP+IjAD/zc4A//7+AP/l + 5QD/1NUA/66wAP9pbQD/cHQA/3J3AP+ZnAD/6usA/+bnAP+fogD/2NkA/6yvAP9nawD/m54A//HyAP+C + hQD/lZgA/8jJAP/BwwD/iY0A/4aKAP+oqwD/7e4A/+vrAP+gogD/io4A/3Z6AP9tcQD/ZmoA/5SYAP+S + lQD/qq0A/7m7AP/CxAD/uLoA/6WoAP+RlAD/hIgA/4uPAP+tsAD/zs8A//DwAP/X2AD/en0A/4aJAP/0 + 9AD/6+wA/+LjAP/e3wD/5+gA/8DCAP98fwD/+fkA/93eAP+8vgD/nJ8A//HxAP+LjgD/tLYA/3R5AP/2 + 9wD/kJMA/42RAP97fgD/naAA/4WJAP+AgwD/j5IA/9DSAP+qrAD/kpYA/32AAP+jpQD/xMUA//r6AP/u + 7wD/2doA//X2AP+RlQD/io0A/2ZrAP95fAD9c3kA+3yDAPNtewDtboEA8XSEAPl2fwD9eH4A+X2GAOZy + jADHaJ0AtG2yAL5uqgDZapAA73KEAPt9hQD5eoMA4nCNALBxugB3ZN0AWFTpAGRb5gCRZskAyGKWAP1/ + hQDtcoYAumqpAGxm6QAuLugAGBjmAB8f5gBKSOoAmmK+AOBnhgD7fIQA+3uDAN5vjwCUZsYAOzvpAA4O + 5QAEBOMACAjkACkp6AB/bd8A1V+IAPl0fQD5eIEA2W2SAIZfzAAvL+gACQnkAAIC4wAGBuQAJibnAHxr + 4ADVWIAA4G2MAJtivQBKSusAHBzmAA0N5AASEuUAkmrNAN5cfgD9gYcA73WHAMhmmgCPY8gAW0/hAD08 + 6QBDQegAdFbTALxgngDtcIQA/X6EAPt+hQDvdogA116FALVhpQCaZcEAnVu0AL5WkwDmaoMA+YCJAP2A + hgD3doEA7Wd7AORceADkYn4A73SGAPl/iAD9gocAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAA////AAoKCgEKCgoKAgoKCgEKAgoKCgoCCgoKAgoKCgoBCgoKCggKDEoC + CgoKCgIKAgoKCgoCCgIKAgoKCgoCSgwKCAoKChJrJQgKCgoKCgIKCgoKCgoKCgIKCgoKCgglaxIKCgEK + YDkslQgKCgIKCgoKCgoKCgoKCgoCCgoIlSw5YAoBARISH3NZBgoKCgoCAQECAgoBCgoCCgoKCgZZcx8S + EgEBElYsj0ICBgIKCgoKAgoKAgIKAgoKCgIGAkKPLFYSAQEMOZGOCAUSCQIKAgIKCgIKCgoCAgoCCRIF + CI6ROQwBAgmKRgEIYDg6BgYCCgIKCgIKCgECBgY6OGAIAUaKCQIClx6KMBIDHh9aCgEKAQEKCgoKCgEK + Wh8eAxIwih6XAgZDb4AwYBo+RAoIQgYKCgoKCgoCQggKRD4aYDCAb0MGDI6QTAwJOT59FwFAcQIB4qav + AnFAARd9PjkJDEyQjgwTOE0vBgg7dBZgTFCECOOoz6CcQFBMYBZ0OwgGL004EzA3NAgGEpIeCBc5LG2c + rujn36RRLDkXCB6SEgYINDcwDGcgBgaIdzYGQiORVs/n3tve6GORI0IGNneIBgYgZwwJIzIGCi9NOHlg + cB+drt7ItbPnuB5wYHk4TS8KBjIjCQhEUAgKWXRlhQUfPZrf27TJtd7kNR8FhWV0WQoIUEQIAjyShQYv + dGUMESBHmt+2tMC13s4dIBEMZXQvBoWSPAIRPJIFBpVdOQkwP3uYrt61vszn5DI/MAk5XZUGBZI8EQkj + MgYKQ003EgwrNK+7x92z2+egNCsMEjdNQwoGMiMJDC11DAIBd1cCMBwsTLDl3t7nrhosHDACV3cBAgx1 + LQxCOk0RAgoyewJgbVwln8bf5a6gJVxtYAJ7MgoCEU06QkKLLIQFBS1cQ2CVUS8C46Co4+JrUZVgQ1wt + BQWELItCCRo+JTBCWzNIBQgSQgoB4aYCCgkSCAVIM1tCMCU+GgkGL00tQgmDLDwBAgYBCgEKCgEBBwYC + ATwsgwlCLU0vBgYFP4oRCANQj1UKCgqICgoKCgoCCgpVj1ADCBGKPwUGATBuRhYFMH1AAgoKCgoKAgIK + CgoKCgJAfTAFFkZuMAEBCUhvJQkIeQgCCgoKAgoKAgoKCgoKAgh5CAklb0gJAQEGLyxQCwESAgEKCgoK + CgIKCgoGCgoBAhIBC1AsLwYBCgcXbjJrBgoKCgoKCgoCCgIKCggKCgoKCgZrMm4XBwoBAQmUMQYKCgqI + CgIKCgoCCgoCAQIKiAoKCgYxlAkBAQIKAgwSAgoKCgEBCgIKAgoKAgoKCgEBCgoKAhIMAgoCCgoKAQoK + CgEKCgoKCgoCCgoKCgoKCgoKAQoKCgEKCgoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAQAAAAIAAAAAEACAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAD/eX0AFhblAB0d5gA9NeIARTvgAHxVywBmS9QAr1mjAKVarACyXaQA3GiKANNq + lADabZEA0nGcAO92iADyeYcA/36CAPt+hQD+f4QA8X6NAIpYwQD/gIMA/oCEAP+FiQD/iIsA/oqNAOWA + mgD3hpAA84iWAP+QkwD/k5YA/5SXAP+anQD/nqEA/6OmAP+lpwD/p6oA/6qtAP+trwD/rrAA/7CzAP+0 + tgD/ubsA/7y+AP/BwwD/xccA/8nLAP/MzQD/0dMA/9XWAP/X2AD/2doA/9rcAP/c3QAAz48AAPCmABH/ + tAAx/74AUf/IAHH/0wCR/9wAsf/lANH/8AD///8AAAAAAAAvDgAAUBgAAHAiAACQLAAAsDYAAM9AAADw + SgAR/1sAMf9xAFH/hwBx/50Akf+yALH/yQDR/98A////AAAAAAACLwAABFAAAAZwAAAIkAAACrAAAAvP + AAAO8AAAIP8SAD3/MQBb/1EAef9xAJj/kQC1/7EA1P/RAP///wAAAAAAFC8AACJQAAAwcAAAPZAAAEyw + AABZzwAAZ/AAAHj/EQCK/zEAnP9RAK7/cQDA/5EA0v+xAOT/0QD///8AAAAAACYvAABAUAAAWnAAAHSQ + AACOsAAAqc8AAMLwAADR/xEA2P8xAN7/UQDj/3EA6f+RAO//sQD2/9EA////AAAAAAAvJgAAUEEAAHBb + AACQdAAAsI4AAM+pAADwwwAA/9IRAP/YMQD/3VEA/+RxAP/qkQD/8LEA//bRAP///wAAAAAALxQAAFAi + AABwMAAAkD4AALBNAADPWwAA8GkAAP95EQD/ijEA/51RAP+vcQD/wZEA/9KxAP/l0QD///8AAAAAAC8D + AABQBAAAcAYAAJAJAACwCgAAzwwAAPAOAAD/IBIA/z4xAP9cUQD/enEA/5eRAP+2sQD/1NEA////AAAA + AAAvAA4AUAAXAHAAIQCQACsAsAA2AM8AQADwAEkA/xFaAP8xcAD/UYYA/3GcAP+RsgD/scgA/9HfAP// + /wAAAAAALwAgAFAANgBwAEwAkABiALAAeADPAI4A8ACkAP8RswD/Mb4A/1HHAP9x0QD/kdwA/7HlAP/R + 8AD///8AAAAAACwALwBLAFAAaQBwAIcAkAClALAAxADPAOEA8ADwEf8A8jH/APRR/wD2cf8A95H/APmx + /wD70f8A////AAAAAAAbAC8ALQBQAD8AcABSAJAAYwCwAHYAzwCIAPAAmRH/AKYx/wC0Uf8AwnH/AM+R + /wDcsf8A69H/AP///wAAAAAACAAvAA4AUAAVAHAAGwCQACEAsAAmAM8ALADwAD4R/wBYMf8AcVH/AIxx + /wCmkf8Av7H/ANrR/wD///8AFRAAFRUVFRUVFRUVFQAQFRUZJBUVFRUVFRUVFRUkGRUQKicQFRUVFRUV + FRUQJyoQEDEYGBkVFRUVFRUZGBgxEBUxACsmEBUVFRUQJisAMRUdLAAxFyEVDw4RIRcxACwdICgQMwAx + HAgUGjEAMxAoICIlFy8ANAoEAgk0AC8XJSIjJRcvADUKAwEHNAAvFyUjISYVMQA1EwUGDTUAMRUmIR4q + EDMQKRkMCxspEDMQKh4XMAAuIRAQFhIQECEuADAXEDIQIB8VFRUVFRUfIBAyEBAtIRAVFRUVFRUVFRAh + LRAVHiEVFRUVFRUVFRUVIR4VFRAQFRUVFRUVFRUVFRAQFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= +</value> + </data> +</root> \ No newline at end of file Added: trunk/plugins/IR Server Suite/Applications/Web Remote/Web Remote.csproj =================================================================== --- trunk/plugins/IR Server Suite/Applications/Web Remote/Web Remote.csproj (rev 0) +++ trunk/plugins/IR Server Suite/Applications/Web Remote/Web Remote.csproj 2007-12-02 09:17:53 UTC (rev 1115) @@ -0,0 +1,91 @@ +<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>{CCDBA239-8E8E-4F5F-A098-7132EED5F160}</ProjectGuid> + <OutputType>WinExe</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>WebRemote</RootNamespace> + <AssemblyName>WebRemote</AssemblyName> + <StartupObject>WebRemote.Program</StartupObject> + <ApplicationIcon>Icon.ico</ApplicationIcon> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <TreatWarningsAsErrors>true</TreatWarningsAsErrors> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Deployment" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Web" /> + <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> + <Compile Include="RemoteButton.cs" /> + <Compile Include="Setup.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="Setup.Designer.cs"> + <DependentUpon>Setup.cs</DependentUpon> + </Compile> + <Compile Include="WebServer.cs" /> + </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> + </ItemGro... [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/IR Server Suite/IR Server Plugins/Direct Input 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/FusionRemote Receiver/FusionRemoteReceiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/FusionRemoteReceiver.cs 2008-01-08 21:59:08 UTC (rev 1229) +++ trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/FusionRemoteReceiver.cs 2008-01-09 16:06:45 UTC (rev 1230) @@ -211,7 +211,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> @@ -249,29 +249,13 @@ /// <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() { - try - { - OpenDevice(); + OpenDevice(); - _deviceBuffer = new byte[128]; + _deviceBuffer = new byte[128]; - _deviceStream.BeginRead(_deviceBuffer, 0, _deviceBuffer.Length, new AsyncCallback(OnReadComplete), null); - - return true; - } -#if TRACE - catch (Exception ex) - { - Trace.WriteLine("FusionRemoteReceiver: " + ex.ToString()); -#else - catch - { -#endif - return false; - } + _deviceStream.BeginRead(_deviceBuffer, 0, _deviceBuffer.Length, new AsyncCallback(OnReadComplete), null); } /// <summary> /// Suspend the IR Server plugin when computer enters standby. Modified: trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/Properties/AssemblyInfo.cs 2008-01-08 21:59:08 UTC (rev 1229) +++ trunk/plugins/IR Server Suite/IR Server Plugins/FusionRemote Receiver/Properties/AssemblyInfo.cs 2008-01-09 16:06:45 UTC (rev 1230) @@ -30,8 +30,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("db244336-eeac-4789-af94-6fbe53df225f")] Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/Girder Plugin.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/Girder Plugin.cs 2008-01-08 21:59:08 UTC (rev 1229) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/Girder Plugin.cs 2008-01-09 16:06:45 UTC (rev 1230) @@ -53,7 +53,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> @@ -66,21 +66,9 @@ public override string Description { get { return "Supports using Girder 3.x plugins with IR Server"; } } /// <summary> - /// Detect the presence of this device. Devices that cannot be detected will always return false. - /// </summary> - /// <returns> - /// <c>true</c> if the device is present, otherwise <c>false</c>. - /// </returns> - public override bool Detect() - { - 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() { LoadSettings(); @@ -88,11 +76,23 @@ _pluginWrapper.EventCallback += new PluginEventCallback(PluginCallback); - bool open = _pluginWrapper.GirOpen(); - if (open) - _pluginWrapper.GirStart(); + if (!_pluginWrapper.GirOpen()) + { + _pluginWrapper.Dispose(); + _pluginWrapper = null; - return open; + throw new ApplicationException("Failed to initiate girder plugin"); + } + + if (!_pluginWrapper.GirStart()) + { + _pluginWrapper.GirClose(); + _pluginWrapper.Dispose(); + _pluginWrapper = null; + + throw new ApplicationException("Failed to start girder plugin"); + } + } /// <summary> /// Suspend the IR Server plugin when computer enters standby. Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/Properties/AssemblyInfo.cs 2008-01-08 21:59:08 UTC (rev 1229) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Girder Plugin/Properties/AssemblyInfo.cs 2008-01-09 16:06:45 UTC (rev 1230) @@ -35,7 +35,7 @@ // // 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: SecurityPermission(SecurityAction.RequestMinimum, UnmanagedCode = true)] Modified: trunk/plugins/IR Server Suite/IR Server Plugins/HCW Transceiver/Configure.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/HCW Transceiver/Configure.Designer.cs 2008-01-08 21:59:08 UTC (rev 1229) +++ trunk/plugins/IR Server Suite/IR Server Plugins/HCW Transceiver/Configure.Designer.cs 2008-01-09 16:06:45 UTC (rev 1230) @@ -32,15 +32,9 @@ this.buttonOK = new System.Windows.Forms.Button(); this.buttonCancel = new System.Windows.Forms.Button(); this.toolTips = new System.Windows.Forms.ToolTip(this.components); - this.labelRepeatCount = new System.Windows.Forms.Label(); this.numericUpDownButtonRepeatDelay = new System.Windows.Forms.NumericUpDown(); - this.numericUpDownRepeatCount = new System.Windows.Forms.NumericUpDown(); this.labelButtonRepeatDelay = new System.Windows.Forms.Label(); - this.numericUpDownLearnTimeout = new System.Windows.Forms.NumericUpDown(); - this.labelLearnIRTimeout = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownButtonRepeatDelay)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownRepeatCount)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLearnTimeout)).BeginInit(); this.SuspendLayout(); // // buttonOK @@ -66,15 +60,6 @@ this.buttonCancel.UseVisualStyleBackColor = true; this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); // - // labelRepeatCount - // - this.labelRepeatCount.Location = new System.Drawing.Point(8, 40); - this.labelRepeatCount.Name = "labelRepeatCount"; - this.labelRepeatCount.Size = new System.Drawing.Size(144, 20); - this.labelRepeatCount.TabIndex = 2; - this.labelRepeatCount.Text = "IR blast repeat count:"; - this.labelRepeatCount.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // // numericUpDownButtonRepeatDelay // this.numericUpDownButtonRepeatDelay.Increment = new decimal(new int[] { @@ -105,25 +90,6 @@ 0, 0}); // - // numericUpDownRepeatCount - // - this.numericUpDownRepeatCount.Location = new System.Drawing.Point(152, 40); - this.numericUpDownRepeatCount.Minimum = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.numericUpDownRepeatCount.Name = "numericUpDownRepeatCount"; - this.numericUpDownRepeatCount.Size = new System.Drawing.Size(88, 20); - this.numericUpDownRepeatCount.TabIndex = 3; - this.numericUpDownRepeatCount.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.numericUpDownRepeatCount.ThousandsSeparator = true; - this.numericUpDownRepeatCount.Value = new decimal(new int[] { - 100, - 0, - 0, - 0}); - // // labelButtonRepeatDelay // this.labelButtonRepeatDelay.Location = new System.Drawing.Point(8, 8); @@ -133,56 +99,13 @@ this.labelButtonRepeatDelay.Text = "Button repeat delay:"; this.labelButtonRepeatDelay.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // - // numericUpDownLearnTimeout - // - this.numericUpDownLearnTimeout.Increment = new decimal(new int[] { - 500, - 0, - 0, - 0}); - this.numericUpDownLearnTimeout.Location = new System.Drawing.Point(152, 72); - this.numericUpDownLearnTimeout.Maximum = new decimal(new int[] { - 60000, - 0, - 0, - 0}); - this.numericUpDownLearnTimeout.Minimum = new decimal(new int[] { - 2000, - 0, - 0, - 0}); - this.numericUpDownLearnTimeout.Name = "numericUpDownLearnTimeout"; - this.numericUpDownLearnTimeout.Size = new System.Drawing.Size(88, 20); - this.numericUpDownLearnTimeout.TabIndex = 7; - this.numericUpDownLearnTimeout.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.numericUpDownLearnTimeout.ThousandsSeparator = true; - this.toolTips.SetToolTip(this.numericUpDownLearnTimeout, "When teaching IR commands this is how long before the process times out"); - this.numericUpDownLearnTimeout.Value = new decimal(new int[] { - 10000, - 0, - 0, - 0}); - // - // labelLearnIRTimeout - // - this.labelLearnIRTimeout.Location = new System.Drawing.Point(8, 72); - this.labelLearnIRTimeout.Name = "labelLearnIRTimeout"; - this.labelLearnIRTimeout.Size = new System.Drawing.Size(144, 20); - this.labelLearnIRTimeout.TabIndex = 6; - this.labelLearnIRTimeout.Text = "Learn IR timeout:"; - this.labelLearnIRTimeout.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // // Configure // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(248, 137); - this.Controls.Add(this.labelLearnIRTimeout); - this.Controls.Add(this.numericUpDownLearnTimeout); this.Controls.Add(this.labelButtonRepeatDelay); - this.Controls.Add(this.numericUpDownRepeatCount); this.Controls.Add(this.numericUpDownButtonRepeatDelay); - this.Controls.Add(this.labelRepeatCount); this.Controls.Add(this.buttonCancel); this.Controls.Add(this.buttonOK); this.MaximizeBox = false; @@ -194,8 +117,6 @@ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "HCW Configuration"; ((System.ComponentModel.ISupportInitialize)(this.numericUpDownButtonRepeatDelay)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownRepeatCount)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLearnTimeout)).EndInit(); this.ResumeLayout(false); } @@ -205,11 +126,7 @@ private System.Windows.Forms.Button buttonOK; private System.Windows.Forms.Button buttonCancel; private System.Windows.Forms.ToolTip toolTips; - private System.Windows.Forms.Label labelRepeatCount; private System.Windows.Forms.NumericUpDown numericUpDownButtonRepeatDelay; - private System.Windows.Forms.NumericUpDown numericUpDownRepeatCount; private System.Windows.Forms.Label labelButtonRepeatDelay; - private System.Windows.Forms.NumericUpDown numericUpDownLearnTimeout; - private System.Windows.Forms.Label labelLearnIRTimeout; } } \ No newline at end of file Modified: trunk/plugins/IR Server Suite/IR Server Plugins/HCW Transceiver/Configure.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/HCW Transceiver/Configure.cs 2008-01-08 21:59:08 UTC (rev 1229) +++ trunk/plugins/IR Server Suite/IR Server Plugins/HCW Transceiver/Configure.cs 2008-01-09 16:06:45 UTC (rev 1230) @@ -26,24 +26,6 @@ get { return Decimal.ToInt32(numericUpDownButtonRepeatDelay.Value); } set { numericUpDownButtonRepeatDelay.Value = new Decimal(value); } } - /// <summary> - /// Gets or sets the blast repeats. - /// </summary> - /// <value>The blast repeats.</value> - public int BlastRepeats - { - get { return Decimal.ToInt32(numericUpDownRepeatCount.Value); } - set { numericUpDownRepeatCount.Value = new Decimal(value); } - } - /// <summary> - /// Gets or sets the learn timeout. - /// </summary> - /// <value>The learn timeout.</value> - public int LearnTimeout - { - get { return Decimal.ToInt32(numericUpDownLearnTimeout.Value); } - set { numericUpDownLearnTimeout.Value = new Decimal(value); } - } #endregion Properties Modified: trunk/plugins/IR Server Suite/IR Server Plugins/HCW Transceiver/HcwTransceiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/HCW Transceiver/HcwTransceiver.cs 2008-01-08 21:59:08 UTC (rev 1229) +++ trunk/plugins/IR Server Suite/IR Server Plugins/HCW Transceiver/HcwTransceiver.cs 2008-01-09 16:06:45 UTC (rev 1230) @@ -17,7 +17,7 @@ /// IR Server plugin supporting Hauppauge devices. /// </summary> [CLSCompliant(false)] - public class HcwTransceiver : IRServerPluginBase, IRemoteReceiver // IConfigure, ITransmitIR, ILearnIR, + public class HcwTransceiver : IRServerPluginBase, IRemoteReceiver, IConfigure { #region Delegates @@ -34,22 +34,15 @@ Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + "\\IR Server Suite\\IR Server\\HCW Transceiver.xml"; - static readonly string[] Ports = new string[] { "Default", "Port 1", "Port 2" }; - #endregion Constants #region Variables RemoteHandler _remoteButtonHandler = null; - string _blastPort = Ports[0]; int _repeatDelay; - int _blastRepeats; - int _learnTimeout; - //ulong _learnCarrierFreq; - string _lastCode = String.Empty; DateTime _lastCodeTime = DateTime.Now; @@ -66,7 +59,7 @@ /// IR Server plugin version. /// </summary> /// <value>The version.</value> - public override string Version { get { return "1.0.4.0"; } } + public override string Version { get { return "1.0.4.2"; } } /// <summary> /// The IR Server plugin's author. /// </summary> @@ -81,12 +74,11 @@ /// <summary> /// Start the IR Server plugin. /// </summary> - /// <returns>true if successful, otherwise false.</returns> - public override bool Start() + public override void Start() { LoadSettings(); - - return true; + + } /// <summary> /// Suspend the IR Server plugin when computer enters standby. @@ -122,14 +114,10 @@ Configure config = new Configure(); config.RepeatDelay = _repeatDelay; - config.BlastRepeats = _blastRepeats; - config.LearnTimeout = _learnTimeout; if (config.ShowDialog(owner) == DialogResult.OK) { _repeatDelay = config.RepeatDelay; - _blastRepeats = config.BlastRepeats; - _learnTimeout = config.LearnTimeout; SaveSettings(); } @@ -146,14 +134,7 @@ set { _remoteButtonHandler = value; } } - /// <summary> - /// Gets the available ports. - /// </summary> - /// <value>The available ports.</value> - public string[] AvailablePorts { get { return Ports; } } - - void LoadSettings() { try @@ -162,8 +143,6 @@ doc.Load(ConfigurationFile); _repeatDelay = int.Parse(doc.DocumentElement.Attributes["RepeatDelay"].Value); - _blastRepeats = int.Parse(doc.DocumentElement.Attributes["BlastRepeats"].Value); - _learnTimeout = int.Parse(doc.DocumentElement.Attributes["LearnTimeout"].Value); } #if TRACE catch (Exception ex) @@ -174,8 +153,6 @@ { #endif _repeatDelay = 500; - _blastRepeats = 4; - _learnTimeout = 10000; } } void SaveSettings() @@ -190,8 +167,6 @@ writer.WriteStartElement("settings"); // <settings> writer.WriteAttributeString("RepeatDelay", _repeatDelay.ToString()); - writer.WriteAttributeString("BlastRepeats", _blastRepeats.ToString()); - writer.WriteAttributeString("LearnTimeout", _learnTimeout.ToString()); writer.WriteEndElement(); // </settings> writer.WriteEndDocument(); Modified: trunk/plugins/IR Server Suite/IR Server Plugins/HCW Transceiver/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/HCW Transceiver/Properties/AssemblyInfo.cs 2008-01-08 21:59:08 UTC (rev 1229) +++ trunk/plugins/IR Server Suite/IR Server Plugins/HCW Transceiver/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.0")] -[assembly: AssemblyFileVersion("1.0.4.0")] +[assembly: AssemblyVersion("1.0.4.2")] +[assembly: AssemblyFileVersion("1.0.4.2")] [assembly: CLSCompliant(true)] [assembly: GuidAttribute("560F8887-A826-40c8-BAB2-022FB7011EEF")] Modified: 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/IRServerPluginBase.cs 2008-01-08 21:59:08 UTC (rev 1229) +++ trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/IRServerPluginBase.cs 2008-01-09 16:06:45 UTC (rev 1230) @@ -46,18 +46,17 @@ /// <summary> /// Start the IR Server plugin. /// </summary> - /// <returns><c>true</c> if successful, otherwise <c>false</c>.</returns> - public abstract bool Start(); + public abstract void Start(); /// <summary> /// Suspend the IR Server plugin when computer enters standby. /// </summary> - public virtual void Suspend() { } + public abstract void Suspend(); /// <summary> /// Resume the IR Server plugin when the computer returns from standby. /// </summary> - public virtual void Resume() { } + public abstract void Resume(); /// <summary> /// Stop the IR Server plugin. Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/Properties/AssemblyInfo.cs 2008-01-08 21:59:08 UTC (rev 1229) +++ trunk/plugins/IR Server Suite/IR Server Plugins/IR Server Plugin Interface/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("efdc4eaa-6ccc-4928-a1e7-f4b634780081")] Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/IRMan Receiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/IRMan Receiver.cs 2008-01-08 21:59:08 UTC (rev 1229) +++ trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/IRMan Receiver.cs 2008-01-09 16:06:45 UTC (rev 1230) @@ -59,7 +59,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> @@ -85,8 +85,7 @@ /// <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() { LoadSettings(); @@ -114,11 +113,11 @@ { _serialPort.ReceivedBytesThreshold = DeviceBufferSize; _serialPort.DataReceived += new SerialDataReceivedEventHandler(SerialPort_DataReceived); - - return true; } - - return false; + else + { + throw new ApplicationException("Failed to initialize device"); + } } /// <summary> /// Suspend the IR Server plugin when computer enters standby. Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/IRMan Receiver/Properties/AssemblyInfo.cs 2008-01-08 21:59:08 UTC (rev 1229) +++ trunk/plugins/IR Server Suite/IR Server Plugins/IRMan 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("a50e930e-1653-40d5-ba5a-3c0315868c1b")] Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/IRTransTransceiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/IRTransTransceiver.cs 2008-01-08 21:59:08 UTC (rev 1229) +++ trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/IRTransTransceiver.cs 2008-01-09 16:06:45 UTC (rev 1230) @@ -221,7 +221,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> @@ -241,24 +241,30 @@ /// </returns> public override bool Detect() { - return false; + LoadSettings(); + + if (Connect(_irTransServerAddress, _irTransServerPort)) + { + _socket.Close(); + return true; + } + else + { + 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() { LoadSettings(); if (Connect(_irTransServerAddress, _irTransServerPort)) - { BeginReceive(); - return true; - } - - return false; + else + throw new ApplicationException("Failed to connect"); } /// <summary> /// Suspend the IR Server plugin when computer enters standby. Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/Properties/AssemblyInfo.cs 2008-01-08 21:59:08 UTC (rev 1229) +++ trunk/plugins/IR Server Suite/IR Server Plugins/IRTrans Transceiver/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("fef45a20-12af-4750-b7fa-8c8b6ea42a15")] Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug Receiver/IgorPlug Receiver.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug Receiver/IgorPlug Receiver.cs 2008-01-08 21:59:08 UTC (rev 1229) +++ trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug Receiver/IgorPlug Receiver.cs 2008-01-09 16:06:45 UTC (rev 1230) @@ -159,7 +159,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> @@ -175,14 +175,12 @@ /// 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() { ThreadStart readThreadStart = new ThreadStart(ReadThread); _readThread = new Thread(readThreadStart); _readThread.IsBackground = true; _readThread.Start(); - - return true; } /// <summary> /// Suspend the IR Server plugin when computer enters standby. Modified: trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug Receiver/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug Receiver/Properties/AssemblyInfo.cs 2008-01-08 21:59:08 UTC (rev 1229) +++ trunk/plugins/IR Server Suite/IR Server Plugins/IgorPlug 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("2286B6BF-A7F8-4f1a-B72A-764B5002C949")] Modified: trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverReplacement.cs =================================================================== --- trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverReplacement.cs 2008-01-08 21:59:08 UTC (rev 1229) +++ trunk/plugins/IR Server Suite/IR Server Plugins/Microsoft MCE Transceiver/DriverReplacement.cs 2008-01-09 16:06:45 UTC (rev 1230) @@ -15,7 +15,7 @@ { /// <summary> - /// Driver class for replacement driver. + /// Driver class for the replacement driver. /// </summary> class DriverReplacement : Driver { @@ -85,8 +85,10 @@ #region Constants - const double ClockFrequency = 2412460.0; + const int TimingResolution = 50; // In microseconds. + //const double ClockFrequency = 2412460.0; + // Vendor ID's for SMK and Topseed devices. const string VidSMK = "vid_1784"; const string VidTopseed = "vid_0609"; @@ -191,21 +193,14 @@ #endif _notifyWindow = new NotifyWindow(); + _notifyWindow.Create(); _notifyWindow.Class = _deviceGuid; + _notifyWindow.RegisterDeviceArrival(); OpenDevice(); StartReadThread(); + InitializeDevice(); - // Initialize device ... - WriteSync(StartPacket); - Thread.Sleep(PacketTimeout); - - SetTimeout(PacketTimeout); - SetInputPort(InputPort.Receive); - - _notifyWindow.Create(); - _notifyWindow.RegisterDeviceArrival(); - _notifyWindow.RegisterDeviceRemoval(_readHandle.DangerousGetHandle()); _notifyWindow.DeviceArrival += new DeviceEventHandler(OnDeviceArrival); _notifyWindow.DeviceRemoval += new DeviceEventHandler(OnDeviceRemoval); } @@ -219,36 +214,34 @@ DebugWriteLine("Stop()"); #endif - _notifyWindow.DeviceArrival -= new DeviceEventHandler(OnDeviceArrival); - _notifyWindow.DeviceRemoval -= new DeviceEventHandler(OnDeviceRemoval); - - /* try { + _notifyWindow.DeviceArrival -= new DeviceEventHandler(OnDeviceArrival); + _notifyWindow.DeviceRemoval -= new DeviceEventHandler(OnDeviceRemoval); + WriteSync(StopPacket); - Thread.Sleep(PacketTimeout); + StopReadThread(); + CloseDevice(); } #if DEBUG catch (Exception ex) { DebugWriteLine(ex.ToString()); - } #else catch { +#endif + throw; } -#endif - */ + finally + { + _notifyWindow.Dispose(); + _notifyWindow = null; - StopReadThread(); - CloseDevice(); - - _notifyWindow.Dispose(); - _notifyWindow = null; - #if DEBUG - DebugClose(); + DebugClose(); #endif + } } /// <summary> @@ -261,7 +254,6 @@ #endif WriteSync(St... [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: return AppCommands.BrowserRefresh; + case Keys.BrowserSearch: return AppCommands.BrowserSearch; + case Keys.BrowserStop: return AppCommands.BrowserStop; + case Keys.Help: return AppCommands.Help; + case Keys.LaunchApplication1: return AppCommands.LaunchApp1; + case Keys.LaunchApplication2: return AppCommands.LaunchApp2; + case Keys.LaunchMail: return AppCommands.LaunchMail; + case Keys.MediaNextTrack: return AppCommands.MediaNextTrack; + case Keys.MediaPlayPause: return AppCommands.MediaPlayPause; + case Keys.MediaPreviousTrack: return AppCommands.MediaPreviousTrack; + case Keys.MediaStop: return AppCommands.MediaStop; + case Keys.SelectMedia: return AppCommands.LaunchMediaSelect; + case Keys.VolumeDown: return AppCommands.VolumeDown; + case Keys.VolumeMute: return AppCommands.VolumeMute; + case Keys.VolumeUp: return AppCommands.VolumeUp; + default: return AppCommands.None; + } + } + + } + +} Added: trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/Properties/AssemblyInfo.cs (rev 0) +++ trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/Properties/AssemblyInfo.cs 2008-03-02 16:34:31 UTC (rev 1414) @@ -0,0 +1,36 @@ +using System; +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("Keyboard Input Relay")] +[assembly: AssemblyDescription("Relays keyboard input to the input service to use like remote button presses")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("and-81")] +[assembly: AssemblyProduct("Keyboard Input Relay")] +[assembly: AssemblyCopyright("Aaron Dinnage")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("cf85e48e-e867-49e5-b240-693378fdd11c")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.4.2")] +[assembly: AssemblyFileVersion("1.0.4.2")] + +[assembly: CLSCompliant(true)] Added: trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/Properties/Resources.Designer.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/Properties/Resources.Designer.cs (rev 0) +++ trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/Properties/Resources.Designer.cs 2008-03-02 16:34:31 UTC (rev 1414) @@ -0,0 +1,70 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:2.0.50727.832 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace KeyboardInputRelay.Properties { + using System; + + + /// <summary> + /// A strongly-typed resource class, for looking up localized strings, etc. + /// </summary> + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// <summary> + /// Returns the cached ResourceManager instance used by this class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("KeyboardInputRelay.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// <summary> + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + internal static System.Drawing.Icon Icon { + get { + object obj = ResourceManager.GetObject("Icon", resourceCulture); + return ((System.Drawing.Icon)(obj)); + } + } + } +} Added: trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/Properties/Resources.resx =================================================================== --- trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/Properties/Resources.resx (rev 0) +++ trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/Properties/Resources.resx 2008-03-02 16:34:31 UTC (rev 1414) @@ -0,0 +1,124 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> + <data name="Icon" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\icon.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> +</root> \ No newline at end of file Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.cs 2008-03-02 07:03:40 UTC (rev 1413) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.cs 2008-03-02 16:34:31 UTC (rev 1414) @@ -47,7 +47,7 @@ textBoxName.Text = name; textBoxName.Enabled = false; - string fileName = Program.FolderMacros + name + Common.FileExtensionMacro; + string fileName = Path.Combine(Program.FolderMacros, name + Common.FileExtensionMacro); string[] commands = IrssMacro.ReadFromFile(fileName); listBoxMacro.Items.AddRange(commands); @@ -344,8 +344,10 @@ foreach (string item in listBoxMacro.Items) commands[index++] = item; - IrssMacro.WriteToFile(Program.FolderMacros + name + Common.FileExtensionMacro, commands); + string fileName = Path.Combine(Program.FolderMacros, name + Common.FileExtensionMacro); + IrssMacro.WriteToFile(fileName, commands); + Program.ProcessCommand(Common.CmdPrefixMacro + name, false); } catch (Exception ex) @@ -386,7 +388,9 @@ foreach (string item in listBoxMacro.Items) commands[index++] = item; - IrssMacro.WriteToFile(Program.FolderMacros + name + Common.FileExtensionMacro, commands); + string fileName = Path.Combine(Program.FolderMacros, name + Common.FileExtensionMacro); + + IrssMacro.WriteToFile(fileName, commands); } catch (Exception ex) { Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs 2008-03-02 07:03:40 UTC (rev 1413) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs 2008-03-02 16:34:31 UTC (rev 1414) @@ -412,7 +412,7 @@ return; string command = listViewIR.SelectedItems[0].Text; - string fileName = Common.FolderIRCommands + command + Common.FileExtensionIR; + string fileName = Path.Combine(Common.FolderIRCommands, command + Common.FileExtensionIR); if (File.Exists(fileName)) { @@ -438,7 +438,7 @@ return; string command = listViewMacro.SelectedItems[0].Text; - string fileName = Program.FolderMacros + command + Common.FileExtensionMacro; + string fileName = Path.Combine(Program.FolderMacros, command + Common.FileExtensionMacro); if (File.Exists(fileName)) { @@ -805,7 +805,7 @@ ListViewItem originItem = origin.Items[e.Item]; - string oldFileName = Common.FolderIRCommands + originItem.Text + Common.FileExtensionIR; + string oldFileName = Path.Combine(Common.FolderIRCommands, originItem.Text + Common.FileExtensionIR); if (!File.Exists(oldFileName)) { MessageBox.Show("File not found: " + oldFileName, "Cannot rename, Original file not found", MessageBoxButtons.OK, MessageBoxIcon.Error); @@ -824,7 +824,7 @@ try { - string newFileName = Common.FolderIRCommands + name + Common.FileExtensionIR; + string newFileName = Path.Combine(Common.FolderIRCommands, name + Common.FileExtensionIR); File.Move(oldFileName, newFileName); } @@ -851,7 +851,7 @@ ListViewItem originItem = origin.Items[e.Item]; - string oldFileName = Program.FolderMacros + originItem.Text + Common.FileExtensionMacro; + string oldFileName = Path.Combine(Program.FolderMacros, originItem.Text + Common.FileExtensionMacro); if (!File.Exists(oldFileName)) { MessageBox.Show("File not found: " + oldFileName, "Cannot rename, Original file not found", MessageBoxButtons.OK, MessageBoxIcon.Error); @@ -870,8 +870,7 @@ try { - string newFileName = Program.FolderMacros + name + Common.FileExtensionMacro; - + string newFileName = Path.Combine(Program.FolderMacros, name + Common.FileExtensionMacro); File.Move(oldFileName, newFileName); } catch (Exception ex) @@ -1286,7 +1285,7 @@ return; string file = listViewMacro.SelectedItems[0].Text; - string fileName = Program.FolderMacros + file + Common.FileExtensionMacro; + string fileName = Path.Combine(Program.FolderMacros, file + Common.FileExtensionMacro); if (File.Exists(fileName)) { if (MessageBox.Show(this, "Are you sure you want to delete \"" + file + "\"?", "Confirm delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) @@ -1328,7 +1327,7 @@ string translatorFolder = Path.Combine(SystemRegistry.GetInstallFolder(), "Translator"); - //shortcut.Arguments = String.Format("-MACRO \"{0}{1}{2}\"", Program.FolderMacros, macroName, Common.FileExtensionMacro); + //shortcut.Arguments = String.Format("-MACRO \"{0}\"", Path.Combine(Program.FolderMacros, macroName + Common.FileExtensionMacro)); shortcut.Arguments = String.Format("-MACRO \"{0}\"", macroName); shortcut.Description = "Launch Macro: " + macroName; shortcut.Path = Path.Combine(translatorFolder, "Translator.exe"); @@ -1361,7 +1360,7 @@ return; string file = listViewIR.SelectedItems[0].Text; - string fileName = Common.FolderIRCommands + file + Common.FileExtensionIR; + string fileName = Path.Combine(Common.FolderIRCommands, file + Common.FileExtensionIR); if (File.Exists(fileName)) { if (MessageBox.Show(this, "Are you sure you want to delete \"" + file + "\"?", "Confirm delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) Modified: trunk/plugins/IR Server Suite/Applications/Translator/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2008-03-02 07:03:40 UTC (rev 1413) +++ trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2008-03-02 16:34:31 UTC (rev 1414) @@ -26,11 +26,11 @@ #region Constants - internal static readonly string ConfigFile = Common.FolderAppData + "Translator\\Translator.xml"; + internal static readonly string ConfigFile = Path.Combine(Common.FolderAppData, "Translator\\Translator.xml"); - internal static readonly string FolderMacros = Common.FolderAppData + "Translator\\Macro\\"; + internal static readonly string FolderMacros = Path.Combine(Common.FolderAppData, "Translator\\Macro"); - const string ProcessCommandThreadName = "ProcessCommand"; + const string ProcessCommandThreadName = "ProcessCommand"; #endregion Constants @@ -118,7 +118,7 @@ #else IrssLog.LogLevel = IrssLog.Level.Info; #endif - IrssLog.Open(Common.FolderIrssLogs + "Translator.log"); + IrssLog.Open("Translator.log"); Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException); @@ -1045,13 +1045,13 @@ if (command.StartsWith(Common.CmdPrefixMacro, StringComparison.OrdinalIgnoreCase)) { - string fileName = FolderMacros + command.Substring(Common.CmdPrefixMacro.Length) + Common.FileExtensionMacro; + string fileName = Path.Combine(FolderMacros, command.Substring(Common.CmdPrefixMacro.Length) + Common.FileExtensionMacro); IrssMacro.ExecuteMacro(fileName, _variables, new ProcessCommandCallback(ProcCommand)); } else if (command.StartsWith(Common.CmdPrefixBlast, StringComparison.OrdinalIgnoreCase)) { string[] commands = Common.SplitBlastCommand(command.Substring(Common.CmdPrefixBlast.Length)); - BlastIR(Common.FolderIRCommands + commands[0] + Common.FileExtensionIR, commands[1]); + BlastIR(Path.Combine(Common.FolderIRCommands, commands[0] + Common.FileExtensionIR), commands[1]); } else if (command.StartsWith(Common.CmdPrefixPause, StringComparison.OrdinalIgnoreCase)) { Modified: trunk/plugins/IR Server Suite/Applications/Translator/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Properties/AssemblyInfo.cs 2008-03-02 07:03:40 UTC (rev 1413) +++ trunk/plugins/IR Server Suite/Applications/Translator/Properties/AssemblyInfo.cs 2008-03-02 16:34:31 UTC (rev 1414) @@ -9,7 +9,7 @@ // associated with an assembly. // [assembly: AssemblyTitle("Translator")] -[assembly: AssemblyDescription("Remote control application for use with IR Server")] +[assembly: AssemblyDescription("PC control application for use with Input Service")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("and-81")] [assembly: AssemblyProduct("Translator")] Modified: trunk/plugins/IR Server Suite/Applications/Tray Launcher/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Tray Launcher/Program.cs 2008-03-02 07:03:40 UTC (rev 1413) +++ trunk/plugins/IR Server Suite/Applications/Tray Launcher/Program.cs 2008-03-02 16:34:31 UTC (rev 1414) @@ -29,7 +29,7 @@ #else IrssLog.LogLevel = IrssLog.Level.Info; #endif - IrssLog.Open(Common.FolderIrssLogs + "Tray Launcher.log"); + IrssLog.Open("Tray Launcher.log"); Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException); Modified: trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray.cs 2008-03-02 07:03:40 UTC (rev 1413) +++ trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray.cs 2008-03-02 16:34:31 UTC (rev 1414) @@ -27,7 +27,7 @@ const string DefaultKeyCode = "31730"; - static readonly string ConfigurationFile = Common.FolderAppData + "Tray Launcher\\Tray Launcher.xml"; + static readonly string ConfigurationFile = Path.Combine(Common.FolderAppData, "Tray Launcher\\Tray Launcher.xml"); #endregion Constants Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.cs 2008-03-02 07:03:40 UTC (rev 1413) +++ trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.cs 2008-03-02 16:34:31 UTC (rev 1414) @@ -112,8 +112,7 @@ { try { - string path = Path.Combine(Program.InstallFolder, "Skins"); - string[] skins = Directory.GetFiles(path, "*.png", SearchOption.TopDirectoryOnly); + string[] skins = Directory.GetFiles(Program.SkinsFolder, "*.png", SearchOption.TopDirectoryOnly); for (int index = 0; index < skins.Length; index++) skins[index] = Path.GetFileNameWithoutExtension(skins[index]); @@ -135,17 +134,17 @@ if (String.IsNullOrEmpty(skin)) return; - string skinFile = Path.Combine(Program.InstallFolder, String.Format("Skins\\{0}.png", skin)); + string skinFile = Path.Combine(Program.SkinsFolder, skin + ".png"); if (!File.Exists(skinFile)) 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 = Path.Combine(Program.InstallFolder, String.Format("Skins\\{0}.xml", skin)); + string xmlFile = Path.Combine(Program.SkinsFolder, skin + ".xml"); if (!File.Exists(xmlFile)) { string firstWord = skin.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)[0]; - xmlFile = Path.Combine(Program.InstallFolder, String.Format("Skins\\{0}.xml", firstWord)); + xmlFile = Path.Combine(Program.SkinsFolder, firstWord + ".xml"); if (!File.Exists(xmlFile)) throw new FileNotFoundException("Skin file not found", xmlFile); } Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Virtual Remote/Program.cs 2008-03-02 07:03:40 UTC (rev 1413) +++ trunk/plugins/IR Server Suite/Applications/Virtual Remote/Program.cs 2008-03-02 16:34:31 UTC (rev 1414) @@ -26,7 +26,7 @@ const string DefaultSkin = "MCE"; - static readonly string ConfigurationFile = Common.FolderAppData + "Virtual Remote\\Virtual Remote.xml"; + static readonly string ConfigurationFile = Path.Combine(Common.FolderAppData, "Virtual Remote\\Virtual Remote.xml"); #endregion Constants @@ -38,7 +38,7 @@ static string _serverHost; - static string _installFolder; + static string _skinsFolder; static string _remoteSkin; @@ -61,9 +61,9 @@ set { _serverHost = value; } } - internal static string InstallFolder + internal static string SkinsFolder { - get { return _installFolder; } + get { return _skinsFolder; } } internal static string RemoteSkin @@ -100,7 +100,7 @@ #else IrssLog.LogLevel = IrssLog.Level.Info; #endif - IrssLog.Open(Common.FolderIrssLogs + "Virtual Remote.log"); + IrssLog.Open("Virtual Remote.log"); Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException); @@ -223,17 +223,17 @@ { try { - _installFolder = SystemRegistry.GetInstallFolder(); - if (String.IsNullOrEmpty(_installFolder)) - _installFolder = "."; + _skinsFolder = SystemRegistry.GetInstallFolder(); + if (String.IsNullOrEmpty(_skinsFolder)) + _skinsFolder = ".\\Skins"; else - _installFolder = Path.Combine(_installFolder, "Virtual Remote"); + _skinsFolder = Path.Combine(_skinsFolder, "Virtual Remote\\Skins"); } catch (Exception ex) { IrssLog.Error(ex); - _installFolder = "."; + _skinsFolder = ".\\Skins"; } XmlDocument doc = new XmlDocument(); Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote/RemoteButton.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Virtual Remote/RemoteButton.cs 2008-03-02 07:03:40 UTC (rev 1413) +++ trunk/plugins/IR Server Suite/Applications/Virtual Remote/RemoteButton.cs 2008-03-02 16:34:31 UTC (rev 1414) @@ -4,6 +4,9 @@ namespace VirtualRemote { + /// <summary> + /// Data structure for Virtual Remote button representation. + /// </summary> struct RemoteButton { @@ -21,36 +24,64 @@ #region Properties + /// <summary> + /// Gets or sets the name. + /// </summary> + /// <value>The name.</value> public string Name { get { return _name; } set { _name = value; } } + /// <summary> + /// Gets or sets the code. + /// </summary> + /// <value>The code.</value> public string Code { get { return _code; } set { _code = value; } } + /// <summary> + /// Gets or sets the shortcut. + /// </summary> + /// <value>The shortcut.</value> public Keys Shortcut { get { return _shortcut; } set { _shortcut = value; } } + /// <summary> + /// Gets or sets the distance from top. + /// </summary> + /// <value>The distance from top.</value> public int Top { get { return _top; } set { _top = value; } } + /// <summary> + /// Gets or sets the distance from left. + /// </summary> + /// <value>The distance from left.</value> public int Left { get { return _left; } set { _left = value; } } + /// <summary> + /// Gets or sets the width. + /// </summary> + /// <value>The width.</value> public int Width { get { return _width; } set { _width = value; } } + /// <summary> + /// Gets or sets the height. + /// </summary> + /// <value>The height.</value> public int Height { get { return _height; } Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote (Smartphone2003)/FormMain.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Virtual Remote (Smartphone2003)/FormMain.cs 2008-03-02 07:03:40 UTC (rev 1413) +++ trunk/plugins/IR Server Suite/Applications/Virtual Remote (Smartphone2003)/FormMain.cs 2008-03-02 16:34:31 UTC (rev 1414) @@ -40,7 +40,7 @@ Client _client; - string _serverHost = "192.168.0.3"; + string _serverHost; bool _registered; @@ -199,12 +199,12 @@ } catch { - _serverHost = "192.168.0.1"; + _serverHost = null; return; } try { _serverHost = doc.DocumentElement.Attributes["ServerHost"].Value; } - ... [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, 24); this.checkBoxAbstractRemoteMode.Name = "checkBoxAbstractRemoteMode"; - this.checkBoxAbstractRemoteMode.Size = new System.Drawing.Size(159, 17); - this.checkBoxAbstractRemoteMode.TabIndex = 3; - this.checkBoxAbstractRemoteMode.Text = "Use Abstract Remote Model"; + this.checkBoxAbstractRemoteMode.Size = new System.Drawing.Size(264, 24); + this.checkBoxAbstractRemoteMode.TabIndex = 0; + this.checkBoxAbstractRemoteMode.Text = "Use the Abstract Remote Model"; this.toolTips.SetToolTip(this.checkBoxAbstractRemoteMode, "Enable automatic abstract remote model translation"); this.checkBoxAbstractRemoteMode.UseVisualStyleBackColor = true; + this.checkBoxAbstractRemoteMode.CheckedChanged += new System.EventHandler(this.checkBoxAbstractRemoteMode_CheckedChanged); // + // groupBoxPriority + // + this.groupBoxPriority.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBoxPriority.Controls.Add(this.labelPriority); + this.groupBoxPriority.Controls.Add(this.comboBoxPriority); + this.groupBoxPriority.Location = new System.Drawing.Point(8, 200); + this.groupBoxPriority.Name = "groupBoxPriority"; + this.groupBoxPriority.Size = new System.Drawing.Size(384, 56); + this.groupBoxPriority.TabIndex = 2; + this.groupBoxPriority.TabStop = false; + this.groupBoxPriority.Text = "Process Priority"; + // + // labelPriority + // + this.labelPriority.Location = new System.Drawing.Point(8, 21); + this.labelPriority.Name = "labelPriority"; + this.labelPriority.Size = new System.Drawing.Size(88, 24); + this.labelPriority.TabIndex = 0; + this.labelPriority.Text = "Set Priority:"; + this.labelPriority.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // comboBoxPriority + // + this.comboBoxPriority.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.comboBoxPriority.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBoxPriority.FormattingEnabled = true; + this.comboBoxPriority.Location = new System.Drawing.Point(104, 24); + this.comboBoxPriority.Name = "comboBoxPriority"; + this.comboBoxPriority.Size = new System.Drawing.Size(272, 21); + this.comboBoxPriority.TabIndex = 1; + // // Advanced // 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(398, 167); - this.Controls.Add(this.checkBoxAbstractRemoteMode); + this.ClientSize = new System.Drawing.Size(400, 304); + this.Controls.Add(this.groupBoxPriority); + this.Controls.Add(this.groupBoxAbstractRemoteModel); this.Controls.Add(this.buttonCancel); this.Controls.Add(this.buttonOK); this.Controls.Add(this.groupBoxMode); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.MinimumSize = new System.Drawing.Size(406, 194); + this.MinimumSize = new System.Drawing.Size(406, 336); this.Name = "Advanced"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "IR Server - Advanced Configuration"; this.groupBoxMode.ResumeLayout(false); this.groupBoxMode.PerformLayout(); + this.groupBoxAbstractRemoteModel.ResumeLayout(false); + this.groupBoxPriority.ResumeLayout(false); this.ResumeLayout(false); - this.PerformLayout(); } @@ -192,6 +261,11 @@ private System.Windows.Forms.Button buttonCancel; private System.Windows.Forms.Button buttonOK; private System.Windows.Forms.ToolTip toolTips; + private System.Windows.Forms.GroupBox groupBoxAbstractRemoteModel; + private System.Windows.Forms.Button buttonExclusions; private System.Windows.Forms.CheckBox checkBoxAbstractRemoteMode; + private System.Windows.Forms.GroupBox groupBoxPriority; + private System.Windows.Forms.Label labelPriority; + private System.Windows.Forms.ComboBox comboBoxPriority; } } \ No newline at end of file Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Advanced.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/Advanced.cs 2008-03-08 10:05:03 UTC (rev 1436) +++ trunk/plugins/IR Server Suite/Applications/IR Server/Advanced.cs 2008-03-08 13:45:51 UTC (rev 1437) @@ -2,7 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.ComponentModel; -using System.Data; +using System.Diagnostics; using System.Drawing; using System.Text; using System.Windows.Forms; @@ -56,7 +56,19 @@ get { return comboBoxComputer.Text; } set { comboBoxComputer.Text = value; } } + public string ProcessPriority + { + get + { + return comboBoxPriority.SelectedText; + } + set + { + comboBoxPriority.SelectedItem = value; + } + } + #endregion Properties #region Constructor @@ -68,6 +80,10 @@ List<string> networkPCs = Network.GetComputers(false); if (networkPCs != null) comboBoxComputer.Items.AddRange(networkPCs.ToArray()); + + comboBoxPriority.Items.Add("No Change"); + comboBoxPriority.Items.AddRange(Enum.GetNames(typeof(ProcessPriorityClass))); + comboBoxPriority.SelectedIndex = 0; } #endregion Constructor @@ -85,6 +101,19 @@ this.Close(); } + private void buttonExclusions_Click(object sender, EventArgs e) + { + /* + Exclusions exclusions = new Exclusions(new string[] { "plugin1", "plugin2", "plugin3" }); + exclusions.ExclusionList = new string[] { "plugin1" }; + + if (exclusions.ShowDialog(this) == DialogResult.OK) + { + + } + */ + } + private void radioButtonServer_CheckedChanged(object sender, EventArgs e) { comboBoxComputer.Enabled = false; @@ -98,7 +127,13 @@ comboBoxComputer.Enabled = true; } + private void checkBoxAbstractRemoteMode_CheckedChanged(object sender, EventArgs e) + { + //buttonExclusions.Enabled = checkBoxAbstractRemoteMode.Checked; + } + #endregion Controls + } Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/Config.cs 2008-03-08 10:05:03 UTC (rev 1436) +++ trunk/plugins/IR Server Suite/Applications/IR Server/Config.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.Drawing; using System.IO; using System.Runtime.InteropServices; @@ -250,7 +249,11 @@ // Setup Column Headers gridPlugins.Rows.Insert(row); - gridPlugins[row, ColIcon] = new SourceGrid.Cells.ColumnHeader(" "); + + SourceGrid.Cells.ColumnHeader header = new SourceGrid.Cells.ColumnHeader(" "); + header.AutomaticSortEnabled = false; + gridPlugins[row, ColIcon] = header; + gridPlugins[row, ColName] = new SourceGrid.Cells.ColumnHeader("Name"); gridPlugins[row, ColReceive] = new SourceGrid.Cells.ColumnHeader("Receive"); gridPlugins[row, ColTransmit] = new SourceGrid.Cells.ColumnHeader("Transmit"); Modified: trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs 2008-03-08 10:05:03 UTC (rev 1436) +++ trunk/plugins/IR Server Suite/Applications/IR Server/Program.cs 2008-03-08 13:45:51 UTC (rev 1437) @@ -146,7 +146,7 @@ if (plugin.Name.Equals(pluginName, StringComparison.OrdinalIgnoreCase)) return plugin; - throw new ApplicationException(String.Format("Plugin not found ({0})", pluginName)); + throw new InvalidOperationException(String.Format("Plugin not found ({0})", pluginName)); } /// <summary> Modified: trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/Program.cs 2008-03-08 10:05:03 UTC (rev 1436) +++ trunk/plugins/IR Server Suite/Applications/Keyboard Input Relay/Program.cs 2008-03-08 13:45:51 UTC (rev 1437) @@ -38,7 +38,7 @@ static extern int UnhookWindowsHookEx(IntPtr hhook); [DllImport("user32.dll")] - static extern int CallNextHookEx(IntPtr hhook, int code, int wParam, IntPtr lParam); + static extern IntPtr CallNextHookEx(IntPtr hhook, int code, int wParam, IntPtr lParam); [DllImport("kernel32.dll")] static extern IntPtr LoadLibrary(string lpFileName); @@ -47,7 +47,7 @@ #region Delegates - delegate int HookDelegate(int code, int wParam, IntPtr lParam); + delegate IntPtr HookDelegate(int code, int wParam, IntPtr lParam); #endregion Delegates @@ -416,6 +416,9 @@ _notifyIcon.Text = "Keyboard Input Relay - Connecting ..."; _notifyIcon.ContextMenuStrip = new ContextMenuStrip(); + + _notifyIcon.ContextMenuStrip.Items.Add(new ToolStripLabel("Keyboard Input Relay")); + _notifyIcon.ContextMenuStrip.Items.Add(new ToolStripSeparator()); _notifyIcon.ContextMenuStrip.Items.Add("&Setup", null, new EventHandler(NotifyIcon_ClickSetup)); _notifyIcon.ContextMenuStrip.Items.Add("&Quit", null, new EventHandler(NotifyIcon_ClickQuit)); @@ -456,7 +459,7 @@ _libPtr = IntPtr.Zero; } - static int InternalHookDelegate(int code, int wParam, IntPtr lParam) + static IntPtr InternalHookDelegate(int code, int wParam, IntPtr lParam) { try { @@ -498,7 +501,7 @@ } if (_stealAppCommands && appCommand != AppCommands.None) - return 1; + return new IntPtr(1); } } catch (Exception ex) Modified: trunk/plugins/IR Server Suite/Applications/SageSetup/FormMain.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/SageSetup/FormMain.cs 2008-03-08 10:05:03 UTC (rev 1436) +++ trunk/plugins/IR Server Suite/Applications/SageSetup/FormMain.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.Drawing; using System.Text; using System.Windows.Forms; Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs 2008-03-08 10:05:03 UTC (rev 1436) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/ButtonMappingForm.cs 2008-03-08 13:45:51 UTC (rev 1437) @@ -1,7 +1,6 @@ using System; 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/Translator/Forms/EditProgramForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/EditProgramForm.cs 2008-03-08 10:05:03 UTC (rev 1436) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/EditProgramForm.cs 2008-03-08 13:45:51 UTC (rev 1437) @@ -1,7 +1,6 @@ using System; 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/Translator/Forms/GetKeyCodeForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/GetKeyCodeForm.cs 2008-03-08 10:05:03 UTC (rev 1436) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/GetKeyCodeForm.cs 2008-03-08 13:45:51 UTC (rev 1437) @@ -1,6 +1,5 @@ using System; using System.ComponentModel; -using System.Data; using System.Drawing; using System.Text; using System.Threading; Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.cs 2008-03-08 10:05:03 UTC (rev 1436) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/MacroEditor.cs 2008-03-08 13:45:51 UTC (rev 1437) @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.ComponentModel; -using System.Data; #if TRACE using System.Diagnostics; #endif @@ -277,7 +276,7 @@ } else { - throw new ApplicationException(String.Format("Unknown macro command ({0})", selected)); + throw new IrssUtils.Exceptions.CommandStructureException(String.Format("Unknown macro command ({0})", selected)); } if (!String.IsNullOrEmpty(newCommand)) Modified: trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs 2008-03-08 10:05:03 UTC (rev 1436) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/MainForm.cs 2008-03-08 13:45:51 UTC (rev 1437) @@ -1,7 +1,6 @@ using System; 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/Translator/Forms/MenuForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Forms/MenuForm.cs 2008-03-08 10:05:03 UTC (rev 1436) +++ trunk/plugins/IR Server Suite/Applications/Translator/Forms/MenuForm.cs 2008-03-08 13:45:51 UTC (rev 1437) @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.ComponentModel; -using System.Data; #if TRACE using System.Diagnostics; #endif Modified: trunk/plugins/IR Server Suite/Applications/Translator/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2008-03-08 10:05:03 UTC (rev 1436) +++ trunk/plugins/IR Server Suite/Applications/Translator/Program.cs 2008-03-08 13:45:51 UTC (rev 1437) @@ -994,7 +994,7 @@ internal static void BlastIR(string fileName, string port) { if (!_registered) - throw new ApplicationException("Cannot Blast, not registered to an active Input Service"); + throw new InvalidOperationException("Cannot Blast, not registered to an active Input Service"); using (FileStream file = File.OpenRead(fileName)) { Modified: trunk/plugins/IR Server Suite/Applications/Translator/Translator.csproj =================================================================== --- trunk/plugins/IR Server Suite/Applications/Translator/Translator.csproj 2008-03-08 10:05:03 UTC (rev 1436) +++ trunk/plugins/IR Server Suite/Applications/Translator/Translator.csproj 2008-03-08 13:45:51 UTC (rev 1437) @@ -166,6 +166,9 @@ <None Include="Icon16Connecting.ico" /> </ItemGroup> <ItemGroup> + <Content Include="Default Settings\GBPVR.exe.xml" /> + <Content Include="Default Settings\Meedio.exe.xml" /> + <Content Include="Default Settings\PVRX2.exe.xml" /> <Content Include="Graphics\ClickLeft.png" /> <Content Include="Graphics\ClickMiddle.png" /> <Content Include="Graphics\ClickRight.png" /> @@ -184,9 +187,6 @@ <Content Include="Graphics\Shortcut.png" /> <Content Include="Graphics\WinLogo.png" /> </ItemGroup> - <ItemGroup> - <Folder Include="Default Settings\" /> - </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. Modified: trunk/plugins/IR Server Suite/Applications/Tray Launcher/GetKeyCodeForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Tray Launcher/GetKeyCodeForm.cs 2008-03-08 10:05:03 UTC (rev 1436) +++ trunk/plugins/IR Server Suite/Applications/Tray Launcher/GetKeyCodeForm.cs 2008-03-08 13:45:51 UTC (rev 1437) @@ -1,6 +1,5 @@ using System; using System.ComponentModel; -using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; Modified: trunk/plugins/IR Server Suite/Applications/Tray Launcher/Setup.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Tray Launcher/Setup.cs 2008-03-08 10:05:03 UTC (rev 1436) +++ trunk/plugins/IR Server Suite/Applications/Tray Launcher/Setup.cs 2008-03-08 13:45:51 UTC (rev 1437) @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.ComponentModel; -using System.Data; using System.Drawing; using System.Runtime.InteropServices; using System.Security; Modified: trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray.cs 2008-03-08 10:05:03 UTC (rev 1436) +++ trunk/plugins/IR Server Suite/Applications/Tray Launcher/Tray.cs 2008-03-08 13:45:51 UTC (rev 1437) @@ -1,6 +1,5 @@ using System; using System.ComponentModel; -using System.Data; using System.Diagnostics; using System.Drawing; using System.IO; Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Virtual Remote/MainForm.cs 2008-03-08 10:05:03 UTC (rev 1436) +++ trunk/plugins/IR Server Suite/Applications/Virtual Remote/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.Drawing; using System.IO; using System.Net; Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote/Program.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Virtual Remote/Program.cs 2008-03-08 10:05:03 UTC (rev 1436) +++ trunk/plugins/IR Server Suite/Applications/Virtual Remote/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.Drawing; using System.IO; using System.Net; Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote (PocketPC2003)/Client.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Virtual Remote (PocketPC2003)/Client.cs 2008-03-08 10:05:03 UTC (rev 1436) +++ trunk/plugins/IR Server Suite/Applications/Virtual Remote (PocketPC2003)/Client.cs 2008-03-08 13:45:51 UTC (rev 1437) @@ -13,14 +13,14 @@ /// Message handling delegate for client. /// </summary> /// <param name="message">Message received.</param> - public delegate void ClientMessageSink(IrssMessage message); + delegate void ClientMessageSink(IrssMessage message); #endregion Delegates /// <summary> /// TCP communications client class. /// </summary> - public class Client : IDisposable + class Client : IDisposable { #region Variables Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote (PocketPC2003)/FormMain.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Virtual Remote (PocketPC2003)/FormMain.cs 2008-03-08 10:05:03 UTC (rev 1436) +++ trunk/plugins/IR Server Suite/Applications/Virtual Remote (PocketPC2003)/FormMain.cs 2008-03-08 13:45:51 UTC (rev 1437) @@ -22,7 +22,7 @@ #region Constants - static readonly string ConfigurationFile = "VirtualRemote.xml"; + const string ConfigurationFile = "VirtualRemote.xml"; const int ServerPort = 24000; Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote (PocketPC2003)/IrssMessage.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Virtual Remote (PocketPC2003)/IrssMessage.cs 2008-03-08 10:05:03 UTC (rev 1436) +++ trunk/plugins/IR Server Suite/Applications/Virtual Remote (PocketPC2003)/IrssMessage.cs 2008-03-08 13:45:51 UTC (rev 1437) @@ -9,7 +9,7 @@ /// <summary> /// Type of message. /// </summary> - public enum MessageType + enum MessageType { /// <summary> /// Unknown message type. @@ -117,7 +117,7 @@ /// Flags to determine more information about the message. /// </summary> [Flags] - public enum MessageFlags + enum MessageFlags { /// <summary> /// No Flags. @@ -168,7 +168,7 @@ /// <summary> /// Message class for passing over network. /// </summary> - public class IrssMessage + class IrssMessage { #region Members Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote (PocketPC2003)/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Virtual Remote (PocketPC2003)/Properties/AssemblyInfo.cs 2008-03-08 10:05:03 UTC (rev 1436) +++ trunk/plugins/IR Server Suite/Applications/Virtual Remote (PocketPC2003)/Properties/AssemblyInfo.cs 2008-03-08 13:45:51 UTC (rev 1437) @@ -32,3 +32,4 @@ // [assembly: AssemblyVersion("1.0.4.2")] +[assembly: CLSCompliant(true)] Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote (PocketPC2003)/ServerAddress.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Virtual Remote (PocketPC2003)/ServerAddress.cs 2008-03-08 10:05:03 UTC (rev 1436) +++ trunk/plugins/IR Server Suite/Applications/Virtual Remote (PocketPC2003)/ServerAddress.cs 2008-03-08 13:45:51 UTC (rev 1437) @@ -8,7 +8,7 @@ /// <summary> /// Server Address form. /// </summary> - public partial class ServerAddress : Form + partial class ServerAddress : Form { #region Properties Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote (PocketPC2003)/Virtual Remote (PocketPC2003).csproj =================================================================== --- trunk/plugins/IR Server Suite/Applications/Virtual Remote (PocketPC2003)/Virtual Remote (PocketPC2003).csproj 2008-03-08 10:05:03 UTC (rev 1436) +++ trunk/plugins/IR Server Suite/Applications/Virtual Remote (PocketPC2003)/Virtual Remote (PocketPC2003).csproj 2008-03-08 13:45:51 UTC (rev 1437) @@ -34,7 +34,8 @@ <WarningLevel>4</WarningLevel> <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> - <DocumentationFile>bin\Debug\VirtualRemote.XML</DocumentationFile> + <DocumentationFile> + </DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote (Smartphone2003)/Client.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Virtual Remote (Smartphone2003)/Client.cs 2008-03-08 10:05:03 UTC (rev 1436) +++ trunk/plugins/IR Server Suite/Applications/Virtual Remote (Smartphone2003)/Client.cs 2008-03-08 13:45:51 UTC (rev 1437) @@ -13,14 +13,14 @@ /// Message handling delegate for client. /// </summary> /// <param name="message">Message received.</param> - public delegate void ClientMessageSink(IrssMessage message); + delegate void ClientMessageSink(IrssMessage message); #endregion Delegates /// <summary> /// TCP communications client class. /// </summary> - public class Client : IDisposable + class Client : IDisposable { #region Variables Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote (Smartphone2003)/FormMain.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Virtual Remote (Smartphone2003)/FormMain.cs 2008-03-08 10:05:03 UTC (rev 1436) +++ trunk/plugins/IR Server Suite/Applications/Virtual Remote (Smartphone2003)/FormMain.cs 2008-03-08 13:45:51 UTC (rev 1437) @@ -23,7 +23,7 @@ #region Constants - static readonly string ConfigurationFile = "VirtualRemote.xml"; + const string ConfigurationFile = "VirtualRemote.xml"; const int ServerPort = 24000; Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote (Smartphone2003)/IrssMessage.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Virtual Remote (Smartphone2003)/IrssMessage.cs 2008-03-08 10:05:03 UTC (rev 1436) +++ trunk/plugins/IR Server Suite/Applications/Virtual Remote (Smartphone2003)/IrssMessage.cs 2008-03-08 13:45:51 UTC (rev 1437) @@ -9,7 +9,7 @@ /// <summary> /// Type of message. /// </summary> - public enum MessageType + enum MessageType { /// <summary> /// Unknown message type. @@ -117,7 +117,7 @@ /// Flags to determine more information about the message. /// </summary> [Flags] - public enum MessageFlags + enum MessageFlags { /// <summary> /// No Flags. @@ -168,7 +168,7 @@ /// <summary> /// Message class for passing over network. /// </summary> - public class IrssMessage + class IrssMessage { #region Members Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote (Smartphone2003)/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Virtual Remote (Smartphone2003)/Properties/AssemblyInfo.cs 2008-03-08 10:05:03 UTC (rev 1436) +++ trunk/plugins/IR Server Suite/Applications/Virtual Remote (Smartphone2003)/Properties/AssemblyInfo.cs 2008-03-08 13:45:51 UTC (rev 1437) @@ -30,3 +30,5 @@ // by using the '*' as shown below: [assembly: AssemblyVersion("1.0.4.2")] + +[assembly: CLSCompliant(true)] Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote (Smartphone2003)/ServerAddress.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Virtual Remote (Smartphone2003)/ServerAddress.cs 2008-03-08 10:05:03 UTC (rev 1436) +++ trunk/plugins/IR Server Suite/Applications/Virtual Remote (Smartphone2003)/ServerAddress.cs 2008-03-08 13:45:51 UTC (rev 1437) @@ -12,7 +12,7 @@ /// <summary> /// Summary description for ServerAddress. /// </summary> - public class ServerAddress : Form + class ServerAddress : Form { private MainMenu mainMenu; Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote (Smartphone2003)/Virtual Remote (Smartphone2003).csproj =================================================================== --- trunk/plugins/IR Server Suite/Applications/Virtual Remote (Smartphone2003)/Virtual Remote (Smartphone2003).csproj 2008-03-08 10:05:03 UTC (rev 1436) +++ trunk/plugins/IR Server Suite/Applications/Virtual Remote (Smartphone2003)/Virtual Remote (Smartphone2003).csproj 2008-03-08 13:45:51 UTC (rev 1437) @@ -31,7 +31,8 @@ <WarningLevel>4</WarningLevel> <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies> <TreatWarningsAsErrors>true</TreatWarningsAsErrors> - <DocumentationFile>bin\Debug\VirtualRemote.xml</DocumentationFile> + <DocumentationFile> + </DocumentationFile> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote (WinCE5)/Client.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Virtual Remote (WinCE5)/Client.cs 2008-03-08 10:05:03 UTC (rev 1436) +++ trunk/plugins/IR Server Suite/Applications/Virtual Remote (WinCE5)/Client.cs 2008-03-08 13:45:51 UTC (rev 1437) @@ -13,14 +13,14 @@ /// Message handling delegate for client. /// </summary> /// <param name="message">Message received.</param> - public delegate void ClientMessageSink(IrssMessage message); + delegate void ClientMessageSink(IrssMessage message); #endregion Delegates /// <summary> /// TCP communications client class. /// </summary> - public class Client : IDisposable + class Client : IDisposable { #region Variables Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote (WinCE5)/FormMain.cs =================================================================== --- trunk/plugins/IR Server Suite/Applications/Virtual Remote (WinCE5)/FormMain.cs 2008-03-08 10:05:03 UTC (rev 1436) +++ trunk/plugins/IR Server Suite/Applications/Virtual Remote (WinCE5)/FormMain.cs 2008-03-08 13:45:51 UTC (rev 1437) @@ -22,7 +22,7 @@ #region Constants - static readonly string ConfigurationFile = "VirtualRemote.xml"; + const string ConfigurationFile = "VirtualRemote.xml"; const int ServerPort = 24000; Modified: trunk/plugins/IR Server Suite/Applications/Virtual Remote (WinCE5)/IrssMessage.cs =================================... [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.ProgramInfo != string.Empty) + programDesc.Visible = true; + + programView = true; + btnletter.Visible = false; + prevMode = pageMode.SearchView; + + } + + } + } + catch (Exception ex) + { + Log.Info("GUIAreena: Unable to get page ({0})", ex.Message); + GUIDialogNotify dlg = (GUIDialogNotify)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_NOTIFY); + dlg.SetHeading("ERROR"); + dlg.SetText(GUILocalizeStrings.Get(800006)); + dlg.DoModal(GUIWindowManager.ActiveWindow); + } + + } + #endregion + + void ShowMainListView() + { + mainview = true; + letterview = false; + poster.SetFileName(GUIGraphicsContext.Skin + @"\media\" + backgroundposter); + GUIPropertyManager.SetProperty("#title", GUILocalizeStrings.Get(800001)); //Show which movies? + + string[] MainListOptions = new string[15]; + MainListOptions[0] = GUILocalizeStrings.Get(800002); + MainListMenu[0] = MainListOptions[0]; + MainListOptions[1] = GUILocalizeStrings.Get(800003); + MainListMenu[1] = MainListOptions[1]; + MainListOptions[2] = GUILocalizeStrings.Get(800005); + MainListMenu[2] = MainListOptions[3]; + + listview.Clear(); + int i = 0; + while (MainListOptions[i] != null) + { + GUIListItem item = new GUIListItem(); + item.IsFolder = true; + MediaPortal.Util.Utils.SetDefaultIcons(item); + item.Label = MainListOptions[i]; + listview.Add(item); + i++; + } + } + + void LoadSettings() + { + } + + public void ShowListView(string[] _ProgramName, int _titlenumber) + { + if (AreenaUtility.interupted == true) + { + AreenaUtility.interupted = false; + return; + } + poster.SetFileName(GUIGraphicsContext.Skin + @"\media\" + backgroundposter); + GUIPropertyManager.SetProperty("#title", GUILocalizeStrings.Get(_titlenumber)); + + listview.Clear(); + GUIListItem item1 = new GUIListItem(); + item1.Label = ".."; + item1.IsFolder = true; + MediaPortal.Util.Utils.SetDefaultIcons(item1); + listview.Add(item1); + + int i = 0; + while (_ProgramName[i] != null) + { + GUIListItem item = new GUIListItem(); + item.IsFolder = true; + MediaPortal.Util.Utils.SetDefaultIcons(item); + item.Label = _ProgramName[i]; + listview.Add(item); + i++; + } + } + + void ShowLabelsFalse() + { + btnletter.Visible = false; + poster.Visible = false; + programPoster.Visible = false; + programDesc.Visible = false; + btnletter.NavigateDown = 4; + } + + public void ShowPoster(string downloadurl, string movieID) + { + if (downloadurl == null | downloadurl == string.Empty) + return; + else + { + AreenaUtility AU = new AreenaUtility(); + AU.DownloadIcon(downloadurl, movieID); + + // TODO - add utils function here + string thumbFile = System.IO.Path.Combine(Thumbs.Trailers, movieID + ".jpg"); + if (System.IO.File.Exists(thumbFile)) + { + poster.Visible = true; + poster.SetFileName(thumbFile); + } + } + } + + public void ShowProgramPoster(string downloadurl, string movieID) + { + if (downloadurl == null | downloadurl == string.Empty) + return; + else + { + AreenaUtility AU = new AreenaUtility(); + AU.DownloadIcon(downloadurl, movieID); + + string thumbFile = System.IO.Path.Combine(Thumbs.Trailers, movieID + ".jpg"); + if (System.IO.File.Exists(thumbFile)) + { + programPoster.Visible = true; + programPoster.SetFileName(thumbFile); + } + } + } + + public static void PlayMedia(string url, string videoName) + { + + bool playOk = false; + playOk = g_Player.Play(url, g_Player.MediaType.Video); + + if (playOk) + { + g_Player.ShowFullScreenWindow(); + g_Player.FullScreen = true; + } + else + { + Log.Info("GUIAreena: Unable to play {0}", url); + GUIDialogNotify dlg = (GUIDialogNotify)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_NOTIFY); + dlg.SetHeading("ERROR"); + dlg.SetText("Unable to play the selected video. Please try again later."); + dlg.DoModal(GUIWindowManager.ActiveWindow); + } + } + + public void ShowLetterListView(string[] movienames, string[] movieurls, string[] movieids) + { + int i = 0; + int j = 0; + string letter; + listview.Clear(); + ShowLabelsFalse(); + btnletter.Visible = true; + Array.Clear(LMovieName, 0, 2000); + Array.Clear(LMovieUrl, 0, 2000); + Array.Clear(LMovieID, 0, 2000); + + poster.SetFileName(GUIGraphicsContext.Skin + @"\media\" + backgroundposter); + GUIPropertyManager.SetProperty("#title", ""); + letter = btnletter.SelectedLabel; + + GUIListItem item1 = new GUIListItem(); + item1.Label = ".."; + item1.IsFolder = true; + MediaPortal.Util.Utils.SetDefaultIcons(item1); + listview.Add(item1); + + while (movienames[i] != null) + { + if (movienames[i].StartsWith("The " + letter) == true) + { + LMovieName[j] = movienames[i]; + LMovieUrl[j] = movieurls[i]; + LMovieID[j] = movieids[i]; + GUIListItem item = new GUIListItem(); + item.Label = LMovieName[j]; + item.IsFolder = true; + MediaPortal.Util.Utils.SetDefaultIcons(item); + listview.Add(item); + j++; + } + else if (movienames[i].StartsWith("The ") == true) { } + else if (movienames[i].StartsWith("A " + letter) == true) + { + LMovieName[j] = movienames[i]; + LMovieUrl[j] = movieurls[i]; + LMovieID[j] = movieids[i]; + GUIListItem item = new GUIListItem(); + item.Label = LMovieName[j]; + item.IsFolder = true; + MediaPortal.Util.Utils.SetDefaultIcons(item); + listview.Add(item); + j++; + } + else if (movienames[i].StartsWith("A ") == true) { } + else if (movienames[i].StartsWith("An " + letter) == true) + { + LMovieName[j] = movienames[i]; + LMovieUrl[j] = movieurls[i]; + LMovieID[j] = movieids[i]; + GUIListItem item = new GUIListItem(); + item.Label = LMovieName[j]; + item.IsFolder = true; + MediaPortal.Util.Utils.SetDefaultIcons(item); + listview.Add(item); + j++; + } + else if (movienames[i].StartsWith("An ") == true) { } + else if (movienames[i].StartsWith(letter) == true) + { + LMovieName[j] = movienames[i]; + LMovieID[j] = movieids[i]; + LMovieUrl[j] = movieurls[i]; + GUIListItem item = new GUIListItem(); + item.Label = LMovieName[j]; + listview.Add(item); + item.IsFolder = true; + MediaPortal.Util.Utils.SetDefaultIcons(item); + j++; + } + else if (letter.Equals("#") == true) + { + for (int n = 0; n <= 9; n++) + if (movienames[i].StartsWith(n.ToString()) == true) + { + LMovieName[j] = movienames[i]; + LMovieUrl[j] = movieurls[i]; + LMovieID[j] = movieids[i]; + GUIListItem item = new GUIListItem(); + item.Label = LMovieName[j]; + item.IsFolder = true; + MediaPortal.Util.Utils.SetDefaultIcons(item); + listview.Add(item); + j++; + } + } + + i++; + } + if (currentletter == letter) + listview.SelectedListItemIndex = Prev_SelectedItem; + else + { + listview.SelectedListItemIndex = 0; + currentletter = letter; + } + } + + } +} Added: trunk/plugins/YleAreena/GUIAreenaPlugin.cs =================================================================== --- trunk/plugins/YleAreena/GUIAreenaPlugin.cs (rev 0) +++ trunk/plugins/YleAreena/GUIAreenaPlugin.cs 2008-05-24 17:08:34 UTC (rev 1808) @@ -0,0 +1,88 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows.Forms; +using MediaPortal.GUI.Library; + +namespace MediaPortal.YleAreena +{ + public class GUIAreenaPlugin : ISetupForm, IShowPlugin + { + // Returns the name of the plugin which is shown in the plugin menu + public string PluginName() + { + return "Yle Areena"; + } + + // Returns the description of the plugin is shown in the plugin menu + public string Description() + { + return "Browse material on Finnish YLE Areena service"; + } + + // Returns the author of the plugin which is shown in the plugin menu + public string Author() + { + return "Jupek Faithflame"; + } + + // show the setup dialog + public void ShowPlugin() + { + GUIAreenaSetupForm setup = new GUIAreenaSetupForm(); + setup.ShowDialog(); + } + + // Indicates whether plugin can be enabled/disabled + public bool CanEnable() + { + return true; + } + + // get ID of windowplugin belonging to this setup + public int GetWindowId() + { + return 800000; + } + + // Indicates if plugin is enabled by default; + public bool DefaultEnabled() + { + return false; + } + // indicates if a plugin has its own setup screen + public bool HasSetup() + { + return true; + } + + /// <summary> + /// If the plugin should have its own button on the main menu of Mediaportal then it + /// should return true to this method, otherwise if it should not be on home + /// it should return false + /// </summary> + /// <param name="strButtonText">text the button should have</param> + /// <param name="strButtonImage">image for the button, or empty for default</param> + /// <param name="strButtonImageFocus">image for the button, or empty for default</param> + /// <param name="strPictureImage">subpicture for the button or empty for none</param> + /// <returns>true : plugin needs its own button on home + /// false : plugin does not need its own button on home</returns> + public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) + { + strButtonText = GUILocalizeStrings.Get(800000); + strButtonImage = string.Empty; + strButtonImageFocus = string.Empty; + strPictureImage = "YleAreena.png"; + return true; + } + + #region IShowPlugin Members + + public bool ShowDefaultHome() + { + return false; + } + + #endregion + } +} Added: trunk/plugins/YleAreena/GUIAreenaSetupForm.Designer.cs =================================================================== --- trunk/plugins/YleAreena/GUIAreenaSetupForm.Designer.cs (rev 0) +++ trunk/plugins/YleAreena/GUIAreenaSetupForm.Designer.cs 2008-05-24 17:08:34 UTC (rev 1808) @@ -0,0 +1,50 @@ +namespace MediaPortal.YleAreena +{ + partial class GUIAreenaSetupForm + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + + #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.btnCancel = new MediaPortal.UserInterface.Controls.MPButton(); + this.SuspendLayout(); + // + // btnCancel + // + this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.btnCancel.Location = new System.Drawing.Point(205, 231); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.Size = new System.Drawing.Size(75, 23); + this.btnCancel.TabIndex = 11; + this.btnCancel.Text = "&Cancel"; + this.btnCancel.UseVisualStyleBackColor = true; + this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); + // + // GUIAreenaSetupForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(292, 266); + this.Controls.Add(this.btnCancel); + this.Name = "GUIAreenaSetupForm"; + this.Text = "GUIAreenaSetupForm"; + this.ResumeLayout(false); + + } + + #endregion + + private MediaPortal.UserInterface.Controls.MPButton btnCancel; + } +} \ No newline at end of file Added: trunk/plugins/YleAreena/GUIAreenaSetupForm.cs =================================================================== --- trunk/plugins/YleAreena/GUIAreenaSetupForm.cs (rev 0) +++ trunk/plugins/YleAreena/GUIAreenaSetupForm.cs 2008-05-24 17:08:34 UTC (rev 1808) @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +namespace MediaPortal.YleAreena +{ + public partial class GUIAreenaSetupForm : System.Windows.Forms.Form + { + public GUIAreenaSetupForm() + { + InitializeComponent(); + } + + private void btnCancel_Click(object sender, EventArgs e) + { + this.Close(); + } + } +} Added: trunk/plugins/YleAreena/GUIAreenaSetupForm.resx =================================================================== --- trunk/plugins/YleAreena/GUIAreenaSetupForm.resx (rev 0) +++ trunk/plugins/YleAreena/GUIAreenaSetupForm.resx 2008-05-24 17:08:34 UTC (rev 1808) @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file Added: trunk/plugins/YleAreena/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/YleAreena/Properties/AssemblyInfo.cs (rev 0) +++ trunk/plugins/YleAreena/Properties/AssemblyInfo.cs 2008-05-24 17:08:34 UTC (rev 1808) @@ -0,0 +1,36 @@ +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("YleAreena")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("YleAreena")] +[assembly: AssemblyCopyright("Copyright © 2008")] +[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("7627a567-14cc-4be7-9a8b-f3d661b63df7")] + +// 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 Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] Added: trunk/plugins/YleAreena/Skin/YLEAreena.xml =================================================================== --- trunk/plugins/YleAreena/Skin/YLEAreena.xml (rev 0) +++ trunk/plugins/YleAreena/Skin/YLEAreena.xml 2008-05-24 17:08:34 UTC (rev 1808) @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<window> + <id>800000</id> + <defaultcontrol>4</defaultcontrol> + <allowoverlay>yes</allowoverlay> + <define>#header.label:800000</define> + <controls> + <import>common.window.xml</import> + <control> + <type>image</type> + <description>item poster</description> + <id>24</id> + <posX>104</posX> + <posY>120</posY> + <width>120</width> + <height>67</height> + </control> + <control> + <type>image</type> + <description>program poster</description> + <id>25</id> + <posX>30</posX> + <posY>200</posY> + <width>180</width> + <height>101</height> + </control> + <control> + <type>textboxscrollup</type> + <description>program description</description> + <id>26</id> + <posX>20</posX> + <posY>300</posY> + <width>250</width> + <height>280</height> + <colordiffuse>ffffffff</colordiffuse> + <font>font13</font> + <label>#programinfo</label> + <textcolor>FFFFFFFF</textcolor> + </control> + <control> + <type>selectbutton</type> + <description>Letter button</description> + <id>3</id> + <posX>60</posX> + <posY>97</posY> + <onleft>4</onleft> + <onright>4</onright> + <onup>4</onup> + <ondown>4</ondown> + <subitems>-</subitems> + <label>872</label> + <textureFocus>menu_list_nofocus.png</textureFocus> + <subitems /> + </control> + <control> + <type>listcontrol</type> + <description>listview</description> + <id>4</id> + <posX>250</posX> + <width>440</width> + <height>432</height> + <onleft>3</onleft> + <onright>3</onright> + <onup>3</onup> + <ondown>3</ondown> + <font>font13</font> + </control> + </controls> +</window> \ No newline at end of file Added: trunk/plugins/YleAreena/YleAreena.csproj =================================================================== --- trunk/plugins/YleAreena/YleAreena.csproj (rev 0) +++ trunk/plugins/YleAreena/YleAreena.csproj 2008-05-24 17:08:34 UTC (rev 1808) @@ -0,0 +1,85 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>9.0.21022</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{F02A7FDC-4783-48FA-87D2-7FDF12A7D838}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>YleAreena</RootNamespace> + <AssemblyName>YleAreena</AssemblyName> + <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + </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\debug\</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.Data" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="GUIAreena.cs" /> + <Compile Include="GUIAreenaPlugin.cs" /> + <Compile Include="GUIAreenaSetupForm.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="GUIAreenaSetupForm.Designer.cs"> + <DependentUpon>GUIAreenaSetupForm.cs</DependentUpon> + </Compile> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="AreenaMedia.cs" /> + <Compile Include="AreenaUtility.cs" /> + </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="GUIAreenaSetupForm.resx"> + <DependentUpon>GUIAreenaSetupForm.cs</DependentUpon> + <SubType>Designer</SubType> + </EmbeddedResource> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\MP17778\Core\Core.csproj"> + <Project>{02FFFC1F-2555-4B99-8B01-3432D0673855}</Project> + <Name>Core</Name> + </ProjectReference> + <ProjectReference Include="..\..\MP17778\Dialogs\Dialogs.csproj"> + <Project>{396C5208-5D46-4A11-92C1-FD0F2F42D7DD}</Project> + <Name>Dialogs</Name> + </ProjectReference> + <ProjectReference Include="..\..\MP17778\Utils\Utils.csproj"> + <Project>{6DA0E4DF-6230-4642-98B5-E690BB6942BB}</Project> + <Name>Utils</Name> + </ProjectReference> + <ProjectReference Include="..\WindowPlugins\WindowPlugins.csproj"> + <Project>{B282C55B-A37B-4CEC-A4FC-00791069BF00}</Project> + <Name>WindowPlugins</Name> + </ProjectReference> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\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/YleAreena/YleAreena.sln =================================================================== --- trunk/plugins/YleAreena/YleAreena.sln (rev 0) +++ trunk/plugins/YleAreena/YleAreena.sln 2008-05-24 17:08:34 UTC (rev 1808) @@ -0,0 +1,20 @@ + +... [truncated message content] |