From: <hwa...@us...> - 2008-11-25 21:05:34
|
Revision: 2363 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=2363&view=rev Author: hwahrmann Date: 2008-11-25 21:05:26 +0000 (Tue, 25 Nov 2008) Log Message: ----------- Initial Import Added Paths: ----------- trunk/plugins/OneButtonMusic/ trunk/plugins/OneButtonMusic/OneButtonMusic/ trunk/plugins/OneButtonMusic/OneButtonMusic/OneButtonMusic.cs trunk/plugins/OneButtonMusic/OneButtonMusic/OneButtonMusic.csproj trunk/plugins/OneButtonMusic/OneButtonMusic/OneButtonMusicConfig.Designer.cs trunk/plugins/OneButtonMusic/OneButtonMusic/OneButtonMusicConfig.cs trunk/plugins/OneButtonMusic/OneButtonMusic/OneButtonMusicConfig.resx trunk/plugins/OneButtonMusic/OneButtonMusic/Properties/ trunk/plugins/OneButtonMusic/OneButtonMusic/Properties/AssemblyInfo.cs trunk/plugins/OneButtonMusic/OneButtonMusic.sln Added: trunk/plugins/OneButtonMusic/OneButtonMusic/OneButtonMusic.cs =================================================================== --- trunk/plugins/OneButtonMusic/OneButtonMusic/OneButtonMusic.cs (rev 0) +++ trunk/plugins/OneButtonMusic/OneButtonMusic/OneButtonMusic.cs 2008-11-25 21:05:26 UTC (rev 2363) @@ -0,0 +1,243 @@ +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Text; +using System.Windows.Forms; + +using MediaPortal.Configuration; +using MediaPortal.Music.Database; +using MediaPortal.GUI.Library; +using MediaPortal.Playlists; +using MediaPortal.Util; + +namespace MediaPortal.Plugins +{ + public class OneButtonMusic : IPlugin, ISetupForm + { + #region Variables + string _playlistFolder = ""; + string _playlist = ""; + bool _usePlaylist = false; + bool _randomPlaylist = true; + bool _lucky = false; + PlayListPlayer playlistPlayer; + #endregion + + #region Methods + /// <summary> + /// Load the settings + /// </summary> + private void LoadSettings() + { + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) + { + _playlistFolder = xmlreader.GetValueAsString("music", "playlists", ""); + _playlist = xmlreader.GetValueAsString("onebuttonmusic", "playlist", ""); + _usePlaylist = xmlreader.GetValueAsBool("onebuttonmusic", "useplaylist", false); + _randomPlaylist = xmlreader.GetValueAsBool("onebuttonmusic", "randomplaylist", true); + _lucky = xmlreader.GetValueAsBool("onebuttonmusic", "feelinglucky", false); + } + } + + /// <summary> + /// An Action has been fired + /// + /// Check if we are on Home Screen and if Play was pressed. + /// </summary> + /// <param name="action"></param> + void OnAction(Action action) + { + if ((action.wID == Action.ActionType.ACTION_PLAY || + action.wID == Action.ActionType.ACTION_MUSIC_PLAY) && + (GUIWindowManager.ActiveWindow == (int)GUIWindow.Window.WINDOW_HOME || + GUIWindowManager.ActiveWindow == (int)GUIWindow.Window.WINDOW_SECOND_HOME)) + { + playlistPlayer = PlayListPlayer.SingletonPlayer; + + if (_lucky) + { + Log.Info("OneButtonMusic: Adding 100 Random songs from the database"); + AddRandomSongToPlaylist(); + } + else + { + string playList = ""; + if (_randomPlaylist) + playList = GetRandomPlayList(); + else + playList = System.IO.Path.Combine(_playlistFolder, _playlist); + + if (playList == "") + { + Log.Warn("OneButtonMusic: No useable Playlist found"); + return; + } + + Log.Info("OneButtonMusic: Playing Playlist: {0}", playList); + LoadPlaylist(playList); + } + + // if we got a playlist start playing it + if (playlistPlayer.GetPlaylist(PlayListType.PLAYLIST_MUSIC).Count > 0) + { + playlistPlayer.CurrentPlaylistType = PlayListType.PLAYLIST_MUSIC; + playlistPlayer.Reset(); + playlistPlayer.Play(0); + } + } + } + + void LoadPlaylist(string strPlayList) + { + IPlayListIO loader = PlayListFactory.CreateIO(strPlayList); + if (loader == null) + return; + + PlayList playlist = new PlayList(); + + if (!loader.Load(playlist, strPlayList)) + { + Log.Error("OneButtonMusic: Could not load Playlist"); + return; + } + + playlistPlayer.CurrentPlaylistName = System.IO.Path.GetFileNameWithoutExtension(strPlayList); + + // clear current playlist + playlistPlayer.GetPlaylist(PlayListType.PLAYLIST_MUSIC).Clear(); + // add each item of the playlist to the playlistplayer + for (int i = 0; i < playlist.Count; ++i) + { + PlayListItem playListItem = playlist[i]; + playlistPlayer.GetPlaylist(PlayListType.PLAYLIST_MUSIC).Add(playListItem); + } + } + + /// <summary> + /// Gets a Random Playlist out of the Playlist folder + /// </summary> + /// <returns></returns> + string GetRandomPlayList() + { + if (!System.IO.Directory.Exists(_playlistFolder)) + { + Log.Warn("OneButtonMusic: Non existing Playlist Folder"); + return ""; + } + + string[] playLists = System.IO.Directory.GetFiles(_playlistFolder); + PseudoRandomNumberGenerator rand = new PseudoRandomNumberGenerator(); + int rndPlayList = rand.Next(0, playLists.Length - 1); + return playLists[rndPlayList]; + } + + + void AddRandomSongToPlaylist() + { + MusicDatabase m_db = MusicDatabase.Instance; + + // clear current playlist + playlistPlayer.GetPlaylist(PlayListType.PLAYLIST_MUSIC).Clear(); + + for (int i = 0; i < 100; i++) + { + Song song = new Song(); + if (m_db.GetRandomSong(ref song)) + { + PlayListItem playListItem = new PlayListItem(song.Title, song.FileName); + playlistPlayer.GetPlaylist(PlayListType.PLAYLIST_MUSIC).Add(playListItem); + } + } + } + + #endregion + + #region IPlugin Members + /// <summary> + /// The plugin is started by Mediaportal + /// </summary> + public void Start() + { + LoadSettings(); + GUIGraphicsContext.OnNewAction += new OnActionHandler(OnAction); + Log.Info("OneButtonMusic: Started"); + } + + /// <summary> + /// The Plugin is stopped + /// </summary> + public void Stop() + { + Log.Info("OneButtonMusic: Stopped"); + } + + #endregion IPlugin Members + + #region ISetupForm methods + + /// <summary> + /// Determines whether this plugin can be enabled. + /// </summary> + /// <returns> + /// <c>true</c> if this plugin can be enabled; otherwise, <c>false</c>. + /// </returns> + public bool CanEnable() { return true; } + /// <summary> + /// Determines whether this plugin has setup. + /// </summary> + /// <returns> + /// <c>true</c> if this plugin has setup; otherwise, <c>false</c>. + /// </returns> + public bool HasSetup() { return true; } + /// <summary> + /// Gets the plugin name. + /// </summary> + /// <returns>The plugin name.</returns> + public string PluginName() { return "OneButtonMusic"; } + /// <summary> + /// Defaults enabled. + /// </summary> + /// <returns>true if this plugin is enabled by default, otherwise false.</returns> + public bool DefaultEnabled() { return false; } + /// <summary> + /// Gets the window id. + /// </summary> + /// <returns>The window id.</returns> + public int GetWindowId() { return 0; } + /// <summary> + /// Gets the plugin author. + /// </summary> + /// <returns>The plugin author.</returns> + public string Author() { return "hwahrmann"; } + /// <summary> + /// Gets the description of the plugin. + /// </summary> + /// <returns>The plugin description.</returns> + public string Description() { return "Starts Music Playback when \"Play\" is pressed in Home screen"; } + + /// <summary> + /// Shows the plugin configuration. + /// </summary> + public void ShowPlugin() + { + OneButtonMusicConfig config = new OneButtonMusicConfig(); + config.ShowDialog(); + } + + /// <summary> + /// Gets the home screen details for the plugin. + /// </summary> + /// <param name="strButtonText">The button text.</param> + /// <param name="strButtonImage">The button image.</param> + /// <param name="strButtonImageFocus">The button image focus.</param> + /// <param name="strPictureImage">The picture image.</param> + /// <returns>true if the plugin can be seen, otherwise false.</returns> + public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) + { + strButtonText = strButtonImage = strButtonImageFocus = strPictureImage = String.Empty; + return false; + } + + #endregion ISetupForm methods + } +} Added: trunk/plugins/OneButtonMusic/OneButtonMusic/OneButtonMusic.csproj =================================================================== --- trunk/plugins/OneButtonMusic/OneButtonMusic/OneButtonMusic.csproj (rev 0) +++ trunk/plugins/OneButtonMusic/OneButtonMusic/OneButtonMusic.csproj 2008-11-25 21:05:26 UTC (rev 2363) @@ -0,0 +1,89 @@ +<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>{27F417A4-6D27-4952-B0FC-FDCE9101A7DD}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>OneButtonMusic</RootNamespace> + <AssemblyName>OneButtonMusic</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> + <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> + </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="Core, Version=0.9.4.25894, Culture=neutral, processorArchitecture=x86"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\..\mediaportal\Core\bin\Debug\Core.dll</HintPath> + </Reference> + <Reference Include="Databases, Version=0.9.4.25896, Culture=neutral, processorArchitecture=x86"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\..\mediaportal\Databases\bin\Debug\Databases.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=2.2.6.30715, Culture=neutral, processorArchitecture=x86"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\..\mediaportal\Utils\bin\Debug\Utils.dll</HintPath> + </Reference> + </ItemGroup> + <ItemGroup> + <Compile Include="OneButtonMusic.cs" /> + <Compile Include="OneButtonMusicConfig.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="OneButtonMusicConfig.Designer.cs"> + <DependentUpon>OneButtonMusicConfig.cs</DependentUpon> + </Compile> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="OneButtonMusicConfig.resx"> + <SubType>Designer</SubType> + <DependentUpon>OneButtonMusicConfig.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/OneButtonMusic/OneButtonMusic/OneButtonMusicConfig.Designer.cs =================================================================== --- trunk/plugins/OneButtonMusic/OneButtonMusic/OneButtonMusicConfig.Designer.cs (rev 0) +++ trunk/plugins/OneButtonMusic/OneButtonMusic/OneButtonMusicConfig.Designer.cs 2008-11-25 21:05:26 UTC (rev 2363) @@ -0,0 +1,168 @@ +namespace MediaPortal.Plugins +{ + partial class OneButtonMusicConfig + { + /// <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.groupBox1 = new System.Windows.Forms.GroupBox(); + this.label1 = new System.Windows.Forms.Label(); + this.btPlaylistSelect = new System.Windows.Forms.Button(); + this.tbPlayList = new System.Windows.Forms.TextBox(); + this.rbRandomPlaylist = new System.Windows.Forms.RadioButton(); + this.rbUsePlaylist = new System.Windows.Forms.RadioButton(); + this.btOk = new System.Windows.Forms.Button(); + this.btCancel = new System.Windows.Forms.Button(); + this.rbLucky = new System.Windows.Forms.RadioButton(); + this.groupBox1.SuspendLayout(); + this.SuspendLayout(); + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.rbLucky); + this.groupBox1.Controls.Add(this.label1); + this.groupBox1.Controls.Add(this.btPlaylistSelect); + this.groupBox1.Controls.Add(this.tbPlayList); + this.groupBox1.Controls.Add(this.rbRandomPlaylist); + this.groupBox1.Controls.Add(this.rbUsePlaylist); + this.groupBox1.Location = new System.Drawing.Point(13, 22); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(403, 173); + this.groupBox1.TabIndex = 0; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "PlayList Options"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(16, 139); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(262, 13); + this.label1.TabIndex = 4; + this.label1.Text = "Note: Playlists are loaded from the Music Playlist folder"; + // + // btPlaylistSelect + // + this.btPlaylistSelect.Location = new System.Drawing.Point(359, 21); + this.btPlaylistSelect.Name = "btPlaylistSelect"; + this.btPlaylistSelect.Size = new System.Drawing.Size(36, 23); + this.btPlaylistSelect.TabIndex = 3; + this.btPlaylistSelect.Text = "..."; + this.btPlaylistSelect.UseVisualStyleBackColor = true; + this.btPlaylistSelect.Click += new System.EventHandler(this.btPlaylistSelect_Click); + // + // tbPlayList + // + this.tbPlayList.Location = new System.Drawing.Point(139, 25); + this.tbPlayList.Name = "tbPlayList"; + this.tbPlayList.Size = new System.Drawing.Size(213, 20); + this.tbPlayList.TabIndex = 2; + // + // rbRandomPlaylist + // + this.rbRandomPlaylist.AutoSize = true; + this.rbRandomPlaylist.Checked = true; + this.rbRandomPlaylist.Location = new System.Drawing.Point(19, 61); + this.rbRandomPlaylist.Name = "rbRandomPlaylist"; + this.rbRandomPlaylist.Size = new System.Drawing.Size(100, 17); + this.rbRandomPlaylist.TabIndex = 1; + this.rbRandomPlaylist.TabStop = true; + this.rbRandomPlaylist.Text = "Random Playlist"; + this.rbRandomPlaylist.UseVisualStyleBackColor = true; + // + // rbUsePlaylist + // + this.rbUsePlaylist.AutoSize = true; + this.rbUsePlaylist.Location = new System.Drawing.Point(19, 25); + this.rbUsePlaylist.Name = "rbUsePlaylist"; + this.rbUsePlaylist.Size = new System.Drawing.Size(80, 17); + this.rbUsePlaylist.TabIndex = 0; + this.rbUsePlaylist.Text = "Use Paylist:"; + this.rbUsePlaylist.UseVisualStyleBackColor = true; + // + // btOk + // + this.btOk.Location = new System.Drawing.Point(79, 213); + this.btOk.Name = "btOk"; + this.btOk.Size = new System.Drawing.Size(75, 23); + this.btOk.TabIndex = 1; + this.btOk.Text = "Ok"; + this.btOk.UseVisualStyleBackColor = true; + this.btOk.Click += new System.EventHandler(this.btOk_Click); + // + // btCancel + // + this.btCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.btCancel.Location = new System.Drawing.Point(255, 213); + this.btCancel.Name = "btCancel"; + this.btCancel.Size = new System.Drawing.Size(75, 23); + this.btCancel.TabIndex = 2; + this.btCancel.Text = "Cancel"; + this.btCancel.UseVisualStyleBackColor = true; + this.btCancel.Click += new System.EventHandler(this.btCancel_Click); + // + // rbLucky + // + this.rbLucky.AutoSize = true; + this.rbLucky.Location = new System.Drawing.Point(19, 99); + this.rbLucky.Name = "rbLucky"; + this.rbLucky.Size = new System.Drawing.Size(303, 17); + this.rbLucky.TabIndex = 5; + this.rbLucky.Text = "I\'m feeling Lucky (Select random 100 songs from database)"; + this.rbLucky.UseVisualStyleBackColor = true; + // + // OneButtonMusicConfig + // + this.AcceptButton = this.btOk; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.btCancel; + this.ClientSize = new System.Drawing.Size(428, 257); + this.Controls.Add(this.btCancel); + this.Controls.Add(this.btOk); + this.Controls.Add(this.groupBox1); + this.Name = "OneButtonMusicConfig"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "OneButtonMusic Configuration"; + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.Button btPlaylistSelect; + private System.Windows.Forms.TextBox tbPlayList; + private System.Windows.Forms.RadioButton rbRandomPlaylist; + private System.Windows.Forms.RadioButton rbUsePlaylist; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Button btOk; + private System.Windows.Forms.Button btCancel; + private System.Windows.Forms.RadioButton rbLucky; + } +} \ No newline at end of file Added: trunk/plugins/OneButtonMusic/OneButtonMusic/OneButtonMusicConfig.cs =================================================================== --- trunk/plugins/OneButtonMusic/OneButtonMusic/OneButtonMusicConfig.cs (rev 0) +++ trunk/plugins/OneButtonMusic/OneButtonMusic/OneButtonMusicConfig.cs 2008-11-25 21:05:26 UTC (rev 2363) @@ -0,0 +1,99 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; +using MediaPortal.Configuration; + + +namespace MediaPortal.Plugins +{ + public partial class OneButtonMusicConfig : Form + { + #region Variables + string _playlistFolder = ""; + string _playlist = ""; + bool _usePlaylist = false; + bool _randomPlaylist = true; + bool _lucky = false; + #endregion + + #region ctor + public OneButtonMusicConfig() + { + InitializeComponent(); + LoadSettings(); + } + #endregion + + #region Methods + private void LoadSettings() + { + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) + { + _playlistFolder = xmlreader.GetValueAsString("music", "playlists", ""); + _playlist = xmlreader.GetValueAsString("onebuttonmusic", "playlist", ""); + _usePlaylist = xmlreader.GetValueAsBool("onebuttonmusic", "useplaylist", false); + _randomPlaylist = xmlreader.GetValueAsBool("onebuttonmusic", "randomplaylist", true); + _lucky = xmlreader.GetValueAsBool("onebuttonmusic", "feelinglucky", false); + + tbPlayList.Text = _playlist; + rbUsePlaylist.Checked = _usePlaylist; + rbRandomPlaylist.Checked = _randomPlaylist; + } + } + + private void SaveSettings() + { + using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) + { + xmlwriter.SetValue("onebuttonmusic", "playlist", _playlist); + xmlwriter.SetValueAsBool("onebuttonmusic", "useplaylist", rbUsePlaylist.Checked); + xmlwriter.SetValueAsBool("onebuttonmusic", "randomplaylist", rbRandomPlaylist.Checked); + xmlwriter.SetValueAsBool("onebuttonmusic", "feelinglucky", rbLucky.Checked); + } + } + #endregion + + #region Events + private void btOk_Click(object sender, EventArgs e) + { + if (rbUsePlaylist.Checked && _playlistFolder == "") + { + MessageBox.Show("No Playlist Folder specified in Music section"); + return; + } + + if (rbUsePlaylist.Checked && tbPlayList.Text == "") + { + MessageBox.Show("No Playlist Folder specified in Music section"); + return; + } + + _playlist = tbPlayList.Text; + SaveSettings(); + this.Close(); + } + + private void btCancel_Click(object sender, EventArgs e) + { + this.Close(); + } + + private void btPlaylistSelect_Click(object sender, EventArgs e) + { + if (_playlistFolder == "") + { + MessageBox.Show("No Playlist Folder specified in Music section"); + return; + } + OpenFileDialog oFD = new OpenFileDialog(); + oFD.InitialDirectory = _playlistFolder; + if (oFD.ShowDialog() == DialogResult.OK) + tbPlayList.Text = System.IO.Path.GetFileName(oFD.FileName); + } + #endregion + } +} \ No newline at end of file Added: trunk/plugins/OneButtonMusic/OneButtonMusic/OneButtonMusicConfig.resx =================================================================== --- trunk/plugins/OneButtonMusic/OneButtonMusic/OneButtonMusicConfig.resx (rev 0) +++ trunk/plugins/OneButtonMusic/OneButtonMusic/OneButtonMusicConfig.resx 2008-11-25 21:05:26 UTC (rev 2363) @@ -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/OneButtonMusic/OneButtonMusic/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/OneButtonMusic/OneButtonMusic/Properties/AssemblyInfo.cs (rev 0) +++ trunk/plugins/OneButtonMusic/OneButtonMusic/Properties/AssemblyInfo.cs 2008-11-25 21:05:26 UTC (rev 2363) @@ -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("OneButtonMusic")] +[assembly: AssemblyDescription("Starts Playback of Predefined Playlists when pressing Play in Home Screen")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("OneButtonMusic")] +[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("46055095-64cf-4446-b808-b3aaa10884a7")] + +// 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/OneButtonMusic/OneButtonMusic.sln =================================================================== --- trunk/plugins/OneButtonMusic/OneButtonMusic.sln (rev 0) +++ trunk/plugins/OneButtonMusic/OneButtonMusic.sln 2008-11-25 21:05:26 UTC (rev 2363) @@ -0,0 +1,24 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OneButtonMusic", "OneButtonMusic\OneButtonMusic.csproj", "{27F417A4-6D27-4952-B0FC-FDCE9101A7DD}" + ProjectSection(WebsiteProperties) = preProject + Debug.AspNetCompiler.Debug = "True" + Release.AspNetCompiler.Debug = "False" + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {27F417A4-6D27-4952-B0FC-FDCE9101A7DD}.Debug|x86.ActiveCfg = Debug|x86 + {27F417A4-6D27-4952-B0FC-FDCE9101A7DD}.Debug|x86.Build.0 = Debug|x86 + {27F417A4-6D27-4952-B0FC-FDCE9101A7DD}.Release|x86.ActiveCfg = Release|x86 + {27F417A4-6D27-4952-B0FC-FDCE9101A7DD}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |