You can subscribe to this list here.
2007 |
Jan
(36) |
Feb
(79) |
Mar
(123) |
Apr
(95) |
May
(119) |
Jun
(172) |
Jul
(124) |
Aug
(100) |
Sep
(83) |
Oct
(52) |
Nov
(97) |
Dec
(87) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(131) |
Feb
(80) |
Mar
(163) |
Apr
(178) |
May
(73) |
Jun
(54) |
Jul
(106) |
Aug
(118) |
Sep
(50) |
Oct
(125) |
Nov
(100) |
Dec
(99) |
2009 |
Jan
(104) |
Feb
(99) |
Mar
(68) |
Apr
(81) |
May
(52) |
Jun
(87) |
Jul
(67) |
Aug
(33) |
Sep
(27) |
Oct
(37) |
Nov
(60) |
Dec
(116) |
2010 |
Jan
(82) |
Feb
(79) |
Mar
(38) |
Apr
(50) |
May
(45) |
Jun
(53) |
Jul
(23) |
Aug
(86) |
Sep
(22) |
Oct
(96) |
Nov
(97) |
Dec
(73) |
2011 |
Jan
(24) |
Feb
(45) |
Mar
(28) |
Apr
(31) |
May
(42) |
Jun
(25) |
Jul
|
Aug
(12) |
Sep
(28) |
Oct
(13) |
Nov
(43) |
Dec
(13) |
2012 |
Jan
(62) |
Feb
(28) |
Mar
(6) |
Apr
(16) |
May
(7) |
Jun
|
Jul
(16) |
Aug
(2) |
Sep
(1) |
Oct
(4) |
Nov
(1) |
Dec
(3) |
2013 |
Jan
(5) |
Feb
|
Mar
(34) |
Apr
(9) |
May
(6) |
Jun
(10) |
Jul
(32) |
Aug
(8) |
Sep
(11) |
Oct
(35) |
Nov
(24) |
Dec
(22) |
2014 |
Jan
(44) |
Feb
(9) |
Mar
(9) |
Apr
(15) |
May
(25) |
Jun
(34) |
Jul
(16) |
Aug
(11) |
Sep
(7) |
Oct
(6) |
Nov
(1) |
Dec
(12) |
2015 |
Jan
(33) |
Feb
(19) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(5) |
From: <sa...@us...> - 2007-02-06 17:34:02
|
Revision: 97 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=97&view=rev Author: saamand Date: 2007-02-06 09:33:33 -0800 (Tue, 06 Feb 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/MyLyrics/LyricsEngine/LyricController.cs trunk/plugins/MyLyrics/LyricsEngine/Wiki.cs Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricController.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricController.cs 2007-02-06 17:33:03 UTC (rev 96) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricController.cs 2007-02-06 17:33:33 UTC (rev 97) @@ -188,21 +188,21 @@ threadList.Add(lyricSearchThread); } - if (googleSites.Length > 0) - { - ThreadStart googleSitesThreadInstance = delegate - { - LyricSearch_GoogleSites lyricSearch_GoogleSites = new LyricSearch_GoogleSites(m_EventStop_LyricController, m_EventStopped_LyricController, this); - lyricSearch_GoogleSites.setLyricInfo(lyricConfigInfo.artist, lyricConfigInfo.track, lyricConfigInfo.extra); - lyricSearch_GoogleSites.Run(); - }; + //if (googleSites.Length > 0) + //{ + // ThreadStart googleSitesThreadInstance = delegate + // { + // LyricSearch_GoogleSites lyricSearch_GoogleSites = new LyricSearch_GoogleSites(m_EventStop_LyricController, m_EventStopped_LyricController, this); + // lyricSearch_GoogleSites.setLyricInfo(lyricConfigInfo.artist, lyricConfigInfo.track, lyricConfigInfo.extra); + // lyricSearch_GoogleSites.Run(); + // }; - Thread lyricSearchThread = new Thread(googleSitesThreadInstance); - lyricSearchThread.Name = "GoogleSearch for " + lyricConfigInfo.artist + " - " + lyricConfigInfo.track; // looks nice in Output window - lyricSearchThread.IsBackground = true; - lyricSearchThread.Start(); - threadList.Add(lyricSearchThread); - } + // Thread lyricSearchThread = new Thread(googleSitesThreadInstance); + // lyricSearchThread.Name = "GoogleSearch for " + lyricConfigInfo.artist + " - " + lyricConfigInfo.track; // looks nice in Output window + // lyricSearchThread.IsBackground = true; + // lyricSearchThread.Start(); + // threadList.Add(lyricSearchThread); + //} } public void suspendAllSearchThreadsExceptMe(int managedThreadId) Modified: trunk/plugins/MyLyrics/LyricsEngine/Wiki.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/Wiki.cs 2007-02-06 17:33:03 UTC (rev 96) +++ trunk/plugins/MyLyrics/LyricsEngine/Wiki.cs 2007-02-06 17:33:33 UTC (rev 97) @@ -77,19 +77,19 @@ } // Step 2: search with parentheses and other disturbance removed - //optimizeString(ref this.artist, ref this.title); - //if (searchForWiki(this.artist, this.title)) - //{ - // return (lyricsResult.lyrics); - //} + optimizeString(ref this.artist, ref this.title); + if (searchForWiki(this.artist, this.title)) + { + return (lyricsResult.lyrics); + } - //// Step 3: search with altered and strings if any - //this.artist = LyricUtil.changeAnd_and_and(this.artist); - //this.title = LyricUtil.changeAnd_and_and(this.title); - //if (searchForWiki(this.artist, this.title)) - //{ - // return (lyricsResult.lyrics); - //} + // Step 3: search with altered and strings if any + this.artist = LyricUtil.changeAnd_and_and(this.artist); + this.title = LyricUtil.changeAnd_and_and(this.title); + if (searchForWiki(this.artist, this.title)) + { + return (lyricsResult.lyrics); + } // final step: return "Not found" if no lyric found return "Not found"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2007-02-06 17:33:18
|
Revision: 96 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=96&view=rev Author: saamand Date: 2007-02-06 09:33:03 -0800 (Tue, 06 Feb 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.cs Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.cs 2007-02-06 03:28:05 UTC (rev 95) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.cs 2007-02-06 17:33:03 UTC (rev 96) @@ -80,7 +80,7 @@ bool m_DisregardMarkedLyric = true; int m_noOfCurrentlySearches = 0; - const int m_NoOfCurrentSearchesAllowed = 1; + const int m_NoOfCurrentSearchesAllowed = 5; int m_Limit = 100; ArrayList songs = new ArrayList(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-02-06 03:28:07
|
Revision: 95 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=95&view=rev Author: chef_koch Date: 2007-02-05 19:28:05 -0800 (Mon, 05 Feb 2007) Log Message: ----------- small change for logging Modified Paths: -------------- trunk/plugins/FritzBox/FritzBoxSetupFrom.cs trunk/plugins/FritzBox/FritzBoxWatch.cs Modified: trunk/plugins/FritzBox/FritzBoxSetupFrom.cs =================================================================== --- trunk/plugins/FritzBox/FritzBoxSetupFrom.cs 2007-02-06 02:46:58 UTC (rev 94) +++ trunk/plugins/FritzBox/FritzBoxSetupFrom.cs 2007-02-06 03:28:05 UTC (rev 95) @@ -795,63 +795,52 @@ private void SaveSettings() { - try + Log.Info("FRITZ!Box: SaveSettings"); + using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) { - Log.Info("FRITZ!Box: SaveSettings"); - - using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) - { - xmlwriter.SetValueAsBool("fritzbox", "extensiveLogging", checkBoxExtensiveLogging.Checked); + xmlwriter.SetValueAsBool("fritzbox", "extensiveLogging", checkBoxExtensiveLogging.Checked); - xmlwriter.SetValue("fritzbox", "address", textBoxAddress.Text); - xmlwriter.SetValue("fritzbox", "port", textBoxPort.Text); + xmlwriter.SetValue("fritzbox", "address", textBoxAddress.Text); + xmlwriter.SetValue("fritzbox", "port", textBoxPort.Text); - // notify settings - xmlwriter.SetValueAsBool("fritzbox", "closeOnTimeout", checkBoxCloseOnTimout.Checked); - xmlwriter.SetValue("fritzbox", "timeout", numericUpDownTimeout.Value); + // notify settings + xmlwriter.SetValueAsBool("fritzbox", "closeOnTimeout", checkBoxCloseOnTimout.Checked); + xmlwriter.SetValue("fritzbox", "timeout", numericUpDownTimeout.Value); - xmlwriter.SetValueAsBool("fritzbox", "filterMSNs", checkBoxFilterMSNs.Checked); - string strMSN = ""; - for (int i = 0; i < comboBoxMSNs.Items.Count; i++) - { - strMSN += comboBoxMSNs.Items[i].ToString() + ";"; - } - xmlwriter.SetValue("fritzbox", "MSN", strMSN); + xmlwriter.SetValueAsBool("fritzbox", "filterMSNs", checkBoxFilterMSNs.Checked); + string strMSN = ""; + for (int i = 0; i < comboBoxMSNs.Items.Count; i++) + { + strMSN += comboBoxMSNs.Items[i].ToString() + ";"; + } + xmlwriter.SetValue("fritzbox", "MSN", strMSN); - xmlwriter.SetValueAsBool("fritzbox", "showMsnOnHeading", checkBoxShowMsnOnHeading.Checked); + xmlwriter.SetValueAsBool("fritzbox", "showMsnOnHeading", checkBoxShowMsnOnHeading.Checked); - // media settings - xmlwriter.SetValueAsBool("fritzbox", "stopMedia", checkBoxStopMedia.Checked); - xmlwriter.SetValueAsBool("fritzbox", "resumeMedia", checkBoxResumeMedia.Checked); - - // phonebook settings - xmlwriter.SetValueAsBool("fritzbox", "usePhonebook", checkBoxUsePhonebook.Checked); - xmlwriter.SetValueAsBool("fritzbox", "showUnknownCaller", checkBoxShowUnknownCaller.Checked); - xmlwriter.SetValueAsBool("fritzbox", "saveUnknownCaller", checkBoxSaveUnknownCaller.Checked); + // media settings + xmlwriter.SetValueAsBool("fritzbox", "stopMedia", checkBoxStopMedia.Checked); + xmlwriter.SetValueAsBool("fritzbox", "resumeMedia", checkBoxResumeMedia.Checked); + // phonebook settings + xmlwriter.SetValueAsBool("fritzbox", "usePhonebook", checkBoxUsePhonebook.Checked); + xmlwriter.SetValueAsBool("fritzbox", "showUnknownCaller", checkBoxShowUnknownCaller.Checked); + xmlwriter.SetValueAsBool("fritzbox", "saveUnknownCaller", checkBoxSaveUnknownCaller.Checked); - string strCallerId = ""; - string strName = ""; - string strShow = ""; - for (int i = 0; i < dataGridView.RowCount; i++) - { - strCallerId += dataGridView.Rows[i].Cells[0].Value.ToString() + ";"; - strName += dataGridView.Rows[i].Cells[1].Value.ToString() + ";"; - strShow += dataGridView.Rows[i].Cells[2].Value.ToString() + ";"; - } + string strCallerId = ""; + string strName = ""; + string strShow = ""; - xmlwriter.SetValue("fritzbox", "phonebookCallerId", strCallerId); - xmlwriter.SetValue("fritzbox", "phonebookName", strName); - xmlwriter.SetValue("fritzbox", "phonebookShow", strShow); - - + for (int i = 0; i < dataGridView.RowCount - 1; i++) + { + strCallerId += dataGridView.Rows[i].Cells[0].Value.ToString() + ";"; + strName += dataGridView.Rows[i].Cells[1].Value.ToString() + ";"; + strShow += dataGridView.Rows[i].Cells[2].Value.ToString() + ";"; } - } - catch (Exception ex) - { - Log.Error("{0}", ex); + xmlwriter.SetValue("fritzbox", "phonebookCallerId", strCallerId); + xmlwriter.SetValue("fritzbox", "phonebookName", strName); + xmlwriter.SetValue("fritzbox", "phonebookShow", strShow); } } Modified: trunk/plugins/FritzBox/FritzBoxWatch.cs =================================================================== --- trunk/plugins/FritzBox/FritzBoxWatch.cs 2007-02-06 02:46:58 UTC (rev 94) +++ trunk/plugins/FritzBox/FritzBoxWatch.cs 2007-02-06 03:28:05 UTC (rev 95) @@ -57,7 +57,7 @@ { Thread watchThread = new Thread(new ThreadStart(WatchThread)); watchThread.Priority = ThreadPriority.BelowNormal; - watchThread.Name = "FritzBox Monitoring"; + watchThread.Name = "FRITZ!Box Monitoring"; watchThread.Start(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-02-06 02:47:14
|
Revision: 94 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=94&view=rev Author: chef_koch Date: 2007-02-05 18:46:58 -0800 (Mon, 05 Feb 2007) Log Message: ----------- added: when renaming a caller, who already has a thumbnail, the thumbnail will be renamed, too -> no manual work anymore added: some checks when adding caller cleaned up the setupform (typos, nice icon ...) Modified Paths: -------------- trunk/plugins/FritzBox/FritzBox.cs trunk/plugins/FritzBox/FritzBox.csproj trunk/plugins/FritzBox/FritzBoxSetupFrom.cs trunk/plugins/FritzBox/Properties/Resources.Designer.cs trunk/plugins/FritzBox/Properties/Resources.resx Modified: trunk/plugins/FritzBox/FritzBox.cs =================================================================== --- trunk/plugins/FritzBox/FritzBox.cs 2007-02-05 12:45:13 UTC (rev 93) +++ trunk/plugins/FritzBox/FritzBox.cs 2007-02-06 02:46:58 UTC (rev 94) @@ -104,7 +104,7 @@ char[] charSeparators = new char[] { ';' }; if (_extensiveLogging) - Log.Info("FritzBox: LoadSettings"); + Log.Info("FRITZ!Box: LoadSettings"); using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) { @@ -125,7 +125,7 @@ _msn = strMSN.Split(charSeparators, StringSplitOptions.RemoveEmptyEntries); if (_extensiveLogging) - Log.Debug("FritzBox: MSNs loaded: {0}", strMSN); + Log.Debug("FRITZ!Box: MSNs loaded: {0}", strMSN); _showMsnOnHeading = xmlreader.GetValueAsBool("fritzbox", "showMsnOnHeading", false); @@ -140,16 +140,16 @@ if (_extensiveLogging) { - Log.Info("FritzBox: closeOnTimeout = {0}", _closeOnTimeout.ToString()); - Log.Info("FritzBox: timeout = {0}", _timeout.ToString()); - Log.Info("FritzBox: showMsnOnHeading = {0}", _showMsnOnHeading.ToString()); + Log.Info("FRITZ!Box: closeOnTimeout = {0}", _closeOnTimeout.ToString()); + Log.Info("FRITZ!Box: timeout = {0}", _timeout.ToString()); + Log.Info("FRITZ!Box: showMsnOnHeading = {0}", _showMsnOnHeading.ToString()); - Log.Info("FritzBox: stopMedia = {0}", _stopMedia.ToString()); - Log.Info("FritzBox: resumeMedia = {0}", _resumeMedia.ToString()); + Log.Info("FRITZ!Box: stopMedia = {0}", _stopMedia.ToString()); + Log.Info("FRITZ!Box: resumeMedia = {0}", _resumeMedia.ToString()); - Log.Info("FritzBox: usePhonebook = {0}", _usePhonebook.ToString()); - Log.Info("FritzBox: showUnknownCaller = {0}", _showUnknownCaller.ToString()); - Log.Info("FritzBox: saveUnknownCaller = {0}", _saveUnknownCaller.ToString()); + Log.Info("FRITZ!Box: usePhonebook = {0}", _usePhonebook.ToString()); + Log.Info("FRITZ!Box: showUnknownCaller = {0}", _showUnknownCaller.ToString()); + Log.Info("FRITZ!Box: saveUnknownCaller = {0}", _saveUnknownCaller.ToString()); } if (_usePhonebook) @@ -164,12 +164,12 @@ phonebook.Add(caller); if (_extensiveLogging) - Log.Debug("FritzBox: caller loaded: {0} {1} {2}", caller.callerId, caller.name, caller.show); + Log.Debug("FRITZ!Box: caller loaded: {0} {1} {2}", caller.callerId, caller.name, caller.show); } } if (_extensiveLogging) - Log.Debug("FritzBox: imported {0} callers", phonebook.Count.ToString()); + Log.Debug("FRITZ!Box: imported {0} callers", phonebook.Count.ToString()); } } @@ -177,7 +177,7 @@ private void SaveSettings() { if (_extensiveLogging) - Log.Info("FritzBox: SaveSettings"); + Log.Info("FRITZ!Box: SaveSettings"); using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) { @@ -482,7 +482,7 @@ /// </summary> public void Start() { - Log.Info("FritzBox Plugin {0} starting.", _version); + Log.Info("FRITZ!Box Plugin {0} starting.", _version); FritzBoxWatch = new FritzBoxWatch(); LoadSettings(); @@ -513,7 +513,7 @@ public string Description() { - return "Displays FritzBox calling information."; + return "Displays FRITZ!Box calling information."; } public bool DefaultEnabled() @@ -542,7 +542,7 @@ public string PluginName() { - return "FritzBox CallMonitor"; + return "FRITZ!Box CallMonitor"; } public bool HasSetup() Modified: trunk/plugins/FritzBox/FritzBox.csproj =================================================================== --- trunk/plugins/FritzBox/FritzBox.csproj 2007-02-05 12:45:13 UTC (rev 93) +++ trunk/plugins/FritzBox/FritzBox.csproj 2007-02-06 02:46:58 UTC (rev 94) @@ -94,6 +94,9 @@ <EmbeddedResource Include="FritzBoxDisabled.png" /> <EmbeddedResource Include="FritzBox.png" /> </ItemGroup> + <ItemGroup> + <None Include="gfx\FritzBoxIconTransparent.png" /> + </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/FritzBox/FritzBoxSetupFrom.cs =================================================================== --- trunk/plugins/FritzBox/FritzBoxSetupFrom.cs 2007-02-05 12:45:13 UTC (rev 93) +++ trunk/plugins/FritzBox/FritzBoxSetupFrom.cs 2007-02-06 02:46:58 UTC (rev 94) @@ -58,13 +58,13 @@ private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxSaveUnknownCaller; private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxShowUnknownCaller; private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxUsePhonebook; - private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxNewShow; - private MediaPortal.UserInterface.Controls.MPTextBox textBoxNewName; - private MediaPortal.UserInterface.Controls.MPTextBox textBoxNewCallerId; - private MediaPortal.UserInterface.Controls.MPButton buttonRemove; - private MediaPortal.UserInterface.Controls.MPLabel labelNewCallerId; - private MediaPortal.UserInterface.Controls.MPLabel labelNewName; - private MediaPortal.UserInterface.Controls.MPButton buttonAdd; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxCallerShow; + private MediaPortal.UserInterface.Controls.MPTextBox textBoxCallerName; + private MediaPortal.UserInterface.Controls.MPTextBox textBoxCallerId; + private MediaPortal.UserInterface.Controls.MPButton buttonCallerRemove; + private MediaPortal.UserInterface.Controls.MPLabel labelCallerId; + private MediaPortal.UserInterface.Controls.MPLabel labelCallerName; + private MediaPortal.UserInterface.Controls.MPButton buttonCallerChange; private MediaPortal.UserInterface.Controls.MPButton buttonCancel; private MediaPortal.UserInterface.Controls.MPButton buttonSave; private MediaPortal.UserInterface.Controls.MPNumericUpDown numericUpDownTimeout; @@ -81,10 +81,11 @@ private MediaPortal.UserInterface.Controls.MPLabel labelHelp; private MediaPortal.UserInterface.Controls.MPButton buttonMSNsRemove; private MediaPortal.UserInterface.Controls.MPButton buttonMSNsAdd; - private PictureBox pictureBox; + private PictureBox pictureBoxCaller; private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxFilterMSNs; private MediaPortal.UserInterface.Controls.MPComboBox comboBoxMSNs; private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxShowMsnOnHeading; + private PictureBox pictureBox1; /// <summary> /// Erforderliche Designervariable. @@ -155,21 +156,22 @@ this.checkBoxResumeMedia = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.checkBoxStopMedia = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.tabPhonebook = new System.Windows.Forms.TabPage(); - this.pictureBox = new System.Windows.Forms.PictureBox(); - this.buttonAdd = new MediaPortal.UserInterface.Controls.MPButton(); - this.checkBoxNewShow = new MediaPortal.UserInterface.Controls.MPCheckBox(); - this.textBoxNewName = new MediaPortal.UserInterface.Controls.MPTextBox(); - this.textBoxNewCallerId = new MediaPortal.UserInterface.Controls.MPTextBox(); - this.buttonRemove = new MediaPortal.UserInterface.Controls.MPButton(); + this.pictureBoxCaller = new System.Windows.Forms.PictureBox(); + this.buttonCallerChange = new MediaPortal.UserInterface.Controls.MPButton(); + this.checkBoxCallerShow = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.textBoxCallerName = new MediaPortal.UserInterface.Controls.MPTextBox(); + this.textBoxCallerId = new MediaPortal.UserInterface.Controls.MPTextBox(); + this.buttonCallerRemove = new MediaPortal.UserInterface.Controls.MPButton(); this.dataGridView = new System.Windows.Forms.DataGridView(); this.colCallerId = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colName = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colShow = new System.Windows.Forms.DataGridViewCheckBoxColumn(); - this.labelNewCallerId = new MediaPortal.UserInterface.Controls.MPLabel(); - this.labelNewName = new MediaPortal.UserInterface.Controls.MPLabel(); + this.labelCallerId = new MediaPortal.UserInterface.Controls.MPLabel(); + this.labelCallerName = new MediaPortal.UserInterface.Controls.MPLabel(); this.buttonCancel = new MediaPortal.UserInterface.Controls.MPButton(); this.buttonSave = new MediaPortal.UserInterface.Controls.MPButton(); this.labelVersion = new MediaPortal.UserInterface.Controls.MPLabel(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.tabControlFritzBoxSettings.SuspendLayout(); this.tabGeneral.SuspendLayout(); this.mpGroupBox1.SuspendLayout(); @@ -179,8 +181,9 @@ ((System.ComponentModel.ISupportInitialize)(this.numericUpDownTimeout)).BeginInit(); this.groupBoxMedia.SuspendLayout(); this.tabPhonebook.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxCaller)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.SuspendLayout(); // // tabControlFritzBoxSettings @@ -224,6 +227,7 @@ // this.mpGroupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); + this.mpGroupBox1.Controls.Add(this.pictureBox1); this.mpGroupBox1.Controls.Add(this.buttonTest); this.mpGroupBox1.Controls.Add(this.textBoxPort); this.mpGroupBox1.Controls.Add(this.textBoxAddress); @@ -241,9 +245,9 @@ // buttonTest // this.buttonTest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.buttonTest.Location = new System.Drawing.Point(430, 18); + this.buttonTest.Location = new System.Drawing.Point(430, 20); this.buttonTest.Name = "buttonTest"; - this.buttonTest.Size = new System.Drawing.Size(75, 25); + this.buttonTest.Size = new System.Drawing.Size(75, 21); this.buttonTest.TabIndex = 2; this.buttonTest.Text = "Test"; this.buttonTest.UseVisualStyleBackColor = true; @@ -254,9 +258,9 @@ this.textBoxPort.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.textBoxPort.BorderColor = System.Drawing.Color.Empty; - this.textBoxPort.Location = new System.Drawing.Point(60, 48); + this.textBoxPort.Location = new System.Drawing.Point(165, 47); this.textBoxPort.Name = "textBoxPort"; - this.textBoxPort.Size = new System.Drawing.Size(364, 21); + this.textBoxPort.Size = new System.Drawing.Size(259, 21); this.textBoxPort.TabIndex = 1; // // textBoxAddress @@ -264,15 +268,15 @@ this.textBoxAddress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.textBoxAddress.BorderColor = System.Drawing.Color.Empty; - this.textBoxAddress.Location = new System.Drawing.Point(60, 20); + this.textBoxAddress.Location = new System.Drawing.Point(165, 20); this.textBoxAddress.Name = "textBoxAddress"; - this.textBoxAddress.Size = new System.Drawing.Size(364, 21); + this.textBoxAddress.Size = new System.Drawing.Size(259, 21); this.textBoxAddress.TabIndex = 0; // // labelPort // this.labelPort.AutoSize = true; - this.labelPort.Location = new System.Drawing.Point(25, 52); + this.labelPort.Location = new System.Drawing.Point(128, 50); this.labelPort.Name = "labelPort"; this.labelPort.Size = new System.Drawing.Size(31, 13); this.labelPort.TabIndex = 8; @@ -281,7 +285,7 @@ // labelAddress // this.labelAddress.AutoSize = true; - this.labelAddress.Location = new System.Drawing.Point(6, 24); + this.labelAddress.Location = new System.Drawing.Point(109, 24); this.labelAddress.Name = "labelAddress"; this.labelAddress.Size = new System.Drawing.Size(50, 13); this.labelAddress.TabIndex = 7; @@ -292,9 +296,9 @@ this.labelHelp.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.labelHelp.Location = new System.Drawing.Point(6, 73); + this.labelHelp.Location = new System.Drawing.Point(165, 73); this.labelHelp.Name = "labelHelp"; - this.labelHelp.Size = new System.Drawing.Size(499, 49); + this.labelHelp.Size = new System.Drawing.Size(340, 49); this.labelHelp.TabIndex = 6; // // tabIncoming @@ -329,7 +333,7 @@ // this.checkBoxSaveUnknownCaller.AutoSize = true; this.checkBoxSaveUnknownCaller.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.checkBoxSaveUnknownCaller.Location = new System.Drawing.Point(24, 70); + this.checkBoxSaveUnknownCaller.Location = new System.Drawing.Point(24, 68); this.checkBoxSaveUnknownCaller.Name = "checkBoxSaveUnknownCaller"; this.checkBoxSaveUnknownCaller.Size = new System.Drawing.Size(121, 17); this.checkBoxSaveUnknownCaller.TabIndex = 2; @@ -398,7 +402,7 @@ this.buttonMSNsRemove.TabIndex = 5; this.buttonMSNsRemove.Text = "Remove"; this.buttonMSNsRemove.UseVisualStyleBackColor = true; - this.buttonMSNsRemove.Click += new System.EventHandler(this.buttonMsnRemove_Click); + this.buttonMSNsRemove.Click += new System.EventHandler(this.buttonMSNsRemove_Click); // // checkBoxFilterMSNs // @@ -421,7 +425,7 @@ this.buttonMSNsAdd.TabIndex = 4; this.buttonMSNsAdd.Text = "Add"; this.buttonMSNsAdd.UseVisualStyleBackColor = true; - this.buttonMSNsAdd.Click += new System.EventHandler(this.buttonMsnAdd_Click); + this.buttonMSNsAdd.Click += new System.EventHandler(this.buttonMSNsAdd_Click); // // comboBoxMSNs // @@ -505,15 +509,15 @@ // // tabPhonebook // - this.tabPhonebook.Controls.Add(this.pictureBox); - this.tabPhonebook.Controls.Add(this.buttonAdd); - this.tabPhonebook.Controls.Add(this.checkBoxNewShow); - this.tabPhonebook.Controls.Add(this.textBoxNewName); - this.tabPhonebook.Controls.Add(this.textBoxNewCallerId); - this.tabPhonebook.Controls.Add(this.buttonRemove); + this.tabPhonebook.Controls.Add(this.pictureBoxCaller); + this.tabPhonebook.Controls.Add(this.buttonCallerChange); + this.tabPhonebook.Controls.Add(this.checkBoxCallerShow); + this.tabPhonebook.Controls.Add(this.textBoxCallerName); + this.tabPhonebook.Controls.Add(this.textBoxCallerId); + this.tabPhonebook.Controls.Add(this.buttonCallerRemove); this.tabPhonebook.Controls.Add(this.dataGridView); - this.tabPhonebook.Controls.Add(this.labelNewCallerId); - this.tabPhonebook.Controls.Add(this.labelNewName); + this.tabPhonebook.Controls.Add(this.labelCallerId); + this.tabPhonebook.Controls.Add(this.labelCallerName); this.tabPhonebook.Location = new System.Drawing.Point(4, 22); this.tabPhonebook.Name = "tabPhonebook"; this.tabPhonebook.Padding = new System.Windows.Forms.Padding(3); @@ -522,72 +526,70 @@ this.tabPhonebook.Text = "Phonebook"; this.tabPhonebook.UseVisualStyleBackColor = true; // - // pictureBox + // pictureBoxCaller // - this.pictureBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Right))); - this.pictureBox.Location = new System.Drawing.Point(417, 38); - this.pictureBox.Name = "pictureBox"; - this.pictureBox.Size = new System.Drawing.Size(100, 122); - this.pictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; - this.pictureBox.TabIndex = 13; - this.pictureBox.TabStop = false; + this.pictureBoxCaller.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.pictureBoxCaller.Location = new System.Drawing.Point(417, 38); + this.pictureBoxCaller.Name = "pictureBoxCaller"; + this.pictureBoxCaller.Size = new System.Drawing.Size(100, 122); + this.pictureBoxCaller.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pictureBoxCaller.TabIndex = 13; + this.pictureBoxCaller.TabStop = false; // - // buttonAdd + // buttonCallerChange // - this.buttonAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.buttonAdd.Location = new System.Drawing.Point(417, 278); - this.buttonAdd.Name = "buttonAdd"; - this.buttonAdd.Size = new System.Drawing.Size(100, 25); - this.buttonAdd.TabIndex = 3; - this.buttonAdd.Text = "Add"; - this.buttonAdd.UseVisualStyleBackColor = true; - this.buttonAdd.Click += new System.EventHandler(this.buttonAdd_Click); + this.buttonCallerChange.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonCallerChange.Location = new System.Drawing.Point(417, 278); + this.buttonCallerChange.Name = "buttonCallerChange"; + this.buttonCallerChange.Size = new System.Drawing.Size(100, 25); + this.buttonCallerChange.TabIndex = 3; + this.buttonCallerChange.Text = "Change"; + this.buttonCallerChange.UseVisualStyleBackColor = true; + this.buttonCallerChange.Click += new System.EventHandler(this.buttonCallerChange_Click); // - // checkBoxNewShow + // checkBoxCallerShow // - this.checkBoxNewShow.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.checkBoxNewShow.AutoSize = true; - this.checkBoxNewShow.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.checkBoxNewShow.Location = new System.Drawing.Point(437, 254); - this.checkBoxNewShow.Name = "checkBoxNewShow"; - this.checkBoxNewShow.Size = new System.Drawing.Size(80, 17); - this.checkBoxNewShow.TabIndex = 2; - this.checkBoxNewShow.Text = "show notify"; - this.checkBoxNewShow.UseVisualStyleBackColor = true; + this.checkBoxCallerShow.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.checkBoxCallerShow.AutoSize = true; + this.checkBoxCallerShow.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.checkBoxCallerShow.Location = new System.Drawing.Point(437, 254); + this.checkBoxCallerShow.Name = "checkBoxCallerShow"; + this.checkBoxCallerShow.Size = new System.Drawing.Size(80, 17); + this.checkBoxCallerShow.TabIndex = 2; + this.checkBoxCallerShow.Text = "show notify"; + this.checkBoxCallerShow.UseVisualStyleBackColor = true; // - // textBoxNewName + // textBoxCallerName // - this.textBoxNewName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.textBoxNewName.BorderColor = System.Drawing.Color.Empty; - this.textBoxNewName.Location = new System.Drawing.Point(417, 222); - this.textBoxNewName.Name = "textBoxNewName"; - this.textBoxNewName.Size = new System.Drawing.Size(100, 21); - this.textBoxNewName.TabIndex = 1; + this.textBoxCallerName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.textBoxCallerName.BorderColor = System.Drawing.Color.Empty; + this.textBoxCallerName.Location = new System.Drawing.Point(417, 222); + this.textBoxCallerName.Name = "textBoxCallerName"; + this.textBoxCallerName.Size = new System.Drawing.Size(100, 21); + this.textBoxCallerName.TabIndex = 1; // - // textBoxNewCallerId + // textBoxCallerId // - this.textBoxNewCallerId.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.textBoxNewCallerId.BorderColor = System.Drawing.Color.Empty; - this.textBoxNewCallerId.Location = new System.Drawing.Point(417, 180); - this.textBoxNewCallerId.Name = "textBoxNewCallerId"; - this.textBoxNewCallerId.Size = new System.Drawing.Size(100, 21); - this.textBoxNewCallerId.TabIndex = 0; + this.textBoxCallerId.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.textBoxCallerId.BorderColor = System.Drawing.Color.Empty; + this.textBoxCallerId.Location = new System.Drawing.Point(417, 180); + this.textBoxCallerId.Name = "textBoxCallerId"; + this.textBoxCallerId.Size = new System.Drawing.Size(100, 21); + this.textBoxCallerId.TabIndex = 0; // - // buttonRemove + // buttonCallerRemove // - this.buttonRemove.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.buttonRemove.Location = new System.Drawing.Point(417, 6); - this.buttonRemove.Name = "buttonRemove"; - this.buttonRemove.Size = new System.Drawing.Size(100, 25); - this.buttonRemove.TabIndex = 6; - this.buttonRemove.Text = "Remove"; - this.buttonRemove.UseVisualStyleBackColor = true; - this.buttonRemove.Click += new System.EventHandler(this.buttonRemove_Click); + this.buttonCallerRemove.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.buttonCallerRemove.Location = new System.Drawing.Point(417, 6); + this.buttonCallerRemove.Name = "buttonCallerRemove"; + this.buttonCallerRemove.Size = new System.Drawing.Size(100, 25); + this.buttonCallerRemove.TabIndex = 6; + this.buttonCallerRemove.Text = "Remove"; + this.buttonCallerRemove.UseVisualStyleBackColor = true; + this.buttonCallerRemove.Click += new System.EventHandler(this.buttonCallerRemove_Click); // // dataGridView // - this.dataGridView.AllowUserToAddRows = false; this.dataGridView.AllowUserToDeleteRows = false; this.dataGridView.AllowUserToResizeRows = false; this.dataGridView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -632,25 +634,25 @@ this.colShow.Name = "colShow"; this.colShow.ReadOnly = true; // - // labelNewCallerId + // labelCallerId // - this.labelNewCallerId.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.labelNewCallerId.AutoSize = true; - this.labelNewCallerId.Location = new System.Drawing.Point(423, 163); - this.labelNewCallerId.Name = "labelNewCallerId"; - this.labelNewCallerId.Size = new System.Drawing.Size(44, 13); - this.labelNewCallerId.TabIndex = 12; - this.labelNewCallerId.Text = "CallerId"; + this.labelCallerId.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.labelCallerId.AutoSize = true; + this.labelCallerId.Location = new System.Drawing.Point(423, 163); + this.labelCallerId.Name = "labelCallerId"; + this.labelCallerId.Size = new System.Drawing.Size(44, 13); + this.labelCallerId.TabIndex = 12; + this.labelCallerId.Text = "CallerId"; // - // labelNewName + // labelCallerName // - this.labelNewName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.labelNewName.AutoSize = true; - this.labelNewName.Location = new System.Drawing.Point(423, 205); - this.labelNewName.Name = "labelNewName"; - this.labelNewName.Size = new System.Drawing.Size(34, 13); - this.labelNewName.TabIndex = 11; - this.labelNewName.Text = "Name"; + this.labelCallerName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.labelCallerName.AutoSize = true; + this.labelCallerName.Location = new System.Drawing.Point(423, 205); + this.labelCallerName.Name = "labelCallerName"; + this.labelCallerName.Size = new System.Drawing.Size(34, 13); + this.labelCallerName.TabIndex = 11; + this.labelCallerName.Text = "Name"; // // buttonCancel // @@ -683,6 +685,16 @@ this.labelVersion.TabIndex = 13; this.labelVersion.TextAlign = System.Drawing.ContentAlignment.MiddleRight; // + // pictureBox1 + // + this.pictureBox1.Image = global::FritzBox.Properties.Resources.FritzBoxIconTransparent; + this.pictureBox1.Location = new System.Drawing.Point(6, 20); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(97, 99); + this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pictureBox1.TabIndex = 2; + this.pictureBox1.TabStop = false; + // // FritzBoxSetupForm // this.AutoScaleBaseSize = new System.Drawing.Size(5, 14); @@ -697,7 +709,7 @@ this.MinimizeBox = false; this.Name = "FritzBoxSetupForm"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "FritzBox configuration"; + this.Text = "FRITZ!Box configuration"; this.tabControlFritzBoxSettings.ResumeLayout(false); this.tabGeneral.ResumeLayout(false); this.tabGeneral.PerformLayout(); @@ -713,8 +725,9 @@ this.groupBoxMedia.PerformLayout(); this.tabPhonebook.ResumeLayout(false); this.tabPhonebook.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxCaller)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); this.ResumeLayout(false); } @@ -723,7 +736,7 @@ private void LoadSettings() { - Log.Info("FritzBox: LoadSettings"); + Log.Info("FRITZ!Box: LoadSettings"); labelVersion.Text = "v" + FritzBox._version; @@ -784,7 +797,7 @@ { try { - Log.Info("FritzBox: SaveSettings"); + Log.Info("FRITZ!Box: SaveSettings"); using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) { @@ -886,47 +899,6 @@ myClient.Close(); } - - private void buttonAdd_Click(object sender, EventArgs e) - { - if ( (textBoxNewCallerId.Text.Length > 0) && (!textBoxNewCallerId.Text.Contains(";")) ) - { - if ( (textBoxNewName.Text.Length > 0) && (!textBoxNewName.Text.Contains(";")) ) - { - dataGridView.Rows.Add(textBoxNewCallerId.Text, textBoxNewName.Text, checkBoxNewShow.Checked); - - textBoxNewCallerId.Text = ""; - textBoxNewName.Text = ""; - checkBoxNewShow.Checked = false; - - textBoxNewCallerId.Focus(); - } - else - { - textBoxNewName.Focus(); - MessageBox.Show("Name must contain any characters.\nA ';' ist not allowed."); - } - } - else - { - textBoxNewCallerId.Focus(); - MessageBox.Show("CallerID must contain any characters.\nA ';' ist not allowed."); - } - } - - private void buttonRemove_Click(object sender, EventArgs e) - { - if ((dataGridView.SelectedRows.Count > 0) && (dataGridView.Rows.Count > 0)) - { - textBoxNewCallerId.Text = dataGridView.Rows[dataGridView.CurrentCell.RowIndex].Cells[0].Value.ToString(); - textBoxNewName.Text = dataGridView.Rows[dataGridView.CurrentCell.RowIndex].Cells[1].Value.ToString(); - checkBoxNewShow.Checked = bool.Parse(dataGridView.Rows[dataGridView.CurrentCell.RowIndex].Cells[2].Value.ToString()); - - dataGridView.Rows.RemoveAt(dataGridView.CurrentCell.RowIndex); - } - } - - private void checkBoxCloseOnTimout_CheckedChanged(object sender, EventArgs e) { numericUpDownTimeout.Enabled = checkBoxCloseOnTimout.Checked; @@ -943,12 +915,22 @@ checkBoxSaveUnknownCaller.Enabled = checkBoxUsePhonebook.Checked; } - private void buttonMsnAdd_Click(object sender, EventArgs e) + private void buttonMSNsAdd_Click(object sender, EventArgs e) { if (isMSNvalid(comboBoxMSNs.Text) == true) comboBoxMSNs.Items.Add(comboBoxMSNs.Text); } + private void buttonMSNsRemove_Click(object sender, EventArgs e) + { + if (comboBoxMSNs.SelectedIndex != -1) + { + comboBoxMSNs.Text = comboBoxMSNs.SelectedItem.ToString(); + + comboBoxMSNs.Items.RemoveAt(comboBoxMSNs.SelectedIndex); + } + } + private bool isMSNvalid(string msn) { string msg = ""; @@ -967,32 +949,116 @@ } } - private void buttonMsnRemove_Click(object sender, EventArgs e) + private void checkBoxFilterMSNs_CheckedChanged(object sender, EventArgs e) { - if (comboBoxMSNs.SelectedIndex != -1) + comboBoxMSNs.Enabled = checkBoxFilterMSNs.Checked; + buttonMSNsAdd.Enabled = checkBoxFilterMSNs.Checked; + buttonMSNsRemove.Enabled = checkBoxFilterMSNs.Checked; + } + + private void checkBoxCloseOnTimout_CheckedChanged_1(object sender, EventArgs e) + { + numericUpDownTimeout.Enabled = checkBoxCloseOnTimout.Checked; + } + + private void buttonCallerChange_Click(object sender, EventArgs e) + { + if (CheckCallerId() && CheckCallerName()) + if (dataGridView.Rows[dataGridView.NewRowIndex].Selected) + { + dataGridView.Rows.Add(textBoxCallerId.Text, textBoxCallerName.Text, checkBoxCallerShow.Checked); + } + else + { + string oldfile = MediaPortal.Util.Utils.GetCoverArt(Thumbs.Yac, + dataGridView.Rows[dataGridView.CurrentCell.RowIndex].Cells[1].Value.ToString()); + + string newfile = String.Format(@"{0}\{1}{2}", Thumbs.Yac, Utils.MakeFileName(textBoxCallerName.Text), Utils.GetThumbExtension()); + + if (File.Exists(oldfile)) + File.Move(oldfile, newfile); + + dataGridView.Rows[dataGridView.CurrentCell.RowIndex].Cells[0].Value = textBoxCallerId.Text; + dataGridView.Rows[dataGridView.CurrentCell.RowIndex].Cells[1].Value = textBoxCallerName.Text; + dataGridView.Rows[dataGridView.CurrentCell.RowIndex].Cells[2].Value = checkBoxCallerShow.Checked; + + pictureBoxCaller.ImageLocation = MediaPortal.Util.Utils.GetCoverArt(Thumbs.Yac, textBoxCallerName.Text); + } + } + + private bool CheckCallerId() + { + if (textBoxCallerId.Text.Length == 0) { - comboBoxMSNs.Text = comboBoxMSNs.SelectedItem.ToString(); + textBoxCallerId.Focus(); + MessageBox.Show("CallerID is empty. Please type in the correct CallerID."); + return false; + } - comboBoxMSNs.Items.RemoveAt(comboBoxMSNs.SelectedIndex); + if (textBoxCallerId.Text.Contains(";")) + { + textBoxCallerId.Focus(); + MessageBox.Show("CallerID: A ';' ist not allowed."); + return false; } + + if (dataGridView.Rows[dataGridView.NewRowIndex].Selected) + for (int i = 0; i < dataGridView.Rows.Count - 1; i++) + if (textBoxCallerId.Text == dataGridView.Rows[i].Cells[0].Value.ToString()) + { + textBoxCallerId.Focus(); + MessageBox.Show("CallerID already exists in phonebook. Please check and change the id."); + return false; + } + + return true; } - private void dataGridView_SelectionChanged(object sender, EventArgs e) + private bool CheckCallerName() { - string strCallerId = dataGridView.Rows[dataGridView.CurrentCell.RowIndex].Cells[1].Value.ToString(); - pictureBox.ImageLocation = MediaPortal.Util.Utils.GetCoverArt(Thumbs.Yac, strCallerId); + if (textBoxCallerName.Text.Length == 0) + { + textBoxCallerName.Focus(); + MessageBox.Show("Name is empty. Please type the name to display for this CallerID."); + return false; + } + + if (textBoxCallerName.Text.Contains(";")) + { + textBoxCallerName.Focus(); + MessageBox.Show("Name: A ';' ist not allowed."); + return false; + } + + return true; } - private void checkBoxFilterMSNs_CheckedChanged(object sender, EventArgs e) + private void buttonCallerRemove_Click(object sender, EventArgs e) { - comboBoxMSNs.Enabled = checkBoxFilterMSNs.Checked; - buttonMSNsAdd.Enabled = checkBoxFilterMSNs.Checked; - buttonMSNsRemove.Enabled = checkBoxFilterMSNs.Checked; + if ((!dataGridView.Rows[dataGridView.NewRowIndex].Selected) && (dataGridView.SelectedRows.Count > 0)) + { + dataGridView.Rows.RemoveAt(dataGridView.CurrentCell.RowIndex); + } } - private void checkBoxCloseOnTimout_CheckedChanged_1(object sender, EventArgs e) + private void dataGridView_SelectionChanged(object sender, EventArgs e) { - numericUpDownTimeout.Enabled = checkBoxCloseOnTimout.Checked; + if (dataGridView.Rows[dataGridView.NewRowIndex].Selected) + { + textBoxCallerId.Text = ""; + textBoxCallerName.Text = ""; + checkBoxCallerShow.Checked = false; + + pictureBoxCaller.ImageLocation = ""; + } + else + { + textBoxCallerId.Text = dataGridView.Rows[dataGridView.CurrentCell.RowIndex].Cells[0].Value.ToString(); + textBoxCallerName.Text = dataGridView.Rows[dataGridView.CurrentCell.RowIndex].Cells[1].Value.ToString(); + checkBoxCallerShow.Checked = bool.Parse(dataGridView.Rows[dataGridView.CurrentCell.RowIndex].Cells[2].Value.ToString()); + + pictureBoxCaller.ImageLocation = MediaPortal.Util.Utils.GetCoverArt(Thumbs.Yac, textBoxCallerName.Text); + } } } } \ No newline at end of file Modified: trunk/plugins/FritzBox/Properties/Resources.Designer.cs =================================================================== --- trunk/plugins/FritzBox/Properties/Resources.Designer.cs 2007-02-05 12:45:13 UTC (rev 93) +++ trunk/plugins/FritzBox/Properties/Resources.Designer.cs 2007-02-06 02:46:58 UTC (rev 94) @@ -59,5 +59,12 @@ resourceCulture = value; } } + + internal static System.Drawing.Bitmap FritzBoxIconTransparent { + get { + object obj = ResourceManager.GetObject("FritzBoxIconTransparent", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } Modified: trunk/plugins/FritzBox/Properties/Resources.resx =================================================================== --- trunk/plugins/FritzBox/Properties/Resources.resx 2007-02-05 12:45:13 UTC (rev 93) +++ trunk/plugins/FritzBox/Properties/Resources.resx 2007-02-06 02:46:58 UTC (rev 94) @@ -117,4 +117,8 @@ <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="FritzBoxIconTransparent" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\gfx\FritzBoxIconTransparent.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> </root> \ 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: <an...@us...> - 2007-02-05 12:45:15
|
Revision: 93 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=93&view=rev Author: and-81 Date: 2007-02-05 04:45:13 -0800 (Mon, 05 Feb 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/MCEReplacement/MCEReplacement.cs trunk/plugins/MCEReplacement/MappedEvent.cs trunk/plugins/MCEReplacement/MceIrApi.cs trunk/plugins/MCEReplacementTray/MceIrApi.cs trunk/plugins/TV3MceBlaster/MceIrApi.cs Modified: trunk/plugins/MCEReplacement/MCEReplacement.cs =================================================================== --- trunk/plugins/MCEReplacement/MCEReplacement.cs 2007-02-04 12:36:28 UTC (rev 92) +++ trunk/plugins/MCEReplacement/MCEReplacement.cs 2007-02-05 12:45:13 UTC (rev 93) @@ -636,7 +636,7 @@ ShowNotifyDialog("Mouse Mode", notifyMessage, 2); if (LogVerbose) - Log.Debug("MCEReplacement: {0}", notifyMessage); + Log.Info("MCEReplacement: {0}", notifyMessage); return true; } @@ -861,7 +861,7 @@ string setName = MultiMaps[_multiMappingSet]; if (LogVerbose) - Log.Debug("MCEReplacement: Multi-Mapping has changed to \"{0}\"", setName); + Log.Info("MCEReplacement: Multi-Mapping has changed to \"{0}\"", setName); ShowNotifyDialog("Multi-Mapping", setName, 2); } Modified: trunk/plugins/MCEReplacement/MappedEvent.cs =================================================================== --- trunk/plugins/MCEReplacement/MappedEvent.cs 2007-02-04 12:36:28 UTC (rev 92) +++ trunk/plugins/MCEReplacement/MappedEvent.cs 2007-02-05 12:45:13 UTC (rev 93) @@ -281,7 +281,14 @@ /// </summary> /// <param name="eventType">Event to act on</param> /// <param name="command">Command to execute when event occurs</param> - public MappedEvent(Events eventType, string command) : this(eventType, "", "", command) { } + public MappedEvent(Events eventType, string command) + { + _matchParam = false; + _eventType = eventType; + _param = ""; + _paramValue = ""; + _command = command; + } /// <summary> /// Used to run the Event Mapper Modified: trunk/plugins/MCEReplacement/MceIrApi.cs =================================================================== --- trunk/plugins/MCEReplacement/MceIrApi.cs 2007-02-04 12:36:28 UTC (rev 92) +++ trunk/plugins/MCEReplacement/MceIrApi.cs 2007-02-05 12:45:13 UTC (rev 93) @@ -1,5 +1,6 @@ using System; using System.Runtime.InteropServices; +using System.Threading; namespace MediaPortal.Plugins { @@ -208,7 +209,7 @@ { _inUse = true; bool returnValue = MceIrPlaybackFromFile(fileHandle); - System.Threading.Thread.Sleep(250); + Thread.Sleep(250); return returnValue; } @@ -235,6 +236,7 @@ _inUse = true; _isSuspended = false; MceIrResume(); + Thread.Sleep(250); } } Modified: trunk/plugins/MCEReplacementTray/MceIrApi.cs =================================================================== --- trunk/plugins/MCEReplacementTray/MceIrApi.cs 2007-02-04 12:36:28 UTC (rev 92) +++ trunk/plugins/MCEReplacementTray/MceIrApi.cs 2007-02-05 12:45:13 UTC (rev 93) @@ -1,5 +1,6 @@ using System; using System.Runtime.InteropServices; +using System.Threading; namespace MCEReplacementTray { @@ -208,7 +209,7 @@ { _inUse = true; bool returnValue = MceIrPlaybackFromFile(fileHandle); - System.Threading.Thread.Sleep(250); + Thread.Sleep(250); return returnValue; } @@ -235,6 +236,7 @@ _inUse = true; _isSuspended = false; MceIrResume(); + Thread.Sleep(250); } } Modified: trunk/plugins/TV3MceBlaster/MceIrApi.cs =================================================================== --- trunk/plugins/TV3MceBlaster/MceIrApi.cs 2007-02-04 12:36:28 UTC (rev 92) +++ trunk/plugins/TV3MceBlaster/MceIrApi.cs 2007-02-05 12:45:13 UTC (rev 93) @@ -1,5 +1,6 @@ using System; using System.Runtime.InteropServices; +using System.Threading; namespace TvEngine { @@ -208,7 +209,7 @@ { _inUse = true; bool returnValue = MceIrPlaybackFromFile(fileHandle); - System.Threading.Thread.Sleep(250); + Thread.Sleep(250); return returnValue; } @@ -235,6 +236,7 @@ _inUse = true; _isSuspended = false; MceIrResume(); + Thread.Sleep(250); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2007-02-04 12:36:30
|
Revision: 92 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=92&view=rev Author: saamand Date: 2007-02-04 04:36:28 -0800 (Sun, 04 Feb 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/MyLyrics/LRC/Properties/AssemblyInfo.cs trunk/plugins/MyLyrics/LyricsEngine/GetGoogleSearchResult.cs trunk/plugins/MyLyrics/LyricsEngine/LyricConfigInfo.cs trunk/plugins/MyLyrics/LyricsEngine/LyricController.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs trunk/plugins/MyLyrics/LyricsEngine/Properties/Settings.Designer.cs trunk/plugins/MyLyrics/LyricsEngine/Properties/Settings.settings trunk/plugins/MyLyrics/LyricsEngine/Setup.cs trunk/plugins/MyLyrics/LyricsEngine/app.config trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.Designer.cs trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.cs trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.resx trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.cs trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs trunk/plugins/MyLyrics/MyLyric Windows Application/MyLyric Windows Application/LyricSiteTestUC.cs trunk/plugins/MyLyrics/MyLyric Windows Application/MyLyric Windows Application/LyricsEngine Tester.cs trunk/plugins/MyLyrics/MyLyric Windows Application/MyLyric Windows Application/Properties/AssemblyInfo.cs Modified: trunk/plugins/MyLyrics/LRC/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MyLyrics/LRC/Properties/AssemblyInfo.cs 2007-02-04 08:11:20 UTC (rev 91) +++ trunk/plugins/MyLyrics/LRC/Properties/AssemblyInfo.cs 2007-02-04 12:36:28 UTC (rev 92) @@ -29,5 +29,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("0.13")] -[assembly: AssemblyFileVersion("0.13")] +[assembly: AssemblyVersion("0.14")] +[assembly: AssemblyFileVersion("0.14")] Modified: trunk/plugins/MyLyrics/LyricsEngine/GetGoogleSearchResult.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/GetGoogleSearchResult.cs 2007-02-04 08:11:20 UTC (rev 91) +++ trunk/plugins/MyLyrics/LyricsEngine/GetGoogleSearchResult.cs 2007-02-04 12:36:28 UTC (rev 92) @@ -9,13 +9,13 @@ { class GetGoogleSearchResult : IDisposable { - private LyricSearch m_LyricSearh; + private LyricSearch_GoogleSites m_LyricSearh; GetGoogleSearchResultsDelegate delSearch; IAsyncResult ar; public static bool Abort = false; // Constructor - public GetGoogleSearchResult(LyricSiteInfo siteInfo, LyricSearch lyricSearch2) + public GetGoogleSearchResult(LyricSiteInfo siteInfo, LyricSearch_GoogleSites lyricSearch2) { Thread.Sleep(1000); @@ -47,9 +47,8 @@ Google.GoogleSearchService s = new Google.GoogleSearchService(); return s.doGoogleSearch(key, q, start, maxResults, filter, restrict, safe, lr, ie, oe); } - catch (System.Net.WebException e) + catch (System.Net.WebException) { - //System.Windows.Forms.MessageBox.Show(e.ToString()); return null; } catch (System.Web.Services.Protocols.SoapException soapException) @@ -68,10 +67,8 @@ //Google.GoogleSearchResult searchResult = delSearch.EndInvoke delSearch = null; } - catch (Exception e) + catch (Exception) { - //System.Console.WriteLine(e.Message); - //delSearch = null; } System.Console.WriteLine("*****************************"); } @@ -106,9 +103,8 @@ m_LyricSearh.validateSearchResult(null, siteInfo); } } - catch (Exception e) + catch (Exception) { - //System.Windows.Forms.MessageBox.Show(e.ToString()); } } } Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricConfigInfo.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricConfigInfo.cs 2007-02-04 08:11:20 UTC (rev 91) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricConfigInfo.cs 2007-02-04 12:36:28 UTC (rev 92) @@ -10,15 +10,13 @@ internal string artist; internal string track; internal string extra; - internal string[] sitesToSearch; - public LyricConfigInfo(string licenseKey, string artist, string track, string extraInfo, params string[] sitesToSearch) + public LyricConfigInfo(string licenseKey, string artist, string track, string extraInfo) { this.licenseKey = licenseKey; this.artist = artist; this.track = track; - this.extra = extraInfo; - this.sitesToSearch = sitesToSearch; + this.extra = extraInfo;; } } } Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricController.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricController.cs 2007-02-04 08:11:20 UTC (rev 91) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricController.cs 2007-02-04 12:36:28 UTC (rev 92) @@ -7,7 +7,6 @@ using System.Threading; using System.IO; using System.Diagnostics; - using LyricsEngineConfig; using LyricsEngine; @@ -25,56 +24,71 @@ public class LyricController : IDisposable { - // form - //private AbstractLyricForm m_Form; private ILyricForm m_Form; - private bool m_MessageMode; - - private string m_GoogleLicenseKey = ""; - private bool m_StopSearches = false; - // status private static int noOfLyricsToSearch; - private static int noOfLyricsSearched; private static int noOfLyricsFound; private static int noOfLyricsNotFound; - // LyricController should control the used google license keys -> make it to an arraylist - private ArrayList m_GoogleLicenseKeysUsed = new ArrayList(); + private bool m_StopSearches = false; + public static event EventHandler StopTheSearchAndAbort = null; - //private Thread[] searchThreads = ArrayList threadList = new ArrayList(); ArrayList suspendedThreadList = new ArrayList(); + // Main thread sets this event to stop LyricController ManualResetEvent m_EventStop_LyricController; - // LyricController sets this event when it is stopped ManualResetEvent m_EventStopped_LyricController; - // Main thread sets this event to pause all LyricSearches public ManualResetEvent m_EventStop_LyricSearches; + // Variables related to GoogleSites + private ArrayList m_GoogleLicenseKeysUsed = new ArrayList(); + private string m_GoogleLicenseKey = ""; + private bool m_noMoreValidLicenseKeys = false; int m_managedThreadId = -1; - public static event EventHandler StopTheSearchAndAbort; - - private bool m_noMoreValidLicenseKeys = false; + // Lyric sites + private string[] lyricSites; + private string[] eastSites; + private string[] googleSites; - - - public LyricController(ILyricForm mainForm, ManualResetEvent eventStopThread, ManualResetEvent eventThreadStopped, bool messageMode) + public LyricController(ILyricForm mainForm, + ManualResetEvent eventStopThread, ManualResetEvent eventThreadStopped, + string[] lyricSites) { this.m_Form = mainForm; - this.m_MessageMode = messageMode; - // Reset counters - noOfLyricsToSearch = 1; - noOfLyricsSearched = 0; - noOfLyricsFound = 0; - noOfLyricsNotFound = 0; + LyricController.noOfLyricsToSearch = 1; + LyricController.noOfLyricsSearched = 0; + LyricController.noOfLyricsFound = 0; + LyricController.noOfLyricsNotFound = 0; + + this.lyricSites = lyricSites; + + // Sort the sites in easy and google sites + ArrayList easySitesArrayList = new ArrayList(); + ArrayList googleArrayList = new ArrayList(); + foreach (string site in lyricSites) + { + if (Setup.IsMemberOfEasySites(site)) + { + easySitesArrayList.Add(site); + } + if (Setup.IsMemberOfGoogleSites(site)) + { + googleArrayList.Add(site); + } + } + eastSites = (string[])easySitesArrayList.ToArray(typeof(string)); + LyricSearch_EasySites.EasySites = eastSites; + + googleSites = (string[])googleArrayList.ToArray(typeof(string)); + LyricSearch_GoogleSites.GoogleSites = googleSites; // initialize events m_EventStop_LyricController = eventStopThread; @@ -83,10 +97,10 @@ m_EventStop_LyricSearches = new ManualResetEvent(false); m_EventStop_LyricSearches.Set(); - LyricSearch.Abort = false; + LyricSearch_GoogleSites.Abort = false; } - // Function runs in worker thread and emulates long process. + public void Run() { // check if thread is cancelled @@ -115,10 +129,7 @@ } Thread.Sleep(500); - - // inform main thread that this thread stopped m_EventStopped_LyricController.Set(); - //finishThread(artist, title, "The search has ended", site); break; } } @@ -157,22 +168,41 @@ this.m_EventStopped_LyricController = eventThreadStopped; } - - public int addNewLyricSearch(LyricConfigInfo lyricConfigInfo) + public void addNewLyricSearch(LyricConfigInfo lyricConfigInfo) { - // create worker thread instance - ThreadStart job = delegate + if (eastSites.Length > 0) { - LyricSearch lyricSearch = new LyricSearch(m_EventStop_LyricController, m_EventStopped_LyricController, this); - lyricSearch.setLyricInfo(lyricConfigInfo.artist, lyricConfigInfo.track, lyricConfigInfo.extra, lyricConfigInfo.sitesToSearch); - lyricSearch.Run(); - }; - Thread lyricSearchThread = new Thread(job); - lyricSearchThread.Name = "lyricSearch for " + lyricConfigInfo.artist + " - " + lyricConfigInfo.track; // looks nice in Output window - lyricSearchThread.IsBackground = true; - lyricSearchThread.Start(); - threadList.Add(lyricSearchThread); - return noOfLyricsToSearch; + // create worker thread instance + ThreadStart easySitesThreadInstance = delegate + { + + LyricSearch_EasySites lyricSearch_EasySites = new LyricSearch_EasySites(m_EventStop_LyricController, m_EventStopped_LyricController, this); + lyricSearch_EasySites.setLyricInfo(lyricConfigInfo.artist, lyricConfigInfo.track, lyricConfigInfo.extra); + lyricSearch_EasySites.Run(); + }; + + Thread lyricSearchThread = new Thread(easySitesThreadInstance); + lyricSearchThread.Name = "BasicSearch for " + lyricConfigInfo.artist + " - " + lyricConfigInfo.track; // looks nice in Output window + lyricSearchThread.IsBackground = true; + lyricSearchThread.Start(); + threadList.Add(lyricSearchThread); + } + + if (googleSites.Length > 0) + { + ThreadStart googleSitesThreadInstance = delegate + { + LyricSearch_GoogleSites lyricSearch_GoogleSites = new LyricSearch_GoogleSites(m_EventStop_LyricController, m_EventStopped_LyricController, this); + lyricSearch_GoogleSites.setLyricInfo(lyricConfigInfo.artist, lyricConfigInfo.track, lyricConfigInfo.extra); + lyricSearch_GoogleSites.Run(); + }; + + Thread lyricSearchThread = new Thread(googleSitesThreadInstance); + lyricSearchThread.Name = "GoogleSearch for " + lyricConfigInfo.artist + " - " + lyricConfigInfo.track; // looks nice in Output window + lyricSearchThread.IsBackground = true; + lyricSearchThread.Start(); + threadList.Add(lyricSearchThread); + } } public void suspendAllSearchThreadsExceptMe(int managedThreadId) @@ -212,8 +242,6 @@ { return false; } - - return true; } internal void updateString(String message, String site) @@ -233,7 +261,7 @@ m_Form.UpdateStatus = new Object[] { noOfLyricsToSearch, noOfLyricsSearched, noOfLyricsFound, noOfLyricsNotFound }; - if (noOfLyricsSearched >= noOfLyricsToSearch && lyricFound == false) + if (noOfLyricsSearched >= noOfLyricsToSearch) { finishThread(artist, title, "All songs have been searched!", site); } @@ -270,14 +298,6 @@ m_Form.ThreadException = s; } - public bool isMessageMode - { - get - { - return m_MessageMode; - } - } - public string GoogleLicenseKey { get { return m_GoogleLicenseKey; } @@ -292,14 +312,14 @@ { m_StopSearches = true; m_EventStop_LyricSearches.Reset(); - LyricSearch.Abort = true; + LyricSearch_GoogleSites.Abort = true; //StopTheSearchAndAbort.Invoke(this, EventArgs.Empty); } else { m_StopSearches = false; m_EventStop_LyricSearches.Set(); - LyricSearch.Abort = false; + LyricSearch_GoogleSites.Abort = false; } } } Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj 2007-02-04 08:11:20 UTC (rev 91) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj 2007-02-04 12:36:28 UTC (rev 92) @@ -40,6 +40,7 @@ <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> + <Compile Include="LyricSearch_EasySites.cs" /> <Compile Include="LyricDiagnostics.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="GetGoogleSearchResult.cs" /> @@ -53,7 +54,7 @@ <LastGenOutput>Resources.Designer.cs</LastGenOutput> <SubType>Designer</SubType> </EmbeddedResource> - <Compile Include="LyricSearch.cs" /> + <Compile Include="LyricSearch_GoogleSites.cs" /> <Compile Include="LyricUtil.cs" /> <Compile Include="Properties\Resources.Designer.cs"> <AutoGen>True</AutoGen> Modified: trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs 2007-02-04 08:11:20 UTC (rev 91) +++ trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs 2007-02-04 12:36:28 UTC (rev 92) @@ -26,7 +26,7 @@ // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.13")] +[assembly: AssemblyVersion("0.14")] // // In order to sign your assembly you must specify a key to use. Refer to the Modified: trunk/plugins/MyLyrics/LyricsEngine/Properties/Settings.Designer.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/Properties/Settings.Designer.cs 2007-02-04 08:11:20 UTC (rev 91) +++ trunk/plugins/MyLyrics/LyricsEngine/Properties/Settings.Designer.cs 2007-02-04 12:36:28 UTC (rev 92) @@ -42,5 +42,15 @@ return ((string)(this["LyricsEngine_org_lyricwiki_LyricWiki"])); } } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.WebServiceUrl)] + [global::System.Configuration.DefaultSettingValueAttribute("http://api.google.com/search/beta2")] + public string MyLyrics_Google_GoogleSearchService { + get { + return ((string)(this["MyLyrics_Google_GoogleSearchService"])); + } + } } } Modified: trunk/plugins/MyLyrics/LyricsEngine/Properties/Settings.settings =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/Properties/Settings.settings 2007-02-04 08:11:20 UTC (rev 91) +++ trunk/plugins/MyLyrics/LyricsEngine/Properties/Settings.settings 2007-02-04 12:36:28 UTC (rev 92) @@ -8,5 +8,8 @@ <Setting Name="LyricsEngine_org_lyricwiki_LyricWiki" Type="(Web Service URL)" Scope="Application"> <Value Profile="(Default)">http://lyricwiki.org/server.php</Value> </Setting> + <Setting Name="MyLyrics_Google_GoogleSearchService" Type="(Web Service URL)" Scope="Application"> + <Value Profile="(Default)">http://api.google.com/search/beta2</Value> + </Setting> </Settings> </SettingsFile> \ No newline at end of file Modified: trunk/plugins/MyLyrics/LyricsEngine/Setup.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/Setup.cs 2007-02-04 08:11:20 UTC (rev 91) +++ trunk/plugins/MyLyrics/LyricsEngine/Setup.cs 2007-02-04 12:36:28 UTC (rev 92) @@ -1,14 +1,19 @@ using System; -using System.Collections.Generic; +using System.Collections; using System.Text; namespace LyricsEngineConfig { public static class Setup { - public static string[] accessibleLyricSites = new string[9-2] + public static string[] EasySites = new string[2] { "LyricWiki", + "EvilLabs" + }; + + public static string[] GoogleSites = new string[8 - 2] + { "Sing365", "LyricsMania", "Lyrics007", @@ -19,19 +24,34 @@ //"MusicMadeMe", }; - public static int GetNoOfAccessibleLyricSites() + public static string[] AllSites() { - return accessibleLyricSites.Length; + ArrayList allSites = new ArrayList(); + allSites.AddRange(EasySites); + allSites.AddRange(GoogleSites); + string[] allSitesArray = (string[])allSites.ToArray(typeof(string)); + return allSitesArray; } - public static int GetIndex(string value) + public static bool IsMember(string value) { - return System.Array.IndexOf(Setup.accessibleLyricSites, value); + return (System.Array.IndexOf(Setup.EasySites, value) != -1 + || System.Array.IndexOf(Setup.GoogleSites, value) != -1); } - public static bool IsMember(string value) + public static bool IsMemberOfEasySites(string value) { - return System.Array.IndexOf(Setup.accessibleLyricSites, value) != -1; + return System.Array.IndexOf(Setup.EasySites, value) != -1; } + + public static bool IsMemberOfGoogleSites(string value) + { + return System.Array.IndexOf(Setup.GoogleSites, value) != -1; + } + + public static int NoOfSites() + { + return EasySites.Length + GoogleSites.Length; + } } } Modified: trunk/plugins/MyLyrics/LyricsEngine/app.config =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/app.config 2007-02-04 08:11:20 UTC (rev 91) +++ trunk/plugins/MyLyrics/LyricsEngine/app.config 2007-02-04 12:36:28 UTC (rev 92) @@ -13,6 +13,9 @@ <setting name="LyricsEngine_org_lyricwiki_LyricWiki" serializeAs="String"> <value>http://lyricwiki.org/server.php</value> </setting> + <setting name="MyLyrics_Google_GoogleSearchService" serializeAs="String"> + <value>http://api.google.com/search/beta2</value> + </setting> </LyricsEngine.Properties.Settings> </applicationSettings> </configuration> \ No newline at end of file Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2007-02-04 08:11:20 UTC (rev 91) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2007-02-04 12:36:28 UTC (rev 92) @@ -27,24 +27,19 @@ public class GUIMyLyrics : GUIWindow, ILyricForm, ISetupForm { + #region Fields that is consisted and related to the MP session, and not MyLyrics session public static int WINDOW_MYLYRICS = 90478; int m_GoogleLicenseKeyIndex = 0; const int MAX_NO_OF_LICENSE_KEYS = 5; string[] m_GoogleLicenseKeys = new String[5] { "", "", "", "", "" }; int startingScrollSpeedVertical = 2; - - - LRC.SimpleLRC lrc; - IEnumerator enumerator; - System.Windows.Forms.Timer timer; - Stopwatch stopwatch; - string nextTimeToShow; - string nextLineToShow; - int lineCounter; + bool googlePopUpMessageShown = false; const int SHIFT_WHEN_HIT = 10; + #endregion - bool googlePopUpMessageShown = false; - + #region Fields related to the skin engine + [SkinControlAttribute(20)] + protected GUITextScrollUpControl CONTROL_Lyric = null; enum Controls { CONTROL_BACKGROUND = 1, @@ -52,9 +47,17 @@ CONTROL_LBStatus = 11, CONTROL_Lyric = 20 } + #endregion - [SkinControlAttribute(20)] - protected GUITextScrollUpControl CONTROL_Lyric = null; + #region Fields related to the MyLyrics, and therefore will be reset after each MyLyrics session + bool exitingMyLyrics = false; + LRC.SimpleLRC lrc; + IEnumerator enumerator; + System.Windows.Forms.Timer timer; + Stopwatch stopwatch; + string nextTimeToShow; + string nextLineToShow; + int lineCounter; // worker thread Thread m_LyricControllerThread; @@ -63,7 +66,6 @@ // events used to stop worker thread ManualResetEvent m_EventStopThread; ManualResetEvent m_EventThreadStopped; - //bool m_lyricControllerThreadIsReady = true; // Track info string m_artist = ""; @@ -73,11 +75,11 @@ string m_LyricText = ""; string m_Path = ""; - static bool lyricsFound = false; + bool lyricsFound = false; String[] m_sitesToSearch; + #endregion - public GUIMyLyrics() { m_EventStopThread = new ManualResetEvent(false); @@ -138,14 +140,41 @@ base.OnAction(action); } + private void resetAll() + { + exitingMyLyrics = true; + m_artist = ""; + m_title = ""; + m_TrackText = ""; + m_StatusText = ""; + m_LyricText = ""; + m_Path = ""; + lyricsFound = false; + m_LyricControllerThread = null; + lc = null; + m_sitesToSearch = null; + resetLrcFields(); + } + private void resetLrcFields() + { + if (timer != null) + timer.Dispose(); + if (stopwatch != null) + stopwatch.Reset(); + nextTimeToShow = ""; + nextLineToShow = ""; + lineCounter = 0; + } + public override bool OnMessage(GUIMessage message) { switch (message.Message) { case GUIMessage.MessageType.GUI_MSG_WINDOW_INIT: { + exitingMyLyrics = false; base.OnMessage(message); LoadSettings(); @@ -162,6 +191,7 @@ { SaveSettings(); StopThread(); + resetAll(); GUIGraphicsContext.ScrollSpeedVertical = startingScrollSpeedVertical; LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Stop, 0, LyricDiagnostics.elapsedTimeString() + "MyLyrics closes"); } @@ -178,7 +208,7 @@ public override void Process() { - if (isNewTrack()) + if (isNewTrack() && exitingMyLyrics == false) { lyricsFound = false; StopThread(); @@ -204,7 +234,7 @@ GUIControl.ClearControl(GetID, (int)Controls.CONTROL_Lyric); GUIControl.SetControlLabel(GetID, (int)Controls.CONTROL_Lyric, m_LyricText); - bool useSing365, useLyricsHosting, useLyricsMania, useSongMeanings, useLyricsFreak, useMMMD, useLeosLyrics, useLyrics007, useLyricWiki; + bool useSing365, useLyricsHosting, useLyricsMania, useSongMeanings, useLyricsFreak, useMMMD, useLeosLyrics, useLyrics007, useLyricWiki, useEvilLabs; using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml")) { @@ -223,6 +253,7 @@ useLeosLyrics = ((string)xmlreader.GetValueAsString("myLyrics", "useLeosLyrics", "False")).ToString().Equals("True") ? true : false; useLyrics007 = ((string)xmlreader.GetValueAsString("myLyrics", "useLyrics007", "False")).ToString().Equals("True") ? true : false; useLyricWiki = ((string)xmlreader.GetValueAsString("myLyrics", "useLyricWiki", "True")).ToString().Equals("True") ? true : false; + useEvilLabs = ((string)xmlreader.GetValueAsString("myLyrics", "useEvilLabs", "True")).ToString().Equals("True") ? true : false; } ArrayList sitesToSearch = new ArrayList(); @@ -263,6 +294,10 @@ { sitesToSearch.Add("LyricWiki"); } + if (useEvilLabs && Setup.IsMember("EvilLabs")) + { + sitesToSearch.Add("EvilLabs"); + } m_sitesToSearch = (string[])sitesToSearch.ToArray(typeof(string)); } @@ -295,17 +330,25 @@ LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Information, 0, LyricDiagnostics.elapsedTimeString() + "findLyric(" + m_artist + ", " + m_title + ")"); /* The search order for a lyric of the currently played file is as follows: + 1) LRC in music tag 1) LRC in database 2) Lyric in music tag 3) Lyric in database 4) Search the Internet */ - // 1) Check if LRC in Database + // 1) + 2) Check if LRC in music tag or Database string lyricText = MyLyrics.MyLyricsUtil.LookUpLyricInDatabase(m_artist, m_title); - if (!lyricText.Equals("") && (lrc = new LRC.SimpleLRC(m_artist, m_title, lyricText)).IsValid) + if ((!tag.Lyrics.Equals("") && (lrc = new LRC.SimpleLRC(m_artist, m_title, tag.Lyrics)).IsValid) + || (!lyricText.Equals("") && (lrc = new LRC.SimpleLRC(m_artist, m_title, lyricText)).IsValid)) { + + resetLrcFields(); + + m_StatusText = ""; + GUIControl.SetControlLabel(GetID, (int)Controls.CONTROL_LBStatus, m_StatusText); + if (lrc == null) { MessageBox.Show("The lrc-file couldn't not be read properly." + Environment.NewLine + "The reading of the files was suspended."); @@ -362,7 +405,7 @@ { lyricsFound = false; - lc = new LyricController(this, m_EventStopThread, m_EventThreadStopped, false); + lc = new LyricController(this, m_EventStopThread, m_EventThreadStopped, m_sitesToSearch); // create worker thread instance ThreadStart job = delegate { @@ -375,7 +418,7 @@ lc.GoogleLicenseKey = m_GoogleLicenseKeys[m_GoogleLicenseKeyIndex]; - LyricConfigInfo lyricConfigInfo = new LyricConfigInfo(lc.GoogleLicenseKey, m_artist, m_title, "lyrics", m_sitesToSearch); + LyricConfigInfo lyricConfigInfo = new LyricConfigInfo(lc.GoogleLicenseKey, m_artist, m_title, "lyrics"); lc.addNewLyricSearch(lyricConfigInfo); } } Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.Designer.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.Designer.cs 2007-02-04 08:11:20 UTC (rev 91) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.Designer.cs 2007-02-04 12:36:28 UTC (rev 92) @@ -92,15 +92,8 @@ this.tbLicenseKey1 = new MediaPortal.UserInterface.Controls.MPTextBox(); this.lbGoogleLicenceKey = new MediaPortal.UserInterface.Controls.MPLabel(); this.gbLyricSites = new MediaPortal.UserInterface.Controls.MPGroupBox(); - this.cbLyricsHosting = new MediaPortal.UserInterface.Controls.MPCheckBox(); - this.cbLeosLyrics = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.cbEvilLabs = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.cbLyricWiki = new MediaPortal.UserInterface.Controls.MPCheckBox(); - this.cbLyricsMania = new MediaPortal.UserInterface.Controls.MPCheckBox(); - this.cbLyrics007 = new MediaPortal.UserInterface.Controls.MPCheckBox(); - this.cbSing365 = new MediaPortal.UserInterface.Controls.MPCheckBox(); - this.cbSongMeaning = new MediaPortal.UserInterface.Controls.MPCheckBox(); - this.cbLyricsFreak = new MediaPortal.UserInterface.Controls.MPCheckBox(); - this.cbMMMD = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.gbGenerel = new MediaPortal.UserInterface.Controls.MPGroupBox(); this.lbLimit = new MediaPortal.UserInterface.Controls.MPTextBox(); this.lbSongsLimit = new MediaPortal.UserInterface.Controls.MPLabel(); @@ -112,6 +105,15 @@ this.btClose = new MediaPortal.UserInterface.Controls.MPButton(); this.bgWorkerTestWebservices = new System.ComponentModel.BackgroundWorker(); this.bgWorkerSearch = new System.ComponentModel.BackgroundWorker(); + this.mpGroupBox1 = new MediaPortal.UserInterface.Controls.MPGroupBox(); + this.cbLyricsHosting = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.cbLeosLyrics = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.cbLyricsMania = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.cbLyrics007 = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.cbSing365 = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.cbSongMeaning = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.cbLyricsFreak = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.cbMMMD = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.tabControl.SuspendLayout(); this.tabPageDatabase.SuspendLayout(); this.gbGoogleLicKeyStatuses.SuspendLayout(); @@ -124,6 +126,7 @@ this.gbLyricSites.SuspendLayout(); this.gbGenerel.SuspendLayout(); this.gbLicenseKeyHelp.SuspendLayout(); + this.mpGroupBox1.SuspendLayout(); this.SuspendLayout(); // // tabControl @@ -622,6 +625,7 @@ // // tabPageSetup // + this.tabPageSetup.Controls.Add(this.mpGroupBox1); this.tabPageSetup.Controls.Add(this.gbSettings); this.tabPageSetup.Controls.Add(this.gbLyricSites); this.tabPageSetup.Controls.Add(this.gbGenerel); @@ -742,124 +746,42 @@ // gbLyricSites // this.gbLyricSites.AutoSize = true; - this.gbLyricSites.Controls.Add(this.cbLyricsHosting); - this.gbLyricSites.Controls.Add(this.cbLeosLyrics); + this.gbLyricSites.Controls.Add(this.cbEvilLabs); this.gbLyricSites.Controls.Add(this.cbLyricWiki); - this.gbLyricSites.Controls.Add(this.cbLyricsMania); - this.gbLyricSites.Controls.Add(this.cbLyrics007); - this.gbLyricSites.Controls.Add(this.cbSing365); - this.gbLyricSites.Controls.Add(this.cbSongMeaning); - this.gbLyricSites.Controls.Add(this.cbLyricsFreak); - this.gbLyricSites.Controls.Add(this.cbMMMD); this.gbLyricSites.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.gbLyricSites.Location = new System.Drawing.Point(3, 62); this.gbLyricSites.Name = "gbLyricSites"; - this.gbLyricSites.Size = new System.Drawing.Size(517, 101); + this.gbLyricSites.Size = new System.Drawing.Size(124, 102); this.gbLyricSites.TabIndex = 28; this.gbLyricSites.TabStop = false; - this.gbLyricSites.Text = "Lyric sites to search"; + this.gbLyricSites.Text = "Basic lyric sites"; // - // cbLyricsHosting + // cbEvilLabs // - this.cbLyricsHosting.AutoSize = true; - this.cbLyricsHosting.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbLyricsHosting.Location = new System.Drawing.Point(366, 65); - this.cbLyricsHosting.Name = "cbLyricsHosting"; - this.cbLyricsHosting.Size = new System.Drawing.Size(90, 17); - this.cbLyricsHosting.TabIndex = 10; - this.cbLyricsHosting.Text = "Lyrics Hosting"; - this.cbLyricsHosting.UseVisualStyleBackColor = true; + this.cbEvilLabs.AutoSize = true; + this.cbEvilLabs.Checked = true; + this.cbEvilLabs.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbEvilLabs.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.cbEvilLabs.Location = new System.Drawing.Point(16, 43); + this.cbEvilLabs.Name = "cbEvilLabs"; + this.cbEvilLabs.Size = new System.Drawing.Size(67, 17); + this.cbEvilLabs.TabIndex = 3; + this.cbEvilLabs.Text = "Evil Labs"; + this.cbEvilLabs.UseVisualStyleBackColor = true; // - // cbLeosLyrics - // - this.cbLeosLyrics.AutoSize = true; - this.cbLeosLyrics.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbLeosLyrics.Location = new System.Drawing.Point(208, 43); - this.cbLeosLyrics.Name = "cbLeosLyrics"; - this.cbLeosLyrics.Size = new System.Drawing.Size(79, 17); - this.cbLeosLyrics.TabIndex = 6; - this.cbLeosLyrics.Text = "Leo\'s Lyrics"; - this.cbLeosLyrics.UseVisualStyleBackColor = true; - // // cbLyricWiki // this.cbLyricWiki.AutoSize = true; this.cbLyricWiki.Checked = true; this.cbLyricWiki.CheckState = System.Windows.Forms.CheckState.Checked; this.cbLyricWiki.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbLyricWiki.Location = new System.Drawing.Point(49, 21); + this.cbLyricWiki.Location = new System.Drawing.Point(16, 21); this.cbLyricWiki.Name = "cbLyricWiki"; this.cbLyricWiki.Size = new System.Drawing.Size(67, 17); this.cbLyricWiki.TabIndex = 2; this.cbLyricWiki.Text = "LyricWiki"; this.cbLyricWiki.UseVisualStyleBackColor = true; // - // cbLyricsMania - // - this.cbLyricsMania.AutoSize = true; - this.cbLyricsMania.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbLyricsMania.Location = new System.Drawing.Point(49, 43); - this.cbLyricsMania.Name = "cbLyricsMania"; - this.cbLyricsMania.Size = new System.Drawing.Size(83, 17); - this.cbLyricsMania.TabIndex = 3; - this.cbLyricsMania.Text = "Lyrics Mania"; - this.cbLyricsMania.UseVisualStyleBackColor = true; - // - // cbLyrics007 - // - this.cbLyrics007.AutoSize = true; - this.cbLyrics007.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbLyrics007.Location = new System.Drawing.Point(208, 21); - this.cbLyrics007.Name = "cbLyrics007"; - this.cbLyrics007.Size = new System.Drawing.Size(69, 17); - this.cbLyrics007.TabIndex = 5; - this.cbLyrics007.Text = "Lyrics007"; - this.cbLyrics007.UseVisualStyleBackColor = true; - // - // cbSing365 - // - this.cbSing365.AutoSize = true; - this.cbSing365.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbSing365.Location = new System.Drawing.Point(49, 65); - this.cbSing365.Name = "cbSing365"; - this.cbSing365.Size = new System.Drawing.Size(63, 17); - this.cbSing365.TabIndex = 4; - this.cbSing365.Text = "Sing365"; - this.cbSing365.UseVisualStyleBackColor = true; - // - // cbSongMeaning - // - this.cbSongMeaning.AutoSize = true; - this.cbSongMeaning.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbSongMeaning.Location = new System.Drawing.Point(366, 21); - this.cbSongMeaning.Name = "cbSongMeaning"; - this.cbSongMeaning.Size = new System.Drawing.Size(93, 17); - this.cbSongMeaning.TabIndex = 8; - this.cbSongMeaning.Text = "Song Meaning"; - this.cbSongMeaning.UseVisualStyleBackColor = true; - // - // cbLyricsFreak - // - this.cbLyricsFreak.AutoSize = true; - this.cbLyricsFreak.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbLyricsFreak.Location = new System.Drawing.Point(208, 65); - this.cbLyricsFreak.Name = "cbLyricsFreak"; - this.cbLyricsFreak.Size = new System.Drawing.Size(81, 17); - this.cbLyricsFreak.TabIndex = 7; - this.cbLyricsFreak.Text = "Lyrics Freak"; - this.cbLyricsFreak.UseVisualStyleBackColor = true; - // - // cbMMMD - // - this.cbMMMD.AutoSize = true; - this.cbMMMD.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbMMMD.Location = new System.Drawing.Point(366, 43); - this.cbMMMD.Name = "cbMMMD"; - this.cbMMMD.Size = new System.Drawing.Size(94, 17); - this.cbMMMD.TabIndex = 9; - this.cbMMMD.Text = "MusicMadeMe"; - this.cbMMMD.UseVisualStyleBackColor = true; - // // gbGenerel // this.gbGenerel.Controls.Add(this.lbLimit); @@ -885,7 +807,7 @@ // lbSongsLimit // this.lbSongsLimit.AutoSize = true; - this.lbSongsLimit.Location = new System.Drawing.Point(6, 21); + this.lbSongsLimit.Location = new System.Drawing.Point(13, 22); this.lbSongsLimit.Name = "lbSongsLimit"; this.lbSongsLimit.Size = new System.Drawing.Size(340, 13); this.lbSongsLimit.TabIndex = 12; @@ -925,9 +847,9 @@ // // labelPluginBannerHint // - this.labelPluginBannerHint.Location = new System.Drawing.Point(11, 20); + this.labelPluginBannerHint.Location = new System.Drawing.Point(13, 20); this.labelPluginBannerHint.Name = "labelPluginBannerHint"; - this.labelPluginBannerHint.Size = new System.Drawing.Size(489, 43); + this.labelPluginBannerHint.Size = new System.Drawing.Size(484, 43); this.labelPluginBannerHint.TabIndex = 17; this.labelPluginBannerHint.Text = resources.GetString("labelPluginBannerHint.Text"); // @@ -964,11 +886,118 @@ this.bgWorkerSearch.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.bgWorkerSearch_RunWorkerCompleted); this.bgWorkerSearch.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.bgWorkerSearch_ProgressChanged); // + // mpGroupBox1 + // + this.mpGroupBox1.AutoSize = true; + this.mpGroupBox1.Controls.Add(this.cbLyricsHosting); + this.mpGroupBox1.Controls.Add(this.cbLeosLyrics); + this.mpGroupBox1.Controls.Add(this.cbLyricsMania); + this.mpGroupBox1.Controls.Add(this.cbLyrics007); + this.mpGroupBox1.Controls.Add(this.cbSing365); + this.mpGroupBox1.Controls.Add(this.cbSongMeaning); + this.mpGroupBox1.Controls.Add(this.cbLyricsFreak); + this.mpGroupBox1.Controls.Add(this.cbMMMD); + this.mpGroupBox1.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.mpGroupBox1.Location = new System.Drawing.Point(133, 62); + this.mpGroupBox1.Name = "mpGroupBox1"; + this.mpGroupBox1.Size = new System.Drawing.Size(381, 102); + this.mpGroupBox1.TabIndex = 29; + this.mpGroupBox1.TabStop = false; + this.mpGroupBox1.Text = "Lyric sites dependent of Google webservice"; + // + // cbLyricsHosting + // + this.cbLyricsHosting.AutoSize = true; + this.cbLyricsHosting.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.cbLyricsHosting.Location = new System.Drawing.Point(250, 44); + this.cbLyricsHosting.Name = "cbLyricsHosting"; + this.cbLyricsHosting.Size = new System.Drawing.Size(90, 17); + this.cbLyricsHosting.TabIndex = 18; + this.cbLyricsHosting.Text = "Lyrics Hosting"; + this.cbLyricsHosting.UseVisualStyleBackColor = true; + // + // cbLeosLyrics + // + this.cbLeosLyrics.AutoSize = true; + this.cbLeosLyrics.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.cbLeosLyrics.Location = new System.Drawing.Point(136, 21); + this.cbLeosLyrics.Name = "cbLeosLyrics"; + this.cbLeosLyrics.Size = new System.Drawing.Size(79, 17); + this.cbLeosLyrics.TabIndex = 14; + this.cbLeosLyrics.Text = "Leo\'s Lyrics"; + this.cbLeosLyrics.UseVisualStyleBackColor = true; + // + // cbLyricsMania + // + this.cbLyricsMania.AutoSize = true; + this.cbLyricsMania.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.cbLyricsMania.Location = new System.Drawing.Point(16, 21); + this.cbLyricsMania.Name = "cbLyricsMania"; + this.cbLyricsMania.Size = new System.Drawing.Size(83, 17); + this.cbLyricsMania.TabIndex = 11; + this.cbLyricsMania.Text = "Lyrics Mania"; + this.cbLyricsMania.UseVisualStyleBackColor = true; + // + // cbLyrics007 + // + this.cbLyrics007.AutoSize = true; + this.cbLyrics007.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.cbLyrics007.Location = new System.Drawing.Point(16, 66); + this.cbLyrics007.Name = "cbLyrics007"; + this.cbLyrics007.Size = new System.Drawing.Size(69, 17); + this.cbLyrics007.TabIndex = 13; + this.cbLyrics007.Text = "Lyrics007"; + this.cbLyrics007.UseVisualStyleBackColor = true; + // + // cbSing365 + // + this.cbSing365.AutoSize = true; + this.cbSing365.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.cbSing365.Location = new System.Drawing.Point(16, 43); + this.cbSing365.Name = "cbSing365"; + this.cbSing365.Size = new System.Drawing.Size(63, 17); + this.cbSing365.TabIndex = 12; + this.cbSing365.Text = "Sing365"; + this.cbSing365.UseVisualStyleBackColor = true; + // + // cbSongMeaning + // + this.cbSongMeaning.AutoSize = true; + this.cbSongMeaning.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.cbSongMeaning.Location = new System.Drawing.Point(136, 65); + this.cbSongMeaning.Name = "cbSongMeaning"; + this.cbSongMeaning.Size = new System.Drawing.Size(93, 17); + this.cbSongMeaning.TabIndex = 16; + this.cbSongMeaning.Text = "Song Meaning"; + this.cbSongMeaning.UseVisualStyleBackColor = true; + // + // cbLyricsFreak + // + this.cbLyricsFreak.AutoSize = true; + this.cbLyricsFreak.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.cbLyricsFreak.Location = new System.Drawing.Point(136, 44); + this.cbLyricsFreak.Name = "cbLyricsFreak"; + this.cbLyricsFreak.Size = new System.Drawing.Size(81, 17); + this.cbLyricsFreak.TabIndex = 15; + this.cbLyricsFreak.Text = "Lyrics Freak"; + this.cbLyricsFreak.UseVisualStyleBackColor = true; + // + // cbMMMD + // + this.cbMMMD.AutoSize = true; + this.cbMMMD.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.cbMMMD.Location = new System.Drawing.Point(250, 21); + this.cbMMMD.Name = "cbMMMD"; + this.cbMMMD.Size = new System.Drawing.Size(94, 17); + this.cbMMMD.TabIndex = 17; + this.cbMMMD.Text = "MusicMadeMe"; + this.cbMMMD.UseVisualStyleBackColor = true; + // // MyLyricsSetup // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(530, 562); + this.ClientSize = new System.Drawing.Size(531, 562); this.ControlBox = false; this.Controls.Add(this.btClose); this.Controls.Add(this.tabControl); @@ -997,6 +1026,8 @@ this.gbGenerel.ResumeLayout(false); this.gbGenerel.PerformLayout(); this.gbLicenseKeyHelp.ResumeLayout(false); + this.mpGroupBox1.ResumeLayout(false); + this.mpGroupBox1.PerformLayout(); this.ResumeLayout(false); } @@ -1053,15 +1084,7 @@ private MediaPortal.UserInterface.Controls.MPTextBox lbLimit; private MediaPortal.UserInterface.Controls.MPLabel lbSongsLimit; private MediaPortal.UserInterface.Controls.MPGroupBox gbLyricSites; - internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyricsHosting; - internal MediaPortal.UserInterface.Controls.MPCheckBox cbLeosLyrics; internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyricWiki; - internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyricsMania; - internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyrics007; - internal MediaPortal.UserInterface.Controls.MPCheckBox cbSing365; - internal MediaPortal.UserInterface.Controls.MPCheckBox cbSongMeaning; - internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyricsFreak; - internal MediaPortal.UserInterface.Controls.MPCheckBox cbMMMD; private MediaPortal.UserInterface.Controls.MPTabPage tabPageDatabase; private MediaPortal.UserInterface.Controls.MPGroupBox gbMusicDBSearch; private MediaPortal.UserInterface.Controls.MPCheckBox cbDisregardVariousArtist; @@ -1086,5 +1109,15 @@ private MediaPortal.UserInterface.Controls.MPLabel lbGoogleLicenceKey; private MediaPortal.UserInterface.Controls.MPLabel labelPluginBannerHint; private MediaPortal.UserInterface.Controls.MPLabel mpLabel6; + internal MediaPortal.UserInterface.Controls.MPCheckBox cbEvilLabs; + private MediaPortal.UserInterface.Controls.MPGroupBox mpGroupBox1; + internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyricsHosting; + internal MediaPortal.UserInterface.Controls.MPCheckBox cbLeosLyrics; + internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyricsMania; + internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyrics007; + internal MediaPortal.UserInterface.Controls.MPCheckBox cbSing365; + internal MediaPortal.UserInterface.Controls.MPCheckBox cbSongMeaning; + internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyricsFreak; + internal MediaPortal.UserInterface.Controls.MPCheckBox cbMMMD; } } \ No newline at end of file Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.cs 2007-02-04 08:11:20 UTC (rev 91) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.cs 2007-02-04 12:36:28 UTC (rev 92) @@ -80,7 +80,7 @@ bool m_DisregardMarkedLyric = true; int m_noOfCurrentlySearches = 0; - const int m_NoOfCurrentSearchesAllowed = 10; + const int m_NoOfCurrentSearchesAllowed = 1; int m_Limit = 100; ArrayList songs = new ArrayList(); @@ -90,8 +90,8 @@ MyLyricsSetup_LyricsLibrary lyricUC; - - + string[] sitesToSearchArray = null; + // worker thread Thread m_LyricControllerThread; @@ -134,6 +134,7 @@ cbLeosLyrics.Checked = ((string)xmlreader.GetValueAsString("myLyrics", "useLeosLyrics", "False")).ToString().Equals("True") ? true : false; cbLyrics007.Checked = ((string)xmlreader.GetValueAsString("myLyrics", "useLyrics007", "False")).ToString().Equals("True") ? true : false; cbLyricWiki.Checked = ((string)xmlreader.GetValueAsString("myLyrics", "useLyricWiki", "True")).ToString().Equals("True") ? true : false; + cbEvilLabs.Checked = ((string)xmlreader.GetValueAsString("myLyrics", "useEvilLabs", "True")).ToString().Equals("True") ? true : false; if (Setup.IsMember("Sing365") == false) { @@ -180,8 +181,11 @@ cbLyricWiki.Checked = false; cbLyricWiki.Enabled = false; } - - + if (Setup.IsMember("EvilLabs") == false) + { + cbEvilLabs.Checked = false; + cbEvilLabs.Enabled = false; + } } catch { MessageBox.Show("Something has gone wrong when reading Mediaportal.xml"); @@ -253,6 +257,7 @@ xmlwriter.SetValue("myLyrics", "useLeosLyrics", cbLeosLyrics.Checked.ToString()); xmlwriter.SetValue("myLyrics", "useLyrics007", cbLyrics007.Checked.ToString()); xmlwriter.SetValue("myLyrics", "useLyricWiki", cbLyricWiki.Checked.ToString()); + xmlwriter.SetValue("myLyrics", "useEvilLabs", cbEvilLabs.Checked.ToString()); xmlwriter.SetValue("myLyrics", "googleLicenseKey1", tbLicenseKey1.Text); xmlwriter.SetValue("myLyrics", "googleLicenseKey2", tbLicenseKey2.Text); xmlwriter.SetValue("myLyrics", "googleLicenseKey3", tbLicenseKey3.Text); @@ -297,6 +302,7 @@ { isSearching(true); lbStep1a.Text = "The collecting of songs has started."; + lbStep2a.Text = ""; MusicDatabase dbs = new MusicDatabase(); m_TotalTitles = dbs.GetNumOfSongs(); @@ -314,6 +320,7 @@ btImportAll.Enabled = false; progressBar.Enabled = true; + progressBar.Value = 0; progressBar.Maximum = m_TotalTitles; logFullFileName = Config.GetFile(Config.Dir.Log, logFileName); @@ -352,6 +359,31 @@ lbLyricsFound2.Text = "-"; lbLyricsNotFound2.Text = "-"; + ArrayList sitesToSearch = new ArrayList(); + + if (cbSing365.Checked) + sitesToSearch.Add("Sing365"); + if (cbLyricsHosting.Checked) + sitesToSearch.Add("LyricsHosting"); + if (cbLyricsMania.Checked) + sitesToSearch.Add("LyricsMania"); + if (cbSongMeaning.Checked) + sitesToSearch.Add("SongMeanings"); + if (cbLyricsFreak.Checked) + sitesToSearch.Add("LyricsFreak"); + if (cbMMMD.Checked) + sitesToSearch.Add("MusicMadeMe"); + if (cbLeosLyrics.Checked) + sitesToSearch.Add("LeosLyrics"); + if (cbLyrics007.Checked) + sitesToSearch.Add("Lyrics007"); + if (cbLyricWiki.Checked) + sitesToSearch.Add("LyricWiki"); + if (cbEvilLabs.Checked) + sitesToSearch.Add("EvilLabs"); + + sitesToSearchArray = (string[])sitesToSearch.ToArray(typeof(string)); + m_EventStopThread.Reset(); m_EventThreadStopped.Reset(); @@ -435,10 +467,14 @@ // Called from worker thread using delegate and Control.Invoke private void ThreadFinishedMethod(String artist, String title, String message, String site) { - lc.StopSearches = true; + if (lc != null) + { + lc.StopSearches = true; + } StopThread(); progressBar.ResetText(); progressBar.Enabled = false; + lbStep1a.Text = "Completed"; lbStep2a.Text = "Completed"; lbMessage.Text = "#" + ((int)(++m_noOfMessages)).ToString() + " - " + message + "\r\n" + lbMessage.Text + "\r\n"; btImportAll.Enabled = true; @@ -558,22 +594,6 @@ } #endregion - private string[] sitesToSearch() - { - ArrayList sitesToSearch = new ArrayList(); - if (cbLyricWiki.Checked) sitesToSearch.Add("LyricWiki"); - if (cbLyricsMania.Checked) sitesToSearch.Add("LyricsMania"); - if (cbSing365.Checked) sitesToSearch.Add("Sing365"); - if (cbLyrics007.Checked) sitesToSearch.Add("Lyrics007"); - if (cbLeosLyrics.Checked) sitesToSearch.Add("LeosLyrics"); - if (cbLyricsFreak.Checked) sitesToSearch.Add("LyricsFreak"); - if (cbSongMeaning.Checked) sitesToSearch.Add("SongMeanings"); - if (cbMMMD.Checked) sitesToSearch.Add("MusicMadeMe"); - if (cbLyricsHosting.Checked) sitesToSearch.Add("LyricsHosting"); - - return (string[])sitesToSearch.ToArray("".GetType()); - } - private void bgrWorkerTestWebservices_DoWork(object sender, DoWorkEventArgs e) { // Thread.CurrentThread.Name = "bgWorker - TestWebservices"; @@ -759,7 +779,7 @@ goto startSearch; } - LyricConfigInfo lyricConfigInfo = new LyricConfigInfo(m_GoogleLicenseKeys[m_GoogleLicenseKeyIndex], song.Artist, song.Title, "lyrics", sitesToSearch()); + LyricConfigInfo lyricConfigInfo = new LyricConfigInfo(m_GoogleLicenseKeys[m_GoogleLicenseKeyIndex], song.Artist, song.Title, "lyrics"); lyricConfigInfosQueue.Enqueue(lyricConfigInfo); } else if (status.Equals(MyLyricsUtil.LYRIC_FOUND)) @@ -776,7 +796,7 @@ } } - startSearch: + startSearch: # endregion @@ -785,9 +805,9 @@ if (lyricConfigInfosQueue.Count > 0) { // start running the lyricController - lc = new LyricController(this, m_EventStopThread, m_EventThreadStopped, false); + lc = new LyricController(this, m_EventStopThread, m_EventThreadStopped, sitesToSearchArray); - lc.NoOfLyricsToSearch = m_Limit; + lc.NoOfLyricsToSearch = lyricConfigInfosQueue.Count; ThreadStart runLyricController = delegate { lc.Run(); @@ -812,6 +832,10 @@ Thread.Sleep(100); } } + else + { + ThreadFinished = new string[] { "", "", "There is no titles to search", "" }; + } #endregion } @@ -820,7 +844,7 @@ lbSongsWithMark2.Text = m_SongsWithMark.ToString(); lbSongsWithLyric2.Text = m_SongsWithLyric.ToString(); lbDisregardedSongs2.Text = m_DisregardedSongs.ToString(); - lbSongsToSearch2.Text = m_SongsNotKnown > 0 ? ((int)(m_SongsNotKnown - 1)).ToString() : "0"; + lbSongsToSearch2.Text = m_SongsNotKnown > 0 ? ((int)(m_SongsNotKnown)).ToString() : "0"; if (e.ProgressPercentage == -1) { @@ -846,6 +870,8 @@ lc.finishThread(m_artist, m_track, "The search has been cancelled by the user.", "none"); lc.Dispose(); lc = null; + progressBar.ResetText(); + progressBar.Value = 0; m_LyricControllerThread = null; Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.resx =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.resx 2007-02-04 08:11:20 UTC (rev 91) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.resx 2007-02-04 12:36:28 UTC (rev 92) @@ -118,7 +118,7 @@ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <data name="labelPluginBannerHint.Text" xml:space="preserve"> - <value>The Google Web service is a free service which offers the users to query billions of web pages directly from their own computer programs. To use a lyric site other than LyricWiki, you have to apply for at least one license key.</value> + <value>The Google Web service is a free service which offers the users to query billions of web pages directly from their own computer programs. If no google license key is applied you won't be able to use the lyric sites that is dependent of the Google webservice.</value> </data> <metadata name="bgWorkerTestWebservices.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.cs 2007-02-04 08:11:20 UTC (rev 91) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.cs 2007-02-04 12:36:28 UTC (rev 92) @@ -36,8 +36,8 @@ LRC.SimpleLRC lrc; IEnumerator enumera... [truncated message content] |
From: <fr...@us...> - 2007-02-04 08:11:23
|
Revision: 91 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=91&view=rev Author: framug Date: 2007-02-04 00:11:20 -0800 (Sun, 04 Feb 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/file explorer/Source/Explorer.csproj Modified: trunk/plugins/file explorer/Source/Explorer.csproj =================================================================== --- trunk/plugins/file explorer/Source/Explorer.csproj 2007-02-04 08:06:16 UTC (rev 90) +++ trunk/plugins/file explorer/Source/Explorer.csproj 2007-02-04 08:11:20 UTC (rev 91) @@ -35,13 +35,13 @@ <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> </PropertyGroup> <ItemGroup> - <Reference Include="Core, Version=1.0.2584.14424, Culture=neutral, processorArchitecture=MSIL"> + <Reference Include="Core, Version=1.0.2590.13808, Culture=neutral, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>D:\sources mp\Core\bin\Release\Core.dll</HintPath> + <HintPath>..\..\..\MediaPortal\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> + <HintPath>..\..\..\MediaPortal\Dialogs\bin\Release\Dialogs.dll</HintPath> </Reference> <Reference Include="System" /> <Reference Include="System.Xml" /> @@ -52,9 +52,9 @@ <Private>True</Private> </Reference> <Reference Include="Microsoft.VisualBasic" /> - <Reference Include="Utils, Version=1.0.2584.14423, Culture=neutral, processorArchitecture=MSIL"> + <Reference Include="Utils, Version=1.0.2590.13806, Culture=neutral, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>D:\sources mp\Utils\bin\Release\Utils.dll</HintPath> + <HintPath>..\..\..\MediaPortal\Utils\bin\Release\Utils.dll</HintPath> </Reference> </ItemGroup> <ItemGroup> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fr...@us...> - 2007-02-04 08:06:18
|
Revision: 90 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=90&view=rev Author: framug Date: 2007-02-04 00:06:16 -0800 (Sun, 04 Feb 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/My Explorer/My Explorer.csproj trunk/plugins/My Status/My Status.csproj trunk/plugins/My clickmania/GUIClickMania.csproj Removed Paths: ------------- trunk/plugins/MultiShortcut/MultiButton.suo trunk/plugins/My Recipes/My Recipes.suo trunk/plugins/file explorer/Source/Explorer.suo trunk/plugins/file explorer/Source/bin/ Deleted: trunk/plugins/MultiShortcut/MultiButton.suo =================================================================== (Binary files differ) Modified: trunk/plugins/My Explorer/My Explorer.csproj =================================================================== --- trunk/plugins/My Explorer/My Explorer.csproj 2007-02-04 07:51:19 UTC (rev 89) +++ trunk/plugins/My Explorer/My Explorer.csproj 2007-02-04 08:06:16 UTC (rev 90) @@ -28,22 +28,22 @@ <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> - <Reference Include="Core, Version=1.0.2582.33626, Culture=neutral, processorArchitecture=MSIL"> + <Reference Include="Core, Version=1.0.2590.13808, Culture=neutral, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>D:\sources mp\Core\bin\Release\Core.dll</HintPath> + <HintPath>..\..\MediaPortal\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> + <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.2582.33625, Culture=neutral, processorArchitecture=MSIL"> + <Reference Include="Utils, Version=1.0.2590.13806, Culture=neutral, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>D:\sources mp\Core\bin\Release\Utils.dll</HintPath> + <HintPath>..\..\MediaPortal\Utils\bin\Release\Utils.dll</HintPath> </Reference> </ItemGroup> <ItemGroup> Deleted: trunk/plugins/My Recipes/My Recipes.suo =================================================================== (Binary files differ) Modified: trunk/plugins/My Status/My Status.csproj =================================================================== --- trunk/plugins/My Status/My Status.csproj 2007-02-04 07:51:19 UTC (rev 89) +++ trunk/plugins/My Status/My Status.csproj 2007-02-04 08:06:16 UTC (rev 90) @@ -28,27 +28,24 @@ <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> - <Reference Include="Core, Version=1.0.2582.36060, Culture=neutral, processorArchitecture=MSIL"> + <Reference Include="Core, Version=1.0.2590.13808, Culture=neutral, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>D:\sources mp\xbmc\bin\Release\Core.dll</HintPath> + <HintPath>..\..\MediaPortal\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\xbmc\bin\Release\plugins\windows\Dialogs.dll</HintPath> + <HintPath>..\..\MediaPortal\Dialogs\bin\Release\Dialogs.dll</HintPath> </Reference> - <Reference Include="mbm5, Version=1.0.1778.42739, Culture=neutral"> - <SpecificVersion>False</SpecificVersion> - <HintPath>.\mbm5.dll</HintPath> - </Reference> + <Reference Include="mbm5, Version=1.0.1778.42739, Culture=neutral" /> <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"> + <Reference Include="Utils, Version=1.0.2590.13806, Culture=neutral, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>D:\sources mp\xbmc\bin\Release\Utils.dll</HintPath> + <HintPath>..\..\MediaPortal\Utils\bin\Release\Utils.dll</HintPath> </Reference> </ItemGroup> <ItemGroup> Modified: trunk/plugins/My clickmania/GUIClickMania.csproj =================================================================== --- trunk/plugins/My clickmania/GUIClickMania.csproj 2007-02-04 07:51:19 UTC (rev 89) +++ trunk/plugins/My clickmania/GUIClickMania.csproj 2007-02-04 08:06:16 UTC (rev 90) @@ -74,13 +74,13 @@ <ErrorReport>prompt</ErrorReport> </PropertyGroup> <ItemGroup> - <Reference Include="Core, Version=1.0.2585.31249, Culture=neutral, processorArchitecture=MSIL"> + <Reference Include="Core, Version=1.0.2590.13808, Culture=neutral, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>D:\sources mp\Core\bin\Release\Core.dll</HintPath> + <HintPath>..\..\MediaPortal\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> + <HintPath>..\..\MediaPortal\Dialogs\bin\Release\Dialogs.dll</HintPath> </Reference> <Reference Include="Microsoft.DirectX"> <Name>Microsoft.DirectX</Name> @@ -107,9 +107,9 @@ <Reference Include="System.Xml"> <Name>System.XML</Name> </Reference> - <Reference Include="Utils, Version=1.0.2585.31248, Culture=neutral, processorArchitecture=MSIL"> + <Reference Include="Utils, Version=1.0.2590.13806, Culture=neutral, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>D:\sources mp\Utils\bin\Release\Utils.dll</HintPath> + <HintPath>..\..\MediaPortal\Utils\bin\Release\Utils.dll</HintPath> </Reference> </ItemGroup> <ItemGroup> Deleted: trunk/plugins/file explorer/Source/Explorer.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fr...@us...> - 2007-02-04 07:51:20
|
Revision: 89 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=89&view=rev Author: framug Date: 2007-02-03 23:51:19 -0800 (Sat, 03 Feb 2007) Log Message: ----------- Removed Paths: ------------- trunk/plugins/My Explorer/My Explorer.suo Deleted: trunk/plugins/My Explorer/My Explorer.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fr...@us...> - 2007-02-04 07:39:04
|
Revision: 88 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=88&view=rev Author: framug Date: 2007-02-03 23:38:59 -0800 (Sat, 03 Feb 2007) Log Message: ----------- Removed Paths: ------------- trunk/plugins/My clickmania/GUIClickMania.suo Deleted: trunk/plugins/My clickmania/GUIClickMania.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fr...@us...> - 2007-02-04 07:38:26
|
Revision: 87 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=87&view=rev Author: framug Date: 2007-02-03 23:38:25 -0800 (Sat, 03 Feb 2007) Log Message: ----------- Removed Paths: ------------- trunk/plugins/My Status/My Status.suo Deleted: trunk/plugins/My Status/My Status.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fr...@us...> - 2007-02-04 07:35:37
|
Revision: 86 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=86&view=rev Author: framug Date: 2007-02-03 23:35:33 -0800 (Sat, 03 Feb 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/MultiShortcut/MultiButton.suo trunk/plugins/MultiShortcut/MultiShortcut/MultiShortcut.cs Modified: trunk/plugins/MultiShortcut/MultiButton.suo =================================================================== (Binary files differ) Modified: trunk/plugins/MultiShortcut/MultiShortcut/MultiShortcut.cs =================================================================== --- trunk/plugins/MultiShortcut/MultiShortcut/MultiShortcut.cs 2007-02-03 17:49:17 UTC (rev 85) +++ trunk/plugins/MultiShortcut/MultiShortcut/MultiShortcut.cs 2007-02-04 07:35:33 UTC (rev 86) @@ -1,4 +1,27 @@ -// THIS IS NOTHING MORE THAN A HACK! +#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; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <du...@us...> - 2007-02-03 17:49:21
|
Revision: 85 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=85&view=rev Author: dukus Date: 2007-02-03 09:49:17 -0800 (Sat, 03 Feb 2007) Log Message: ----------- Build form remaked Modified Paths: -------------- trunk/plugins/mpinstaler/MPInstaler/Build dialog.Designer.cs trunk/plugins/mpinstaler/MPInstaler/Build dialog.cs trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs trunk/plugins/mpinstaler/MPInstaler.suo Modified: trunk/plugins/mpinstaler/MPInstaler/Build dialog.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Build dialog.Designer.cs 2007-02-03 07:03:39 UTC (rev 84) +++ trunk/plugins/mpinstaler/MPInstaler/Build dialog.Designer.cs 2007-02-03 17:49:17 UTC (rev 85) @@ -28,81 +28,106 @@ /// </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(); + 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.listBox1 = new System.Windows.Forms.ListBox(); + this.progressBar1 = new System.Windows.Forms.ProgressBar(); + 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(452, 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(469, 20); + 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, 220); + 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, 220); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(75, 23); + this.button3.TabIndex = 4; + this.button3.Text = "Close"; + this.button3.UseVisualStyleBackColor = true; + this.button3.Click += new System.EventHandler(this.button3_Click); + // + // listBox1 + // + this.listBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.listBox1.FormattingEnabled = true; + this.listBox1.HorizontalScrollbar = true; + this.listBox1.Location = new System.Drawing.Point(12, 54); + this.listBox1.Name = "listBox1"; + this.listBox1.Size = new System.Drawing.Size(484, 134); + this.listBox1.TabIndex = 5; + // + // progressBar1 + // + this.progressBar1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.progressBar1.Location = new System.Drawing.Point(12, 198); + this.progressBar1.Name = "progressBar1"; + this.progressBar1.Size = new System.Drawing.Size(484, 16); + this.progressBar1.TabIndex = 6; + // + // Build_dialog + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(502, 255); + this.Controls.Add(this.progressBar1); + this.Controls.Add(this.listBox1); + 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.Load += new System.EventHandler(this.Build_dialog_Load); + this.ResumeLayout(false); + this.PerformLayout(); } @@ -114,5 +139,7 @@ private System.Windows.Forms.Button button1; private System.Windows.Forms.Button button2; private System.Windows.Forms.Button button3; + private System.Windows.Forms.ListBox listBox1; + private System.Windows.Forms.ProgressBar progressBar1; } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/Build dialog.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Build dialog.cs 2007-02-03 07:03:39 UTC (rev 84) +++ trunk/plugins/mpinstaler/MPInstaler/Build dialog.cs 2007-02-03 17:49:17 UTC (rev 85) @@ -40,11 +40,16 @@ private void button2_Click(object sender, EventArgs e) { _struct.BuildFileName = textBox1.Text; - _struct.BuilFile(); + _struct.BuilFile(listBox1,progressBar1); } public void onbuild() { } + + private void Build_dialog_Load(object sender, EventArgs e) + { + listBox1.Items.Clear(); + } } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-02-03 07:03:39 UTC (rev 84) +++ trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-02-03 17:49:17 UTC (rev 85) @@ -12,169 +12,193 @@ namespace MPInstaler { - public class MPinstalerStruct - { - - public const string PLUGIN_TYPE = "Plugin"; - public const string PLUGIN_WINDOW_SUBTYPE = "Window"; - public const string PLUGIN_PROCESS_SUBTYPE = "Process"; - public const string PLUGIN_SUBTITLE_SUBTYPE = "Subtitle"; - public const string PLUGIN_TAGREADER_SUBTYPE = "TagReader"; - public const string PLUGIN_PLAYER_SUBTYPE = "External Player"; - public const string SKIN_TYPE = "Skin"; - public const string SKIN_MEDIA_TYPE = "Media"; - public const string SKIN_XML_SUBTYPE = "Genskin"; - - string _builFileName = string.Empty; - string _proiectFileName = string.Empty; - public ArrayList FileList = new ArrayList(); - public MPinstalerStruct() - { - - } - public string BuildFileName + public class MPinstalerStruct { - get { return _builFileName; } - set { _builFileName = value; } - } - public string ProiectdFileName - { - get { return _proiectFileName; } - set { _proiectFileName = value; } - } - - public void AddFileList(ListView lst) - { - FileList.Clear(); - for (int i = 0; i < lst.Items.Count; i++) - { - FileList.Add(new MPIFileList(lst.Items[i].SubItems[3].Text, lst.Items[i].SubItems[1].Text, lst.Items[i].SubItems[2].Text, lst.Items[i].SubItems[4].Text)); - } - } - public void Clear() - { - FileList.Clear(); - BuildFileName = string.Empty; - } - public void BuilFile() - { - ZipOutputStream s = new ZipOutputStream(File.Create(_builFileName)); + public const string PLUGIN_TYPE = "Plugin"; + public const string PLUGIN_WINDOW_SUBTYPE = "Window"; + public const string PLUGIN_PROCESS_SUBTYPE = "Process"; + public const string PLUGIN_SUBTITLE_SUBTYPE = "Subtitle"; + public const string PLUGIN_TAGREADER_SUBTYPE = "TagReader"; + public const string PLUGIN_PLAYER_SUBTYPE = "External Player"; + public const string SKIN_TYPE = "Skin"; + public const string SKIN_MEDIA_TYPE = "Media"; + public const string SKIN_XML_SUBTYPE = "Genskin"; - s.SetLevel(5); // 0 - store only to 9 - means best compression + string _builFileName = string.Empty; + string _proiectFileName = string.Empty; + public ArrayList FileList = new ArrayList(); + public MPinstalerStruct() + { - foreach (MPIFileList file in FileList) - { - MessageBox.Show(file.FileName); - if (!string.IsNullOrEmpty(file.FileName)&&File.Exists(file.FileName)) + } + public string BuildFileName { - FileStream fs = File.OpenRead(Path.GetFullPath(file.FileName)); - byte[] buffer = new byte[fs.Length]; - fs.Read(buffer, 0, buffer.Length); + get { return _builFileName; } + set { _builFileName = value; } + } + public string ProiectdFileName + { + get { return _proiectFileName; } + set { _proiectFileName = value; } + } - ZipEntry entry = new ZipEntry(GetZipEntry(file)); + public void AddFileList(ListView lst) + { + FileList.Clear(); + for (int i = 0; i < lst.Items.Count; i++) + { + FileList.Add(new MPIFileList(lst.Items[i].SubItems[3].Text, lst.Items[i].SubItems[1].Text, lst.Items[i].SubItems[2].Text, lst.Items[i].SubItems[4].Text)); + } + } + public void Clear() + { + FileList.Clear(); + BuildFileName = string.Empty; + } - s.PutNextEntry(entry); + public void BuilFile(ListBox ls, ProgressBar pb) + { + ZipOutputStream s = new ZipOutputStream(File.Create(_builFileName)); + ls.Items.Clear(); + s.SetLevel(5); // 0 - store only to 9 - means best compression + pb.Value = 0; + pb.Maximum = FileList.Count; + ls.Items.Add("Build file :" + _builFileName); + foreach (MPIFileList file in FileList) + { + ls.Items.Add("Adding file :" + file.FileName); + pb.Value++; + ls.Refresh(); + ls.Update(); + if (!string.IsNullOrEmpty(file.FileName) && File.Exists(file.FileName)) + { + FileStream fs = File.OpenRead(Path.GetFullPath(file.FileName)); + byte[] buffer = new byte[fs.Length]; + fs.Read(buffer, 0, buffer.Length); - s.Write(buffer, 0, buffer.Length); - } + ZipEntry entry = new ZipEntry(GetZipEntry(file)); - } - if (File.Exists(ProiectdFileName)) - { - FileStream fs = File.OpenRead(Path.GetFullPath(ProiectdFileName)); - byte[] buffer = new byte[fs.Length]; - fs.Read(buffer, 0, buffer.Length); + s.PutNextEntry(entry); - ZipEntry entry = new ZipEntry("instaler.xmp"); + s.Write(buffer, 0, buffer.Length); + } - s.PutNextEntry(entry); + } + if (File.Exists(ProiectdFileName)) + { + FileStream fs = File.OpenRead(Path.GetFullPath(ProiectdFileName)); + byte[] buffer = new byte[fs.Length]; + fs.Read(buffer, 0, buffer.Length); - s.Write(buffer, 0, buffer.Length); - } - s.Finish(); - s.Close(); - } + ZipEntry entry = new ZipEntry("instaler.xmp"); - public string GetZipEntry(MPIFileList flst) - { - string ret = string.Empty; - if (flst.Type == PLUGIN_TYPE) - { - ret="Release"+@"\"+"Plugins"+@"\"; - switch (flst.SubType) + s.PutNextEntry(entry); + + s.Write(buffer, 0, buffer.Length); + } + s.Finish(); + s.Close(); + } + public void LoadFromFile(string fil) { - case PLUGIN_WINDOW_SUBTYPE: - ret += "Windows"; - break; - case PLUGIN_PLAYER_SUBTYPE: - ret += "ExternalPlayers"; - break; - case PLUGIN_PROCESS_SUBTYPE: - ret += "Process"; - break; - case PLUGIN_SUBTITLE_SUBTYPE: - ret += "Subtitle"; - break; - case PLUGIN_TAGREADER_SUBTYPE: - ret += "TagReaders"; - break; } - ret += @"\" + Path.GetFileName(flst.FileName); - } + public string GetZipEntry(MPIFileList flst) + { + string ret = string.Empty; + if (flst.Type == PLUGIN_TYPE) + { + ret = "Release" + @"\" + "Plugins" + @"\"; + switch (flst.SubType) + { + case PLUGIN_WINDOW_SUBTYPE: + ret += "Windows"; + break; + case PLUGIN_PLAYER_SUBTYPE: + ret += "ExternalPlayers"; + break; + case PLUGIN_PROCESS_SUBTYPE: + ret += "Process"; + break; + case PLUGIN_SUBTITLE_SUBTYPE: + ret += "Subtitle"; + break; + case PLUGIN_TAGREADER_SUBTYPE: + ret += "TagReaders"; + break; - if (flst.Type == SKIN_TYPE) - { - ret = "Release" + @"\" + "Skin" + @"\" + flst.SubType + @"\" + Path.GetFileName(flst.FileName); - } + } + ret += @"\" + Path.GetFileName(flst.FileName); + } - if (flst.Type == SKIN_MEDIA_TYPE) - { - ret = "Release" + @"\" + "Skin" + @"\" + flst.SubType +@"\"+"Media"+ @"\" + Path.GetFileName(flst.FileName); - } + if (flst.Type == SKIN_TYPE) + { + ret = "Release" + @"\" + "Skin" + @"\" + flst.SubType + @"\" + Path.GetFileName(flst.FileName); + } - return ret; + if (flst.Type == SKIN_MEDIA_TYPE) + { + ret = "Release" + @"\" + "Skin" + @"\" + flst.SubType + @"\" + "Media" + @"\" + Path.GetFileName(flst.FileName); + } + + return ret; + } } - } - public class MPIFileList - { - string _FileName = string.Empty; - string _Type = string.Empty; - string _SubType = string.Empty; - string _Id = string.Empty; - - public MPIFileList(string fn,string ty, string sty,string i) + public class MPIFileList { - FileName = fn; - Type = ty; - SubType = sty; - ID = i; - } - public string FileName - { - get { return _FileName; } - set { _FileName = value; } - } + string _FileName = string.Empty; + string _Type = string.Empty; + string _SubType = string.Empty; + string _Id = string.Empty; + string _Op = string.Empty; + + public MPIFileList(string fn, string ty, string sty, string i) + { + FileName = fn; + Type = ty; + SubType = sty; + ID = i; + Option = String.Empty; + } - public string Type - { - get { return _Type; } - set { _Type = value; } - } + public MPIFileList(string fn, string ty, string sty, string i,string o) + { + FileName = fn; + Type = ty; + SubType = sty; + ID = i; + Option = o; + } + public string FileName + { + get { return _FileName; } + set { _FileName = value; } + } - public string SubType - { - get { return _SubType; } - set { _SubType = value; } + public string Type + { + get { return _Type; } + set { _Type = value; } + } + + public string SubType + { + get { return _SubType; } + set { _SubType = value; } + } + public string ID + { + get { return _Id; } + set { _Id = value; } + } + public string Option + { + get { return _Op; } + set { _Op = value; } + } + } - public string ID - { - get { return _Id; } - set { _Id = value; } - } - - } } Modified: trunk/plugins/mpinstaler/MPInstaler.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fr...@us...> - 2007-02-03 07:03:40
|
Revision: 84 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=84&view=rev Author: framug Date: 2007-02-02 23:03:39 -0800 (Fri, 02 Feb 2007) Log Message: ----------- Remove bin folder Removed Paths: ------------- trunk/plugins/My clickmania/bin/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <an...@us...> - 2007-02-03 03:10:17
|
Revision: 83 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=83&view=rev Author: and-81 Date: 2007-02-02 19:10:09 -0800 (Fri, 02 Feb 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/MCEReplacement/MceIrApi.cs trunk/plugins/MCEReplacementTray/MceIrApi.cs trunk/plugins/TV3MceBlaster/MceIrApi.cs Modified: trunk/plugins/MCEReplacement/MceIrApi.cs =================================================================== --- trunk/plugins/MCEReplacement/MceIrApi.cs 2007-02-02 17:35:27 UTC (rev 82) +++ trunk/plugins/MCEReplacement/MceIrApi.cs 2007-02-03 03:10:09 UTC (rev 83) @@ -78,6 +78,7 @@ public enum MceButtons { Custom = -1, + None = 0, TV_Power = 0x7b9a, Blue = 0x7ba1, Yellow = 0x7ba2, Modified: trunk/plugins/MCEReplacementTray/MceIrApi.cs =================================================================== --- trunk/plugins/MCEReplacementTray/MceIrApi.cs 2007-02-02 17:35:27 UTC (rev 82) +++ trunk/plugins/MCEReplacementTray/MceIrApi.cs 2007-02-03 03:10:09 UTC (rev 83) @@ -78,6 +78,7 @@ public enum MceButtons { Custom = -1, + None = 0, TV_Power = 0x7b9a, Blue = 0x7ba1, Yellow = 0x7ba2, Modified: trunk/plugins/TV3MceBlaster/MceIrApi.cs =================================================================== --- trunk/plugins/TV3MceBlaster/MceIrApi.cs 2007-02-02 17:35:27 UTC (rev 82) +++ trunk/plugins/TV3MceBlaster/MceIrApi.cs 2007-02-03 03:10:09 UTC (rev 83) @@ -78,6 +78,7 @@ public enum MceButtons { Custom = -1, + None = 0, TV_Power = 0x7b9a, Blue = 0x7ba1, Yellow = 0x7ba2, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fr...@us...> - 2007-02-02 17:35:39
|
Revision: 82 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=82&view=rev Author: framug Date: 2007-02-02 09:35:27 -0800 (Fri, 02 Feb 2007) Log Message: ----------- Add My Recipes Was removed from MP, check //fmu Added Paths: ----------- trunk/plugins/My Recipes/ trunk/plugins/My Recipes/CatReader.cs trunk/plugins/My Recipes/GUIRecipes.cs trunk/plugins/My Recipes/My Recipes.csproj trunk/plugins/My Recipes/My Recipes.sln trunk/plugins/My Recipes/My Recipes.suo trunk/plugins/My Recipes/Properties/ trunk/plugins/My Recipes/Properties/AssemblyInfo.cs trunk/plugins/My Recipes/Recipe.cs trunk/plugins/My Recipes/RecipeDatabase.cs trunk/plugins/My Recipes/RecipePrinter.cs trunk/plugins/My Recipes/RecipeReader.cs trunk/plugins/My Recipes/SetupForm.cs trunk/plugins/My Recipes/SetupForm.resx Added: trunk/plugins/My Recipes/CatReader.cs =================================================================== --- trunk/plugins/My Recipes/CatReader.cs (rev 0) +++ trunk/plugins/My Recipes/CatReader.cs 2007-02-02 17:35:27 UTC (rev 82) @@ -0,0 +1,90 @@ +/* + * 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 + * + */ + +using System; +using System.Collections; +using System.IO; +using MediaPortal.GUI.Library; + +namespace GUIRecipes { + /// <summary> + /// Summary description for CatReader. + /// </summary> + public class CatReader { + + protected string cFileName; + + public int CatCount { + get { return catCount; } + } + + protected int catCount = 0; + + public CatReader( string fileName ) { + cFileName = fileName; + } + + public void GetCategories() { + StreamReader reader = new StreamReader( cFileName, System.Text.Encoding.Default ); + string line = reader.ReadLine(); + bool maincat=false; + bool sorts=false; + string content=""; + int num=0; + + while( line != null ) { + if (line.Trim().StartsWith( "#Main" )) { + maincat=true; + sorts=false; + line = reader.ReadLine(); + } + if (line.Trim().StartsWith( "#Sorts" )) { + sorts=true; + maincat=false; + line = reader.ReadLine(); + } + + string[] lines = line.Split( ';' ); + int l=0; + foreach( string lin in lines ) { + if (l==1) { + content=lin.Trim(); + l++; + } + if (l==0) { + num=Convert.ToInt16(lin); + l++; + } + } + if (maincat==true) { + catCount++; + RecipeDatabase.GetInstance().AddMainCat( content.TrimEnd(), num,0); + } + if (sorts==true) { + catCount++; + RecipeDatabase.GetInstance().AddMainCat( content.TrimEnd(), 0, num); + } + line = reader.ReadLine(); + } + reader.Close(); + } + } +} Added: trunk/plugins/My Recipes/GUIRecipes.cs =================================================================== --- trunk/plugins/My Recipes/GUIRecipes.cs (rev 0) +++ trunk/plugins/My Recipes/GUIRecipes.cs 2007-02-02 17:35:27 UTC (rev 82) @@ -0,0 +1,644 @@ +#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 + +#region Usings +using System; +using System.Collections; +using System.Windows.Forms; +using MediaPortal.GUI.Library; +using MediaPortal.Dialogs; + +#endregion + +namespace GUIRecipes +{ + /// <summary> + /// Summary description for GUIRecipes. + /// </summary> + public class GUIRecipes : GUIWindow, ISetupForm, IShowPlugin + { + #region Private Enumerations + enum Controls + { + CONTROL_BACKBUTTON = 2, + CONTROL_SEARCH_TYP = 3, + CONTROL_SEARCH_TOG = 4, + CONTROL_SEARCH = 5, + CONTROL_FAVOR = 6, + CONTROL_DELETE = 7, + CONTROL_PRINT = 8, + CONTROL_SPIN = 9, + CONTROL_LIST = 10, + CONTROL_TEXTBOX = 11 + }; + #endregion + + #region Base variabeles + + Recipe rec = new Recipe(); + RecipePrinter rp = new RecipePrinter(); + string subcatstr = "";// contains actual subcategorie + string catstr = ""; // contains actual categorie + string titstr = ""; // contains actual title of recipe + string seastr = ""; // contains actual search string + bool search = false; // was search mode the last menu? + bool online = false; // online recipe update? + bool subcat = false; // show subcategories ? + + enum States + { + STATE_MAIN = 0, + STATE_CATEGORY = 1, + STATE_Recipe = 2, + STATE_SUB = 3, + STATE_FAVORITES = 4 + }; + + enum Search_Types + { + SEARCH_TITLE = 0, + SEARCH_Recipe = 1 + }; + + private States currentState = States.STATE_MAIN; + private Search_Types currentSearch = Search_Types.SEARCH_TITLE; + + #endregion + + #region Constructor + public GUIRecipes() + { + // + // TODO: Add constructor logic here + // + } + + #endregion + + #region ISetupForm + + public string PluginName() + { + return "My Recipes"; + } + + public string Description() + { + return "Browse your cooking recipes with MediaPortal"; + } + + public string Author() + { + return "Gucky62/Domi_fan"; + } + + public void ShowPlugin() + { + SetupForm form = new SetupForm(); + + form.ShowDialog(); + } + + public bool DefaultEnabled() + { + return false; + } + + public bool CanEnable() + { + return true; + } + + public bool HasSetup() + { + return true; + } + + public int GetWindowId() + { + return 750; + } + + /// <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(10); + strButtonImage = ""; + strButtonImageFocus = ""; + strPictureImage = @"hover_my recipes.png"; + return true; + } + + #endregion + + #region IShowPlugin Members + + public bool ShowDefaultHome() + { + return false; + } + + #endregion + + #region Overides + /// <summary> + /// Return the id of this window + /// </summary> + public override int GetID + { + get { return 750; } + set { base.GetID = value; } + } + + /// <summary> + /// Gets called by the runtime when a new window has been created + /// Every window window should override this method and load itself by calling + /// the Load() method + /// </summary> + /// <returns></returns> + public override bool Init() + { + LoadSettings(); + return Load(GUIGraphicsContext.Skin + @"\myrecipes.xml"); + } + + public override void OnAction(Action action) + { + if (action.wID == Action.ActionType.ACTION_PREVIOUS_MENU) + { + GUIWindowManager.ShowPreviousWindow(); + return; + } + if (action.wID == Action.ActionType.ACTION_KEY_PRESSED) + { + if (action.m_key.KeyChar == 89 || action.m_key.KeyChar == 121) + { + GUIListItem item = GUIControl.GetSelectedListItem(GetID, (int)Controls.CONTROL_LIST); + if (item != null) + { + if (item.Label.Length > 1) RecipeDatabase.GetInstance().AddFavorite(item.Label); + } + } + return; + } + if (action.wID == Action.ActionType.ACTION_QUEUE_ITEM) // add recipe to favorites + { + if (currentState == States.STATE_Recipe) + { + GUIListItem item = GUIControl.GetSelectedListItem(GetID, (int)Controls.CONTROL_LIST); + if (item != null) + { + if (item.Label.Length > 1) RecipeDatabase.GetInstance().AddFavorite(item.Label); + } + } + return; + } + if (action.wID == Action.ActionType.ACTION_DELETE_ITEM) + { + GUIListItem item = GUIControl.GetSelectedListItem(GetID, (int)Controls.CONTROL_LIST); + if (item != null) + { + GUIDialogYesNo dlgYesNo = (GUIDialogYesNo)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_YES_NO); + if (null != dlgYesNo) + { + titstr = item.Label; + dlgYesNo.SetLine(1, ""); + dlgYesNo.SetLine(2, ""); + if (currentState == States.STATE_Recipe || currentState == States.STATE_CATEGORY) + { + dlgYesNo.SetHeading(GUILocalizeStrings.Get(2049)); + dlgYesNo.SetLine(1, titstr); + } + if (currentState == States.STATE_MAIN) + { + dlgYesNo.SetHeading(GUILocalizeStrings.Get(2050)); + dlgYesNo.SetLine(1, titstr); + } + if (currentState == States.STATE_FAVORITES) + { + dlgYesNo.SetHeading(GUILocalizeStrings.Get(933)); + dlgYesNo.SetLine(1, titstr); + } + dlgYesNo.DoModal(GetID); + + if (dlgYesNo.IsConfirmed) + { + switch (currentState) + { + case States.STATE_FAVORITES: + { + RecipeDatabase.GetInstance().DeleteFavorite(titstr); + ArrayList recipes = RecipeDatabase.GetInstance().GetRecipesForFavorites(); + UpDateList(recipes); + GUIControl.FocusControl(GetID, (int)Controls.CONTROL_BACKBUTTON); + currentState = States.STATE_FAVORITES; + UpdateButtons(); + } + break; + case States.STATE_CATEGORY: + case States.STATE_Recipe: + { + RecipeDatabase.GetInstance().DeleteRecipe(titstr); + currentState = States.STATE_CATEGORY; + UpdateButtons(); + ArrayList recipes = RecipeDatabase.GetInstance().GetRecipesForCategory(catstr); + UpDateList(recipes); + GUIControl.FocusControl(GetID, (int)Controls.CONTROL_BACKBUTTON); + } + break; + case States.STATE_MAIN: + { + } + break; + } + } + } + } + } + base.OnAction(action); + } + + public override bool OnMessage(GUIMessage message) + { + switch (message.Message) + { + case GUIMessage.MessageType.GUI_MSG_WINDOW_INIT: + base.OnMessage(message); + GUISpinControl cntlYieldInterval = GetControl((int)Controls.CONTROL_SPIN) as GUISpinControl; + if (cntlYieldInterval != null) + { + for (int i = 1; i <= 24; i++) cntlYieldInterval.AddLabel("", i); + cntlYieldInterval.Value = 1; + } + LoadAllCategories(); + currentState = States.STATE_MAIN; + UpdateButtons(); + return true; + case GUIMessage.MessageType.GUI_MSG_CLICKED: + int iControl = message.SenderControlId; + if (iControl == (int)Controls.CONTROL_SPIN) + { // Yield Calculator + if (currentState == States.STATE_Recipe) + { + GUISpinControl cntlYieldInt = GetControl((int)Controls.CONTROL_SPIN) as GUISpinControl; + int iInterval = (cntlYieldInt.Value) + 1; + rec.CYield = iInterval; + ShowDetails(rec); + UpdateButtons(); + } + } + else if (iControl == (int)Controls.CONTROL_SEARCH_TYP) + { // Select type of search + GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_ITEM_SELECTED, GetID, 0, iControl, 0, 0, null); + OnMessage(msg); + switch (currentSearch) + { + case Search_Types.SEARCH_Recipe: // search by title + currentSearch = Search_Types.SEARCH_TITLE; + break; + case Search_Types.SEARCH_TITLE: // search by recipe + currentSearch = Search_Types.SEARCH_Recipe; + break; + } + UpdateButtons(); + GUIControl.FocusControl(GetID, iControl); + } + else if (iControl == (int)Controls.CONTROL_LIST) // Click on 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 && iItem != -1) + { + GUIListItem item = GUIControl.GetSelectedListItem(GetID, (int)Controls.CONTROL_LIST); + if (currentState == States.STATE_CATEGORY || currentState == States.STATE_FAVORITES) // show recipe details + { + if (item.Label != GUILocalizeStrings.Get(2054)) + { + rec = RecipeDatabase.GetInstance().GetRecipe(item.Label); + titstr = item.Label; + GUISpinControl cntlYieldInt = GetControl((int)Controls.CONTROL_SPIN) as GUISpinControl; + cntlYieldInt.Value = rec.CYield; + ShowDetails(rec); + GUIControl.FocusControl(GetID, (int)Controls.CONTROL_BACKBUTTON); + currentState = States.STATE_Recipe; + UpdateButtons(); + } + } + else if (currentState == States.STATE_MAIN) + { // show category + // show list of items + ArrayList recipes; + if (subcat == true) + { + recipes = RecipeDatabase.GetInstance().GetSubsForCategory(item.Label); + currentState = States.STATE_SUB; + subcatstr = item.Label; + } + else + { + recipes = RecipeDatabase.GetInstance().GetRecipesForCategory(item.Label); + currentState = States.STATE_CATEGORY; + catstr = item.Label; + } + UpDateList(recipes); + GUIControl.FocusControl(GetID, (int)Controls.CONTROL_BACKBUTTON); + UpdateButtons(); + } + else if (currentState == States.STATE_SUB) + { // show category + // show list of items + ArrayList recipes = RecipeDatabase.GetInstance().GetRecipesForCategory(item.Label); + currentState = States.STATE_CATEGORY; + catstr = item.Label; + UpDateList(recipes); + GUIControl.FocusControl(GetID, (int)Controls.CONTROL_BACKBUTTON); + UpdateButtons(); + } + } + } + else if (iControl == (int)Controls.CONTROL_BACKBUTTON) + { // click on Backbutton + if (currentState == States.STATE_Recipe) + { // back from recipe detail + currentState = States.STATE_CATEGORY; + UpdateButtons(); + if (search == true) + { + byte styp = 0; + if (currentSearch == Search_Types.SEARCH_Recipe) styp = 0; + if (currentSearch == Search_Types.SEARCH_TITLE) styp = 1; + ArrayList recipes = RecipeDatabase.GetInstance().SearchRecipes(seastr, styp); + UpDateList(recipes); + } + else + { + ArrayList recipes = RecipeDatabase.GetInstance().GetRecipesForCategory(catstr); + UpDateList(recipes); + } + GUIControl.FocusControl(GetID, (int)Controls.CONTROL_BACKBUTTON); + } + else if (currentState == States.STATE_CATEGORY || currentState == States.STATE_FAVORITES) + { + search = false; + if (subcat == true) + { + currentState = States.STATE_SUB; + // show list of items + ArrayList recipes = RecipeDatabase.GetInstance().GetSubsForCategory(subcatstr); + UpDateList(recipes); + GUIControl.FocusControl(GetID, (int)Controls.CONTROL_BACKBUTTON); + UpdateButtons(); + } + else + { + currentState = States.STATE_MAIN; + LoadAllCategories(); + } + UpdateButtons(); + GUIControl.FocusControl(GetID, (int)Controls.CONTROL_LIST); + } + else if (currentState == States.STATE_SUB) + { + currentState = States.STATE_MAIN; + LoadAllCategories(); + UpdateButtons(); + GUIControl.FocusControl(GetID, (int)Controls.CONTROL_LIST); + } + } + else if (iControl == (int)Controls.CONTROL_SEARCH) // click on Search Button + { + int activeWindow = (int)GUIWindowManager.ActiveWindow; + + //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 seastr = 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 + seastr = keyboard.Text; + + GUIListItem item = GUIControl.GetSelectedListItem(GetID, (int)Controls.CONTROL_LIST); + byte styp = 0; + if (currentSearch == Search_Types.SEARCH_Recipe) styp = 0; + if (currentSearch == Search_Types.SEARCH_TITLE) styp = 1; + search = true; + ArrayList recipes = RecipeDatabase.GetInstance().SearchRecipes(seastr, styp); + UpDateList(recipes); + currentState = States.STATE_CATEGORY; + UpdateButtons(); + } + else if (iControl == (int)Controls.CONTROL_FAVOR) // click on Favorites + { + // show list of items + GUIListItem item = GUIControl.GetSelectedListItem(GetID, (int)Controls.CONTROL_LIST); + ArrayList recipes = RecipeDatabase.GetInstance().GetRecipesForFavorites(); + UpDateList(recipes); + GUIControl.FocusControl(GetID, (int)Controls.CONTROL_BACKBUTTON); + currentState = States.STATE_FAVORITES; + UpdateButtons(); + } + else if (iControl == (int)Controls.CONTROL_DELETE) // click on delete button + { + Action action = new Action(Action.ActionType.ACTION_DELETE_ITEM, 0, 0); + OnAction(action); + } + else if (iControl == (int)Controls.CONTROL_PRINT) + { // click on Print button + if (currentState == States.STATE_Recipe) + { + rp.printRecipe(rec, catstr, titstr); + GUIControl.FocusControl(GetID, (int)Controls.CONTROL_BACKBUTTON); + } + } + break; + } + return base.OnMessage(message); + } + #endregion + + #region Private Methods + //loads list control with new values + void UpDateList(ArrayList recipes) + { + GUIControl.ClearControl(GetID, (int)Controls.CONTROL_LIST); + if (recipes.Count > 0) + { + foreach (Recipe r in recipes) + { + GUIListItem gli = new GUIListItem(r.Title); + GUIControl.AddListItemControl(GetID, (int)Controls.CONTROL_LIST, gli); + } + } + else + { + GUIListItem gli = new GUIListItem(GUILocalizeStrings.Get(2054)); + GUIControl.AddListItemControl(GetID, (int)Controls.CONTROL_LIST, gli); + } + string strObjects = String.Format("{0} {1}", recipes.Count, GUILocalizeStrings.Get(632)); + GUIPropertyManager.SetProperty("#itemcount", strObjects); + } + + + void UpdateButtons() + { + string strLine = ""; + switch (currentSearch) + { + case Search_Types.SEARCH_Recipe: + strLine = GUILocalizeStrings.Get(2052); + break; + case Search_Types.SEARCH_TITLE: + strLine = GUILocalizeStrings.Get(2051); + break; + } + GUIControl.SetControlLabel(GetID, (int)Controls.CONTROL_SEARCH_TYP, strLine); + switch (currentState) + { + case States.STATE_MAIN: + GUIControl.DisableControl(GetID, (int)Controls.CONTROL_TEXTBOX); + GUIControl.DisableControl(GetID, (int)Controls.CONTROL_SPIN); + GUIControl.HideControl(GetID, (int)Controls.CONTROL_TEXTBOX); + GUIControl.HideControl(GetID, (int)Controls.CONTROL_SPIN); + GUIControl.EnableControl(GetID, (int)Controls.CONTROL_LIST); + GUIControl.ShowControl(GetID, (int)Controls.CONTROL_LIST); + GUIControl.FocusControl(GetID, (int)Controls.CONTROL_LIST); + GUIControl.DisableControl(GetID, (int)Controls.CONTROL_DELETE); + GUIControl.DisableControl(GetID, (int)Controls.CONTROL_BACKBUTTON); + GUIControl.DisableControl(GetID, (int)Controls.CONTROL_PRINT); + break; + case States.STATE_FAVORITES: + case States.STATE_CATEGORY: + GUIControl.DisableControl(GetID, (int)Controls.CONTROL_TEXTBOX); + GUIControl.DisableControl(GetID, (int)Controls.CONTROL_SPIN); + GUIControl.HideControl(GetID, (int)Controls.CONTROL_TEXTBOX); + GUIControl.HideControl(GetID, (int)Controls.CONTROL_SPIN); + GUIControl.EnableControl(GetID, (int)Controls.CONTROL_LIST); + GUIControl.ShowControl(GetID, (int)Controls.CONTROL_LIST); + GUIControl.FocusControl(GetID, (int)Controls.CONTROL_LIST); + GUIControl.DisableControl(GetID, (int)Controls.CONTROL_DELETE); + GUIControl.EnableControl(GetID, (int)Controls.CONTROL_BACKBUTTON); + GUIControl.DisableControl(GetID, (int)Controls.CONTROL_PRINT); + break; + case States.STATE_SUB: + GUIControl.DisableControl(GetID, (int)Controls.CONTROL_TEXTBOX); + GUIControl.DisableControl(GetID, (int)Controls.CONTROL_SPIN); + GUIControl.HideControl(GetID, (int)Controls.CONTROL_TEXTBOX); + GUIControl.HideControl(GetID, (int)Controls.CONTROL_SPIN); + GUIControl.EnableControl(GetID, (int)Controls.CONTROL_LIST); + GUIControl.ShowControl(GetID, (int)Controls.CONTROL_LIST); + GUIControl.FocusControl(GetID, (int)Controls.CONTROL_LIST); + GUIControl.DisableControl(GetID, (int)Controls.CONTROL_DELETE); + GUIControl.EnableControl(GetID, (int)Controls.CONTROL_BACKBUTTON); + GUIControl.DisableControl(GetID, (int)Controls.CONTROL_PRINT); + break; + case States.STATE_Recipe: + GUIControl.HideControl(GetID, (int)Controls.CONTROL_LIST); + GUIControl.DisableControl(GetID, (int)Controls.CONTROL_LIST); + GUIControl.EnableControl(GetID, (int)Controls.CONTROL_BACKBUTTON); + GUIControl.EnableControl(GetID, (int)Controls.CONTROL_TEXTBOX); + GUIControl.EnableControl(GetID, (int)Controls.CONTROL_SPIN); + GUIControl.ShowControl(GetID, (int)Controls.CONTROL_TEXTBOX); + GUIControl.ShowControl(GetID, (int)Controls.CONTROL_SPIN); + GUIControl.EnableControl(GetID, (int)Controls.CONTROL_DELETE); + GUIControl.EnableControl(GetID, (int)Controls.CONTROL_BACKBUTTON); + GUIControl.EnableControl(GetID, (int)Controls.CONTROL_PRINT); + break; + } + } + + /// <summary> + /// Loads my status settings from the profile xml. + /// </summary> + /// + private void LoadSettings() + { + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml")) + { + subcat = xmlreader.GetValueAsBool("recipe", "subcats", false); + online = xmlreader.GetValueAsBool("recipe", "online", false); + } + } + + private void ShowDetails(Recipe rec) // show recipe directions + { + GUITextControl control = (GUITextControl)this.GetControl((int)Controls.CONTROL_TEXTBOX); + control.OnMessage(new GUIMessage(GUIMessage.MessageType.GUI_MSG_LABEL_RESET, GetID, 0, (int)Controls.CONTROL_TEXTBOX, 0, 0, null)); + + GUIControl.SetControlLabel(GetID, (int)Controls.CONTROL_TEXTBOX, rec.ToString()); + GUIPropertyManager.SetProperty("#itemcount", " "); + } + + void keyboard_TextChanged(int kindOfSearch, string data) + { + // + } + + private void LoadAllCategories() // show all categories + { + ArrayList recipes; + GUIControl.ClearControl(GetID, (int)Controls.CONTROL_LIST); + if (subcat == true) + { + recipes = RecipeDatabase.GetInstance().GetMainCategories(); + } + else + { + recipes = RecipeDatabase.GetInstance().GetCategories(); + } + foreach (string cat in recipes) + { + GUIListItem gli = new GUIListItem(cat); + GUIControl.AddListItemControl(GetID, (int)Controls.CONTROL_LIST, gli); + } + string strObjects = String.Format("{0} {1}", recipes.Count, GUILocalizeStrings.Get(632)); + GUIPropertyManager.SetProperty("#itemcount", strObjects); + } + #endregion + + + + } +} Added: trunk/plugins/My Recipes/My Recipes.csproj =================================================================== --- trunk/plugins/My Recipes/My Recipes.csproj (rev 0) +++ trunk/plugins/My Recipes/My Recipes.csproj 2007-02-02 17:35:27 UTC (rev 82) @@ -0,0 +1,79 @@ +<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>{44E2881F-457F-4CD9-969F-ECC0981FA0B2}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>GUIRecipes</RootNamespace> + <AssemblyName>My Recipes</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.2589.32413, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\MediaPortal\Core\bin\Release\Core.dll</HintPath> + </Reference> + <Reference Include="Databases, Version=1.0.2589.32414, 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.2589.32412, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\MediaPortal\Utils\bin\Release\Utils.dll</HintPath> + </Reference> + </ItemGroup> + <ItemGroup> + <Compile Include="CatReader.cs" /> + <Compile Include="GUIRecipes.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="Recipe.cs" /> + <Compile Include="RecipeDatabase.cs" /> + <Compile Include="RecipePrinter.cs" /> + <Compile Include="RecipeReader.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 Recipes/My Recipes.sln =================================================================== --- trunk/plugins/My Recipes/My Recipes.sln (rev 0) +++ trunk/plugins/My Recipes/My Recipes.sln 2007-02-02 17:35:27 UTC (rev 82) @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual C# Express 2005 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "My Recipes", "My Recipes.csproj", "{44E2881F-457F-4CD9-969F-ECC0981FA0B2}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {44E2881F-457F-4CD9-969F-ECC0981FA0B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {44E2881F-457F-4CD9-969F-ECC0981FA0B2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {44E2881F-457F-4CD9-969F-ECC0981FA0B2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {44E2881F-457F-4CD9-969F-ECC0981FA0B2}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal Added: trunk/plugins/My Recipes/My Recipes.suo =================================================================== (Binary files differ) Property changes on: trunk/plugins/My Recipes/My Recipes.suo ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/My Recipes/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/My Recipes/Properties/AssemblyInfo.cs (rev 0) +++ trunk/plugins/My Recipes/Properties/AssemblyInfo.cs 2007-02-02 17:35:27 UTC (rev 82) @@ -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 Recipes")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("My Recipes")] +[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("4c9ea42f-aeab-4c44-ab0d-af3adc79d8a5")] + +// 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 Recipes/Recipe.cs =================================================================== --- trunk/plugins/My Recipes/Recipe.cs (rev 0) +++ trunk/plugins/My Recipes/Recipe.cs 2007-02-02 17:35:27 UTC (rev 82) @@ -0,0 +1,222 @@ +/* + * 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 + * + */ + +using System; +using System.Collections; +using MediaPortal.GUI.Library; +namespace GUIRecipes +{ + /// <summary> + /// Summary description for Recipe. + /// </summary> + public class Recipe { + string mId; + string mTitle; + int mCYield; + ArrayList mCategories; + string mYield; + ArrayList mIngredients = new ArrayList(); + ArrayList mLot = new ArrayList(); + ArrayList mUnit = new ArrayList(); + ArrayList mRemarks = new ArrayList(); + string mDirections; + + public Recipe(){ + // + // TODO: Add constructor logic here + // + } + + public string Title { + get{ return mTitle; } + set{ mTitle = value; } + } + + public string Id { + get { return mId; } + set { mId = value; } + } + + public ArrayList Categories { + get{ return mCategories; } + set{ mCategories = value; } + } + + public void SetCategories( string Categories) { + mCategories = new ArrayList( Categories.Split( ',' ) ); + } + + public string Yield { + get{ return mYield; } + set{ mYield = value; } + } + + public int CYield { + get{ return mCYield; } + set{ mCYield = value; } + } + + public string Directions { + get{ return mDirections; } + set{ mDirections = value; } + } + + public ArrayList Ingredients { + get{ return mIngredients; } + set{ mIngredients = value; } + } + + public ArrayList Lot { + get{ return mLot; } + set{ mLot = value; } + } + + public ArrayList Unit { + get{ return mUnit; } + set{ mUnit = value; } + } + + public ArrayList Remarks { + get{ return mRemarks; } + set{ mRemarks = value; } + } + + public void AddIngredient( string ing ) { + Ingredients.Add( ing ); + } + + public void AddLot( string lot ) { + Lot.Add( lot ); + } + + public void AddUnit( string unit ) { + Unit.Add( unit ); + } + + public void AddRemarks( string rem ) { + Remarks.Add( rem ); + } + + public override string ToString() + { + int sunit=0; + double dsunit=0.0; + double dilot=0.0; + string s1 = ""; + string stunit = ""; + try { + if (CYield <= 1) { + stunit=Yield; + } else { + stunit=Yield.Trim(); + string[] s2 = stunit.Split( ' ' ); + dsunit=Convert.ToDouble(s2[0]); + stunit=Convert.ToString(CYield); + } + } + catch (Exception ) { + stunit=Yield; + dsunit=1.0; + } + string retval = String.Format("{0}: {1}\n{2}: {3}\n\n{4}:\n", + GUILocalizeStrings.Get(2006),Title, + GUILocalizeStrings.Get(2007),stunit, + GUILocalizeStrings.Get(2008)); + + for( int i=0; i < Ingredients.Count; i++ ) { + sunit=Convert.ToInt16(Unit[i]); + if (sunit > 10) { + stunit=GUILocalizeStrings.Get(sunit)+" "; + } else { + stunit=""; + } + s1=(string)Lot[i]; + s1=s1.Trim(); + if (s1!="") { + try { + if (CYield > 1) { + string SLot=(string)Lot[i]; + SLot=SLot.Trim(); + if (SLot.IndexOf("/",0) > 0) { + int l = SLot.IndexOf("/",0); + string b = SLot.Substring(l-1,3); + double x=0.0; + double y=0.0; + if (l>2) { + int k=SLot.IndexOf(" ",0); + y=Convert.ToDouble(SLot.Substring(0,k)); + } + switch (b) { + case "1/2" : // 1/2 + x=(y+0.5)/dsunit; + x=x*(double)CYield; + break; + case "1/4" : // 1/4 + x=(y+0.25)/dsunit; + x=x*(double)CYield; + break; + case "1/8" : // 1/8 + x=(y+0.125)/dsunit; + x=x*(double)CYield; + break; + case "3/8" : // 3/8 + x=(y+0.375)/dsunit; + x=x*(double)CYield; + break; + case "3/4" : // 3/4 + x=(y+0.75)/dsunit; + x=x*(double)CYield; + break; + } + s1=String.Format("{0:0.##} ",x); + } else { + dilot=Convert.ToDouble(Lot[i]); + dilot=dilot/dsunit; + dilot=dilot*(double)CYield; + s1=String.Format("{0:0.##} ",dilot); + } + } else s1=s1+" "; + } + catch (Exception ) { + s1=(string)Lot[i]; + s1=s1+" "; + } + } + if (i+1 < Ingredients.Count) { + if (Convert.ToInt16(Unit[i+1]) == 1) { // Line Break with "-" in first char + retval = retval + " " + s1 + stunit + Ingredients[i]+ Ingredients[i+1]+"\n"; + i++; + } else { + if (sunit == 2) { // Subtitle + retval = retval + "\n" + Ingredients[i]+ "\n";; + } else { // Normal Ingredients + retval = retval + " " + s1 + stunit + Ingredients[i]+ "\n";; + } + } + } else { + retval = retval + " " + s1 + stunit + Ingredients[i]+ "\n";; + } + } + retval = retval + String.Format("\n{0}:\n{1}",GUILocalizeStrings.Get(2009), Directions) ; + return retval; + } + } +} Added: trunk/plugins/My Recipes/RecipeDatabase.cs =================================================================== --- trunk/plugins/My Recipes/RecipeDatabase.cs (rev 0) +++ trunk/plugins/My Recipes/RecipeDatabase.cs 2007-02-02 17:35:27 UTC (rev 82) @@ -0,0 +1,385 @@ +/* + * 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 + * + */ + +using System.Collections; +using System.Windows.Forms; +using SQLite.NET; +using MediaPortal.GUI.Library; +using System; + +namespace GUIRecipes +{ + /// <summary> + /// Summary description for RecipeDatabase. + /// </summary> + public class RecipeDatabase + { + public enum M_Keys { + VERSION = 1, + ONLINE = 2, + O_NAME = 3, + O_PASS = 4, + SUB_CAT = 5 + } + + private int m_key=0; + private string m_content; + private int m_var1=0; + private int m_var2=0; + + public int M_Key { + get { return m_key; } + set { m_key = value; } + } + + public string M_Content { + get { return m_content; } + set { m_content = value; } + } + + public int M_Var1 { + get { return m_var1; } + set { m_var1 = value; } + } + + public int M_Var2 { + get { return m_var2; } + set { m_var2 = value; } + } + + private static RecipeDatabase instance=null; + private SQLiteClient m_db; + private bool dbExists; + + private RecipeDatabase() { + try { + // Open database + try + { + System.IO.Directory.CreateDirectory("database"); + } + catch(Exception){} + dbExists = System.IO.File.Exists( @"database\RecipeDatabaseV3.db3" ); + m_db = new SQLiteClient(@"database\RecipeDatabaseV3.db3"); + + MediaPortal.Database.DatabaseUtility.SetPragmas(m_db); + if( !dbExists ){ + CreateTables(); + } + } catch (SQLiteException ex){ + Console.Write("Recipedatabase exception err:{0} stack:{1}", ex.Message,ex.StackTrace); + } + } + + public static RecipeDatabase GetInstance() { + if( instance == null ) { + instance = new RecipeDatabase(); + } + return instance; + } + + private void CreateTables(){ + if( m_db == null ){ + return; + } + m_db.Execute("CREATE TABLE Recipe ( Recipe_ID integer primary key, TITLE text, YIELD text, DIRECTIONS text, VOTE text, VERSION integer)\n"); + m_db.Execute("CREATE TABLE INGREDIENT ( INGREDIENT_ID integer primary key, Recipe_ID integer, TITLE text, LOT text, UNIT text)\n"); + m_db.Execute("CREATE TABLE CATEGORY ( CATEGORY_ID integer primary key, TITLE text)\n" ); + m_db.Execute("CREATE TABLE Recipe_CATEGORY( Recipe_CATEGORY_ID integer primary key, CATEGORY_ID integer, Recipe_ID integer, TITLE text)\n" ); + m_db.Execute("CREATE TABLE FAVORITE ( CATEGORY_ID integer primary key, TITLE text)\n" ); + m_db.Execute("CREATE TABLE MAIN_CATEGORY ( CATEGORY_ID integer primary key, TITLE text, NUM integer, SUB integer)\n" ); + m_db.Execute("CREATE TABLE MAINTENANCE ( ID integer primary key, KEY integer, CONTENT text, VAR1 integer, VAR2 integer)\n" ); + m_db.Execute("CREATE TABLE DELETE ( ID integer primary key, STAT integer)\n" ); + AddMaintenance((int)M_Keys.ONLINE, "Init", 0,0); + AddMaintenance((int)M_Keys.SUB_CAT, "Init", 0,0); + AddMaintenance((int)M_Keys.VERSION, "Version", 0,3); + } + + private void BuildMaintenance(ArrayList row) { + if (row!=null) { + IEnumerator en = row.GetEnumerator(); + en.MoveNext(); + string Id = (string) en.Current; + en.MoveNext(); + M_Key = (int) en.Current; + en.MoveNext(); + M_Content=(string)en.Current; + en.MoveNext(); + M_Var1=(int)en.Current; + en.MoveNext(); + M_Var2=(int)en.Current; + } + } + + public bool CheckKey(int key) { + // look to exist key + string rSQL = String.Format("SELECT * FROM MAINTENANCE WHERE KEY = '{0}'",key); + SQLiteResultSet rs = m_db.Execute( rSQL ); + BuildMaintenance((ArrayList)rs.RowsList[0]); + if (M_Key==key) return true; + else return false; + } + + public void AddMainCat(string content, int num, int sub) { + string rSQL = String.Format( "INSERT INTO MAIN_CATEGORY VALUES ( null, '{0}', '{1}', '{2}' )", content, num, sub); + SQLiteResultSet rs = m_db.Execute( rSQL ); + } + + public void AddMaintenance(int key, string content, int var1, int var2) { + // look to exist key + M_Key=0; + string rSQL = String.Format("SELECT * FROM MAINTENANCE WHERE KEY = '{0}'",key.ToString() ); + SQLiteResultSet rs = m_db.Execute( rSQL ); + BuildMaintenance((ArrayList)rs.RowsList[0]); + + rSQL = String.Format( "INSERT INTO MAINTENANCE VALUES ( null, '{0}', '{1}', '{2}', {3} )", key.ToString(),content,var1,var2); + rs = m_db.Execute( rSQL ); + } + + public void AddRecipe( Recipe r ) // add recipe to database + { + if (r.Categories.Count==0) return; + + string rSql = String.Format( "INSERT INTO Recipe VALUES ( null, '{0}', '{1}', '{2}', {3}, {4} )", + RemoveInvalidChars( r.Title ), + RemoveInvalidChars( r.Yield ), + RemoveInvalidChars( r.Directions ), + "0","1"); + m_db.Execute( "BEGIN" ); + m_db.Execute( rSql ); + int rId = m_db.LastInsertID(); + AddCategories( r, rId ); + for (int i=0; i<r.Ingredients.Count; i++){ + string iSql = String.Format( "INSERT INTO INGREDIENT VALUES ( null, '{0}', '{1}', '{2}', '{3}')", rId, RemoveInvalidChars( (string)r.Ingredients[i] ),RemoveInvalidChars((string)r.Lot[i]),RemoveInvalidChars((string)r.Unit[i])); + m_db.Execute( iSql ); + } + m_db.Execute( "END" ); + } + + private void AddCategories(Recipe r, int id) // add category to database + { + ArrayList cat = r.Categories; + foreach( string category in cat ){ + string cSQL = String.Format( "Select * from CATEGORY where title = '{0}'", + RemoveInvalidChars( category.Trim() ) ); + SQLiteResultSet rs = m_db.Execute( cSQL ); + string cId = ""; + + if( rs.RowsList.Count > 0 ){ + // this category already exists + cId = rs.GetField( 0, 0 ); + } else { + // the category doesn't exist, so we need to add it + string iSQL = String.Format( "INSERT INTO CATEGORY VALUES ( null, '{0}')", + RemoveInvalidChars( category.Trim() )); + m_db.Execute( iSQL ); + cId = m_db.LastInsertID().ToString(); + } + + string crSQL = String.Format( "INSERT INTO Recipe_CATEGORY VALUES( null, {0}, {1}, '{2}' )", cId, id.ToString(),RemoveInvalidChars( r.Title ) ); + m_db.Execute( crSQL ); + } + } + + public Recipe GetRecipe( string title ) // get a recipe from database + { + string rSQL = String.Format("SELECT * FROM Recipe WHERE TITLE = '{0}'",title ); + SQLiteResultSet rs = m_db.Execute( rSQL ); + return BuildRecipe((ArrayList)rs.RowsList[0]); + } + + private Recipe BuildRecipe(ArrayList row){ + string stunit = ""; + + if (row==null) return null; + Recipe rec = new Recipe(); + IEnumerator en = row.GetEnumerator(); + en.MoveNext(); + rec.Id = (string) en.Current; + en.MoveNext(); + rec.Title = (string) en.Current; + en.MoveNext(); + + stunit=(string)en.Current; + stunit=stunit.Trim()+" "; + string[] s2 = stunit.Split( ' ' ); + + rec.Yield = stunit; + rec.CYield = Convert.ToInt16(s2[0]); + en.MoveNext(); + rec.Directions = (string)en.Current; + rec.Ingredients = BuildIngredients( rec.Id ); + rec.Lot = BuildLot( rec.Id ); + rec.Unit = BuildUnit( rec.Id ); + return rec; + } + + private Recipe BuildCategorie(ArrayList row){ + if (row==null) return null; + Recipe rec = new Recipe(); + IEnumerator en = row.GetEnumerator(); + en.MoveNext(); + rec.Id = (string) en.Current; + en.MoveNext(); + rec.Title = (string) en.Current; + return rec; + } + + private ArrayList BuildIngredients(string id){ + string aSQL = String.Format( "SELECT TITLE FROM INGREDIENT WHERE Recipe_ID = {0}", id ); + return m_db.Execute( aSQL ).GetColumn( 0 ); + } + + private ArrayList BuildLot(string id){ + string aSQL = String.Format( "SELECT LOT FROM INGREDIENT WHERE Recipe_ID = {0}", id ); + return m_db.Execute( aSQL ).GetColumn( 0 ); + } + + private ArrayList BuildUnit(string id){ + string aSQL = String.Format( "SELECT UNIT FROM INGREDIENT WHERE Recipe_ID = {0}", id ); + return m_db.Execute( aSQL ).GetColumn( 0 ); + } + + public ArrayList GetCategories(){ + string cSQL = "SELECT * FROM CATEGORY ORDER BY TITLE"; + SQLiteResultSet rs = m_db.Execute( cSQL ); + return rs.GetColumn( 1 ); + } + + public ArrayList GetMainCategories(){ + string cSQL = "SELECT * FROM MAIN_CATEGORY WHERE SUB = '0'"; + SQLiteResultSet rs = m_db.Execute( cSQL ); + return rs.GetColumn( 1 ); + } + + public void AddFavorite(string id ) { + string cSQL = String.Format( "INSERT INTO FAVORITE VALUES ( null, '{0}')",id); + SQLiteResultSet rs = m_db.Execute( cSQL ); + return; + } + + public void DeleteFavorite(string id ) + { + string cSQL = String.Format( "DELETE FROM FAVORITE WHERE TITLE = '{0}'", id ); + SQLiteResultSet rs = m_db.Execute( cSQL ); + return; + } + + public void DeleteRecipe(string id ) // delete a recipe from database + { + string cSQL = String.Format( "SELECT * FROM Recipe WHERE TITLE = '{0}'", id ); + SQLiteResultSet rs = m_db.Execute( cSQL ); + string recipeID = (string) rs.GetField(0,0); + + cSQL = String.Format( "DELETE FROM Recipe WHERE Recipe_ID = '{0}'", recipeID ); + rs = m_db.Execute( cSQL ); + cSQL = String.Format( "DELETE FROM Recipe_CATEGORY WHERE TITLE = '{0}'", id ); + rs = m_db.Execute( cSQL ); + cSQL = String.Format( "DELETE FROM FAVORITE WHERE TITLE = '{0}'", id ); + rs = m_db.Execute( cSQL ); + cSQL = String.Format( "DELETE FROM INGREDIENT WHERE Recipe_ID = '{0}'", recipeID); + rs = m_db.Execute( cSQL ); + return; + } + + public ArrayList SearchRecipes(string text,byte typ) //search recipe in database + { + string stext="%"+RemoveInvalidChars(text)+"%"; + string rSQL=""; + ArrayList recipes = new ArrayList(); + if (typ==1) {// Search in Title + rSQL = String.Format("SELECT recipe_id,title FROM Recipe WHERE TITLE LIKE '{0}'",stext); + } + else { // Search in all + rSQL = String.Format("SELECT recipe_id,title FROM Recipe WHERE TITLE LIKE '{0}' OR DIRECTIONS LIKE '{0}'",stext); + } + SQLiteResultSet rs = m_db.Execute( rSQL ); + + foreach( ArrayList row in rs.RowsList ) { + recipes.Add( BuildCategorie( row )); + } + return recipes; + } + + public ArrayList GetRecipesForFavorites() + { + ArrayList recipes = new ArrayList(); + string sql = String.Format( "Select * from favorite" ); + SQLiteResultSet rs = m_db.Execute( sql ); + foreach( ArrayList row in rs.RowsList ) + { + recipes.Add( BuildCategorie( row )); + } + return recipes; + } + + public ArrayList GetSubsForCategory( string category ) { + ArrayList recipes = new ArrayList(); + string sql = String.Format("SELECT * FROM MAIN_CATEGORY WHERE TITLE = '{0}'",category); + SQLiteResultSet rs = m_db.Execute( sql ); + string categoryID = (string) rs.GetField(0,2); + string sql2 = String.Format( "Select * from main_category where sub = {0}", categoryID ); + rs = m_db.Execute( sql2 ); + foreach( ArrayList row in rs.RowsList ) { + recipes.Add( BuildCategorie( row )); + } + return recipes; + } + + public ArrayList GetRecipesForCategory( string category ) + { + ArrayList recipes = new ArrayList(); + string sql = String.Format( "Select * from category where title = '{0}'", category ); + SQLiteResultSet rs = m_db.Execute( sql ); + + string categoryID = rs.GetField(0,0).ToString(); + string sql2 = String.Format( "Select recipe_id,title from recipe_category where category_id = {0}", categoryID ); + rs = m_db.Execute( sql2 ); + foreach( ArrayList row in rs.RowsList ) + { + recipes.Add( BuildCategorie( row )); + } + return recipes; + } + + string RemoveInvalidChars( string strTxt) + { + if( strTxt == null ) return ""; + string strReturn=""; + for (int i=0; i < (int)strTxt.Length; ++i) + { + char k=strTxt[i]; + int z=(int) k; + if (z<32 || z>255) k=' '; + if (k=='^' || k=='~' || k=='#') k=' '; + if (k=='\'') + { + strReturn += "'"; + } + strReturn += k; + } + if (strReturn=="") + strReturn=GUILocalizeStrings.Get(2014); + strTxt=strReturn.Trim(); + return strTxt; + } + } +} Added: trunk/plugins/My Recipes/RecipePrinter.cs =================================================================== --- trunk/plugins/My Recipes/RecipePrinter.cs (rev 0) +++ trunk/plugins/My Recipes/RecipePrinter.cs 2007-02-02 17:35:27 UTC (rev 82) @@ -0,0 +1,193 @@ +/* + * 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 + * + */ + +using System; +using System.Collections; +using System.ComponentModel; +using System.Drawing; +using System.Drawing.Printing; +using System.IO; +using MediaPortal.GUI.Library; + +namespace GUIRecipes +{ + + public class RecipePrinter + { + private string cat; + private bool nextpage; // Is there a second Page to print? + private Font printFont; + private Font printBFont; + private Font printHFont; + private string Snextpage; + private Recipe recP = new Recipe(); + + public RecipePrinter() : base() + { + } + + // The Click event is raised when the user clicks the Print button. + public void printRecipe(Recipe rec, string scat, string stit) + { + cat=scat; + recP = rec; + nextpage = false; + Snextpage=""; + printFont = new Font("Arial", 11); + printHFont = new Font("Arial Black",13); + printBFont = new Font("Arial Black",10); + + PrintDocument pd = new PrintDocument(); + pd.PrintPage += new PrintPageEventHandler(this.pd_PrintPage); + pd.Print(); + if (nextpage==true) + { + PrintDocument pd2 = new PrintDocument(); + pd2.PrintPage += new PrintPageEventHandler(this.pd_PrintPage); + pd2.Print(); + } + } + + // The PrintPage event is raised for each page to be printed. + private void pd_PrintPage(object sender, PrintPageEventArgs ev) + { + float linesPerPage = 0; + float yPos = 0; + int count = 0; + int start = 0; + int end = 0; + int mx = 0; + int len = 80; + + float leftMargin = ev.MarginBounds.Left; + float topMargin = ev.MarginBounds.Top; + string contents = recP.ToString(); + + // Calculate the number of lines per page. + linesPerPage = ev.MarginBounds.Height / printFont.GetHeight(ev.Graphics); + + string[] lines = contents.Split( '\n' ); + string pline = ""; + string lline = ""; + + // Create pen. + Pen blackPen = new Pen(Color.Black, 2); + ev.Graphics.DrawRectangle(blackPen,ev.MarginBounds.Left-50,ev.MarginBounds.Top-70,ev.MarginBounds.Width+50,21); + ev.Graphics.DrawRectangle(blackPen,ev.MarginBounds.Left-50,ev.MarginBounds.Top-49,ev.MarginBounds.Width+50,33); + ev.Graphics.DrawString(GUILocalizeStrings.Get(2053)+": "+cat, printBFont, Brushes.Black,leftMargin-30, ev.MarginBounds.Top-69, new StringFormat()); + ev.Graphics.DrawString(lines[0].Substring(8), printHFont, Brushes.Black,leftMargin-30, ev.MarginBounds.Top-47, new StringFormat()); + + // Print each line of the file. + foreach( string line in lines ) + { + if (nextpage==true) + { + if (Snextpage.Length > 1) + { + lline = Snextpage; + start = 0; + end = 0; + mx = len; + for( int i=0; i < Snextpage.Length; i++) + { + if (lline[i] == ' ') end=i; + if (i == mx) + { + pline = Snextpage.Substring(start,end-start); + mx = end + len; + start = end + 1; + pline = " " + pline; + yPos = topMargin + (count * printFont.GetHeight(ev.Graphics)); + ev.Graphics.DrawString(pline, printFont, Brushes.Black,leftMargin, yPos, new StringFormat()); + count++; + if (count >= linesPerPage) break; + } + } + pline = Snextpage.Substring(start); + pline = " " + pline; + yPos = topMargin + (count * printFont.GetHeight(ev.Graphics)); + ev.Graphics.DrawString(pline, printFont, Brushes.Black,leftMargin, yPos, new StringFormat()); + count++; + break; + } + } + if (line.Length > len && nextpage==false) + { + lline=line; + start = 0; + end = 0; + mx=len; + for( int i=0; i<line.Length; i++) + { + if (lline[i] == ' ') end=i; + if (i==mx) + { + pline=line.Substring(start,end-start); + mx=end+len; + start=end+1; + pline=" "+pline; + yPos = topMargin + (count * printFont.GetHeight(ev.Graphics)); + ev.Graphics.DrawString(pline, printFont, Brushes.Black,leftMargin, yPos, new StringFormat()); + count++; + if (count >= linesPerPage) + { + Snextpage=line.Substring(start); + nextpage=true; + break; + } + } + } + if (nextpage==false) + { + pline=line.Substring(start); + pline=" "+pline; + yPos = topMargin + (count * printFont.GetHeight(ev.Graphics)); + ev.Graphics.DrawString(pline, printFont, Brushes.Black,leftMargin, yPos, new StringFormat()); + count++; + } + else + { + break; + } + } + else + { + if (nextpage==false) + { + yPos = topMargin + (count * printFont.GetHeight(ev.Graphics)); + ev.Graphics.DrawString(line, printFont, Brushes.Black,leftMargin, yPos, new StringFormat()); + count++; + if (count >= linesPerPage) + { + nextpage=true; + break; + } + } + } + if (count >= linesPerPage) + { + nextpage=true; + break; + } + } + } + } +} Added: trunk/plugins/My Recipes/RecipeReader.cs ======================... [truncated message content] |
From: <an...@us...> - 2007-02-02 14:48:55
|
Revision: 81 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=81&view=rev Author: and-81 Date: 2007-02-02 06:48:53 -0800 (Fri, 02 Feb 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/MCEReplacement/MCEReplacement.cs trunk/plugins/MCEReplacementTray/Tray.cs Modified: trunk/plugins/MCEReplacement/MCEReplacement.cs =================================================================== --- trunk/plugins/MCEReplacement/MCEReplacement.cs 2007-02-02 12:52:42 UTC (rev 80) +++ trunk/plugins/MCEReplacement/MCEReplacement.cs 2007-02-02 14:48:53 UTC (rev 81) @@ -652,31 +652,19 @@ switch ((RemoteButton)button) { case RemoteButton.Up: - if (y < MouseModeStep) - Cursor.Position = new Point(x, 0); - else - Cursor.Position = new Point(x, y - distance); + Cursor.Position = new Point(x, y - distance); return true; case RemoteButton.Down: - if (y > Screen.PrimaryScreen.WorkingArea.Height - distance) - Cursor.Position = new Point(x, Screen.PrimaryScreen.WorkingArea.Height); - else - Cursor.Position = new Point(x, y + distance); + Cursor.Position = new Point(x, y + distance); return true; case RemoteButton.Left: - if (x < MouseModeStep) - Cursor.Position = new Point(0, y); - else - Cursor.Position = new Point(x - distance, y); + Cursor.Position = new Point(x - distance, y); return true; case RemoteButton.Right: - if (x > Screen.PrimaryScreen.WorkingArea.Width - distance) - Cursor.Position = new Point(x, Screen.PrimaryScreen.WorkingArea.Width); - else - Cursor.Position = new Point(x + distance, y); + Cursor.Position = new Point(x + distance, y); return true; case RemoteButton.Replay: // Left Single-Click Modified: trunk/plugins/MCEReplacementTray/Tray.cs =================================================================== --- trunk/plugins/MCEReplacementTray/Tray.cs 2007-02-02 12:52:42 UTC (rev 80) +++ trunk/plugins/MCEReplacementTray/Tray.cs 2007-02-02 14:48:53 UTC (rev 81) @@ -266,12 +266,14 @@ { case PBT_APMQUERYSUSPEND: case PBT_APMQUERYSTANDBY: - MceIrApi.Suspend(); + if (MceIrApi.InUse) + MceIrApi.Suspend(); TrayIcon.Visible = false; break; case PBT_APMRESUMEAUTOMATIC: - MceIrApi.Resume(); + if (MceIrApi.InUse) + MceIrApi.Resume(); TrayIcon.Visible = true; break; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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: <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: <fr...@us...> - 2007-02-02 00:20:24
|
Revision: 78 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=78&view=rev Author: framug Date: 2007-02-01 16:20:22 -0800 (Thu, 01 Feb 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/My Status/My Status.suo Removed Paths: ------------- trunk/plugins/My Status/bin/ Modified: trunk/plugins/My Status/My Status.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fr...@us...> - 2007-02-02 00:18:24
|
Revision: 77 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=77&view=rev Author: framug Date: 2007-02-01 16:18:22 -0800 (Thu, 01 Feb 2007) Log Message: ----------- Removed Paths: ------------- trunk/plugins/My Explorer/bin/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fr...@us...> - 2007-02-02 00:16:12
|
Revision: 76 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=76&view=rev Author: framug Date: 2007-02-01 16:16:11 -0800 (Thu, 01 Feb 2007) Log Message: ----------- Removed Paths: ------------- trunk/plugins/My Explorer/bin/Release/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2007-02-01 22:04:09
|
Revision: 75 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=75&view=rev Author: saamand Date: 2007-02-01 14:03:59 -0800 (Thu, 01 Feb 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/MyLyrics/My Lyrics/MyLyrics.csproj Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics.csproj =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics.csproj 2007-02-01 19:51:14 UTC (rev 74) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics.csproj 2007-02-01 22:03:59 UTC (rev 75) @@ -5,13 +5,12 @@ <ProductVersion>8.0.50727</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{BBB2DAE2-0D83-4B4B-85B6-D1B5A7E10039}</ProjectGuid> - <OutputType>Library</OutputType> + <OutputType>WinExe</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>MyLyrics</RootNamespace> <AssemblyName>MyLyrics</AssemblyName> <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent> - <StartupObject> - </StartupObject> + <StartupObject>MyLyrics.MyLyricsSetup_test</StartupObject> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <du...@us...> - 2007-02-01 19:51:15
|
Revision: 74 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=74&view=rev Author: dukus Date: 2007-02-01 11:51:14 -0800 (Thu, 01 Feb 2007) Log Message: ----------- Added proiect saving and opening.Some form design. Modified Paths: -------------- trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs trunk/plugins/mpinstaler/MPInstaler/Form1.cs trunk/plugins/mpinstaler/MPInstaler/Form1.resx trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj.user trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs trunk/plugins/mpinstaler/MPInstaler/OptionForm.Designer.cs trunk/plugins/mpinstaler/MPInstaler/OptionForm.cs trunk/plugins/mpinstaler/MPInstaler.suo Modified: trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs 2007-02-01 18:30:53 UTC (rev 73) +++ trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs 2007-02-01 19:51:14 UTC (rev 74) @@ -28,59 +28,65 @@ /// </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.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.tabPage_Skin = new System.Windows.Forms.TabPage(); + this.tabPage_Plugin = new System.Windows.Forms.TabPage(); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tabPage_Other = new System.Windows.Forms.TabPage(); + this.tabPage_Language = new System.Windows.Forms.TabPage(); + this.tabPage_Proiect = new System.Windows.Forms.TabPage(); + this.menuStrip1.SuspendLayout(); + this.contextMenuStrip1.SuspendLayout(); + this.tabControl1.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.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, @@ -90,252 +96,314 @@ 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.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.."; + this.saveProiectAsToolStripMenuItem.Click += new System.EventHandler(this.saveProiectAsToolStripMenuItem_Click); + // + // 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.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.windowPluginToolStripMenuItem.Name = "windowPluginToolStripMenuItem"; + this.windowPluginToolStripMenuItem.Size = new System.Drawing.Size(152, 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.skinToolStripMenuItem.Name = "skinToolStripMenuItem"; + this.skinToolStripMenuItem.Size = new System.Drawing.Size(152, 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(152, 22); + this.languageToolStripMenuItem.Text = "Language"; + this.languageToolStripMenuItem.Click += new System.EventHandler(this.languageToolStripMenuItem_Click); + // + // bossview + // + this.bossview.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.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.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, 227); + this.bossview.TabIndex = 2; + this.bossview.UseCompatibleStateImageBehavior = false; + this.bossview.View = System.Windows.Forms.View.Details; + this.bossview.SelectedIndexChanged += new System.EventHandler(this.bossview_SelectedIndexChanged); + // + // 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 = "Source"; + 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(); + this.contextMenuStrip1.Name = "contextMenuStrip1"; + this.contextMenuStrip1.Size = new System.Drawing.Size(125, 26); + // + // toolStripComboBox1 + // + this.toolStripComboBox1.Name = "toolStripComboBox1"; + this.toolStripComboBox1.Size = new System.Drawing.Size(124, 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.CreatePrompt = true; + this.saveFileDialog1.DefaultExt = "xml"; + this.saveFileDialog1.Filter = "Proiect files (*.xmp)|*.xmp|All files |*.*"; + // + // tabPage_Skin + // + this.tabPage_Skin.Location = new System.Drawing.Point(4, 22); + this.tabPage_Skin.Name = "tabPage_Skin"; + this.tabPage_Skin.Padding = new System.Windows.Forms.Padding(3); + this.tabPage_Skin.Size = new System.Drawing.Size(643, 120); + this.tabPage_Skin.TabIndex = 1; + this.tabPage_Skin.Text = "Properties"; + this.tabPage_Skin.UseVisualStyleBackColor = true; + // + // tabPage_Plugin + // + this.tabPage_Plugin.Location = new System.Drawing.Point(4, 22); + this.tabPage_Plugin.Name = "tabPage_Plugin"; + this.tabPage_Plugin.Padding = new System.Windows.Forms.Padding(3); + this.tabPage_Plugin.Size = new System.Drawing.Size(643, 120); + this.tabPage_Plugin.TabIndex = 0; + this.tabPage_Plugin.Text = "Properties"; + this.tabPage_Plugin.UseVisualStyleBackColor = true; + // + // tabControl1 + // + this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tabControl1.Controls.Add(this.tabPage_Plugin); + this.tabControl1.Controls.Add(this.tabPage_Skin); + this.tabControl1.Controls.Add(this.tabPage_Other); + this.tabControl1.Controls.Add(this.tabPage_Language); + this.tabControl1.Controls.Add(this.tabPage_Proiect); + this.tabControl1.Location = new System.Drawing.Point(12, 273); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(651, 146); + this.tabControl1.TabIndex = 3; + // + // tabPage_Other + // + this.tabPage_Other.Location = new System.Drawing.Point(4, 22); + this.tabPage_Other.Name = "tabPage_Other"; + this.tabPage_Other.Size = new System.Drawing.Size(643, 120); + this.tabPage_Other.TabIndex = 2; + this.tabPage_Other.Text = "Properties"; + this.tabPage_Other.UseVisualStyleBackColor = true; + // + // tabPage_Language + // + this.tabPage_Language.Location = new System.Drawing.Point(4, 22); + this.tabPage_Language.Name = "tabPage_Language"; + this.tabPage_Language.Size = new System.Drawing.Size(643, 120); + this.tabPage_Language.TabIndex = 3; + this.tabPage_Language.Text = "Properties"; + this.tabPage_Language.UseVisualStyleBackColor = true; + // + // tabPage_Proiect + // + this.tabPage_Proiect.Location = new System.Drawing.Point(4, 22); + this.tabPage_Proiect.Name = "tabPage_Proiect"; + this.tabPage_Proiect.Size = new System.Drawing.Size(643, 120); + this.tabPage_Proiect.TabIndex = 4; + this.tabPage_Proiect.Text = "Proiect Properties"; + this.tabPage_Proiect.UseVisualStyleBackColor = true; + // + // 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.tabControl1); + this.Controls.Add(this.menuStrip1); + this.MainMenuStrip = this.menuStrip1; + this.Name = "Form1"; + this.Text = "Form1"; + this.Load += new System.EventHandler(this.Form1_Load); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); + this.contextMenuStrip1.ResumeLayout(false); + this.tabControl1.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); } @@ -373,8 +441,13 @@ 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; + private System.Windows.Forms.ToolStripMenuItem toolStripComboBox1; + private System.Windows.Forms.TabPage tabPage_Skin; + private System.Windows.Forms.TabPage tabPage_Plugin; + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tabPage_Other; + private System.Windows.Forms.TabPage tabPage_Language; + private System.Windows.Forms.TabPage tabPage_Proiect; } } Modified: trunk/plugins/mpinstaler/MPInstaler/Form1.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-02-01 18:30:53 UTC (rev 73) +++ trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-02-01 19:51:14 UTC (rev 74) @@ -11,239 +11,290 @@ namespace MPInstaler { - public partial class Form1 : Form - { - private MPinstalerStruct _struct = new MPinstalerStruct(); - public Form1() + public partial class Form1 : Form { - InitializeComponent(); - } + private MPinstalerStruct _struct = new MPinstalerStruct(); + private string proiect_file_name = "Untitled"; + public Form1() + { + InitializeComponent(); + } - private void button1_Click(object sender, EventArgs e) - { - } + private void button1_Click(object sender, EventArgs e) + { + } - private void sToolStripMenuItem_Click(object sender, EventArgs e) - { - Stream myStream; + private void sToolStripMenuItem_Click(object sender, EventArgs e) + { + saveFileDialog1.Filter = "Proiect files (*.xmp)|*.xmp|All files |*.*"; + if (Path.GetFileName(proiect_file_name) == "Untitled") + { + if (saveFileDialog1.ShowDialog(this) == DialogResult.OK) + { + proiect_file_name = saveFileDialog1.FileName; + save_proiect_file(proiect_file_name); + } + } else save_proiect_file(proiect_file_name); + } - if (saveFileDialog1.ShowDialog(this) == DialogResult.OK) - { - if ((myStream = saveFileDialog1.OpenFile()) != null) + private void windowToolStripMenuItem_Click(object sender, EventArgs e) { - // 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++) + 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) { - 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 + ";"; + fil = openFileDialog1.FileName; + switch (type) + { + case 1: + addrow(Path.GetFileName(fil), MPinstalerStruct.PLUGIN_TYPE, MPinstalerStruct.PLUGIN_WINDOW_SUBTYPE, Path.GetFullPath(fil), "01010"); + break; + case 2: + addrow(Path.GetFileName(fil), MPinstalerStruct.PLUGIN_TYPE, MPinstalerStruct.PLUGIN_PROCESS_SUBTYPE, Path.GetFullPath(fil), "01020"); + break; + case 3: + addrow(Path.GetFileName(fil), MPinstalerStruct.PLUGIN_TYPE, MPinstalerStruct.PLUGIN_SUBTITLE_SUBTYPE, Path.GetFullPath(fil), "01030"); + break; + case 4: + addrow(Path.GetFileName(fil), MPinstalerStruct.PLUGIN_TYPE, MPinstalerStruct.PLUGIN_TAGREADER_SUBTYPE, Path.GetFullPath(fil), "01040"); + break; + case 5: + addrow(Path.GetFileName(fil), MPinstalerStruct.PLUGIN_TYPE, MPinstalerStruct.PLUGIN_PLAYER_SUBTYPE, Path.GetFullPath(fil), "01050"); + break; + default: + break; + } } - 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 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.GetFullPath(fil), "02010"); + break; + case 2: addrow(Path.GetFileName(fil), MPinstalerStruct.SKIN_MEDIA_TYPE, MPinstalerStruct.SKIN_XML_SUBTYPE, Path.GetFullPath(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 windowToolStripMenuItem_Click(object sender, EventArgs e) - { - addplugin(1); - } + private void externalPlayersToolStripMenuItem_Click(object sender, EventArgs e) + { + addplugin(5); + } - 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) + private void addrow(string file, string type, string subtype, string path, string id) { - 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; + 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 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) + private void openProiectToolStripMenuItem_Click(object sender, EventArgs e) { - 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; + string fil; + openFileDialog1.Filter = "Proiect files (*.xmp)|*.xmp|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("Source").InnerText, + nodefile.SelectSingleNode("Id").InnerText); + } + _struct.BuildFileName = ver.SelectSingleNode("Option/BuildFileName").InnerText; + _struct.ProiectdFileName = fil; + } + _struct.AddFileList(bossview); } - } - } - private void subtitleToolStripMenuItem_Click(object sender, EventArgs e) - { - addplugin(3); - } + private void languageToolStripMenuItem_Click(object sender, EventArgs e) + { + Form2 StrForm = new Form2(); + StrForm.ShowDialog(); + } - private void procesToolStripMenuItem_Click(object sender, EventArgs e) - { - addplugin(2); - } + private void optionsToolStripMenuItem_Click(object sender, EventArgs e) + { + OptionForm opForm = new OptionForm(); + opForm.ShowDialog(); + } - private void tagReadersToolStripMenuItem_Click(object sender, EventArgs e) - { - addplugin(4); - } + private void buildToolStripMenuItem_Click(object sender, EventArgs e) + { + Build_dialog buildfrm = new Build_dialog(this._struct); + buildfrm.ShowDialog(); + this._struct = buildfrm._struct; + } - private void externalPlayersToolStripMenuItem_Click(object sender, EventArgs e) - { - addplugin(5); - } + private void newToolStripMenuItem_Click(object sender, EventArgs e) + { + bossview.Items.Clear(); + _struct.Clear(); + } - 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) + private void componentToolStripMenuItem_Click(object sender, EventArgs e) { - addrow(nodefile.SelectSingleNode("FileName").InnerText, - nodefile.SelectSingleNode("Type").InnerText, - nodefile.SelectSingleNode("SubType").InnerText, - nodefile.SelectSingleNode("Path").InnerText, - nodefile.SelectSingleNode("Id").InnerText); + addskin(1); } - _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 mediaToolStripMenuItem_Click(object sender, EventArgs e) + { + addskin(2); + } - private void optionsToolStripMenuItem_Click(object sender, EventArgs e) - { - OptionForm opForm = new OptionForm(); - opForm.ShowDialog(); - } + 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); + } - private void buildToolStripMenuItem_Click(object sender, EventArgs e) - { - Build_dialog buildfrm = new Build_dialog(this._struct); - buildfrm.ShowDialog(); - this._struct = buildfrm._struct; - } + private void save_proiect_file(string fil) + { + Stream myStream; + if ((myStream = File.Open(fil,FileMode.Create, FileAccess.Write, FileShare.None)) != 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("Source", Path.GetFullPath(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.WriteElementString("ProiectFileName", Path.GetFullPath(_struct.ProiectdFileName)); + writer.WriteEndElement(); + writer.WriteEndElement(); + writer.Flush(); - private void newToolStripMenuItem_Click(object sender, EventArgs e) - { - bossview.Items.Clear(); - _struct.Clear(); - } + //------------------------------------- + //------------------------------------- + } + finally + { + if (writer != null) + writer.Close(); + } + myStream.Close(); - 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); - } + private void saveProiectAsToolStripMenuItem_Click(object sender, EventArgs e) + { + saveFileDialog1.Filter = "Proiect files (*.xmp)|*.xmp|All files |*.*"; + if (saveFileDialog1.ShowDialog(this) == DialogResult.OK) + { + proiect_file_name = saveFileDialog1.FileName; + _struct.ProiectdFileName = proiect_file_name; + save_proiect_file(proiect_file_name); + } + } + private void Form1_Load(object sender, EventArgs e) + { + tabControl1.Controls.Clear(); + tabControl1.Controls.Add(tabPage_Proiect); + } + private void bossview_SelectedIndexChanged(object sender, EventArgs e) + { + if (bossview.SelectedItems.Count > 0) + { + if (bossview.SelectedItems[0].SubItems[1].Text == MPinstalerStruct.PLUGIN_TYPE) + { + tabControl1.Controls.Clear(); + tabControl1.Controls.Add(tabPage_Plugin); + tabControl1.Controls.Add(tabPage_Proiect); + } + if (bossview.SelectedItems[0].SubItems[1].Text == MPinstalerStruct.SKIN_TYPE) + { + tabControl1.Controls.Clear(); + tabControl1.Controls.Add(tabPage_Skin); + tabControl1.Controls.Add(tabPage_Proiect); + } + } + else + { + tabControl1.Controls.Clear(); + tabControl1.Controls.Add(tabPage_Proiect); + } - } + } + + } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/Form1.resx =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/Form1.resx 2007-02-01 18:30:53 UTC (rev 73) +++ trunk/plugins/mpinstaler/MPInstaler/Form1.resx 2007-02-01 19:51:14 UTC (rev 74) @@ -127,6 +127,6 @@ <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> + <value>397, 17</value> </metadata> </root> \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj.user =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj.user 2007-02-01 18:30:53 UTC (rev 73) +++ trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj.user 2007-02-01 19:51:14 UTC (rev 74) @@ -12,5 +12,9 @@ <ApplicationRevision>1</ApplicationRevision> <FallbackCulture>en-US</FallbackCulture> <VerifyUploadedFiles>false</VerifyUploadedFiles> + <EnableSecurityDebugging>false</EnableSecurityDebugging> </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <EnableUnmanagedDebugging>true</EnableUnmanagedDebugging> + </PropertyGroup> </Project> \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-02-01 18:30:53 UTC (rev 73) +++ trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-02-01 19:51:14 UTC (rev 74) @@ -26,6 +26,7 @@ public const string SKIN_XML_SUBTYPE = "Genskin"; string _builFileName = string.Empty; + string _proiectFileName = string.Empty; public ArrayList FileList = new ArrayList(); public MPinstalerStruct() { @@ -36,13 +37,18 @@ get { return _builFileName; } set { _builFileName = value; } } + public string ProiectdFileName + { + get { return _proiectFileName; } + set { _proiectFileName = value; } + } public void AddFileList(ListView lst) { FileList.Clear(); for (int i = 0; i < lst.Items.Count; i++) { - FileList.Add(new MPIFileList(lst.Items[i].SubItems[3].Text + @"\" + lst.Items[i].Text, lst.Items[i].SubItems[1].Text, lst.Items[i].SubItems[2].Text, lst.Items[i].SubItems[4].Text)); + FileList.Add(new MPIFileList(lst.Items[i].SubItems[3].Text, lst.Items[i].SubItems[1].Text, lst.Items[i].SubItems[2].Text, lst.Items[i].SubItems[4].Text)); } } public void Clear() @@ -59,10 +65,10 @@ foreach (MPIFileList file in FileList) { + MessageBox.Show(file.FileName); if (!string.IsNullOrEmpty(file.FileName)&&File.Exists(file.FileName)) { FileStream fs = File.OpenRead(Path.GetFullPath(file.FileName)); - byte[] buffer = new byte[fs.Length]; fs.Read(buffer, 0, buffer.Length); @@ -74,6 +80,18 @@ } } + if (File.Exists(ProiectdFileName)) + { + FileStream fs = File.OpenRead(Path.GetFullPath(ProiectdFileName)); + byte[] buffer = new byte[fs.Length... [truncated message content] |
From: <fr...@us...> - 2007-02-01 18:31:07
|
Revision: 73 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=73&view=rev Author: framug Date: 2007-02-01 10:30:53 -0800 (Thu, 01 Feb 2007) Log Message: ----------- another time for others folders Removed Paths: ------------- trunk/plugins/MultiShortcut/DLLFix/bin/ trunk/plugins/MultiShortcut/TestServer/bin/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |