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: <mis...@us...> - 2007-03-18 22:09:27
|
Revision: 197
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=197&view=rev
Author: misterd_sf
Date: 2007-03-18 11:10:10 -0700 (Sun, 18 Mar 2007)
Log Message:
-----------
Added additional error handling
Fixed bug with double entries in setup form
Modified Paths:
--------------
trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationForm.Designer.cs
trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationForm.cs
trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationManager.cs
trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ExtensionSettings.cs
trunk/plugins/My MPlayer/MPlayer_ExtPlayer/MPlayer_ExtPlayer.cs
Modified: trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationForm.Designer.cs
===================================================================
--- trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationForm.Designer.cs 2007-03-18 10:30:53 UTC (rev 196)
+++ trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationForm.Designer.cs 2007-03-18 18:10:10 UTC (rev 197)
@@ -121,8 +121,6 @@
this.ftpArguments = new System.Windows.Forms.TextBox();
this.label12 = new System.Windows.Forms.Label();
this.cueArguments = new System.Windows.Forms.TextBox();
- this.audioCDArguments = new System.Windows.Forms.TextBox();
- this.label6 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.svcdArguments = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
@@ -744,8 +742,6 @@
this.dvd_vcd_svcd_streams_Tab.Controls.Add(this.ftpArguments);
this.dvd_vcd_svcd_streams_Tab.Controls.Add(this.label12);
this.dvd_vcd_svcd_streams_Tab.Controls.Add(this.cueArguments);
- this.dvd_vcd_svcd_streams_Tab.Controls.Add(this.audioCDArguments);
- this.dvd_vcd_svcd_streams_Tab.Controls.Add(this.label6);
this.dvd_vcd_svcd_streams_Tab.Controls.Add(this.label11);
this.dvd_vcd_svcd_streams_Tab.Controls.Add(this.svcdArguments);
this.dvd_vcd_svcd_streams_Tab.Controls.Add(this.label10);
@@ -761,7 +757,7 @@
//
// label20
//
- this.label20.Location = new System.Drawing.Point(3, 326);
+ this.label20.Location = new System.Drawing.Point(3, 300);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(117, 23);
this.label20.TabIndex = 50;
@@ -769,14 +765,14 @@
//
// unsvArguments
//
- this.unsvArguments.Location = new System.Drawing.Point(122, 323);
+ this.unsvArguments.Location = new System.Drawing.Point(122, 297);
this.unsvArguments.Name = "unsvArguments";
this.unsvArguments.Size = new System.Drawing.Size(256, 20);
this.unsvArguments.TabIndex = 51;
//
// label19
//
- this.label19.Location = new System.Drawing.Point(3, 300);
+ this.label19.Location = new System.Drawing.Point(3, 274);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(117, 23);
this.label19.TabIndex = 48;
@@ -784,14 +780,14 @@
//
// udpArguments
//
- this.udpArguments.Location = new System.Drawing.Point(122, 297);
+ this.udpArguments.Location = new System.Drawing.Point(122, 271);
this.udpArguments.Name = "udpArguments";
this.udpArguments.Size = new System.Drawing.Size(256, 20);
this.udpArguments.TabIndex = 49;
//
// label18
//
- this.label18.Location = new System.Drawing.Point(3, 274);
+ this.label18.Location = new System.Drawing.Point(3, 248);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(117, 23);
this.label18.TabIndex = 46;
@@ -799,14 +795,14 @@
//
// sdpArguments
//
- this.sdpArguments.Location = new System.Drawing.Point(122, 271);
+ this.sdpArguments.Location = new System.Drawing.Point(122, 245);
this.sdpArguments.Name = "sdpArguments";
this.sdpArguments.Size = new System.Drawing.Size(256, 20);
this.sdpArguments.TabIndex = 47;
//
// label17
//
- this.label17.Location = new System.Drawing.Point(3, 248);
+ this.label17.Location = new System.Drawing.Point(3, 222);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(117, 23);
this.label17.TabIndex = 44;
@@ -814,14 +810,14 @@
//
// rtspArguments
//
- this.rtspArguments.Location = new System.Drawing.Point(122, 245);
+ this.rtspArguments.Location = new System.Drawing.Point(122, 219);
this.rtspArguments.Name = "rtspArguments";
this.rtspArguments.Size = new System.Drawing.Size(256, 20);
this.rtspArguments.TabIndex = 45;
//
// label16
//
- this.label16.Location = new System.Drawing.Point(3, 222);
+ this.label16.Location = new System.Drawing.Point(3, 196);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(117, 23);
this.label16.TabIndex = 42;
@@ -829,14 +825,14 @@
//
// mpstArguments
//
- this.mpstArguments.Location = new System.Drawing.Point(122, 219);
+ this.mpstArguments.Location = new System.Drawing.Point(122, 193);
this.mpstArguments.Name = "mpstArguments";
this.mpstArguments.Size = new System.Drawing.Size(256, 20);
this.mpstArguments.TabIndex = 43;
//
// label15
//
- this.label15.Location = new System.Drawing.Point(3, 196);
+ this.label15.Location = new System.Drawing.Point(3, 170);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(117, 23);
this.label15.TabIndex = 40;
@@ -844,14 +840,14 @@
//
// mmsArguments
//
- this.mmsArguments.Location = new System.Drawing.Point(122, 193);
+ this.mmsArguments.Location = new System.Drawing.Point(122, 167);
this.mmsArguments.Name = "mmsArguments";
this.mmsArguments.Size = new System.Drawing.Size(256, 20);
this.mmsArguments.TabIndex = 41;
//
// label14
//
- this.label14.Location = new System.Drawing.Point(3, 170);
+ this.label14.Location = new System.Drawing.Point(3, 144);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(117, 23);
this.label14.TabIndex = 38;
@@ -859,14 +855,14 @@
//
// httpArguments
//
- this.httpArguments.Location = new System.Drawing.Point(122, 167);
+ this.httpArguments.Location = new System.Drawing.Point(122, 141);
this.httpArguments.Name = "httpArguments";
this.httpArguments.Size = new System.Drawing.Size(256, 20);
this.httpArguments.TabIndex = 39;
//
// label13
//
- this.label13.Location = new System.Drawing.Point(3, 144);
+ this.label13.Location = new System.Drawing.Point(3, 118);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(117, 23);
this.label13.TabIndex = 36;
@@ -874,14 +870,14 @@
//
// ftpArguments
//
- this.ftpArguments.Location = new System.Drawing.Point(122, 141);
+ this.ftpArguments.Location = new System.Drawing.Point(122, 115);
this.ftpArguments.Name = "ftpArguments";
this.ftpArguments.Size = new System.Drawing.Size(256, 20);
this.ftpArguments.TabIndex = 37;
//
// label12
//
- this.label12.Location = new System.Drawing.Point(3, 118);
+ this.label12.Location = new System.Drawing.Point(3, 92);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(117, 23);
this.label12.TabIndex = 34;
@@ -889,26 +885,11 @@
//
// cueArguments
//
- this.cueArguments.Location = new System.Drawing.Point(122, 115);
+ this.cueArguments.Location = new System.Drawing.Point(122, 89);
this.cueArguments.Name = "cueArguments";
this.cueArguments.Size = new System.Drawing.Size(256, 20);
this.cueArguments.TabIndex = 35;
//
- // audioCDArguments
- //
- this.audioCDArguments.Location = new System.Drawing.Point(122, 89);
- this.audioCDArguments.Name = "audioCDArguments";
- this.audioCDArguments.Size = new System.Drawing.Size(256, 20);
- this.audioCDArguments.TabIndex = 23;
- //
- // label6
- //
- this.label6.Location = new System.Drawing.Point(3, 92);
- this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(117, 23);
- this.label6.TabIndex = 22;
- this.label6.Text = "AudioCD Arguments:";
- //
// label11
//
this.label11.Location = new System.Drawing.Point(3, 66);
@@ -1031,8 +1012,6 @@
private System.Windows.Forms.Button videoDelete;
private System.Windows.Forms.Button videoAdd;
private System.Windows.Forms.ListBox videoExtList;
- private System.Windows.Forms.TextBox audioCDArguments;
- private System.Windows.Forms.Label label6;
private System.Windows.Forms.OpenFileDialog openFileDialog1;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.ComboBox noiseDenoise;
Modified: trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationForm.cs
===================================================================
--- trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationForm.cs 2007-03-18 10:30:53 UTC (rev 196)
+++ trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationForm.cs 2007-03-18 18:10:10 UTC (rev 197)
@@ -69,8 +69,8 @@
// Fetch available Audio Renderers
//
foreach (Filter audioRenderer in Filters.AudioRenderers) {
- if(audioRenderer.Name.StartsWith("DirectSound: ")){
- soundOutputDevice.Items.Add(audioRenderer.Name.Remove(0,13));
+ if (audioRenderer.Name.StartsWith("DirectSound: ")) {
+ soundOutputDevice.Items.Add(audioRenderer.Name.Remove(0, 13));
}
}
}
@@ -146,10 +146,10 @@
videoExtension.Text = String.Empty;
videoArgument.Text = String.Empty;
videoPlayerUse.Checked = false;
+ lastVideoSettings = null;
videoExtension.Enabled = false;
videoArgument.Enabled = false;
videoPlayerUse.Enabled = false;
- lastVideoSettings = null;
}
}
@@ -187,11 +187,16 @@
/// <param name="sender">Sender object</param>
/// <param name="e">Event Arguments</param>
private void videoExtension_Leave(object sender, EventArgs e) {
+ if (lastVideoSettings != null && (!videoExtension.Text.Equals(lastVideoSettings.Name))
+ && videoExtList.Items.Contains(videoExtension.Text)) {
+ MessageBox.Show(this, "Video Extension: " + videoExtension.Text + " already in the list", "MPlayer configuration", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ videoExtension.Focus();
+ return;
+ }
if (lastVideoSettings != null) {
lastVideoSettings.Name = videoExtension.Text;
videoExtList.Items[videoExtList.SelectedIndex] = lastVideoSettings;
}
-
}
/// <summary>
@@ -261,6 +266,12 @@
/// <param name="sender">Sender object</param>
/// <param name="e">Event Arguments</param>
private void audioExtension_Leave(object sender, EventArgs e) {
+ if (lastAudioSettings != null && (!audioExtension.Text.Equals(lastAudioSettings.Name))
+ && audioExtList.Items.Contains(audioExtension.Text)) {
+ MessageBox.Show(this, "Audio Extension: " + audioExtension.Text + " already in the list", "MPlayer configuration", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ audioExtension.Focus();
+ return;
+ }
if (lastAudioSettings != null) {
lastAudioSettings.Name = audioExtension.Text;
audioExtList.Items[audioExtList.SelectedIndex] = lastAudioSettings;
@@ -326,7 +337,6 @@
dvdArguments.Text = xmlreader.GetValueAsString("mplayer", "dvdArguments", String.Empty);
vcdArguments.Text = xmlreader.GetValueAsString("mplayer", "vcdArguments", String.Empty);
svcdArguments.Text = xmlreader.GetValueAsString("mplayer", "svcdArguments", String.Empty);
- audioCDArguments.Text = xmlreader.GetValueAsString("mplayer", "audioCDArguments", String.Empty);
cueArguments.Text = xmlreader.GetValueAsString("mplayer", "cueArguments", String.Empty);
ftpArguments.Text = xmlreader.GetValueAsString("mplayer", "ftpArguments", String.Empty);
httpArguments.Text = xmlreader.GetValueAsString("mplayer", "httpArguments", String.Empty);
@@ -338,7 +348,11 @@
unsvArguments.Text = xmlreader.GetValueAsString("mplayer", "unsvArguments", String.Empty);
mplayerPath.Text = xmlreader.GetValueAsString("mplayer", "mplayerPath", "C:\\Program Files\\MPlayer\\MPlayer.exe");
}
- loadXMLData();
+ try {
+ loadXMLData();
+ } catch (Exception e){
+ Log.Error(e);
+ }
}
@@ -369,7 +383,9 @@
settings.Arguments = nodeExtension.Attributes["arguments"].Value;
settings.ExtPlayerUse = Boolean.Parse(nodeExtension.Attributes["extPlayerUse"].Value);
settings.PlayMode = mode;
- workingList.Items.Add(settings);
+ if (!workingList.Items.Contains(settings.Name)) {
+ workingList.Items.Add(settings);
+ }
}
}
@@ -379,7 +395,7 @@
/// Stores the whole configuration
/// </summary>
private void saveConfiguration() {
- using (MediaPortal.Profile.Settings xmlWriter = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config,"MediaPortal.xml"))) {
+ using (MediaPortal.Profile.Settings xmlWriter = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) {
xmlWriter.SetValue("mplayer", "generalArguments", optionalArguments.Text);
xmlWriter.SetValueAsBool("mplayer", "rebuildIndex", rebuildIndex.Checked);
xmlWriter.SetValueAsBool("mplayer", "priorityBoost", priorityBoost.Checked);
@@ -395,9 +411,9 @@
xmlWriter.SetValue("mplayer", "aspectRatio", aspectRatio.SelectedIndex);
xmlWriter.SetValue("mplayer", "postProcessing", postProcessing.SelectedIndex);
xmlWriter.SetValue("mplayer", "audioChannels", audioChannels.SelectedIndex);
- if(cacheSize.Text.Equals(String.Empty)){
+ if (cacheSize.Text.Equals(String.Empty)) {
xmlWriter.SetValue("mplayer", "cacheSize", 0);
- }else{
+ } else {
xmlWriter.SetValue("mplayer", "cacheSize", cacheSize.Text);
}
xmlWriter.SetValue("mplayer", "noise", noiseDenoise.SelectedIndex);
@@ -405,7 +421,6 @@
xmlWriter.SetValue("mplayer", "dvdArguments", dvdArguments.Text);
xmlWriter.SetValue("mplayer", "vcdArguments", vcdArguments.Text);
xmlWriter.SetValue("mplayer", "svcdArguments", svcdArguments.Text);
- xmlWriter.SetValue("mplayer", "audioCDArguments", audioCDArguments.Text);
xmlWriter.SetValue("mplayer", "cueArguments", cueArguments.Text);
xmlWriter.SetValue("mplayer", "ftpArguments", ftpArguments.Text);
xmlWriter.SetValue("mplayer", "httpArguments", httpArguments.Text);
@@ -416,7 +431,11 @@
xmlWriter.SetValue("mplayer", "udpArguments", udpArguments.Text);
xmlWriter.SetValue("mplayer", "unsvArguments", unsvArguments.Text);
}
- saveXMLData();
+ try {
+ saveXMLData();
+ } catch (Exception e) {
+ Log.Error(e);
+ }
}
/// <summary>
Modified: trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationManager.cs
===================================================================
--- trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationManager.cs 2007-03-18 10:30:53 UTC (rev 196)
+++ trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationManager.cs 2007-03-18 18:10:10 UTC (rev 197)
@@ -474,7 +474,11 @@
videoArguments = xmlreader.GetValueAsString("mplayer", "videoArguments", String.Empty);
audioArguments = xmlreader.GetValueAsString("mplayer", "audioArguments", String.Empty);
}
- loadXMLData();
+ try {
+ loadXMLData();
+ } catch (Exception e) {
+ Log.Error(e);
+ }
m_supportedExtensions = new String[extensionSettingsExtPlayer.Count];
extensionSettingsExtPlayer.Keys.CopyTo(m_supportedExtensions, 0);
}
@@ -502,9 +506,11 @@
settings.Arguments = nodeExtension.Attributes["arguments"].Value;
settings.ExtPlayerUse = Boolean.Parse(nodeExtension.Attributes["extPlayerUse"].Value);
settings.PlayMode = mode;
- extensionSettings.Add(settings.Name, settings);
- if (settings.ExtPlayerUse) {
- extensionSettingsExtPlayer.Add(settings.Name, settings);
+ if (!extensionSettings.ContainsKey(settings.Name)) {
+ extensionSettings.Add(settings.Name, settings);
+ if (settings.ExtPlayerUse) {
+ extensionSettingsExtPlayer.Add(settings.Name, settings);
+ }
}
}
}
Modified: trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ExtensionSettings.cs
===================================================================
--- trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ExtensionSettings.cs 2007-03-18 10:30:53 UTC (rev 196)
+++ trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ExtensionSettings.cs 2007-03-18 18:10:10 UTC (rev 197)
@@ -132,7 +132,7 @@
}
#endregion
- #region ToString-Method
+ #region Overrides
/// <summary>
/// Prints the extension name
/// </summary>
@@ -140,6 +140,27 @@
public override string ToString() {
return name;
}
+
+ /// <summary>
+ /// Compares a given string with the name
+ /// </summary>
+ /// <param name="obj">Object to compare</param>
+ /// <returns>true, if objects or by a given string the names are equal</returns>
+ public override bool Equals(object obj) {
+ String temp = obj as String;
+ if (temp == null) {
+ return base.Equals(obj);
+ }
+ return temp.Equals(name);
+ }
+
+ /// <summary>
+ /// Gets the standard hashcode. Overridden to avoid compiler warning
+ /// </summary>
+ /// <returns>Hashcode of the object</returns>
+ public override int GetHashCode() {
+ return base.GetHashCode();
+ }
#endregion
}
}
Modified: trunk/plugins/My MPlayer/MPlayer_ExtPlayer/MPlayer_ExtPlayer.cs
===================================================================
--- trunk/plugins/My MPlayer/MPlayer_ExtPlayer/MPlayer_ExtPlayer.cs 2007-03-18 10:30:53 UTC (rev 196)
+++ trunk/plugins/My MPlayer/MPlayer_ExtPlayer/MPlayer_ExtPlayer.cs 2007-03-18 18:10:10 UTC (rev 197)
@@ -494,16 +494,19 @@
Log.Info("MPlayer: Data received: " + e.Data);
if (result.StartsWith("ANS_TIME_POSITION=")) {
additionalTime = DateTime.Now;
- baseTime = Double.Parse(result.Substring(18).Replace(".",
- CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator));
+ Double.TryParse(result.Substring(18).Replace(".",
+ CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator),out baseTime);
} else if (result.StartsWith("ANS_PERCENT_POSITION=")) {
additionalTime = DateTime.Now;
- performSeekRelativePercentage(Int32.Parse(result.Substring(21)));
+ int tempValue;
+ Int32.TryParse(result.Substring(21), out tempValue);
+ performSeekRelativePercentage(tempValue);
} else if (result.StartsWith("ID_LENGTH")) {
- duration = Double.Parse(result.Substring(10).Replace(".",
- CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator));
+ Double.TryParse(result.Substring(10).Replace(".",
+ CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator), out duration);
} else if (result.StartsWith("ID_AUDIO_ID")) {
- int temp = Int32.Parse(result.Substring(12));
+ int temp;
+ Int32.TryParse(result.Substring(12), out temp);
if (!audioNames.ContainsKey(temp)) {
audioID.Add(numberOfAudioStreams, temp);
audioNames.Add(temp, Strings.Unknown);
@@ -512,11 +515,13 @@
} else if (result.StartsWith("ID_AID_")) {
String help = result.Substring(7);
int index = help.IndexOf('_');
- int temp = Int32.Parse(help.Substring(0, index));
+ int temp;
+ Int32.TryParse(help.Substring(0, index),out temp);
index = result.IndexOf('=');
audioNames[temp] = result.Substring(index + 1);
} else if (result.StartsWith("ID_SUBTITLE_ID")) {
- int temp = Int32.Parse(result.Substring(15));
+ int temp;
+ Int32.TryParse(result.Substring(15),out temp);
if (!subtitleNames.ContainsKey(temp)) {
subtitleID.Add(numberOfSubtitles, temp);
subtitleNames.Add(temp, Strings.Unknown);
@@ -525,7 +530,8 @@
} else if (result.StartsWith("ID_SID_")) {
String help = result.Substring(7);
int index = help.IndexOf('_');
- int temp = Int32.Parse(help.Substring(0, index));
+ int temp;
+ Int32.TryParse(help.Substring(0, index),out temp);
index = result.IndexOf('=');
subtitleNames[temp] = result.Substring(index + 1);
} else if (result.StartsWith("Exiting... (End of file)")) {
@@ -538,10 +544,10 @@
int pos = result.IndexOf("=> ");
String temp = result.Substring(pos + 3);
pos = temp.IndexOf('x');
- videoWith = Int32.Parse(temp.Substring(0, pos));
+ Int32.TryParse(temp.Substring(0, pos), out videoWith);
temp = temp.Substring(pos + 1);
pos = temp.IndexOf(' ');
- videoHeight = Int32.Parse(temp.Substring(0, pos));
+ Int32.TryParse(temp.Substring(0, pos),out videoHeight);
Log.Info("MPlayer: ASPECT: " + videoWith + "x" + videoHeight);
_needUpdate = true;
SetVideoWindow();
@@ -792,7 +798,7 @@
m_geometry.ScreenHeight = _renderHeight;
m_geometry.ARType = GUIGraphicsContext.ARType;
m_geometry.PixelRatio = GUIGraphicsContext.PixelRatio;
- // Use Method with crop settings, because without it doesn't work properly. There is a bug.
+
m_geometry.GetWindow(videoWith, videoHeight, out _sourceRectangle, out _videoRectangle);
_positionX += _videoRectangle.X;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <an...@us...> - 2007-03-18 12:13:41
|
Revision: 194
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=194&view=rev
Author: and-81
Date: 2007-03-17 05:10:29 -0700 (Sat, 17 Mar 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/ComSkipLauncher TVE2/ComSkipLauncher.cs
trunk/plugins/ComSkipLauncher TVE2/Configuration.cs
trunk/plugins/ComSkipLauncher TVE3/ComSkipLauncher.cs
trunk/plugins/ComSkipLauncher TVE3/PluginSetup.Designer.cs
trunk/plugins/ComSkipLauncher TVE3/PluginSetup.cs
Modified: trunk/plugins/ComSkipLauncher TVE2/ComSkipLauncher.cs
===================================================================
--- trunk/plugins/ComSkipLauncher TVE2/ComSkipLauncher.cs 2007-03-17 06:59:36 UTC (rev 193)
+++ trunk/plugins/ComSkipLauncher TVE2/ComSkipLauncher.cs 2007-03-17 12:10:29 UTC (rev 194)
@@ -126,34 +126,16 @@
try
{
- string fileName = String.Empty;
- List<TVRecorded> recorded = new List<TVRecorded>();
- TVDatabase.GetRecordedTV(ref recorded);
- foreach (TVRecorded rec in recorded)
- {
- if (rec.Title == recording.Title && rec.StartTime == recording.StartTime)
- {
- fileName = rec.FileName;
- break;
- }
- }
+ string parameters = ProcessParameters(_parameters, recordingFilename);
- if (String.IsNullOrEmpty(fileName))
- {
- Log.Warn("ComSkipLauncher: Couldn't process recording titled {0}, no filename found.", recording.Title);
- return;
- }
-
- string parameters = ProcessParameters(_parameters, fileName);
-
Log.Info(
"ComSkipLauncher: Recording ended ({0}), launching program ({1} {2}) ...",
- fileName,
+ recordingFilename,
_program,
parameters
);
- LaunchProcess(_program, parameters, Path.GetDirectoryName(fileName), ProcessWindowStyle.Hidden);
+ LaunchProcess(_program, parameters, Path.GetDirectoryName(recordingFilename), ProcessWindowStyle.Hidden);
}
catch (Exception ex)
{
@@ -194,18 +176,6 @@
}
}
- void LaunchProcess(string program, string parameters, string workingFolder, ProcessWindowStyle windowStyle)
- {
- Process process = new Process();
- process.StartInfo = new ProcessStartInfo();
- process.StartInfo.Arguments = parameters;
- process.StartInfo.FileName = program;
- process.StartInfo.WindowStyle = windowStyle;
- process.StartInfo.WorkingDirectory = workingFolder;
-
- process.Start();
- }
-
internal static string ProcessParameters(string input, string fileName)
{
string output = String.Empty;
@@ -229,7 +199,18 @@
return output;
}
+ internal static void LaunchProcess(string program, string parameters, string workingFolder, ProcessWindowStyle windowStyle)
+ {
+ Process process = new Process();
+ process.StartInfo = new ProcessStartInfo();
+ process.StartInfo.Arguments = parameters;
+ process.StartInfo.FileName = program;
+ process.StartInfo.WindowStyle = windowStyle;
+ process.StartInfo.WorkingDirectory = workingFolder;
+ process.Start();
+ }
+
#endregion Implementation
}
Modified: trunk/plugins/ComSkipLauncher TVE2/Configuration.cs
===================================================================
--- trunk/plugins/ComSkipLauncher TVE2/Configuration.cs 2007-03-17 06:59:36 UTC (rev 193)
+++ trunk/plugins/ComSkipLauncher TVE2/Configuration.cs 2007-03-17 12:10:29 UTC (rev 194)
@@ -1,5 +1,4 @@
using System;
-using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
@@ -79,7 +78,6 @@
{
MessageBox.Show(this, ParametersMessage, "Parameters", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
-
private void buttonTest_Click(object sender, EventArgs e)
{
string program = textBoxProgram.Text.Trim();
@@ -95,12 +93,7 @@
{
string parameters = ComSkipLauncher.ProcessParameters(param, textBoxTest.Text);
- Process process = new Process();
- process.StartInfo.Arguments = parameters;
- process.StartInfo.FileName = program;
- process.StartInfo.WorkingDirectory = Path.GetDirectoryName(program);
-
- process.Start();
+ ComSkipLauncher.LaunchProcess(program, parameters, Path.GetDirectoryName(program), ProcessWindowStyle.Normal);
}
catch (Exception ex)
{
@@ -113,7 +106,6 @@
if (openFileDialog.ShowDialog(this) == DialogResult.OK)
textBoxTest.Text = openFileDialog.FileName;
}
-
private void buttonProgram_Click(object sender, EventArgs e)
{
openFileDialog.Title = "Select Program To Execute";
Modified: trunk/plugins/ComSkipLauncher TVE3/ComSkipLauncher.cs
===================================================================
--- trunk/plugins/ComSkipLauncher TVE3/ComSkipLauncher.cs 2007-03-17 06:59:36 UTC (rev 193)
+++ trunk/plugins/ComSkipLauncher TVE3/ComSkipLauncher.cs 2007-03-17 12:10:29 UTC (rev 194)
@@ -145,25 +145,6 @@
}
}
- void LaunchProcess(string program, string parameters, string workingFolder, ProcessWindowStyle windowStyle)
- {
- try
- {
- Process process = new Process();
- process.StartInfo = new ProcessStartInfo();
- process.StartInfo.Arguments = parameters;
- process.StartInfo.FileName = program;
- process.StartInfo.WindowStyle = windowStyle;
- process.StartInfo.WorkingDirectory = workingFolder;
-
- process.Start();
- }
- catch (Exception ex)
- {
- Log.Error("ComSkipLauncher - LaunchProcess(): {0}", ex.Message);
- }
- }
-
internal static string ProcessParameters(string input, string fileName)
{
string output = String.Empty;
@@ -188,6 +169,25 @@
return output;
}
+ internal static void LaunchProcess(string program, string parameters, string workingFolder, ProcessWindowStyle windowStyle)
+ {
+ try
+ {
+ Process process = new Process();
+ process.StartInfo = new ProcessStartInfo();
+ process.StartInfo.Arguments = parameters;
+ process.StartInfo.FileName = program;
+ process.StartInfo.WindowStyle = windowStyle;
+ process.StartInfo.WorkingDirectory = workingFolder;
+
+ process.Start();
+ }
+ catch (Exception ex)
+ {
+ Log.Error("ComSkipLauncher - LaunchProcess(): {0}", ex.Message);
+ }
+ }
+
#endregion Implementation
}
Modified: trunk/plugins/ComSkipLauncher TVE3/PluginSetup.Designer.cs
===================================================================
--- trunk/plugins/ComSkipLauncher TVE3/PluginSetup.Designer.cs 2007-03-17 06:59:36 UTC (rev 193)
+++ trunk/plugins/ComSkipLauncher TVE3/PluginSetup.Designer.cs 2007-03-17 12:10:29 UTC (rev 194)
@@ -111,21 +111,21 @@
//
// radioButtonStart
//
+ this.radioButtonStart.Checked = true;
this.radioButtonStart.Location = new System.Drawing.Point(8, 16);
this.radioButtonStart.Name = "radioButtonStart";
this.radioButtonStart.Size = new System.Drawing.Size(120, 24);
this.radioButtonStart.TabIndex = 0;
+ this.radioButtonStart.TabStop = true;
this.radioButtonStart.Text = "Recording Start";
this.radioButtonStart.UseVisualStyleBackColor = true;
//
// radioButtonEnd
//
- this.radioButtonEnd.Checked = true;
this.radioButtonEnd.Location = new System.Drawing.Point(144, 16);
this.radioButtonEnd.Name = "radioButtonEnd";
this.radioButtonEnd.Size = new System.Drawing.Size(120, 24);
this.radioButtonEnd.TabIndex = 1;
- this.radioButtonEnd.TabStop = true;
this.radioButtonEnd.Text = "Recording End";
this.radioButtonEnd.UseVisualStyleBackColor = true;
//
Modified: trunk/plugins/ComSkipLauncher TVE3/PluginSetup.cs
===================================================================
--- trunk/plugins/ComSkipLauncher TVE3/PluginSetup.cs 2007-03-17 06:59:36 UTC (rev 193)
+++ trunk/plugins/ComSkipLauncher TVE3/PluginSetup.cs 2007-03-17 12:10:29 UTC (rev 194)
@@ -1,14 +1,11 @@
using System;
-using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Text;
-using System.Threading;
using System.Windows.Forms;
-using System.Xml;
using TvLibrary.Log;
using TvEngine;
@@ -112,15 +109,11 @@
{
MessageBox.Show(this, ParametersMessage, "Parameters", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
-
private void buttonTest_Click(object sender, EventArgs e)
{
- string program;
- string param;
+ string program = textBoxProgram.Text.Trim();
+ string param = textBoxParameters.Text;
- program = textBoxProgram.Text.Trim();
- param = textBoxParameters.Text;
-
if (program.Length == 0)
{
MessageBox.Show(this, "You must specify a program to run", "Missing program name", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
@@ -131,12 +124,7 @@
{
string parameters = ComSkipLauncher.ProcessParameters(param, textBoxTest.Text);
- Process process = new Process();
- process.StartInfo.Arguments = parameters;
- process.StartInfo.FileName = program;
- process.StartInfo.WorkingDirectory = Path.GetDirectoryName(program);
-
- process.Start();
+ ComSkipLauncher.LaunchProcess(program, parameters, Path.GetDirectoryName(program), ProcessWindowStyle.Normal);
}
catch (Exception ex)
{
@@ -149,7 +137,6 @@
if (openFileDialog.ShowDialog(this) == DialogResult.OK)
textBoxTest.Text = openFileDialog.FileName;
}
-
private void buttonProgram_Click(object sender, EventArgs e)
{
openFileDialog.Title = "Select Program To Execute";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <du...@us...> - 2007-03-18 12:06:38
|
Revision: 193
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=193&view=rev
Author: dukus
Date: 2007-03-16 23:59:36 -0700 (Fri, 16 Mar 2007)
Log Message:
-----------
Advanced language editor
Modified Paths:
--------------
trunk/plugins/mpinstaler/MPInstaler/Language dialog.Designer.cs
trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs
trunk/plugins/mpinstaler/MPInstaler.suo
Modified: trunk/plugins/mpinstaler/MPInstaler/Language dialog.Designer.cs
===================================================================
--- trunk/plugins/mpinstaler/MPInstaler/Language dialog.Designer.cs 2007-03-16 20:30:59 UTC (rev 192)
+++ trunk/plugins/mpinstaler/MPInstaler/Language dialog.Designer.cs 2007-03-17 06:59:36 UTC (rev 193)
@@ -41,9 +41,9 @@
this.button4 = new System.Windows.Forms.Button();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.listView2 = new System.Windows.Forms.ListView();
- this.button5 = new System.Windows.Forms.Button();
this.columnHeader4 = new System.Windows.Forms.ColumnHeader();
this.columnHeader5 = new System.Windows.Forms.ColumnHeader();
+ this.button5 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// button1
@@ -77,6 +77,9 @@
//
// listView1
//
+ this.listView1.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.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.columnHeader1,
this.columnHeader2,
@@ -154,6 +157,7 @@
this.listView2.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.columnHeader4,
this.columnHeader5});
+ this.listView2.FullRowSelect = true;
this.listView2.Location = new System.Drawing.Point(434, 12);
this.listView2.Name = "listView2";
this.listView2.Size = new System.Drawing.Size(227, 311);
@@ -161,6 +165,15 @@
this.listView2.UseCompatibleStateImageBehavior = false;
this.listView2.View = System.Windows.Forms.View.Details;
//
+ // columnHeader4
+ //
+ this.columnHeader4.Text = "Id";
+ //
+ // columnHeader5
+ //
+ this.columnHeader5.Text = "Value";
+ this.columnHeader5.Width = 134;
+ //
// button5
//
this.button5.Location = new System.Drawing.Point(390, 156);
@@ -169,16 +182,8 @@
this.button5.TabIndex = 10;
this.button5.Text = "<-";
this.button5.UseVisualStyleBackColor = true;
+ this.button5.Click += new System.EventHandler(this.button5_Click);
//
- // columnHeader4
- //
- this.columnHeader4.Text = "Id";
- //
- // columnHeader5
- //
- this.columnHeader5.Text = "Value";
- this.columnHeader5.Width = 134;
- //
// Form2
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
Modified: trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs
===================================================================
--- trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs 2007-03-16 20:30:59 UTC (rev 192)
+++ trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs 2007-03-17 06:59:36 UTC (rev 193)
@@ -141,5 +141,16 @@
lang.Load(languageComboBox.Text);
load_lang();
}
+
+ private void button5_Click(object sender, EventArgs e)
+ {
+ foreach (ListViewItem it in listView2.SelectedItems)
+ {
+ ListViewItem item1 = new ListViewItem(it.SubItems[0].Text, 0);
+ item1.SubItems.Add(it.SubItems[1].Text);
+ item1.SubItems.Add(languageComboBox.Text);
+ listView1.Items.AddRange(new ListViewItem[] { item1 });
+ }
+ }
}
}
\ No newline at end of file
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: <du...@us...> - 2007-03-18 11:14:46
|
Revision: 196
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=196&view=rev
Author: dukus
Date: 2007-03-18 03:30:53 -0700 (Sun, 18 Mar 2007)
Log Message:
-----------
SVN Conflict resolved
Modified Paths:
--------------
trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs
trunk/plugins/mpinstaler/MPInstaler.suo
Modified: trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs
===================================================================
--- trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs 2007-03-17 13:53:17 UTC (rev 195)
+++ trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs 2007-03-18 10:30:53 UTC (rev 196)
@@ -98,7 +98,6 @@
if (Path.GetFileName(ze.Name) == Path.GetFileName(fl.FileName)
&& ze.Name.Contains(@"\"+fl.SubType+@"\"))
{
-// MessageBox.Show(ze.Name);
return true;
}
else return false;
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: <sa...@us...> - 2007-03-18 11:13:41
|
Revision: 195
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=195&view=rev
Author: saamand
Date: 2007-03-17 06:53:17 -0700 (Sat, 17 Mar 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/MyLyrics/LyricsEngine/LyricDiagnostics.cs
trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj
trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs
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_LyricsLibrary.cs
trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs
trunk/plugins/MyLyrics/MyLyric Windows Application/MyLyric Windows Application/Properties/AssemblyInfo.cs
Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricDiagnostics.cs
===================================================================
--- trunk/plugins/MyLyrics/LyricsEngine/LyricDiagnostics.cs 2007-03-17 12:10:29 UTC (rev 194)
+++ trunk/plugins/MyLyrics/LyricsEngine/LyricDiagnostics.cs 2007-03-17 13:53:17 UTC (rev 195)
@@ -10,15 +10,14 @@
{
private static TraceSource ts;
private static Stopwatch stopWatch;
- private static string logName = "MyLyrics.log";
private static string logFileName = "";
private static FileStream objStream;
private static TextWriterTraceListener objTraceListener;
- public static void OpenLog(string logDir)
+ public static void OpenLog(string url)
{
- logFileName = logDir + "\\" + logName;
+ logFileName = url;
if (ts == null)
{
Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj
===================================================================
--- trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj 2007-03-17 12:10:29 UTC (rev 194)
+++ trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj 2007-03-17 13:53:17 UTC (rev 195)
@@ -125,7 +125,7 @@
</Target>
-->
<PropertyGroup>
- <PostBuildEvent>::copy $(TargetFileName) "C:\Program Files\Team MediaPortal\MediaPortal"</PostBuildEvent>
+ <PostBuildEvent>copy $(TargetFileName) "C:\Program Files\Team MediaPortal\MediaPortal"</PostBuildEvent>
<PreBuildEvent>
</PreBuildEvent>
</PropertyGroup>
Modified: trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs 2007-03-17 12:10:29 UTC (rev 194)
+++ trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs 2007-03-17 13:53:17 UTC (rev 195)
@@ -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.16")]
+[assembly: AssemblyVersion("0.17")]
//
// In order to sign your assembly you must specify a key to use. Refer to the
Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs
===================================================================
--- trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2007-03-17 12:10:29 UTC (rev 194)
+++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2007-03-17 13:53:17 UTC (rev 195)
@@ -83,11 +83,12 @@
String[] m_sitesToSearch;
- // Database settings
+ // Database and log settings
internal static LyricsDatabase LyricsDB = null;
internal static LyricsDatabase LyricsMarkedDB = null;
internal const string LyricsDBName = "LyricsDatabaseV2.db";
internal const string LyricsMarkedDBName = "LyricsMarkedDatabaseV2.db";
+ internal string logName = "MyLyrics.log";
#endregion
@@ -192,8 +193,8 @@
startingScrollSpeedVertical = GUIGraphicsContext.ScrollSpeedVertical;
GUIGraphicsContext.ScrollSpeedVertical = 1;
- LyricDiagnostics.OpenLog(MediaPortal.Configuration.Config.GetFolder(MediaPortal.Configuration.Config.Dir.Log));
- //LyricDiagnostics.OpenLog(MediaPortal.Util.Config.GetFolder(MediaPortal.Util.Config.Dir.Log));
+ LyricDiagnostics.OpenLog(MediaPortal.Util.Config.GetFile(MediaPortal.Util.Config.Dir.Log, logName));
+ //LyricDiagnostics.OpenLog(MediaPortal.Util.Config.GetFile(MediaPortal.Util.Config.Dir.Log, logName));
LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Start, 0, LyricDiagnostics.elapsedTimeString() + "MyLyrics opens");
return true;
}
@@ -301,13 +302,13 @@
m_sitesToSearch = (string[])sitesToSearch.ToArray(typeof(string));
// Deserialize lyrics and marked database, and save references in LyricsDB
- string path = MediaPortal.Configuration.Config.GetFile(MediaPortal.Configuration.Config.Dir.Database, LyricsDBName);
+ string path = MediaPortal.Util.Config.GetFile(MediaPortal.Util.Config.Dir.Database, LyricsDBName);
FileStream fs = new FileStream(path, FileMode.Open);
BinaryFormatter bf = new BinaryFormatter();
LyricsDB = (LyricsDatabase)bf.Deserialize(fs);
fs.Close();
- path = MediaPortal.Configuration.Config.GetFile(MediaPortal.Configuration.Config.Dir.Database, LyricsMarkedDBName);
+ path = MediaPortal.Util.Config.GetFile(MediaPortal.Util.Config.Dir.Database, LyricsMarkedDBName);
fs = new FileStream(path, FileMode.Open);
LyricsMarkedDB = (LyricsDatabase)bf.Deserialize(fs);
fs.Close();
@@ -518,7 +519,7 @@
{
LyricsDB.Add(MyLyricsUtil.CorrectKeyFormat(capArtist, capTitle), new LyricsItem(capArtist, capTitle, m_LyricText, site));
- string path = MediaPortal.Configuration.Config.GetFile(MediaPortal.Configuration.Config.Dir.Database, LyricsDBName);
+ string path = MediaPortal.Util.Config.GetFile(MediaPortal.Util.Config.Dir.Database, LyricsDBName);
using (FileStream fs = new FileStream(path, FileMode.Open))
{
BinaryFormatter bf = new BinaryFormatter();
@@ -532,7 +533,7 @@
{
LyricsMarkedDB.Remove(MyLyricsUtil.CorrectKeyFormat(capArtist, capTitle));
- string path = MediaPortal.Configuration.Config.GetFile(MediaPortal.Configuration.Config.Dir.Database, LyricsMarkedDBName);
+ string path = MediaPortal.Util.Config.GetFile(MediaPortal.Util.Config.Dir.Database, LyricsMarkedDBName);
using (FileStream fs = new FileStream(path, FileMode.Open))
{
BinaryFormatter bf = new BinaryFormatter();
@@ -659,7 +660,11 @@
/// </summary>
public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage)
{
- strButtonText = "My Lyrics";//GUILocalizeStrings.Get(9); // My News
+ using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml"))
+ {
+ strButtonText = ((string)xmlreader.GetValueAsString("myLyrics", "pluginsName", "My Lyrics")).ToString();
+ }
+ //strButtonText = "Myrics";//GUILocalizeStrings.Get(9); // My News
strButtonImage = String.Empty;
strButtonImageFocus = String.Empty;
strPictureImage = "hover_my lyrics.png";
Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.Designer.cs
===================================================================
--- trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.Designer.cs 2007-03-17 12:10:29 UTC (rev 194)
+++ trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.Designer.cs 2007-03-17 13:53:17 UTC (rev 195)
@@ -31,6 +31,9 @@
this.tabControl = new MediaPortal.UserInterface.Controls.MPTabControl();
this.tabPageLyricsDatabase = new MediaPortal.UserInterface.Controls.MPTabPage();
this.tabPageSetup = new MediaPortal.UserInterface.Controls.MPTabPage();
+ this.mpGroupBox2 = new MediaPortal.UserInterface.Controls.MPGroupBox();
+ this.tbPluginName = new MediaPortal.UserInterface.Controls.MPTextBox();
+ this.lbPluginName = new MediaPortal.UserInterface.Controls.MPLabel();
this.tbNote = new MediaPortal.UserInterface.Controls.MPLabel();
this.gbLyricSites = new MediaPortal.UserInterface.Controls.MPGroupBox();
this.cbHotLyrics = new MediaPortal.UserInterface.Controls.MPCheckBox();
@@ -52,7 +55,7 @@
this.cbMarkSongsWithNoLyrics = new MediaPortal.UserInterface.Controls.MPCheckBox();
this.cbDisconsiderTitlesWithLyrics = new MediaPortal.UserInterface.Controls.MPCheckBox();
this.lbSongsLimitNote = new MediaPortal.UserInterface.Controls.MPLabel();
- this.lbLimit = new MediaPortal.UserInterface.Controls.MPTextBox();
+ this.tbLimit = new MediaPortal.UserInterface.Controls.MPTextBox();
this.lbSongsLimit = new MediaPortal.UserInterface.Controls.MPLabel();
this.gbMessages = new MediaPortal.UserInterface.Controls.MPGroupBox();
this.lbMessage = new MediaPortal.UserInterface.Controls.MPLabel();
@@ -86,6 +89,7 @@
this.bgWorkerSearch = new System.ComponentModel.BackgroundWorker();
this.tabControl.SuspendLayout();
this.tabPageSetup.SuspendLayout();
+ this.mpGroupBox2.SuspendLayout();
this.gbLyricSites.SuspendLayout();
this.tabPageDatabase.SuspendLayout();
this.mpGroupBox1.SuspendLayout();
@@ -119,7 +123,7 @@
//
// tabPageSetup
//
- this.tabPageSetup.Controls.Add(this.tbNote);
+ this.tabPageSetup.Controls.Add(this.mpGroupBox2);
this.tabPageSetup.Controls.Add(this.gbLyricSites);
this.tabPageSetup.Location = new System.Drawing.Point(4, 22);
this.tabPageSetup.Name = "tabPageSetup";
@@ -129,10 +133,42 @@
this.tabPageSetup.Text = "General setup";
this.tabPageSetup.UseVisualStyleBackColor = true;
//
+ // mpGroupBox2
+ //
+ this.mpGroupBox2.AutoSize = true;
+ this.mpGroupBox2.Controls.Add(this.tbPluginName);
+ this.mpGroupBox2.Controls.Add(this.lbPluginName);
+ this.mpGroupBox2.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+ this.mpGroupBox2.Location = new System.Drawing.Point(4, 6);
+ this.mpGroupBox2.Name = "mpGroupBox2";
+ this.mpGroupBox2.Size = new System.Drawing.Size(510, 63);
+ this.mpGroupBox2.TabIndex = 29;
+ this.mpGroupBox2.TabStop = false;
+ this.mpGroupBox2.Text = "Lyric sites to search";
+ //
+ // tbPluginName
+ //
+ this.tbPluginName.BorderColor = System.Drawing.Color.Empty;
+ this.tbPluginName.Location = new System.Drawing.Point(87, 24);
+ this.tbPluginName.MaxLength = 30;
+ this.tbPluginName.Name = "tbPluginName";
+ this.tbPluginName.Size = new System.Drawing.Size(154, 20);
+ this.tbPluginName.TabIndex = 13;
+ this.tbPluginName.Text = "My Lyrics";
+ //
+ // lbPluginName
+ //
+ this.lbPluginName.AutoSize = true;
+ this.lbPluginName.Location = new System.Drawing.Point(13, 27);
+ this.lbPluginName.Name = "lbPluginName";
+ this.lbPluginName.Size = new System.Drawing.Size(68, 13);
+ this.lbPluginName.TabIndex = 14;
+ this.lbPluginName.Text = "Plugin name:";
+ //
// tbNote
//
this.tbNote.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.tbNote.Location = new System.Drawing.Point(17, 111);
+ this.tbNote.Location = new System.Drawing.Point(13, 91);
this.tbNote.Name = "tbNote";
this.tbNote.Size = new System.Drawing.Size(377, 18);
this.tbNote.TabIndex = 19;
@@ -142,15 +178,16 @@
//
this.gbLyricSites.AutoSize = true;
this.gbLyricSites.Controls.Add(this.cbHotLyrics);
+ this.gbLyricSites.Controls.Add(this.tbNote);
this.gbLyricSites.Controls.Add(this.cbSeekLyrics);
this.gbLyricSites.Controls.Add(this.cbLyricsOnDemand);
this.gbLyricSites.Controls.Add(this.cbLyrics007);
this.gbLyricSites.Controls.Add(this.cbEvilLabs);
this.gbLyricSites.Controls.Add(this.cbLyricWiki);
this.gbLyricSites.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
- this.gbLyricSites.Location = new System.Drawing.Point(4, 6);
+ this.gbLyricSites.Location = new System.Drawing.Point(4, 75);
this.gbLyricSites.Name = "gbLyricSites";
- this.gbLyricSites.Size = new System.Drawing.Size(510, 102);
+ this.gbLyricSites.Size = new System.Drawing.Size(510, 125);
this.gbLyricSites.TabIndex = 28;
this.gbLyricSites.TabStop = false;
this.gbLyricSites.Text = "Lyric sites to search";
@@ -301,7 +338,7 @@
this.gbGenerel.Controls.Add(this.cbMarkSongsWithNoLyrics);
this.gbGenerel.Controls.Add(this.cbDisconsiderTitlesWithLyrics);
this.gbGenerel.Controls.Add(this.lbSongsLimitNote);
- this.gbGenerel.Controls.Add(this.lbLimit);
+ this.gbGenerel.Controls.Add(this.tbLimit);
this.gbGenerel.Controls.Add(this.lbSongsLimit);
this.gbGenerel.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.gbGenerel.Location = new System.Drawing.Point(3, 6);
@@ -397,16 +434,16 @@
this.lbSongsLimitNote.TabIndex = 13;
this.lbSongsLimitNote.Text = "(1000 is default)";
//
- // lbLimit
+ // tbLimit
//
- this.lbLimit.BorderColor = System.Drawing.Color.Empty;
- this.lbLimit.Location = new System.Drawing.Point(158, 19);
- this.lbLimit.MaxLength = 6;
- this.lbLimit.Name = "lbLimit";
- this.lbLimit.Size = new System.Drawing.Size(44, 20);
- this.lbLimit.TabIndex = 1;
- this.lbLimit.Text = "1000";
- this.lbLimit.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
+ this.tbLimit.BorderColor = System.Drawing.Color.Empty;
+ this.tbLimit.Location = new System.Drawing.Point(158, 19);
+ this.tbLimit.MaxLength = 6;
+ this.tbLimit.Name = "tbLimit";
+ this.tbLimit.Size = new System.Drawing.Size(44, 20);
+ this.tbLimit.TabIndex = 1;
+ this.tbLimit.Text = "1000";
+ this.tbLimit.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
//
// lbSongsLimit
//
@@ -695,7 +732,7 @@
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(540, 539);
+ this.ClientSize = new System.Drawing.Size(537, 537);
this.ControlBox = false;
this.Controls.Add(this.btClose);
this.Controls.Add(this.tabControl);
@@ -710,6 +747,8 @@
this.tabControl.ResumeLayout(false);
this.tabPageSetup.ResumeLayout(false);
this.tabPageSetup.PerformLayout();
+ this.mpGroupBox2.ResumeLayout(false);
+ this.mpGroupBox2.PerformLayout();
this.gbLyricSites.ResumeLayout(false);
this.gbLyricSites.PerformLayout();
this.tabPageDatabase.ResumeLayout(false);
@@ -765,7 +804,7 @@
internal MediaPortal.UserInterface.Controls.MPCheckBox cbLyricsOnDemand;
internal MediaPortal.UserInterface.Controls.MPCheckBox cbSeekLyrics;
private MediaPortal.UserInterface.Controls.MPLabel lbSongsLimitNote;
- private MediaPortal.UserInterface.Controls.MPTextBox lbLimit;
+ private MediaPortal.UserInterface.Controls.MPTextBox tbLimit;
private MediaPortal.UserInterface.Controls.MPLabel lbSongsLimit;
private MediaPortal.UserInterface.Controls.MPGroupBox mpGroupBox1;
private MediaPortal.UserInterface.Controls.MPButton btImportAll;
@@ -782,5 +821,8 @@
internal MediaPortal.UserInterface.Controls.MPCheckBox cbHotLyrics;
private MediaPortal.UserInterface.Controls.MPLabel tbNote;
private MediaPortal.UserInterface.Controls.MPCheckBox cbSearchOnlyForMarkedSongs;
+ private MediaPortal.UserInterface.Controls.MPGroupBox mpGroupBox2;
+ private MediaPortal.UserInterface.Controls.MPTextBox tbPluginName;
+ private MediaPortal.UserInterface.Controls.MPLabel lbPluginName;
}
}
\ No newline at end of file
Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.cs
===================================================================
--- trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.cs 2007-03-17 12:10:29 UTC (rev 194)
+++ trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.cs 2007-03-17 13:53:17 UTC (rev 195)
@@ -93,6 +93,7 @@
internal static LyricsDatabase LyricsMarkedDB = null;
internal const string LyricsDBName = "LyricsDatabaseV2.db";
internal const string LyricsMarkedDBName = "LyricsMarkedDatabaseV2.db";
+ internal const string LyricsXMLName = "Lyrics.xml";
// Timer variables
int hour = 0;
@@ -101,17 +102,24 @@
System.Windows.Forms.Timer timer;
StopWatch stopwatch = new StopWatch();
- // Batch log information
+ // log information
private string log;
- private string logFileName = "MyLyricsBatch.log";
+ private string logName = "MyLyrics.log";
+ private string logBatchFileName = "MyLyricsBatch.log";
private string logFullFileName = "";
+ private int lastShownLyricsTitles = 0;
+ private int lastShownMarkedLyricsTitles = 0;
+
bool stopCollectingOfTitles = false;
public MyLyricsSetup()
{
- // Initialize GUI
+ LyricDiagnostics.OpenLog(MediaPortal.Util.Config.GetFile(MediaPortal.Util.Config.Dir.Log, logName));
+ //LyricDiagnostics.OpenLog(MediaPortal.Util.Config.GetFile(MediaPortal.Util.Config.Dir.Log));
+
+ #region Initialize GUI and class
InitializeComponent();
lyricsLibraryUC = new MyLyricsSetup_LyricsLibrary(this);
this.tabPageLyricsDatabase.Controls.Add(lyricsLibraryUC);
@@ -122,19 +130,19 @@
m_DelegateThreadFinished = new DelegateThreadFinished(this.ThreadFinishedMethod);
m_DelegateThreadException = new DelegateThreadException(this.ThreadExceptionMethod);
- LyricDiagnostics.OpenLog(MediaPortal.Configuration.Config.GetFolder(MediaPortal.Configuration.Config.Dir.Log));
- //LyricDiagnostics.OpenLog(MediaPortal.Util.Config.GetFolder(MediaPortal.Util.Config.Dir.Log));
// Grab music database
MusicDatabase dbs = new MusicDatabase();
m_TotalTitles = dbs.GetNumOfSongs();
+ #endregion
- // Get settings saved in MediaPortal.xml
+ #region Get settings from in MediaPortal.xml
using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml"))
{
try
{
- lbLimit.Text = xmlreader.GetValueAsString("myLyrics", "limit", m_TotalTitles.ToString());
+ tbLimit.Text = xmlreader.GetValueAsString("myLyrics", "limit", m_TotalTitles.ToString());
+ tbPluginName.Text = xmlreader.GetValueAsString("myLyrics", "pluginsName", "My Lyrics");
lbSongsLimitNote.Text = ("(You have currently " + m_TotalTitles.ToString() + " titles in your music database)");
cbLyricWiki.Checked = ((string)xmlreader.GetValueAsString("myLyrics", "useLyricWiki", "True")).ToString().Equals("True") ? true : false;
@@ -173,60 +181,90 @@
MessageBox.Show("Something has gone wrong when reading Mediaportal.xml");
}
}
+#endregion
- // Update database and serialize if needed...
- string path = MediaPortal.Configuration.Config.GetFile(MediaPortal.Configuration.Config.Dir.Database, LyricsDBName);
- FileInfo fileInfo = new FileInfo(path);
+ #region Serialzie/deserialize lyricsdatabases
+ string lyricsXMLpath = MediaPortal.Util.Config.GetFile(MediaPortal.Util.Config.Dir.Base, LyricsXMLName);
+ FileInfo lyricsXMLfileInfo = new FileInfo(lyricsXMLpath);
- if (fileInfo.Exists == false)
+
+ // If lyrics.xml present, then convert database to new format...
+ if (lyricsXMLfileInfo.Exists)
{
- if (MessageBox.Show(this, "Your database will have to be upgraded to work with this version\r\nUpgrade now?", "Upgrade lyricsdatabase", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes)
+
+ string path = MediaPortal.Util.Config.GetFile(MediaPortal.Util.Config.Dir.Database, LyricsDBName);
+ FileInfo fileInfo = new FileInfo(path);
+
+ // .. but only if it hasn't already been converted
+ if (fileInfo.Exists == false)
{
- ConvertFromXMLtoLyricsDatabase convertFromXMLtoLyricsDatabase = new ConvertFromXMLtoLyricsDatabase();
- LyricsDB = convertFromXMLtoLyricsDatabase.Convert();
+ if (MessageBox.Show(this, "Your database will have to be upgraded to work with this version\r\nUpgrade now?", "Upgrade lyricsdatabase", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes)
+ {
+ ConvertFromXMLtoLyricsDatabase convertFromXMLtoLyricsDatabase = new ConvertFromXMLtoLyricsDatabase();
+ LyricsDB = convertFromXMLtoLyricsDatabase.Convert(lyricsXMLpath);
- // Create file to save the database to
- FileStream fs = new FileStream(path, FileMode.Create);
+ // Create file to save the database to
+ FileStream fs = new FileStream(path, FileMode.Create);
- // Create a BinaryFormatter object to perform the serialization
- BinaryFormatter bf = new BinaryFormatter();
+ // Create a BinaryFormatter object to perform the serialization
+ BinaryFormatter bf = new BinaryFormatter();
- // Use the BinaryFormatter object to serialize the database to the file
- bf.Serialize(fs, LyricsDB);
+ // Use the BinaryFormatter object to serialize the database to the file
+ bf.Serialize(fs, LyricsDB);
+ fs.Close();
- // Create likewise a database for the remainingLyrics
- path = MediaPortal.Configuration.Config.GetFolder(MediaPortal.Configuration.Config.Dir.Database) + "\\" + LyricsMarkedDBName;
- fs = new FileStream(path, FileMode.Create);
- LyricsMarkedDB = new LyricsDatabase();
- bf.Serialize(fs, LyricsMarkedDB);
+ // Create likewise a database for the remainingLyrics
+ path = MediaPortal.Util.Config.GetFile(MediaPortal.Util.Config.Dir.Database, LyricsMarkedDBName);
+ fs = new FileStream(path, FileMode.Create);
+ LyricsMarkedDB = new LyricsDatabase();
+ bf.Serialize(fs, LyricsMarkedDB);
- // Close the file
- fs.Close();
+ // Close the file
+ fs.Close();
+ }
}
+
+ // ... else deserialize the databases and save reference in LyricsDB and LyricsMarkedDB
+ else
+ {
+ DeserializeBothDB();
+ }
}
- // ... else deserialize the databases and save reference in LyricsDB and LyricsMarkedDB
+ // If no Lyrics.xml present in base, then create new serialized databases
else
{
- // Open database to read data from
- FileStream fs = new FileStream(path, FileMode.Open);
+ string path = MediaPortal.Util.Config.GetFile(MediaPortal.Util.Config.Dir.Database, LyricsDBName);
+ FileInfo fileInfo = new FileInfo(path);
- // Create a BinaryFormatter object to perform the deserialization
- BinaryFormatter bf = new BinaryFormatter();
+ // .. but only if the databases hasn't been created
+ if (fileInfo.Exists == false)
+ {
+ path = MediaPortal.Util.Config.GetFile(MediaPortal.Util.Config.Dir.Database, LyricsDBName);
- // Use the BinaryFormatter object to deserialize the database
- LyricsDB = (LyricsDatabase)bf.Deserialize(fs);
- fs.Close();
+ // Serialize empty LyricsDatabase if no lyrics.xml present
+ FileStream fs = new FileStream(path, FileMode.Create);
+ BinaryFormatter bf = new BinaryFormatter();
+ LyricsDB = new LyricsDatabase();
+ bf.Serialize(fs, LyricsDB);
+ fs.Close();
- // Deserialize LyricsRemainingDatabase
- path = MediaPortal.Configuration.Config.GetFile(MediaPortal.Configuration.Config.Dir.Database, LyricsMarkedDBName);
-
- fs = new FileStream(path, FileMode.Open);
- LyricsMarkedDB = (LyricsDatabase)bf.Deserialize(fs);
- fs.Close();
+ // Serialize empty LyricsMarkedDatabase
+ path = MediaPortal.Util.Config.GetFile(MediaPortal.Util.Config.Dir.Database, LyricsMarkedDBName);
+ fs = new FileStream(path, FileMode.Create);
+ LyricsMarkedDB = new LyricsDatabase();
+ bf.Serialize(fs, LyricsMarkedDB);
+ fs.Close();
+ }
+ else
+ {
+ DeserializeBothDB();
+ }
}
MyLyricsSetup_LyricsLibrary.CurrentDB = LyricsDB;
+ #endregion
+
lyricsLibraryUC.updateLyricsTree();
}
@@ -263,11 +301,13 @@
}
}
}
+
private void btSave_Click(object sender, System.EventArgs e)
{
using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings("MediaPortal.xml"))
{
- xmlwriter.SetValue("myLyrics", "limit", lbLimit.Text);
+ xmlwriter.SetValue("myLyrics", "limit", tbLimit.Text);
+ xmlwriter.SetValue("myLyrics", "pluginsName", tbPluginName.Text);
xmlwriter.SetValue("myLyrics", "useLyricWiki", cbLyricWiki.Checked.ToString());
xmlwriter.SetValue("myLyrics", "useEvilLabs", cbEvilLabs.Checked.ToString());
xmlwriter.SetValue("myLyrics", "useLyrics007", cbLyrics007.Checked.ToString());
@@ -342,7 +382,7 @@
btImportAll.Enabled = false;
- logFullFileName = Config.GetFile(Config.Dir.Log, logFileName);
+ logFullFileName = Config.GetFile(Config.Dir.Log, logBatchFileName);
//if file is not found, create a new xml file
if (!System.IO.File.Exists(logFullFileName))
@@ -358,7 +398,7 @@
writerLog.Close();
}
- m_Limit = int.Parse(lbLimit.Text);
+ m_Limit = int.Parse(tbLimit.Text);
m_DisregardKnownLyric = cbDisconsiderTitlesWithLyrics.Enabled && cbDisconsiderTitlesWithLyrics.Checked;
m_MarkSongsWhenNoLyricFound = cbMarkSongsWithNoLyrics.Enabled && cbMarkSongsWithNoLyrics.Checked;
@@ -804,11 +844,11 @@
string path = "";
if (ldb.Equals(LyricsDB))
{
- path = MediaPortal.Configuration.Config.GetFile(MediaPortal.Configuration.Config.Dir.Database, LyricsDBName);
+ path = MediaPortal.Util.Config.GetFile(MediaPortal.Util.Config.Dir.Database, LyricsDBName);
}
else if (ldb.Equals(LyricsMarkedDB))
{
- path = MediaPortal.Configuration.Config.GetFile(MediaPortal.Configuration.Config.Dir.Database, LyricsMarkedDBName);
+ path = MediaPortal.Util.Config.GetFile(MediaPortal.Util.Config.Dir.Database, LyricsMarkedDBName);
}
// Create file to save the database to
@@ -827,6 +867,28 @@
}
}
+ private void DeserializeBothDB()
+ {
+ string path = MediaPortal.Util.Config.GetFile(MediaPortal.Util.Config.Dir.Database, LyricsDBName);
+
+ // Open database to read data from
+ FileStream fs = new FileStream(path, FileMode.Open);
+
+ // Create a BinaryFormatter object to perform the deserialization
+ BinaryFormatter bf = new BinaryFormatter();
+
+ // Use the BinaryFormatter object to deserialize the database
+ LyricsDB = (LyricsDatabase)bf.Deserialize(fs);
+ fs.Close();
+
+ // Deserialize LyricsRemainingDatabase
+ path = MediaPortal.Util.Config.GetFile(MediaPortal.Util.Config.Dir.Database, LyricsMarkedDBName);
+
+ fs = new FileStream(path, FileMode.Open);
+ LyricsMarkedDB = (LyricsDatabase)bf.Deserialize(fs);
+ fs.Close();
+ }
+
private void MyLyricsSetup_FormClosing(object sender, FormClosingEventArgs e)
{
@@ -875,8 +937,18 @@
{
if (tabControl.SelectedIndex == 0)
{
+ if ((MyLyricsSetup_LyricsLibrary.CurrentDB.Equals(LyricsDB) && LyricsDB.Count != lastShownLyricsTitles)
+ || (MyLyricsSetup_LyricsLibrary.CurrentDB.Equals(LyricsMarkedDB) && LyricsMarkedDB.Count != lastShownMarkedLyricsTitles))
+ {
+ lyricsLibraryUC.updateLyricsTree();
+ }
lyricsLibraryUC.treeView.Select();
}
+ else
+ {
+ lastShownLyricsTitles = LyricsDB.Count;
+ lastShownMarkedLyricsTitles = LyricsMarkedDB.Count;
+ }
}
}
}
\ No newline at end of file
Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.cs
===================================================================
--- trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.cs 2007-03-17 12:10:29 UTC (rev 194)
+++ trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.cs 2007-03-17 13:53:17 UTC (rev 195)
@@ -37,11 +37,6 @@
int m_NoOfTitles;
LRC.SimpleLRC lrc;
- System.Windows.Forms.Timer timer = null;
- Stopwatch stopwatch = null;
- string nextTimeToShow;
- string nextLineToShow;
- int lineCounter;
const int SHIFT_WHEN_HIT = 15;
internal static LyricsDatabase CurrentDB;
private int currentDBIndex = 0;
@@ -611,7 +606,7 @@
{
if (MessageBox.Show(this, "Are you sure the Lyrics database should be deleted?", "Delete Lyrics database", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes)
{
- string path = MediaPortal.Configuration.Config.GetFolder(MediaPortal.Configuration.Config.Dir.Database) + "\\" + MyLyricsSetup.LyricsDBName;
+ string path = MediaPortal.Util.Config.GetFolder(MediaPortal.Util.Config.Dir.Database) + "\\" + MyLyricsSetup.LyricsDBName;
FileStream fs = new FileStream(path, FileMode.Create);
BinaryFormatter bf = new BinaryFormatter();
MyLyricsSetup.LyricsDB = new LyricsDatabase();
@@ -630,7 +625,7 @@
{
if (MessageBox.Show(this, "Are you sure you want to delete the database with marked titles?", "Delete title database", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes)
{
- string path = MediaPortal.Configuration.Config.GetFolder(MediaPortal.Configuration.Config.Dir.Database) + "\\" + MyLyricsSetup.LyricsMarkedDBName;
+ string path = MediaPortal.Util.Config.GetFolder(MediaPortal.Util.Config.Dir.Database) + "\\" + MyLyricsSetup.LyricsMarkedDBName;
FileStream fs = new FileStream(path, FileMode.Create);
BinaryFormatter bf = new BinaryFormatter();
MyLyricsSetup.LyricsMarkedDB = new LyricsDatabase();
Modified: trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs 2007-03-17 12:10:29 UTC (rev 194)
+++ trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs 2007-03-17 13:53:17 UTC (rev 195)
@@ -31,5 +31,5 @@
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
-[assembly: AssemblyVersion("0.16")]
-[assembly: AssemblyFileVersion("0.16")]
+[assembly: AssemblyVersion("0.17")]
+[assembly: AssemblyFileVersion("0.17")]
Modified: trunk/plugins/MyLyrics/MyLyric Windows Application/MyLyric Windows Application/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/MyLyrics/MyLyric Windows Application/MyLyric Windows Application/Properties/AssemblyInfo.cs 2007-03-17 12:10:29 UTC (rev 194)
+++ trunk/plugins/MyLyrics/MyLyric Windows Application/MyLyric Windows Application/Properties/AssemblyInfo.cs 2007-03-17 13:53:17 UTC (rev 195)
@@ -29,5 +29,5 @@
// Build Number
// Revision
//
-[assembly: AssemblyVersion("0.16")]
-[assembly: AssemblyFileVersion("0.16")]
+[assembly: AssemblyVersion("0.17")]
+[assembly: AssemblyFileVersion("0.17")]
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ze...@us...> - 2007-03-16 20:31:06
|
Revision: 192
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=192&view=rev
Author: zebons
Date: 2007-03-16 13:30:59 -0700 (Fri, 16 Mar 2007)
Log Message:
-----------
Avoid an exception if Name is empty in Control Panel : Name mandatory before saving project
Modified Paths:
--------------
trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs
trunk/plugins/mpinstaler/MPInstaler/Form1.cs
trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs
Modified: trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs
===================================================================
--- trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs 2007-03-16 20:07:38 UTC (rev 191)
+++ trunk/plugins/mpinstaler/MPInstaler/Form1.Designer.cs 2007-03-16 20:30:59 UTC (rev 192)
@@ -77,6 +77,8 @@
this.label1 = new System.Windows.Forms.Label();
this.tabPage_Language = new System.Windows.Forms.TabPage();
this.tabPage_Proiect = new System.Windows.Forms.TabPage();
+ this.proiectt_textBox6 = new System.Windows.Forms.TextBox();
+ this.label10 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.proiectt_textBox5 = new System.Windows.Forms.TextBox();
this.proiectt_textBox4 = new System.Windows.Forms.TextBox();
@@ -93,8 +95,6 @@
this.tabPage_Other = new System.Windows.Forms.TabPage();
this.othert_comboBox1 = new System.Windows.Forms.ComboBox();
this.label8 = new System.Windows.Forms.Label();
- this.label10 = new System.Windows.Forms.Label();
- this.proiectt_textBox6 = new System.Windows.Forms.TextBox();
this.menuStrip1.SuspendLayout();
this.contextMenuStrip1.SuspendLayout();
this.tabPage_Skin.SuspendLayout();
@@ -215,7 +215,7 @@
this.tagReadersToolStripMenuItem,
this.externalPlayersToolStripMenuItem});
this.windowPluginToolStripMenuItem.Name = "windowPluginToolStripMenuItem";
- this.windowPluginToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.windowPluginToolStripMenuItem.Size = new System.Drawing.Size(132, 22);
this.windowPluginToolStripMenuItem.Text = "Plugin";
//
// windowToolStripMenuItem
@@ -260,7 +260,7 @@
this.mediaToolStripMenuItem,
this.fullToolStripMenuItem});
this.skinToolStripMenuItem.Name = "skinToolStripMenuItem";
- this.skinToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.skinToolStripMenuItem.Size = new System.Drawing.Size(132, 22);
this.skinToolStripMenuItem.Text = "Skin";
//
// componentToolStripMenuItem
@@ -288,14 +288,14 @@
// languageToolStripMenuItem
//
this.languageToolStripMenuItem.Name = "languageToolStripMenuItem";
- this.languageToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.languageToolStripMenuItem.Size = new System.Drawing.Size(132, 22);
this.languageToolStripMenuItem.Text = "Language";
this.languageToolStripMenuItem.Click += new System.EventHandler(this.languageToolStripMenuItem_Click);
//
// textToolStripMenuItem
//
this.textToolStripMenuItem.Name = "textToolStripMenuItem";
- this.textToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.textToolStripMenuItem.Size = new System.Drawing.Size(132, 22);
this.textToolStripMenuItem.Text = "Text";
this.textToolStripMenuItem.Click += new System.EventHandler(this.textToolStripMenuItem_Click);
//
@@ -303,20 +303,20 @@
//
this.settingsToolStripMenuItem.Enabled = false;
this.settingsToolStripMenuItem.Name = "settingsToolStripMenuItem";
- this.settingsToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.settingsToolStripMenuItem.Size = new System.Drawing.Size(132, 22);
this.settingsToolStripMenuItem.Text = "Settings";
//
// textToolStripMenuItem1
//
this.textToolStripMenuItem1.Name = "textToolStripMenuItem1";
- this.textToolStripMenuItem1.Size = new System.Drawing.Size(152, 22);
+ this.textToolStripMenuItem1.Size = new System.Drawing.Size(132, 22);
this.textToolStripMenuItem1.Text = "Thumbs";
this.textToolStripMenuItem1.Click += new System.EventHandler(this.textToolStripMenuItem1_Click);
//
// otherToolStripMenuItem
//
this.otherToolStripMenuItem.Name = "otherToolStripMenuItem";
- this.otherToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.otherToolStripMenuItem.Size = new System.Drawing.Size(132, 22);
this.otherToolStripMenuItem.Text = "Other";
this.otherToolStripMenuItem.Click += new System.EventHandler(this.otherToolStripMenuItem_Click);
//
@@ -518,6 +518,23 @@
this.tabPage_Proiect.Text = "Proiect Properties";
this.tabPage_Proiect.UseVisualStyleBackColor = true;
//
+ // proiectt_textBox6
+ //
+ this.proiectt_textBox6.Location = new System.Drawing.Point(224, 85);
+ this.proiectt_textBox6.Name = "proiectt_textBox6";
+ this.proiectt_textBox6.Size = new System.Drawing.Size(168, 20);
+ this.proiectt_textBox6.TabIndex = 11;
+ this.proiectt_textBox6.TextChanged += new System.EventHandler(this.proiectt_textBox1_TextChanged);
+ //
+ // label10
+ //
+ this.label10.AutoSize = true;
+ this.label10.Location = new System.Drawing.Point(176, 92);
+ this.label10.Name = "label10";
+ this.label10.Size = new System.Drawing.Size(42, 13);
+ this.label10.TabIndex = 10;
+ this.label10.Text = "Group :";
+ //
// label9
//
this.label9.AutoSize = true;
@@ -677,23 +694,6 @@
this.label8.TabIndex = 0;
this.label8.Text = "Directory (relative) :";
//
- // label10
- //
- this.label10.AutoSize = true;
- this.label10.Location = new System.Drawing.Point(176, 92);
- this.label10.Name = "label10";
- this.label10.Size = new System.Drawing.Size(42, 13);
- this.label10.TabIndex = 10;
- this.label10.Text = "Group :";
- //
- // proiectt_textBox6
- //
- this.proiectt_textBox6.Location = new System.Drawing.Point(224, 85);
- this.proiectt_textBox6.Name = "proiectt_textBox6";
- this.proiectt_textBox6.Size = new System.Drawing.Size(168, 20);
- this.proiectt_textBox6.TabIndex = 11;
- this.proiectt_textBox6.TextChanged += new System.EventHandler(this.proiectt_textBox1_TextChanged);
- //
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
Modified: trunk/plugins/mpinstaler/MPInstaler/Form1.cs
===================================================================
--- trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-03-16 20:07:38 UTC (rev 191)
+++ trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-03-16 20:30:59 UTC (rev 192)
@@ -41,6 +41,12 @@
private void sToolStripMenuItem_Click(object sender, EventArgs e)
{
+ if (proiectt_textBox1.Text.Length == 0)
+ {
+ MessageBox.Show("Name is mandatory !","Stop");
+ proiectt_textBox1.Focus();
+ return;
+ }
saveFileDialog1.Filter = "Proiect files (*.xmp)|*.xmp|All files |*.*";
if (Path.GetFileName(proiect_file_name) == "Untitled")
{
@@ -291,6 +297,12 @@
private void saveProiectAsToolStripMenuItem_Click(object sender, EventArgs e)
{
+ if (proiectt_textBox1.Text.Length == 0)
+ {
+ MessageBox.Show("Name is mandatory !", "Stop");
+ proiectt_textBox1.Focus();
+ return;
+ }
saveFileDialog1.Filter = "Proiect files (*.xmp)|*.xmp|All files |*.*";
if (saveFileDialog1.ShowDialog(this) == DialogResult.OK)
{
@@ -350,7 +362,6 @@
}
}
}
-
}
private void bossview_SelectedIndexChanged(object sender, EventArgs e)
@@ -456,7 +467,5 @@
{
this.Close();
}
-
-
}
}
\ No newline at end of file
Modified: trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs
===================================================================
--- trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs 2007-03-16 20:07:38 UTC (rev 191)
+++ trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs 2007-03-16 20:30:59 UTC (rev 192)
@@ -98,7 +98,7 @@
if (Path.GetFileName(ze.Name) == Path.GetFileName(fl.FileName)
&& ze.Name.Contains(@"\"+fl.SubType+@"\"))
{
- MessageBox.Show(ze.Name);
+// MessageBox.Show(ze.Name);
return true;
}
else return false;
@@ -346,12 +346,11 @@
client.DownloadFile(url,fil );
return true;
}
- catch (Exception ex)
+ catch (Exception)
{
return false;
}
}
- return false;
}
public void LoadFromFile(string fil)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ove...@us...> - 2007-03-16 20:07:54
|
Revision: 191
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=191&view=rev
Author: overture
Date: 2007-03-16 13:07:38 -0700 (Fri, 16 Mar 2007)
Log Message:
-----------
Removed Paths:
-------------
trunk/plugins/AddNewPlugin.cs
trunk/plugins/AssemblyInfo.cs
trunk/plugins/IPTVPlugin.csproj
trunk/plugins/IPTVPlugin.sln
trunk/plugins/IPTVSetup.cs
trunk/plugins/IPTVsetup.resx
trunk/plugins/ReflectionManager.cs
trunk/plugins/SetupManager.cs
trunk/plugins/SnapperInterface.cs
Deleted: trunk/plugins/AddNewPlugin.cs
===================================================================
--- trunk/plugins/AddNewPlugin.cs 2007-03-16 19:07:02 UTC (rev 190)
+++ trunk/plugins/AddNewPlugin.cs 2007-03-16 20:07:38 UTC (rev 191)
@@ -1,234 +0,0 @@
-using System;
-using System.Drawing;
-using System.Collections;
-using System.ComponentModel;
-using System.Windows.Forms;
-
-
-namespace myIPTV
-{
- /// <summary>
- /// Summary description for PluginsAddNew.
- /// </summary>
- public class PluginsAddNew : System.Windows.Forms.Form
- {
- private System.Windows.Forms.OpenFileDialog openFileDialog1;
- private CheckedListBox chklstBox;
- private System.Windows.Forms.Button btnOK;
- private System.Windows.Forms.Button btnCancel;
- private System.Windows.Forms.GroupBox grpDetails;
- private System.Windows.Forms.TextBox txtDesc;
- private System.Windows.Forms.Label lblDescription;
- private System.Windows.Forms.CheckBox chkBstate;
- private System.Windows.Forms.GroupBox grpDLLFile;
- private System.Windows.Forms.TextBox txtFilePath;
- private System.Windows.Forms.Button btnBrowse;
- private System.ComponentModel.Container components = null;
-
- #region Constructors
-
- public PluginsAddNew()
- {
- InitializeComponent();
- }
-
- public PluginsAddNew(CheckedListBox chkLstBox)
- {
- InitializeComponent();
- this.chklstBox = chkLstBox;
- }
-
- #endregion
-
- #region Dispose
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
-
- #endregion
-
- #region Windows Form Designer generated code
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- private void InitializeComponent()
- {
- this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
- this.btnOK = new System.Windows.Forms.Button();
- this.btnCancel = new System.Windows.Forms.Button();
- this.grpDetails = new System.Windows.Forms.GroupBox();
- this.txtDesc = new System.Windows.Forms.TextBox();
- this.lblDescription = new System.Windows.Forms.Label();
- this.chkBstate = new System.Windows.Forms.CheckBox();
- this.grpDLLFile = new System.Windows.Forms.GroupBox();
- this.txtFilePath = new System.Windows.Forms.TextBox();
- this.btnBrowse = new System.Windows.Forms.Button();
- this.grpDetails.SuspendLayout();
- this.grpDLLFile.SuspendLayout();
- this.SuspendLayout();
- //
- // btnOK
- //
- this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.btnOK.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.btnOK.Location = new System.Drawing.Point(336, 216);
- this.btnOK.Name = "btnOK";
- this.btnOK.TabIndex = 3;
- this.btnOK.Text = "OK";
- this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
- //
- // btnCancel
- //
- this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.btnCancel.Location = new System.Drawing.Point(248, 216);
- this.btnCancel.Name = "btnCancel";
- this.btnCancel.TabIndex = 2;
- this.btnCancel.Text = "Cancel";
- this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
- //
- // grpDetails
- //
- this.grpDetails.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.grpDetails.Controls.Add(this.txtDesc);
- this.grpDetails.Controls.Add(this.lblDescription);
- this.grpDetails.Controls.Add(this.chkBstate);
- this.grpDetails.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.grpDetails.Location = new System.Drawing.Point(8, 80);
- this.grpDetails.Name = "grpDetails";
- this.grpDetails.Size = new System.Drawing.Size(400, 128);
- this.grpDetails.TabIndex = 1;
- this.grpDetails.TabStop = false;
- this.grpDetails.Text = "Details";
-
- //
- // txtDesc
- //
- this.txtDesc.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.txtDesc.Location = new System.Drawing.Point(104, 68);
- this.txtDesc.Name = "txtDesc";
- this.txtDesc.Size = new System.Drawing.Size(280, 20);
- this.txtDesc.TabIndex = 2;
- this.txtDesc.Text = "";
- //
- // lblDescription
- //
- this.lblDescription.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.lblDescription.Location = new System.Drawing.Point(16, 64);
- this.lblDescription.Name = "lblDescription";
- this.lblDescription.Size = new System.Drawing.Size(64, 23);
- this.lblDescription.TabIndex = 1;
- this.lblDescription.Text = "Description";
- this.lblDescription.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
-
- //
- // chkBstate
- //
- this.chkBstate.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.chkBstate.Location = new System.Drawing.Point(16, 24);
- this.chkBstate.Name = "chkBstate";
- this.chkBstate.TabIndex = 0;
- this.chkBstate.Text = "State (On/Off)";
-
- //
- // grpDLLFile
- //
- this.grpDLLFile.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.grpDLLFile.Controls.Add(this.txtFilePath);
- this.grpDLLFile.Controls.Add(this.btnBrowse);
- this.grpDLLFile.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.grpDLLFile.Location = new System.Drawing.Point(8, 8);
- this.grpDLLFile.Name = "grpDLLFile";
- this.grpDLLFile.Size = new System.Drawing.Size(400, 64);
- this.grpDLLFile.TabIndex = 0;
- this.grpDLLFile.TabStop = false;
- this.grpDLLFile.Text = "File";
-
- //
- // txtFilePath
- //
- this.txtFilePath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.txtFilePath.Location = new System.Drawing.Point(104, 24);
- this.txtFilePath.Name = "txtFilePath";
- this.txtFilePath.Size = new System.Drawing.Size(280, 20);
- this.txtFilePath.TabIndex = 1;
- this.txtFilePath.Text = "";
- //
- // btnBrowse
- //
- this.btnBrowse.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.btnBrowse.Location = new System.Drawing.Point(16, 24);
- this.btnBrowse.Name = "btnBrowse";
- this.btnBrowse.TabIndex = 0;
- this.btnBrowse.Text = "Browse";
- this.btnBrowse.Click += new System.EventHandler(this.btnBrowse_Click);
- //
- // PluginsAddNew
- //
- this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
- this.ClientSize = new System.Drawing.Size(416, 242);
- this.Controls.Add(this.btnOK);
- this.Controls.Add(this.btnCancel);
- this.Controls.Add(this.grpDetails);
- this.Controls.Add(this.grpDLLFile);
- this.Name = "PluginsAddNew";
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
- this.Text = "PluginsAddNew";
- this.grpDetails.ResumeLayout(false);
- this.grpDLLFile.ResumeLayout(false);
- this.ResumeLayout(false);
-
- }
- #endregion
-
- #region Event
-
- private void btnBrowse_Click(object sender, System.EventArgs e)
- {
- openFileDialog1.Filter = "Plugin files (*.dll)|*.dll|All files (*.*)|*.*";
- if(DialogResult.OK==openFileDialog1.ShowDialog())
- {
- txtFilePath.Text = openFileDialog1.FileName;
- }
- }
-
- private void btnOK_Click(object sender, System.EventArgs e)
- {
- SetupManager setupManager = new SetupManager();
- setupManager.LoadXMLDoc();
-
- bool ans = setupManager.TestNewItem(this.txtFilePath.Text,this.txtDesc.Text,this.chkBstate.Checked);
- if(ans)
- {
- setupManager.InsertNewItem(this.txtFilePath.Text,this.txtDesc.Text,this.chkBstate.Checked);
- this.chklstBox.Items.Add(this.txtDesc.Text,this.chkBstate.Checked);
- }
- this.Close();
- }
-
- private void btnCancel_Click(object sender, System.EventArgs e)
- {
- this.Close();
- }
-
- #endregion
- }
-}
Deleted: trunk/plugins/AssemblyInfo.cs
===================================================================
--- trunk/plugins/AssemblyInfo.cs 2007-03-16 19:07:02 UTC (rev 190)
+++ trunk/plugins/AssemblyInfo.cs 2007-03-16 20:07:38 UTC (rev 191)
@@ -1,27 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-// Information about this assembly is defined by the following
-// attributes.
-//
-// change them to the information which is associated with the assembly
-// you compile.
-
-[assembly: AssemblyTitle("MediaPortal IPTV Plugin")]
-[assembly: AssemblyDescription("IPTV Plugin Host Application for mini IPTV plugins")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("")]
-[assembly: AssemblyCopyright("")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// The assembly version has following format :
-//
-// Major.Minor.Build.Revision
-//
-// You can specify all values by your own or you can build default build and revision
-// numbers with the '*' character (the default):
-
-[assembly: AssemblyVersion("1.0.*")]
-
Deleted: trunk/plugins/IPTVPlugin.csproj
===================================================================
--- trunk/plugins/IPTVPlugin.csproj 2007-03-16 19:07:02 UTC (rev 190)
+++ trunk/plugins/IPTVPlugin.csproj 2007-03-16 20:07:38 UTC (rev 191)
@@ -1,49 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <OutputType>Library</OutputType>
- <RootNamespace>IPTVPlugin</RootNamespace>
- <AssemblyName>IPTVPlugin</AssemblyName>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProjectGuid>{14CD8D0D-30E2-44FB-8E49-078D1578668D}</ProjectGuid>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
- <OutputPath>bin\Debug\</OutputPath>
- <Optimize>False</Optimize>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <DebugSymbols>True</DebugSymbols>
- <DebugType>Full</DebugType>
- <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
- <OutputPath>bin\Release\</OutputPath>
- <Optimize>True</Optimize>
- <DefineConstants>TRACE</DefineConstants>
- <DebugSymbols>False</DebugSymbols>
- <DebugType>None</DebugType>
- <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Xml" />
- <Reference Include="System.Data, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
- <Reference Include="System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
- <Reference Include="Core">
- <HintPath>..\..\..\..\..\MediaPortal\mediaportal\Core\bin\Release\Core.dll</HintPath>
- <SpecificVersion>False</SpecificVersion>
- </Reference>
- <Reference Include="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="SnapperInterface.cs" />
- <Compile Include="AssemblyInfo.cs" />
- <Compile Include="ReflectionManager.cs" />
- <Compile Include="IPTVSetup.cs" />
- <EmbeddedResource Include="IPTVsetup.resx">
- <DependentUpon>IPTVSetup.cs</DependentUpon>
- </EmbeddedResource>
- <Compile Include="SetupManager.cs" />
- <Compile Include="AddNewPlugin.cs" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
-</Project>
\ No newline at end of file
Deleted: trunk/plugins/IPTVPlugin.sln
===================================================================
--- trunk/plugins/IPTVPlugin.sln 2007-03-16 19:07:02 UTC (rev 190)
+++ trunk/plugins/IPTVPlugin.sln 2007-03-16 20:07:38 UTC (rev 191)
@@ -1,16 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 9.00
-# SharpDevelop 2.0.0.922
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IPTVPlugin", "IPTVPlugin.csproj", "{14CD8D0D-30E2-44FB-8E49-078D1578668D}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {14CD8D0D-30E2-44FB-8E49-078D1578668D}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {14CD8D0D-30E2-44FB-8E49-078D1578668D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {14CD8D0D-30E2-44FB-8E49-078D1578668D}.Release|Any CPU.Build.0 = Release|Any CPU
- {14CD8D0D-30E2-44FB-8E49-078D1578668D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- EndGlobalSection
-EndGlobal
Deleted: trunk/plugins/IPTVSetup.cs
===================================================================
--- trunk/plugins/IPTVSetup.cs 2007-03-16 19:07:02 UTC (rev 190)
+++ trunk/plugins/IPTVSetup.cs 2007-03-16 20:07:38 UTC (rev 191)
@@ -1,501 +0,0 @@
-using System;
-using System.Drawing;
-using System.Windows.Forms;
-using System.Xml;
-using MediaPortal.GUI.Library;
-
-namespace myIPTV
-{
- /// <summary>
- /// Description of MyIPTVsetup.
- /// </summary>
- public class IPTVsetup : System.Windows.Forms.Form, ISetupForm
- {
- private System.ComponentModel.Container components = null;
-
- public IPTVsetup()
- {
- InitializeComponent();
- }
-
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
-
- #region Windows Forms Designer generated code
- /// <summary>
- /// This method is required for Windows Forms designer support.
- /// Do not change the method contents inside the source code editor. The Forms designer might
- /// not be able to load this method if it was changed manually.
- /// </summary>
- private void InitializeComponent()
- {
- this.grpBoxConnectInfo = new System.Windows.Forms.GroupBox();
- this.chkBoxUseDefaultProxy = new System.Windows.Forms.CheckBox();
- this.txtProxyPort = new System.Windows.Forms.TextBox();
- this.label7 = new System.Windows.Forms.Label();
- this.txtProxyIPAddress = new System.Windows.Forms.TextBox();
- this.label6 = new System.Windows.Forms.Label();
- this.txtProxyPass = new System.Windows.Forms.TextBox();
- this.label5 = new System.Windows.Forms.Label();
- this.chkBoxUseProxy = new System.Windows.Forms.CheckBox();
- this.txtProxyUser = new System.Windows.Forms.TextBox();
- this.label4 = new System.Windows.Forms.Label();
- this.btnCancel = new System.Windows.Forms.Button();
- this.btnOK = new System.Windows.Forms.Button();
- this.tabControl1 = new System.Windows.Forms.TabControl();
- this.tabPage1 = new System.Windows.Forms.TabPage();
- this.tabPage2 = new System.Windows.Forms.TabPage();
- this.btnAddNewPlug = new System.Windows.Forms.Button();
- this.btnRemove = new System.Windows.Forms.Button();
- this.checkedListBox1 = new System.Windows.Forms.CheckedListBox();
- this.label1 = new System.Windows.Forms.Label();
- this.lblAuthor = new System.Windows.Forms.Label();
- this.grpBoxConnectInfo.SuspendLayout();
- this.tabControl1.SuspendLayout();
- this.tabPage1.SuspendLayout();
- this.tabPage2.SuspendLayout();
- this.SuspendLayout();
- //
- // grpBoxConnectInfo
- //
- this.grpBoxConnectInfo.Controls.Add(this.chkBoxUseDefaultProxy);
- this.grpBoxConnectInfo.Controls.Add(this.txtProxyPort);
- this.grpBoxConnectInfo.Controls.Add(this.label7);
- this.grpBoxConnectInfo.Controls.Add(this.txtProxyIPAddress);
- this.grpBoxConnectInfo.Controls.Add(this.label6);
- this.grpBoxConnectInfo.Controls.Add(this.txtProxyPass);
- this.grpBoxConnectInfo.Controls.Add(this.label5);
- this.grpBoxConnectInfo.Controls.Add(this.chkBoxUseProxy);
- this.grpBoxConnectInfo.Controls.Add(this.txtProxyUser);
- this.grpBoxConnectInfo.Controls.Add(this.label4);
- this.grpBoxConnectInfo.Location = new System.Drawing.Point(6, 35);
- this.grpBoxConnectInfo.Name = "grpBoxConnectInfo";
- this.grpBoxConnectInfo.Size = new System.Drawing.Size(640, 246);
- this.grpBoxConnectInfo.TabIndex = 1;
- this.grpBoxConnectInfo.TabStop = false;
- this.grpBoxConnectInfo.Text = "Internet Connection Information";
- this.grpBoxConnectInfo.UseCompatibleTextRendering = true;
- //
- // chkBoxUseDefaultProxy
- //
- this.chkBoxUseDefaultProxy.Enabled = false;
- this.chkBoxUseDefaultProxy.Location = new System.Drawing.Point(67, 99);
- this.chkBoxUseDefaultProxy.Name = "chkBoxUseDefaultProxy";
- this.chkBoxUseDefaultProxy.Size = new System.Drawing.Size(242, 24);
- this.chkBoxUseDefaultProxy.TabIndex = 9;
- this.chkBoxUseDefaultProxy.Text = "Use Default Proxy Authentication?";
- this.chkBoxUseDefaultProxy.UseCompatibleTextRendering = true;
- this.chkBoxUseDefaultProxy.CheckedChanged += new System.EventHandler(this.ChkBoxUseDefaultProxyCheckedChanged);
- //
- // txtProxyPort
- //
- this.txtProxyPort.Enabled = false;
- this.txtProxyPort.Location = new System.Drawing.Point(488, 155);
- this.txtProxyPort.Name = "txtProxyPort";
- this.txtProxyPort.Size = new System.Drawing.Size(49, 20);
- this.txtProxyPort.TabIndex = 8;
- //
- // label7
- //
- this.label7.Location = new System.Drawing.Point(382, 155);
- this.label7.Name = "label7";
- this.label7.Size = new System.Drawing.Size(100, 23);
- this.label7.TabIndex = 7;
- this.label7.Text = "Port";
- this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- this.label7.UseCompatibleTextRendering = true;
- //
- // txtProxyIPAddress
- //
- this.txtProxyIPAddress.Enabled = false;
- this.txtProxyIPAddress.Location = new System.Drawing.Point(488, 129);
- this.txtProxyIPAddress.Name = "txtProxyIPAddress";
- this.txtProxyIPAddress.Size = new System.Drawing.Size(100, 20);
- this.txtProxyIPAddress.TabIndex = 6;
- //
- // label6
- //
- this.label6.Location = new System.Drawing.Point(382, 129);
- this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(100, 23);
- this.label6.TabIndex = 5;
- this.label6.Text = "IP Address";
- this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- this.label6.UseCompatibleTextRendering = true;
- //
- // txtProxyPass
- //
- this.txtProxyPass.Enabled = false;
- this.txtProxyPass.Location = new System.Drawing.Point(173, 155);
- this.txtProxyPass.Name = "txtProxyPass";
- this.txtProxyPass.Size = new System.Drawing.Size(100, 20);
- this.txtProxyPass.TabIndex = 4;
- //
- // label5
- //
- this.label5.Location = new System.Drawing.Point(67, 155);
- this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(100, 23);
- this.label5.TabIndex = 3;
- this.label5.Text = "Password";
- this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- this.label5.UseCompatibleTextRendering = true;
- //
- // chkBoxUseProxy
- //
- this.chkBoxUseProxy.Location = new System.Drawing.Point(33, 28);
- this.chkBoxUseProxy.Name = "chkBoxUseProxy";
- this.chkBoxUseProxy.Size = new System.Drawing.Size(136, 24);
- this.chkBoxUseProxy.TabIndex = 2;
- this.chkBoxUseProxy.Text = "Use a Proxy Server?";
- this.chkBoxUseProxy.UseCompatibleTextRendering = true;
- this.chkBoxUseProxy.CheckedChanged += new System.EventHandler(this.ChkBoxUseProxyCheckedChanged);
- //
- // txtProxyUser
- //
- this.txtProxyUser.Enabled = false;
- this.txtProxyUser.Location = new System.Drawing.Point(173, 129);
- this.txtProxyUser.Name = "txtProxyUser";
- this.txtProxyUser.Size = new System.Drawing.Size(100, 20);
- this.txtProxyUser.TabIndex = 1;
- //
- // label4
- //
- this.label4.Location = new System.Drawing.Point(67, 129);
- this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(100, 23);
- this.label4.TabIndex = 0;
- this.label4.Text = "Username";
- this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- this.label4.UseCompatibleTextRendering = true;
- //
- // btnCancel
- //
- this.btnCancel.Location = new System.Drawing.Point(597, 384);
- this.btnCancel.Name = "btnCancel";
- this.btnCancel.Size = new System.Drawing.Size(75, 23);
- this.btnCancel.TabIndex = 2;
- this.btnCancel.Text = "Cancel";
- this.btnCancel.TextAlign = System.Drawing.ContentAlignment.TopCenter;
- this.btnCancel.UseCompatibleTextRendering = true;
- this.btnCancel.Click += new System.EventHandler(this.BtnCancelClick);
- //
- // btnOK
- //
- this.btnOK.Location = new System.Drawing.Point(516, 384);
- this.btnOK.Name = "btnOK";
- this.btnOK.Size = new System.Drawing.Size(75, 23);
- this.btnOK.TabIndex = 3;
- this.btnOK.Text = "OK";
- this.btnOK.TextAlign = System.Drawing.ContentAlignment.TopCenter;
- this.btnOK.UseCompatibleTextRendering = true;
- this.btnOK.Click += new System.EventHandler(this.BtnOKClick);
- //
- // tabControl1
- //
- this.tabControl1.Controls.Add(this.tabPage2);
- this.tabControl1.Controls.Add(this.tabPage1);
- this.tabControl1.Location = new System.Drawing.Point(12, 12);
- this.tabControl1.Name = "tabControl1";
- this.tabControl1.SelectedIndex = 0;
- this.tabControl1.Size = new System.Drawing.Size(660, 357);
- this.tabControl1.TabIndex = 4;
- //
- // tabPage1
- //
- this.tabPage1.Controls.Add(this.grpBoxConnectInfo);
- this.tabPage1.Location = new System.Drawing.Point(4, 23);
- this.tabPage1.Name = "tabPage1";
- this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
- this.tabPage1.Size = new System.Drawing.Size(652, 330);
- this.tabPage1.TabIndex = 0;
- this.tabPage1.Text = "Proxy Settings";
- this.tabPage1.UseVisualStyleBackColor = true;
- //
- // tabPage2
- //
- this.tabPage2.Controls.Add(this.lblAuthor);
- this.tabPage2.Controls.Add(this.label1);
- this.tabPage2.Controls.Add(this.btnAddNewPlug);
- this.tabPage2.Controls.Add(this.btnRemove);
- this.tabPage2.Controls.Add(this.checkedListBox1);
- this.tabPage2.Location = new System.Drawing.Point(4, 23);
- this.tabPage2.Name = "tabPage2";
- this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
- this.tabPage2.Size = new System.Drawing.Size(652, 330);
- this.tabPage2.TabIndex = 1;
- this.tabPage2.Text = "IPTV Mini Plugins";
- this.tabPage2.UseVisualStyleBackColor = true;
- //
- // btnAddNewPlug
- //
- this.btnAddNewPlug.Location = new System.Drawing.Point(526, 301);
- this.btnAddNewPlug.Name = "btnAddNewPlug";
- this.btnAddNewPlug.Size = new System.Drawing.Size(107, 23);
- this.btnAddNewPlug.TabIndex = 2;
- this.btnAddNewPlug.Text = "Add New Plugin";
- this.btnAddNewPlug.UseCompatibleTextRendering = true;
- this.btnAddNewPlug.UseVisualStyleBackColor = true;
- this.btnAddNewPlug.Click += new System.EventHandler(this.BtnAddNewPlugClick);
- //
- // btnRemove
- //
- this.btnRemove.Location = new System.Drawing.Point(18, 301);
- this.btnRemove.Name = "btnRemove";
- this.btnRemove.Size = new System.Drawing.Size(110, 23);
- this.btnRemove.TabIndex = 1;
- this.btnRemove.Text = "Remove Selected";
- this.btnRemove.UseCompatibleTextRendering = true;
- this.btnRemove.UseVisualStyleBackColor = true;
- this.btnRemove.Click += new System.EventHandler(this.BtnRemoveClick);
- //
- // checkedListBox1
- //
- this.checkedListBox1.FormattingEnabled = true;
- this.checkedListBox1.Location = new System.Drawing.Point(18, 36);
- this.checkedListBox1.Name = "checkedListBox1";
- this.checkedListBox1.Size = new System.Drawing.Size(615, 259);
- this.checkedListBox1.TabIndex = 0;
- this.checkedListBox1.UseCompatibleTextRendering = true;
- this.checkedListBox1.SelectedIndexChanged += new System.EventHandler(this.CheckedListBox1SelectedIndexChanged);
- //
- // label1
- //
- this.label1.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.label1.Location = new System.Drawing.Point(18, 7);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(100, 23);
- this.label1.TabIndex = 3;
- this.label1.Text = "Author:";
- this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
- this.label1.UseCompatibleTextRendering = true;
- //
- // lblAuthor
- //
- this.lblAuthor.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.lblAuthor.Location = new System.Drawing.Point(99, 7);
- this.lblAuthor.Name = "lblAuthor";
- this.lblAuthor.Size = new System.Drawing.Size(100, 23);
- this.lblAuthor.TabIndex = 4;
- this.lblAuthor.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- this.lblAuthor.UseCompatibleTextRendering = true;
- //
- // IPTVsetup
- //
- this.ClientSize = new System.Drawing.Size(686, 410);
- this.Controls.Add(this.tabControl1);
- this.Controls.Add(this.btnOK);
- this.Controls.Add(this.btnCancel);
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
- this.Name = "IPTVsetup";
- this.Text = "My IPTV Setup";
- this.Load += new System.EventHandler(this.MyIPTVsetupLoad);
- this.grpBoxConnectInfo.ResumeLayout(false);
- this.grpBoxConnectInfo.PerformLayout();
- this.tabControl1.ResumeLayout(false);
- this.tabPage1.ResumeLayout(false);
- this.tabPage2.ResumeLayout(false);
- this.ResumeLayout(false);
- }
- private System.Windows.Forms.Label label1;
- private System.Windows.Forms.Label lblAuthor;
- private System.Windows.Forms.Button btnRemove;
- private System.Windows.Forms.Button btnAddNewPlug;
- private System.Windows.Forms.CheckedListBox checkedListBox1;
- private System.Windows.Forms.TabPage tabPage2;
- private System.Windows.Forms.TabPage tabPage1;
- private System.Windows.Forms.TabControl tabControl1;
- private System.Windows.Forms.Button btnOK;
- private System.Windows.Forms.Button btnCancel;
- private System.Windows.Forms.Label label4;
- private System.Windows.Forms.TextBox txtProxyUser;
- private System.Windows.Forms.CheckBox chkBoxUseProxy;
- private System.Windows.Forms.Label label5;
- private System.Windows.Forms.TextBox txtProxyPass;
- private System.Windows.Forms.Label label6;
- private System.Windows.Forms.TextBox txtProxyIPAddress;
- private System.Windows.Forms.Label label7;
- private System.Windows.Forms.TextBox txtProxyPort;
- private System.Windows.Forms.CheckBox chkBoxUseDefaultProxy;
- private System.Windows.Forms.GroupBox grpBoxConnectInfo;
- #endregion
-
- void ChkBoxUseProxyCheckedChanged(object sender, System.EventArgs e)
- {
- if(chkBoxUseProxy.Checked==true)
- {
- chkBoxUseDefaultProxy.Checked = true;
- chkBoxUseDefaultProxy.Enabled = true;
- txtProxyIPAddress.Enabled = true;
- txtProxyPort.Enabled = true;
- }
- else
- {
- chkBoxUseDefaultProxy.Checked = false;
- chkBoxUseDefaultProxy.Enabled = false;
- txtProxyIPAddress.Enabled = false;
- txtProxyPort.Enabled = false;
- txtProxyUser.Enabled = false;
- txtProxyPass.Enabled = false;
- }
-
- }
-
- void ChkBoxUseDefaultProxyCheckedChanged(object sender, System.EventArgs e)
- {
- if(chkBoxUseDefaultProxy.Checked==false)
- {
- txtProxyUser.Enabled = true;
- txtProxyPass.Enabled = true;
- }
- else
- {
- txtProxyUser.Enabled = false;
- txtProxyPass.Enabled = false;
- }
- }
-
- void MyIPTVsetupLoad(object sender, System.EventArgs e)
- {
- SetupManager setupManager = new SetupManager();
- setupManager.LoadXMLDoc();
- setupManager.GetPluginDetails();
- setupManager.LoadPluginItems(this.checkedListBox1);
-
- XmlDocument xmld = new XmlDocument();
- xmld.Load("iptvsettings.xml");
-
- // Load Proxy Details from XML file
- chkBoxUseProxy.Checked = Convert.ToBoolean(xmld.SelectSingleNode("/settings/proxydetails/useproxy").InnerText);
- chkBoxUseDefaultProxy.Checked = Convert.ToBoolean(xmld.SelectSingleNode("/settings/proxydetails/usedefaultproxy").InnerText);
- txtProxyUser.Text = xmld.SelectSingleNode("/settings/proxydetails/proxyuser").InnerText;
- txtProxyPass.Text = xmld.SelectSingleNode("/settings/proxydetails/proxypassword").InnerText;
- txtProxyIPAddress.Text = xmld.SelectSingleNode("/settings/proxydetails/proxyipaddress").InnerText;
- txtProxyPort.Text = xmld.SelectSingleNode("/settings/proxydetails/proxyport").InnerText;
- }
-
- void BtnOKClick(object sender, System.EventArgs e)
- {
- XmlNode nchkBoxUseProxyNode;
- XmlNode nchkBoxUseDefaultProxyNode;
- XmlNode ntxtProxyUserNode;
- XmlNode ntxtProxyPassNode;
- XmlNode ntxtProxyIPAddressNode;
- XmlNode ntxtProxyPortNode;
-
- XmlDocument xmld = new XmlDocument();
- xmld.Load("iptvsettings.xml");
-
- nchkBoxUseProxyNode = xmld.SelectSingleNode("/settings/proxydetails/useproxy");
- nchkBoxUseDefaultProxyNode = xmld.SelectSingleNode("/settings/proxydetails/usedefaultproxy");
- ntxtProxyUserNode = xmld.SelectSingleNode("/settings/proxydetails/proxyuser");
- ntxtProxyPassNode = xmld.SelectSingleNode("/settings/proxydetails/proxypassword");
- ntxtProxyIPAddressNode = xmld.SelectSingleNode("/settings/proxydetails/proxyipaddress");
- ntxtProxyPortNode = xmld.SelectSingleNode("/settings/proxydetails/proxyport");
-
- nchkBoxUseProxyNode.InnerText = chkBoxUseProxy.Checked.ToString();
- nchkBoxUseDefaultProxyNode.InnerText = chkBoxUseDefaultProxy.Checked.ToString();
- ntxtProxyUserNode.InnerText = txtProxyUser.Text;
- ntxtProxyPassNode.InnerText = txtProxyPass.Text;
- ntxtProxyIPAddressNode.InnerText = txtProxyIPAddress.Text;
- ntxtProxyPortNode.InnerText = txtProxyPort.Text;
-
- xmld.Save("iptvsettings.xml");
- this.Close();
- }
-
- void BtnCancelClick(object sender, System.EventArgs e)
- {
- this.Close();
- }
-
- #region ISetupForm Members
-
- public bool CanEnable()
- {
- return true;
- }
-
- public string Description()
- {
- return "Plugin for viewing Internet TV";
- }
-
- public bool DefaultEnabled()
- {
- return true;
- }
-
- public int GetWindowId()
- {
- return 5699;
- }
-
- public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage)
- {
- strButtonText=PluginName();
- strButtonImage=String.Empty;
- strButtonImageFocus=String.Empty;
- strPictureImage=String.Empty;
- return true;
- }
-
- public string Author()
- {
- return "overture/juan pablo";
- }
-
- public string PluginName()
- {
- return "My IPTV";
- }
-
- public bool HasSetup()
- {
- return true;
- }
-
- public void ShowPlugin()
- {
- IPTVsetup iptvSetup = new IPTVsetup();
- iptvSetup.ShowDialog();
- iptvSetup.Dispose();
- }
-
- #endregion
-
-
- void BtnRemoveClick(object sender, System.EventArgs e)
- {
- SetupManager setupManager = new SetupManager();
- setupManager.LoadXMLDoc();
- setupManager.RemoveItem(checkedListBox1.Text);
- checkedListBox1.Items.Clear();
- setupManager.GetPluginDetails();
- setupManager.LoadPluginItems(checkedListBox1);
- }
-
- void BtnAddNewPlugClick(object sender, System.EventArgs e)
- {
- PluginsAddNew newplug = new PluginsAddNew(checkedListBox1);
- newplug.ShowDialog();
- newplug.Dispose();
- }
-
- void CheckedListBox1SelectedIndexChanged(object sender, System.EventArgs e)
- {
- }
- }
-}
Deleted: trunk/plugins/IPTVsetup.resx
===================================================================
--- trunk/plugins/IPTVsetup.resx 2007-03-16 19:07:02 UTC (rev 190)
+++ trunk/plugins/IPTVsetup.resx 2007-03-16 20:07:38 UTC (rev 191)
@@ -1,120 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
-</root>
\ No newline at end of file
Deleted: trunk/plugins/ReflectionManager.cs
===================================================================
--- trunk/plugins/ReflectionManager.cs 2007-03-16 19:07:02 UTC (rev 190)
+++ trunk/plugins/ReflectionManager.cs 2007-03-16 20:07:38 UTC (rev 191)
@@ -1,161 +0,0 @@
-using System;
-using System.Reflection;
-using SnapperInterface;
-
-namespace ReflectionManager
-{
- /// <summary>
- /// Controls runtime instances of the mini plugins.
- /// </summary>
- public class ReflectionControl
- {
- private object oInstance;
- private Assembly theSnapInAsm = null;
-
- #region Default Constructor
-
- /// <summary>
- /// Default Constructor
- /// </summary>
- public ReflectionControl()
- {
- }
-
- #endregion
-
- #region Properties
-
- /// <summary>
- /// Property of a given type instance.
- /// </summary>
- public object ObjInstance
- {
- get { return this.oInstance; }
- }
-
- #endregion
-
- #region Public Methods
-
- /// <summary>
- /// Used to load an external assembley.
- /// </summary>
- /// <param name="path">Path to the assembly.</param>
- /// <returns>bool</returns>
- public bool LoadExternalModule(string path)
- {
- try
- {
- // Dynamically load the selected assembly.
- this.theSnapInAsm = Assembly.LoadFrom(path);
- }
- catch
- {
- // If any error at all takes place, just return false.
- return false;
- }
-
- return true;
- }
-
- /// <summary>
- /// Creates an instance of a specified type.
- /// </summary>
- /// <param name="sFullName">Name of the type i.e. "Namespace.Class"</param>
- /// <returns>Instance of the type object.</returns>
- public object GetInstanceOfType(string sFullName)
- {
- // Get all types in assembly.
- Type[] theTypes = theSnapInAsm.GetTypes();
- // See if a type implements ...
- for (int i = 0; i < theTypes.Length; i++)
- {
- object[] theAtts = theTypes[i].GetCustomAttributes(false);
- for(int j = 0;j< theAtts.Length;j++)
- {
- if(theAtts[j] is MiniIPTVPluginAttribute)
- {
- MiniIPTVPluginAttribute pa = theAtts[j] as MiniIPTVPluginAttribute;
- // Use late binding to create the type.
- this.oInstance = theSnapInAsm.CreateInstance(sFullName);
- }
- }
- }
- return this.oInstance;
- }
-
-
- /// <summary>
- /// Checks if the DLL contains a compatiple type
- /// </summary>
- /// <returns>bool true or false</returns>
- public bool CheckValidType()
- {
- bool ans = false;
- int ctr = 0;
- // Get all types in assembly.
- Type[] theTypes = theSnapInAsm.GetTypes();
-
- // Loop through each type in the assembly
- for (int i = 0; i < theTypes.Length; i++)
- {
- // Get custom attributes for a given type
- object[] theAtts = theTypes[i].GetCustomAttributes(false);
-
- // Loop through each attribute supported by the given type.
- for(int j = 0;j< theAtts.Length;j++)
- {
- if(theAtts[j] is MiniIPTVPluginAttribute)
- {
- // Increment ctr for each type that supports
- // the MiniIPTVPluginAttribute.
- ctr++;
- }
- }
-
- }
-
- // If the MiniIPTVPluginAttribute is supported in any type
- // in a given assembly then return true so the DLL
- // is reported to be plugable.
- if(ctr>0)
- {
- // At least one type supports the MiniIPTVPluginAttribute
- ans = true;
- }
- else
- {
- // Zero types support the MiniIPTVPluginAttribute
- ans = false;
- }
-
- return ans;
- }
-
- /// <summary>
- /// Gets the custom attribute(s) of a plugin type.
- /// </summary>
- /// <param name="sTypeName">Name of the type i.e. "Namespace.Class"</param>
- public void GetCustomAttributes(out string sTypeName)
- {
- sTypeName = "";
-
- // Get all types in assembly.
- Type[] theTypes = theSnapInAsm.GetTypes();
- // See if a type implements ...
- for (int i = 0; i < theTypes.Length; i++)
- {
- object[] theAtts = theTypes[i].GetCustomAttributes(true);
- for(int j = 0;j< theAtts.Length;j++)
- {
- if(theAtts[j] is MiniIPTVPluginAttribute)
- {
- MiniIPTVPluginAttribute pa = theAtts[j] as MiniIPTVPluginAttribute;
- sTypeName = pa.TypeName;
- }
- }
- }
- }
- #endregion
- }
-}
Deleted: trunk/plugins/SetupManager.cs
===================================================================
--- trunk/plugins/SetupManager.cs 2007-03-16 19:07:02 UTC (rev 190)
+++ trunk/plugins/SetupManager.cs 2007-03-16 20:07:38 UTC (rev 191)
@@ -1,279 +0,0 @@
-using System;
-using System.Xml;
-using System.Windows.Forms;
-using System.Drawing;
-using ReflectionManager;
-using SnapperInterface;
-
-namespace myIPTV
-{
- /// <summary>
- /// Performs working tasks for this assembly.
- /// </summary>
- public class SetupManager
- {
- private string[] sDesc;
- private string[] sDescP;
- private string[] sState;
- private XmlDocument xmld;
- private string sTypeName;
-
- #region Default Constructor
-
- /// <summary>
- /// Default Constructor
- /// </summary>
- public SetupManager()
- {
- }
-
- #endregion
-
- #region Internal Methods
-
- /// <summary>
- /// Load the IPTVMiniPluginDLLs.xml to an XmlDocument
- /// </summary>
- internal void LoadXMLDoc()
- {
- this.xmld = new XmlDocument();
- try
- {
- this.xmld.Load("IPTVMiniPluginDLLs.xml");
- }
- catch(Exception ex)
- {
- MessageBox.Show(ex.Message);
- }
- }
-
- /// <summary>
- /// Get the require details from the IPTVMiniPluginDLLs.xml file.
- /// </summary>
- internal void GetParams()
- {
- XmlNodeList nodeList = null;
- this.sDesc = new string[10];
- int i=0;
-
- nodeList = this.xmld.SelectNodes("/interface/type");
-
- foreach(XmlNode n in nodeList)
- {
- XmlNode StatusAtt = n.SelectSingleNode("dll/@state");
- XmlNode NameAtt = n.SelectSingleNode("dll/@name");
-
- if(StatusAtt.InnerXml.ToLower()=="on")
- {
- this.sDesc[i] = NameAtt.InnerXml;
- i++;
- }
- }
- }
-
-
- internal void GetPluginDetails()
- {
- XmlNodeList nodeList = null;
- this.sDescP = new string[10];
- this.sState = new string[10];
- int i=0;
-
- nodeList = this.xmld.SelectNodes("/interface/type");
-
- foreach(XmlNode n in nodeList)
- {
- XmlNode StatusAtt = n.SelectSingleNode("dll/@state");
- XmlNode NameAtt = n.SelectSingleNode("dll/@name");
-
- this.sDescP[i] = NameAtt.InnerXml;
- this.sState[i] = StatusAtt.InnerXml;
- i++;
- }
- }
-
- /// <summary>
- /// Load details into the ListBox on the NewItems form.
- /// </summary>
- /// <param name="listBox">ListBox from the NewItems form</param>
- internal void LoadNewItem(ListBox listBox)
- {
- foreach(string s in this.sDesc)
- {
- if(s!=null)
- {
- listBox.Items.Add(s.ToString());
- }
- }
- }
-
- internal void LoadPluginItems(CheckedListBox chklistBox)
- {
- for(int i=0;i<10;i++)
- {
- if(this.sDescP[i]!=null)
- {
- if(this.sState[i].ToLower()=="on")
- {
- chklistBox.Items.Add(this.sDescP[i],CheckState.Checked);
- }
- else if(this.sState[i].ToLower()=="off")
- {
- chklistBox.Items.Add(this.sDescP[i],CheckState.Unchecked);
- }
- else
- {
- chklistBox.Items.Add(this.sDescP[i],CheckState.Indeterminate);
- }
- }
- }
- }
-
- internal void SavePluginItems(CheckedListBox chklistBox)
- {
- int itemIndex = 0;
- foreach(string item in chklistBox.Items)
- {
- this.sDesc = new string[10];
- string sNewState = null;
- XmlNode nodeInner = null;
- XmlNode nodeStatus = null;
-
- nodeInner = this.xmld.SelectSingleNode("/interface/type/dll[@name='" + item.ToString().Trim() + "']");
- nodeStatus = this.xmld.SelectSingleNode("/interface/type/dll[@name='" + item.ToString().Trim() + "']/@state");
-
- if(chklistBox.GetItemCheckState(itemIndex).ToString().ToLower()=="checked")
- {
- sNewState = "On";
- }
- else if (chklistBox.GetItemCheckState(itemIndex).ToString().ToLower()=="unchecked")
- {
- sNewState = "Off";
- }
-
- nodeStatus.Value = sNewState;
- this.xmld.Save("IPTVMiniPluginDLLs.xml");
- itemIndex++;
- }
- }
-
- internal void InsertNewItem(string sFilePath,string sDesc,bool sState)
- {
- XmlNode root = null;
- root = this.xmld.SelectSingleNode("/interface");
-
- //Create new nodes
- XmlElement eleType = this.xmld.CreateElement("type");
- XmlElement eleDLL = this.xmld.CreateElement("dll");
- eleDLL.InnerText = sFilePath;
-
- XmlAttribute attState = this.xmld.CreateAttribute("state");
- if(sState)
- { attState.InnerText = "On";}
- else if(!sState)
- { attState.InnerText = "Off";}
- eleDLL.SetAttributeNode(attState);
-
- XmlAttribute attName = this.xmld.CreateAttribute("name");
- attName.InnerText = sDesc;
- eleDLL.SetAttributeNode(attName);
-
- root.AppendChild(eleType);
- eleType.InsertBefore(eleDLL,eleType.FirstChild);
-
- this.xmld.Save("IPTVMiniPluginDLLs.xml");
- }
-
- internal void RemoveItem(string sSelected)
- {
- if(sSelected!="")
- {
- XmlNode node = null;
- XmlNode childnode = null;
- node = this.xmld.SelectSingleNode("/interface");
- childnode = node.SelectSingleNode("type[dll/@name='" + sSelected + "']");
- node.RemoveChild(childnode);
- this.xmld.Save("IPTVMiniPluginDLLs.xml");
- }
- }
-
- internal string[,] GetChannelArray()
- {
- XmlNodeList nodeList = this.xmld.SelectNodes("/interface/type");
- string[,] sAllChannelDetails;
- sAllChannelDetails = new string[4000,6]; // [Rows,Columns]
- int iLastArrayIndex = 0; // Default Start Index
-
- foreach(XmlNode n in nodeList)
- {
- XmlNode nodeState = n.SelectSingleNode("dll/@state");
- XmlNode nodeDLL = n.SelectSingleNode("dll");
-
- //Load Assembs.
- ReflectionControl dir = new ReflectionControl();
- bool ans = dir.LoadExternalModule(nodeDLL.InnerXml);
- if(ans)
- {
- dir.GetCustomAttributes(out sTypeName);
- object o = dir.GetInstanceOfType(sTypeName);
- IMiniIPTVPlugin iplug = o as IMiniIPTVPlugin;
- string[,] sChannelDetails = iplug.IPTVChannel();
- sChannelDetails.CopyTo(sAllChannelDetails, iLastArrayIndex);
- iLastArrayIndex = sChannelDetails.Length;
- }
- else
- {
- MessageBox.Show("ERROR: DLL Failed to load for '" + nodeDLL.InnerXml + "'.\n\nCheck that the DLL specified in the \n'IPTVMiniPluginDLLs.xml' file is correct.");
- }
- }
- return sAllChannelDetails;
- }
-
- internal string GetAuthor(string sDLL)
- {
- string sAuthor = "unknown"; // Default Author
- ReflectionControl dir = new ReflectionControl();
- bool ans = dir.LoadExternalModule(sDLL);
- if(ans)
- {
- dir.GetCustomAttributes(out sTypeName);
- object o = dir.GetInstanceOfType(sTypeName);
- IMiniIPTVPlugin iplug = o as IMiniIPTVPlugin;
- sAuthor = iplug.Author();
- }
- else
- {
- MessageBox.Show("ERROR: DLL Failed to load for '" + sDLL + "'.\n\nCheck that the DLL specified in the \n'IPTVMiniPluginDLLs.xml' file is correct.");
- }
- return sAuthor;
- }
-
- internal bool TestNewItem(string sFilePath,string sDesc,bool sState)
- {
- bool ans = false;
- if(sFilePath!="" && sDesc!="")
- {
- //Load Assem.
- ReflectionControl dir = new ReflectionControl();
- ans = dir.LoadExternalModule(sFilePath);
- if(ans)
- {
- if(!dir.CheckValidType())
- {
- ans = false;
- MessageBox.Show("ERROR: This DLL is not a valid IPTV Mini Plugin");
- }
- }
- else
- {
- MessageBox.Show("ERROR: DLL Failed to load for '" + sDesc + "'.\n\nThis file may not be a valid DLL File.");
- }
- dir = null;
- }
- return ans;
- }
-
- #endregion
-
- }
-}
Deleted: trunk/plugins/SnapperInterface.cs
===================================================================
--- trunk/plugins/SnapperInterface.cs 2007-03-16 19:07:02 UTC (rev 190)
+++ trunk/plugins/SnapperInterface.cs 2007-03-16 20:07:38 UTC (rev 191)
@@ -1,59 +0,0 @@
-using System;
-using System.Windows.Forms;
-
-namespace SnapperInterface
-{
- #region IMiniIPTVPlugin Interface
- /// <summary>
- /// IMiniIPTVPlugin Interface - for plugging in IPTV providing data.
- /// </summary>
- public interface IMiniIPTVPlugin
- {
- /// <summary>
- /// Should return a multi-dimensional array return in this order (string channelname, string channelDescription, string genre, string language, string country, string streamURL)
- /// </summary>
- /// <returns>A multi-dimensional array</returns>
- string[,] IPTVChannel();
- string Author();
- }
-
- #endregion
-
- #region Plugin Attribute
-
- /// <summary>
- /// MiniIPTVPluginAttribute will be used by classes which
- /// support the IMiniIPTVPlugin interface...and thus which are
- /// pluggable into the extendable application.
- /// </summary>
- [AttributeUsage(AttributeTargets.Class)]
- public class MiniIPTVPluginAttribute : System.Attribute
- {
- private string typeName;
-
- /// <summary>
- /// TypeName public property.
- /// </summary>
- public string TypeName
- {
- get { return typeName; }
- set { typeName = value; }
- }
-
- /// <summary>
- /// Custom consturctor for PluginAttribute.
- /// </summary>
- /// <param name="typeName">TypeName is the full type name of the plugin i.e. formatted "Namespace.Class"</param>
- public MiniIPTVPluginAttribute(string typeName)
- {
- this.typeName = typeName;
- }
-
- /// <summary>
- /// Default Constructor
- /// </summary>
- public MiniIPTVPluginAttribute() {}
- }
-
- #endregion
-}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <du...@us...> - 2007-03-16 19:07:20
|
Revision: 190
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=190&view=rev
Author: dukus
Date: 2007-03-16 12:07:02 -0700 (Fri, 16 Mar 2007)
Log Message:
-----------
Added Zebons suggestion
Modified Paths:
--------------
trunk/plugins/mpinstaler/MPInstaler/Form1.cs
trunk/plugins/mpinstaler/MPInstaler/Language dialog.Designer.cs
trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs
trunk/plugins/mpinstaler/MPInstaler.suo
Modified: trunk/plugins/mpinstaler/MPInstaler/Form1.cs
===================================================================
--- trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-03-16 15:59:02 UTC (rev 189)
+++ trunk/plugins/mpinstaler/MPInstaler/Form1.cs 2007-03-16 19:07:02 UTC (rev 190)
@@ -107,26 +107,43 @@
}
}
}
- 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, "BlueTwo", Path.GetFullPath(fil), "02010", "");
- break;
- case 2: addrow(Path.GetFileName(fil), MPinstalerStruct.SKIN_MEDIA_TYPE, "BlueTwo", Path.GetFullPath(fil), "02020", "");
- break;
- default:
- break;
- }
- }
- }
+ private void addskin(int type)
+ {
+ // string fil;
+ string subtype;
+ openFileDialog1.Multiselect = true;
+ switch (type)
+ {
+ case 1: openFileDialog1.Filter = "xml files|*.xml|png files|*.png|bmp files|*.bmp|All files|*.*";
+ break;
+ case 2: openFileDialog1.Filter = "png files|*.png|bmp files|*.bmp|xml files|*.xml|All files|*.*";
+ break;
+ }
+ if (openFileDialog1.ShowDialog(this) == DialogResult.OK)
+ {
+ foreach (string fil in openFileDialog1.FileNames)
+ {
+ if (Path.GetFullPath(fil).IndexOf("Skin\\") == 0)
+ subtype = "BlueTwo";
+ else
+ {
+ subtype =Path.GetFullPath(fil).Substring(Path.GetFullPath(fil).IndexOf("Skin\\") +5);
+ subtype =subtype.Substring(0,subtype.IndexOf("\\"));
+ }
+ switch (type)
+ {
+ case 1: addrow(Path.GetFileName(fil),MPinstalerStruct.SKIN_TYPE, subtype, Path.GetFullPath(fil), "02010", "");
+ break;
+ case 2: addrow(Path.GetFileName(fil),MPinstalerStruct.SKIN_MEDIA_TYPE, subtype, Path.GetFullPath(fil), "02020","");
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ }
+
private void addother(string ty, string sty)
{
// string fil;
Modified: trunk/plugins/mpinstaler/MPInstaler/Language dialog.Designer.cs
===================================================================
--- trunk/plugins/mpinstaler/MPInstaler/Language dialog.Designer.cs 2007-03-16 15:59:02 UTC (rev 189)
+++ trunk/plugins/mpinstaler/MPInstaler/Language dialog.Designer.cs 2007-03-16 19:07:02 UTC (rev 190)
@@ -34,16 +34,21 @@
this.listView1 = 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.textBox1 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.button3 = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button();
- this.columnHeader3 = new System.Windows.Forms.ColumnHeader();
+ this.comboBox1 = new System.Windows.Forms.ComboBox();
+ this.listView2 = new System.Windows.Forms.ListView();
+ this.button5 = new System.Windows.Forms.Button();
+ this.columnHeader4 = new System.Windows.Forms.ColumnHeader();
+ this.columnHeader5 = new System.Windows.Forms.ColumnHeader();
this.SuspendLayout();
//
// button1
//
- this.button1.Location = new System.Drawing.Point(15, 279);
+ this.button1.Location = new System.Drawing.Point(13, 279);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(65, 21);
this.button1.TabIndex = 0;
@@ -53,7 +58,7 @@
//
// button2
//
- this.button2.Location = new System.Drawing.Point(311, 279);
+ this.button2.Location = new System.Drawing.Point(309, 279);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 21);
this.button2.TabIndex = 1;
@@ -66,8 +71,9 @@
this.languageComboBox.FormattingEnabled = true;
this.languageComboBox.Location = new System.Drawing.Point(216, 252);
this.languageComboBox.Name = "languageComboBox";
- this.languageComboBox.Size = new System.Drawing.Size(170, 21);
+ this.languageComboBox.Size = new System.Drawing.Size(168, 21);
this.languageComboBox.TabIndex = 2;
+ this.languageComboBox.SelectedIndexChanged += new System.EventHandler(this.languageComboBox_SelectedIndexChanged);
//
// listView1
//
@@ -95,6 +101,11 @@
this.columnHeader2.Text = "Value";
this.columnHeader2.Width = 137;
//
+ // columnHeader3
+ //
+ this.columnHeader3.Text = "Language";
+ this.columnHeader3.Width = 155;
+ //
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(12, 253);
@@ -111,7 +122,7 @@
//
// button3
//
- this.button3.Location = new System.Drawing.Point(107, 279);
+ this.button3.Location = new System.Drawing.Point(105, 279);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(75, 21);
this.button3.TabIndex = 6;
@@ -121,7 +132,7 @@
//
// button4
//
- this.button4.Location = new System.Drawing.Point(209, 279);
+ this.button4.Location = new System.Drawing.Point(207, 279);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(75, 21);
this.button4.TabIndex = 7;
@@ -129,16 +140,53 @@
this.button4.UseVisualStyleBackColor = true;
this.button4.Click += new System.EventHandler(this.button4_Click);
//
- // columnHeader3
+ // comboBox1
//
- this.columnHeader3.Text = "Language";
- this.columnHeader3.Width = 155;
+ this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.comboBox1.FormattingEnabled = true;
+ this.comboBox1.Location = new System.Drawing.Point(13, 306);
+ this.comboBox1.Name = "comboBox1";
+ this.comboBox1.Size = new System.Drawing.Size(371, 21);
+ this.comboBox1.TabIndex = 8;
//
+ // listView2
+ //
+ this.listView2.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+ this.columnHeader4,
+ this.columnHeader5});
+ this.listView2.Location = new System.Drawing.Point(434, 12);
+ this.listView2.Name = "listView2";
+ this.listView2.Size = new System.Drawing.Size(227, 311);
+ this.listView2.TabIndex = 9;
+ this.listView2.UseCompatibleStateImageBehavior = false;
+ this.listView2.View = System.Windows.Forms.View.Details;
+ //
+ // button5
+ //
+ this.button5.Location = new System.Drawing.Point(390, 156);
+ this.button5.Name = "button5";
+ this.button5.Size = new System.Drawing.Size(38, 23);
+ this.button5.TabIndex = 10;
+ this.button5.Text = "<-";
+ this.button5.UseVisualStyleBackColor = true;
+ //
+ // columnHeader4
+ //
+ this.columnHeader4.Text = "Id";
+ //
+ // columnHeader5
+ //
+ this.columnHeader5.Text = "Value";
+ this.columnHeader5.Width = 134;
+ //
// Form2
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(396, 325);
+ this.ClientSize = new System.Drawing.Size(673, 335);
+ this.Controls.Add(this.button5);
+ this.Controls.Add(this.listView2);
+ this.Controls.Add(this.comboBox1);
this.Controls.Add(this.button4);
this.Controls.Add(this.button3);
this.Controls.Add(this.textBox2);
@@ -168,5 +216,10 @@
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Button button4;
private System.Windows.Forms.ColumnHeader columnHeader3;
+ private System.Windows.Forms.ComboBox comboBox1;
+ private System.Windows.Forms.ListView listView2;
+ private System.Windows.Forms.Button button5;
+ private System.Windows.Forms.ColumnHeader columnHeader4;
+ private System.Windows.Forms.ColumnHeader columnHeader5;
}
}
\ No newline at end of file
Modified: trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs
===================================================================
--- trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs 2007-03-16 15:59:02 UTC (rev 189)
+++ trunk/plugins/mpinstaler/MPInstaler/Language dialog.cs 2007-03-16 19:07:02 UTC (rev 190)
@@ -16,11 +16,14 @@
{
public string baseDir;
public List<LanguageString> Language;
-
+ public MPLanguageHelper deflang = new MPLanguageHelper();
+ public MPLanguageHelper lang = new MPLanguageHelper();
string LanguageDirectory = Config.GetFolder(Config.Dir.Language);
public Form2()
{
InitializeComponent();
+ deflang.Load("English");
+ lang.Load("English");
}
private void LoadLanguages()
{
@@ -101,8 +104,24 @@
item1.SubItems.Add(lg.language);
listView1.Items.AddRange(new ListViewItem[] { item1 });
}
+ comboBox1.Items.Clear();
+ foreach (LanguageString lg in deflang.Language)
+ {
+ comboBox1.Items.Add(lg.dwCode+" - " + lg.mapSting);
+ }
+ load_lang();
}
+ void load_lang()
+ {
+ listView2.Items.Clear();
+ foreach (LanguageString lg in lang.Language)
+ {
+ ListViewItem item1 = new ListViewItem(lg.dwCode, 0);
+ item1.SubItems.Add(lg.mapSting);
+ listView2.Items.AddRange(new ListViewItem[] { item1 });
+ }
+ }
private void button3_Click(object sender, EventArgs e)
{
Language.Clear();
@@ -116,5 +135,11 @@
{
this.Close();
}
+
+ private void languageComboBox_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ lang.Load(languageComboBox.Text);
+ load_lang();
+ }
}
}
\ No newline at end of file
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: <du...@us...> - 2007-03-16 15:59:06
|
Revision: 189
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=189&view=rev
Author: dukus
Date: 2007-03-16 08:59:02 -0700 (Fri, 16 Mar 2007)
Log Message:
-----------
Skin installation bug fixed
When update file not exist bug fixed
Modified Paths:
--------------
trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs
trunk/plugins/mpinstaler/MPInstaler/download_form.cs
trunk/plugins/mpinstaler/MPInstaler.suo
Modified: trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs
===================================================================
--- trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs 2007-03-14 17:01:09 UTC (rev 188)
+++ trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs 2007-03-16 15:59:02 UTC (rev 189)
@@ -44,7 +44,7 @@
while ((entry = s.GetNextEntry()) != null)
{
//MessageBox.Show(entry.Name);
- if (Path.GetFileName(entry.Name) ==Path.GetFileName(fl.FileName))
+ if (test_file(fl,entry))
{
string tpf =Path.GetFullPath(MPinstalerStruct.GetDirEntry(fl)) ;
if (fl.Type == MPinstalerStruct.SKIN_TYPE || fl.Type == MPinstalerStruct.SKIN_MEDIA_TYPE)
@@ -91,6 +91,25 @@
}
}
+ bool test_file(MPIFileList fl, ZipEntry ze)
+ {
+ if (fl.Type == MPinstalerStruct.SKIN_TYPE || fl.Type == MPinstalerStruct.SKIN_MEDIA_TYPE)
+ {
+ if (Path.GetFileName(ze.Name) == Path.GetFileName(fl.FileName)
+ && ze.Name.Contains(@"\"+fl.SubType+@"\"))
+ {
+ MessageBox.Show(ze.Name);
+ return true;
+ }
+ else return false;
+ }
+ else
+ {
+ if (Path.GetFileName(ze.Name) == Path.GetFileName(fl.FileName))
+ return true;
+ else return false;
+ }
+ }
public void installLanguage(ListBox lb)
{
MPLanguageHelper mpih = new MPLanguageHelper();
Modified: trunk/plugins/mpinstaler/MPInstaler/download_form.cs
===================================================================
--- trunk/plugins/mpinstaler/MPInstaler/download_form.cs 2007-03-14 17:01:09 UTC (rev 188)
+++ trunk/plugins/mpinstaler/MPInstaler/download_form.cs 2007-03-16 15:59:02 UTC (rev 189)
@@ -4,6 +4,7 @@
using System.Data;
using System.Drawing;
using System.Text;
+using System.IO;
using System.Windows.Forms;
using System.Net;
@@ -46,8 +47,12 @@
}
private void DownloadEnd(object sender, AsyncCompletedEventArgs e)
{
- if (e.Error!=null)
- MessageBox.Show(e.Error.Message+"\n"+e.Error.InnerException);
+ if (e.Error != null)
+ {
+ if (File.Exists(dest))
+ File.Delete(dest);
+ MessageBox.Show(e.Error.Message + "\n" + e.Error.InnerException);
+ }
button1.Enabled = false;
this.Close();
}
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: <sa...@us...> - 2007-03-14 17:01:16
|
Revision: 188
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=188&view=rev
Author: saamand
Date: 2007-03-14 10:01:09 -0700 (Wed, 14 Mar 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/MyLyrics/LyricsEngine/LyricsController.cs
trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj
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_LyricsLibrary.Designer.cs
trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.cs
trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.resx
trunk/plugins/MyLyrics/My Lyrics/MyLyricsUtil.cs
Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsController.cs
===================================================================
--- trunk/plugins/MyLyrics/LyricsEngine/LyricsController.cs 2007-03-14 13:51:47 UTC (rev 187)
+++ trunk/plugins/MyLyrics/LyricsEngine/LyricsController.cs 2007-03-14 17:01:09 UTC (rev 188)
@@ -108,7 +108,7 @@
((Thread)threadList[i]).Abort();
}
- bool stillThreadsAlive = true;
+ bool stillThreadsAlive = (threadList.Count > 0 ? true : false);
while (stillThreadsAlive)
{
for (int i = 0; i < threadList.Count; i++)
@@ -118,8 +118,6 @@
stillThreadsAlive = true;
}
}
-
- Thread.Sleep(500);
m_EventStopped_LyricController.Set();
break;
}
Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj
===================================================================
--- trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj 2007-03-14 13:51:47 UTC (rev 187)
+++ trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj 2007-03-14 17:01:09 UTC (rev 188)
@@ -125,7 +125,7 @@
</Target>
-->
<PropertyGroup>
- <PostBuildEvent>copy $(TargetFileName) "C:\Program Files\Team MediaPortal\MediaPortal"</PostBuildEvent>
+ <PostBuildEvent>::copy $(TargetFileName) "C:\Program Files\Team MediaPortal\MediaPortal"</PostBuildEvent>
<PreBuildEvent>
</PreBuildEvent>
</PropertyGroup>
Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs
===================================================================
--- trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2007-03-14 13:51:47 UTC (rev 187)
+++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2007-03-14 17:01:09 UTC (rev 188)
@@ -517,11 +517,29 @@
if (MyLyricsUtil.isTrackInLyricsDatabase(LyricsDB, capArtist, capTitle).Equals(MyLyricsUtil.LYRIC_NOT_FOUND))
{
LyricsDB.Add(MyLyricsUtil.CorrectKeyFormat(capArtist, capTitle), new LyricsItem(capArtist, capTitle, m_LyricText, site));
+
+ string path = MediaPortal.Configuration.Config.GetFile(MediaPortal.Configuration.Config.Dir.Database, LyricsDBName);
+ using (FileStream fs = new FileStream(path, FileMode.Open))
+ {
+ BinaryFormatter bf = new BinaryFormatter();
+ LyricsDB.SetLastModified();
+ bf.Serialize(fs, LyricsDB);
+ fs.Close();
+ }
}
if (MyLyricsUtil.isTrackInLyricsMarkedDatabase(LyricsMarkedDB, capArtist, capTitle).Equals(MyLyricsUtil.LYRIC_MARKED))
{
LyricsMarkedDB.Remove(MyLyricsUtil.CorrectKeyFormat(capArtist, capTitle));
+
+ string path = MediaPortal.Configuration.Config.GetFile(MediaPortal.Configuration.Config.Dir.Database, LyricsMarkedDBName);
+ using (FileStream fs = new FileStream(path, FileMode.Open))
+ {
+ BinaryFormatter bf = new BinaryFormatter();
+ LyricsMarkedDB.SetLastModified();
+ bf.Serialize(fs, LyricsMarkedDB);
+ fs.Close();
+ }
}
}
Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.Designer.cs
===================================================================
--- trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.Designer.cs 2007-03-14 13:51:47 UTC (rev 187)
+++ trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.Designer.cs 2007-03-14 17:01:09 UTC (rev 188)
@@ -100,11 +100,12 @@
this.tabControl.Controls.Add(this.tabPageLyricsDatabase);
this.tabControl.Controls.Add(this.tabPageSetup);
this.tabControl.Controls.Add(this.tabPageDatabase);
- this.tabControl.Location = new System.Drawing.Point(12, 12);
+ this.tabControl.Location = new System.Drawing.Point(7, 12);
this.tabControl.Name = "tabControl";
this.tabControl.SelectedIndex = 0;
this.tabControl.Size = new System.Drawing.Size(528, 494);
this.tabControl.TabIndex = 1;
+ this.tabControl.SelectedIndexChanged += new System.EventHandler(this.tabControl_SelectedIndexChanged);
//
// tabPageLyricsDatabase
//
@@ -123,7 +124,7 @@
this.tabPageSetup.Location = new System.Drawing.Point(4, 22);
this.tabPageSetup.Name = "tabPageSetup";
this.tabPageSetup.Padding = new System.Windows.Forms.Padding(3);
- this.tabPageSetup.Size = new System.Drawing.Size(520, 454);
+ this.tabPageSetup.Size = new System.Drawing.Size(520, 468);
this.tabPageSetup.TabIndex = 2;
this.tabPageSetup.Text = "General setup";
this.tabPageSetup.UseVisualStyleBackColor = true;
@@ -242,7 +243,7 @@
this.tabPageDatabase.Location = new System.Drawing.Point(4, 22);
this.tabPageDatabase.Name = "tabPageDatabase";
this.tabPageDatabase.Padding = new System.Windows.Forms.Padding(3);
- this.tabPageDatabase.Size = new System.Drawing.Size(520, 454);
+ this.tabPageDatabase.Size = new System.Drawing.Size(520, 468);
this.tabPageDatabase.TabIndex = 2;
this.tabPageDatabase.Text = "Search music database";
this.tabPageDatabase.UseVisualStyleBackColor = true;
@@ -400,6 +401,7 @@
//
this.lbLimit.BorderColor = System.Drawing.Color.Empty;
this.lbLimit.Location = new System.Drawing.Point(158, 19);
+ this.lbLimit.MaxLength = 6;
this.lbLimit.Name = "lbLimit";
this.lbLimit.Size = new System.Drawing.Size(44, 20);
this.lbLimit.TabIndex = 1;
@@ -684,6 +686,7 @@
// bgWorkerSearch
//
this.bgWorkerSearch.WorkerReportsProgress = true;
+ this.bgWorkerSearch.WorkerSupportsCancellation = true;
this.bgWorkerSearch.DoWork += new System.ComponentModel.DoWorkEventHandler(this.bgWorkerSearch_DoWork);
this.bgWorkerSearch.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.bgWorkerSearch_RunWorkerCompleted);
this.bgWorkerSearch.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.bgWorkerSearch_ProgressChanged);
@@ -692,7 +695,7 @@
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(538, 543);
+ this.ClientSize = new System.Drawing.Size(540, 539);
this.ControlBox = false;
this.Controls.Add(this.btClose);
this.Controls.Add(this.tabControl);
Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.cs
===================================================================
--- trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.cs 2007-03-14 13:51:47 UTC (rev 187)
+++ trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.cs 2007-03-14 17:01:09 UTC (rev 188)
@@ -33,7 +33,7 @@
Thread m_LyricControllerThread;
LyricsController lc = null;
- MyLyricsSetup_LyricsLibrary lyricUC;
+ MyLyricsSetup_LyricsLibrary lyricsLibraryUC;
// events used to stop worker thread
ManualResetEvent m_EventStopThread;
@@ -106,13 +106,15 @@
private string logFileName = "MyLyricsBatch.log";
private string logFullFileName = "";
+ bool stopCollectingOfTitles = false;
+
public MyLyricsSetup()
{
// Initialize GUI
InitializeComponent();
- lyricUC = new MyLyricsSetup_LyricsLibrary(this);
- this.tabPageLyricsDatabase.Controls.Add(lyricUC);
+ lyricsLibraryUC = new MyLyricsSetup_LyricsLibrary(this);
+ this.tabPageLyricsDatabase.Controls.Add(lyricsLibraryUC);
// initialize delegates
m_DelegateLyricFound = new DelegateLyricFound(this.lyricFoundMethod);
@@ -225,7 +227,7 @@
}
MyLyricsSetup_LyricsLibrary.CurrentDB = LyricsDB;
- lyricUC.updateLyricsTree();
+ lyricsLibraryUC.updateLyricsTree();
}
@@ -284,30 +286,36 @@
{
if (searching)
{
- lyricUC.btAdd.Enabled = false;
- lyricUC.btDelete.Enabled = false;
- lyricUC.btImportSingle.Enabled = false;
- lyricUC.btImportLRC.Enabled = false;
- lyricUC.btResetLyricsDatabase.Enabled = false;
- lyricUC.btResetMarkedLyricsDatabase.Enabled = false;
- lyricUC.btSave.Enabled = false;
+ lyricsLibraryUC.btAdd.Enabled = false;
+ lyricsLibraryUC.btDelete.Enabled = false;
+ lyricsLibraryUC.btImportFiles.Enabled = false;
+ lyricsLibraryUC.btImportDirs.Enabled = false;
+ lyricsLibraryUC.btResetLyricsDatabase.Enabled = false;
+ lyricsLibraryUC.btResetMarkedLyricsDatabase.Enabled = false;
+ lyricsLibraryUC.btSave.Enabled = false;
btClose.Enabled = false;
}
else
{
- lyricUC.btAdd.Enabled = true;
- lyricUC.btDelete.Enabled = true;
- lyricUC.btImportSingle.Enabled = true;
- lyricUC.btImportLRC.Enabled = true;
- lyricUC.btResetLyricsDatabase.Enabled = true;
- lyricUC.btResetMarkedLyricsDatabase.Enabled = true;
- lyricUC.btSave.Enabled = true;
+ lyricsLibraryUC.btAdd.Enabled = true;
+ lyricsLibraryUC.btDelete.Enabled = true;
+ lyricsLibraryUC.btImportFiles.Enabled = true;
+ lyricsLibraryUC.btImportDirs.Enabled = true;
+ lyricsLibraryUC.btResetLyricsDatabase.Enabled = true;
+ lyricsLibraryUC.btResetMarkedLyricsDatabase.Enabled = true;
+ lyricsLibraryUC.btSave.Enabled = true;
btClose.Enabled = true;
}
}
private void btImportAll_Click(object sender, System.EventArgs e)
{
+
+ if (bgWorkerSearch.IsBusy)
+ {
+ Thread.Sleep(2000);
+ }
+
stopwatch.StartZero();
lbTimer.Text = "00:00.00";
timer = new System.Windows.Forms.Timer();
@@ -316,6 +324,7 @@
timer.Tick += new EventHandler(timer_Tick);
timer.Start();
+ stopCollectingOfTitles = false;
isSearching(true);
lbStep1a.Text = "The collecting of songs has started.";
lbStep2a.Text = "";
@@ -332,9 +341,6 @@
m_noOfCurrentlySearches = 0;
btImportAll.Enabled = false;
- progressBar.Enabled = true;
- progressBar.Value = 0;
- progressBar.Maximum = m_TotalTitles;
logFullFileName = Config.GetFile(Config.Dir.Log, logFileName);
@@ -361,6 +367,18 @@
m_DisregardVariousArtist = cbDisregardVariousArtist.Enabled && cbDisregardVariousArtist.Checked;
m_SearchOnlyMarkedSongs = cbSearchOnlyForMarkedSongs.Enabled && cbSearchOnlyForMarkedSongs.Checked;
+ if (m_SearchOnlyMarkedSongs)
+ {
+ progressBar.Maximum = LyricsMarkedDB.Count;
+ }
+ else
+ {
+ progressBar.Maximum = m_TotalTitles;
+ }
+
+ progressBar.Enabled = true;
+ progressBar.Value = 0;
+
m_SongsNotKnown = 0;
m_SongsWithLyric = 0;
m_SongsWithMark = 0;
@@ -374,6 +392,8 @@
lbSongsWithMark2.Text = "-";
lbLyricsFound2.Text = "-";
lbLyricsNotFound2.Text = "-";
+ lbSongsToSearch2.Text = "-";
+ lbDisregardedSongs2.Text = "-";
ArrayList sitesToSearch = new ArrayList();
@@ -491,7 +511,12 @@
if (lc != null)
{
lc.StopSearches = true;
+ // Save databases to disc
+ SerializeDB(LyricsDB);
+ SerializeDB(LyricsMarkedDB);
+ lyricsLibraryUC.updateLyricsTree();
}
+ bgWorkerSearch.CancelAsync();
StopThread();
progressBar.ResetText();
progressBar.Enabled = false;
@@ -501,12 +526,6 @@
btImportAll.Enabled = true;
btCancel.Enabled = false;
isSearching(false);
-
- // Save databases to disc
- SerializeDB(LyricsDB);
- SerializeDB(LyricsMarkedDB);
-
- lyricUC.updateLyricsTree();
}
// Called from worker thread using delegate and Control.Invoke
@@ -582,6 +601,14 @@
for (int albumIndex = 0; albumIndex < artists.Count; albumIndex++)
{
+
+ // If the user has cancelled the search => end this
+ if (stopCollectingOfTitles)
+ {
+ bgWorkerSearch.CancelAsync();
+ return;
+ }
+
string currentArtist = (string)artists[albumIndex];
dbs.GetSongsByArtist(currentArtist, ref songs);
@@ -594,16 +621,32 @@
/* Don't include song if one of the following is true
* 1. The artist isn't known (MP issue - should be deleted?)
* 2. Various artister should not be considered and the artist is "various artist"
- * 3. Song with a lyric in the tag should not be considered and the music tag has an lyrictext included */
+ * 3. Song with a lyric in the tag should not be considered, but instead include the file to the database right away */
MusicTag tag = null;
if (song.Artist.Equals("unknown")
- || (m_DisregardVariousArtist && (song.Artist.ToLower().Equals("various artists") || song.Artist.ToLower().Equals("diverse kunstnere")))
- || (m_DisregardSongWithLyricInTag && ((tag = MediaPortal.TagReader.TagReader.ReadTag(song.FileName)) != null) && tag.Lyrics.Equals("") == false))
+ || (m_DisregardVariousArtist && (song.Artist.ToLower().Equals("various artists") || song.Artist.ToLower().Equals("diverse kunstnere"))))
{
m_DisregardedSongs += 1;
}
+ else if ((m_DisregardSongWithLyricInTag && ((tag = MediaPortal.TagReader.TagReader.ReadTag(song.FileName)) != null) && tag.Lyrics.Equals("") == false))
+ {
+ m_SongsWithLyric += 1;
+
+ string capArtist = LyricUtil.capatalizeString(tag.Artist);
+ string capTitle = LyricUtil.capatalizeString(tag.Title);
+
+ if (MyLyricsUtil.isTrackInLyricsDatabase(LyricsDB, capArtist, capTitle).Equals(MyLyricsUtil.LYRIC_NOT_FOUND))
+ {
+ LyricsDB.Add(MyLyricsUtil.CorrectKeyFormat(capArtist, capTitle), new LyricsItem(capArtist, capTitle, tag.Lyrics, "Tag"));
+ }
+
+ if (MyLyricsUtil.isTrackInLyricsMarkedDatabase(LyricsMarkedDB, capArtist, capTitle).Equals(MyLyricsUtil.LYRIC_MARKED))
+ {
+ LyricsMarkedDB.Remove(MyLyricsUtil.CorrectKeyFormat(capArtist, capTitle));
+ }
+ }
else
{
int status = MyLyricsUtil.isTrackInLyricsDatabase(LyricsDB, song.Artist, song.Title);
@@ -624,6 +667,9 @@
string[] lyricId = new string[2] { song.Artist, song.Title };
lyricConfigInfosQueue.Enqueue(lyricId);
+
+ m_SongsToSearch = lyricConfigInfosQueue.Count;
+ bgWorkerSearch.ReportProgress(songNotKnown);
}
else if (status.Equals(MyLyricsUtil.LYRIC_FOUND))
{
@@ -634,7 +680,6 @@
m_SongsWithMark += 1;
}
}
- m_SongsToSearch = lyricConfigInfosQueue.Count;
bgWorkerSearch.ReportProgress(songNotKnown);
}
}
@@ -643,17 +688,18 @@
{
foreach (KeyValuePair<string, LyricsItem> kvp in LyricsMarkedDB)
{
+ int songNotKnown = 1;
if (++m_SongsNotKnown > m_Limit)
{
+ songNotKnown = 0;
bgWorkerSearch.ReportProgress(-1);
goto startSearch;
}
string[] lyricId = new string[2] { kvp.Value.Artist, kvp.Value.Title };
lyricConfigInfosQueue.Enqueue(lyricId);
+ m_SongsToSearch = lyricConfigInfosQueue.Count;
+ bgWorkerSearch.ReportProgress(songNotKnown);
}
-
- m_SongsToSearch = lyricConfigInfosQueue.Count;
- //bgWorkerSearch.ReportProgress(songNotKnown);
}
startSearch:
@@ -679,10 +725,17 @@
lc.StopSearches = false;
+
while (lyricConfigInfosQueue.Count != 0)
{
- if (lc == null)
+ // If the user has cancelled the search => end this
+ if (stopCollectingOfTitles && lc != null)
+ {
+ bgWorkerSearch.CancelAsync();
return;
+ }
+ else if (lc == null)
+ return;
if (m_noOfCurrentlySearches < m_NoOfCurrentSearchesAllowed && lc.StopSearches == false)
{
@@ -690,6 +743,7 @@
string[] lyricID = (string[])lyricConfigInfosQueue.Dequeue();
lc.addNewLyricSearch(lyricID[0], lyricID[1]);
}
+
Thread.Sleep(100);
}
}
@@ -725,19 +779,24 @@
private void btCancel_Click(object sender, EventArgs e)
{
+ stopCollectingOfTitles = true;
+
if (lc != null)
{
lc.finishThread(m_artist, m_track, "The search has been cancelled by the user.", "none");
lc.Dispose();
lc = null;
- progressBar.ResetText();
- progressBar.Value = 0;
+ }
+ else
+ {
+ m_EventStopThread.Set();
+ ThreadFinishedMethod(m_artist, m_track, "The search has been cancelled by the user.", "none");
+ }
- m_LyricControllerThread = null;
-
- //bgWorkerSearch.Dispose();
- //bgWorkerSearch = null;
- }
+ bgWorkerSearch.CancelAsync();
+ progressBar.ResetText();
+ progressBar.Value = 0;
+ m_LyricControllerThread = null;
}
internal static void SerializeDB(LyricsDatabase ldb)
@@ -811,5 +870,13 @@
cbMarkSongsWithNoLyrics.Enabled = true;
}
}
+
+ private void tabControl_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (tabControl.SelectedIndex == 0)
+ {
+ lyricsLibraryUC.treeView.Select();
+ }
+ }
}
}
\ No newline at end of file
Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.Designer.cs
===================================================================
--- trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.Designer.cs 2007-03-14 13:51:47 UTC (rev 187)
+++ trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.Designer.cs 2007-03-14 17:01:09 UTC (rev 188)
@@ -22,12 +22,12 @@
this.lbSource = new MediaPortal.UserInterface.Controls.MPLabel();
this.comboDatabase = new MediaPortal.UserInterface.Controls.MPComboBox();
this.lbDatabase = new MediaPortal.UserInterface.Controls.MPLabel();
- this.lbTestSecondsLeft = new System.Windows.Forms.Label();
- this.btImportLRC = new MediaPortal.UserInterface.Controls.MPButton();
+ this.lbLRCTest = new System.Windows.Forms.Label();
+ this.btImportDirs = new MediaPortal.UserInterface.Controls.MPButton();
this.lbSongs2 = new MediaPortal.UserInterface.Controls.MPLabel();
this.tbLyrics = new MediaPortal.UserInterface.Controls.MPTextBox();
this.lbSongs = new MediaPortal.UserInterface.Controls.MPLabel();
- this.btImportSingle = new MediaPortal.UserInterface.Controls.MPButton();
+ this.btImportFiles = new MediaPortal.UserInterface.Controls.MPButton();
this.lbArtists2 = new MediaPortal.UserInterface.Controls.MPLabel();
this.lbTitle = new MediaPortal.UserInterface.Controls.MPLabel();
this.lbArtists = new MediaPortal.UserInterface.Controls.MPLabel();
@@ -36,7 +36,7 @@
this.btResetMarkedLyricsDatabase = new System.Windows.Forms.Button();
this.btResetLyricsDatabase = new System.Windows.Forms.Button();
this.lbResetDatabase = new MediaPortal.UserInterface.Controls.MPLabel();
- this.openFileDialog2 = new System.Windows.Forms.OpenFileDialog();
+ this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
this.gbLibrary.SuspendLayout();
this.gbResetDatabase.SuspendLayout();
this.SuspendLayout();
@@ -54,11 +54,12 @@
//
// openFileDialog1
//
- this.openFileDialog1.FileName = "ARTIST - TITLE.txt";
- this.openFileDialog1.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*";
+ this.openFileDialog1.Filter = "Text and LRC files|*-*.txt;*.lrc|Text files|*-*.txt|LRC files|*.lrc|All files|*.*" +
+ "";
this.openFileDialog1.InitialDirectory = "c:\\\\";
this.openFileDialog1.Multiselect = true;
this.openFileDialog1.RestoreDirectory = true;
+ this.openFileDialog1.Title = "Select lyrics files to include";
//
// btDelete
//
@@ -85,12 +86,12 @@
this.gbLibrary.Controls.Add(this.lbSource);
this.gbLibrary.Controls.Add(this.comboDatabase);
this.gbLibrary.Controls.Add(this.lbDatabase);
- this.gbLibrary.Controls.Add(this.lbTestSecondsLeft);
- this.gbLibrary.Controls.Add(this.btImportLRC);
+ this.gbLibrary.Controls.Add(this.lbLRCTest);
+ this.gbLibrary.Controls.Add(this.btImportDirs);
this.gbLibrary.Controls.Add(this.lbSongs2);
this.gbLibrary.Controls.Add(this.tbLyrics);
this.gbLibrary.Controls.Add(this.lbSongs);
- this.gbLibrary.Controls.Add(this.btImportSingle);
+ this.gbLibrary.Controls.Add(this.btImportFiles);
this.gbLibrary.Controls.Add(this.lbArtists2);
this.gbLibrary.Controls.Add(this.lbTitle);
this.gbLibrary.Controls.Add(this.lbArtists);
@@ -99,6 +100,7 @@
this.gbLibrary.Controls.Add(this.btDelete);
this.gbLibrary.Controls.Add(this.btSave);
this.gbLibrary.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+ this.gbLibrary.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.gbLibrary.Location = new System.Drawing.Point(3, 3);
this.gbLibrary.Name = "gbLibrary";
this.gbLibrary.Size = new System.Drawing.Size(515, 362);
@@ -137,25 +139,27 @@
this.lbDatabase.TabIndex = 26;
this.lbDatabase.Text = "Database:";
//
- // lbTestSecondsLeft
+ // lbLRCTest
//
- this.lbTestSecondsLeft.AutoSize = true;
- this.lbTestSecondsLeft.Location = new System.Drawing.Point(215, 335);
- this.lbTestSecondsLeft.Name = "lbTestSecondsLeft";
- this.lbTestSecondsLeft.Size = new System.Drawing.Size(93, 13);
- this.lbTestSecondsLeft.TabIndex = 25;
- this.lbTestSecondsLeft.Text = "SecondsLeftLabel";
- this.lbTestSecondsLeft.Visible = false;
+ this.lbLRCTest.AutoSize = true;
+ this.lbLRCTest.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lbLRCTest.Location = new System.Drawing.Point(440, 313);
+ this.lbLRCTest.MaximumSize = new System.Drawing.Size(60, 13);
+ this.lbLRCTest.MinimumSize = new System.Drawing.Size(60, 13);
+ this.lbLRCTest.Name = "lbLRCTest";
+ this.lbLRCTest.Size = new System.Drawing.Size(60, 13);
+ this.lbLRCTest.TabIndex = 25;
+ this.lbLRCTest.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
- // btImportLRC
+ // btImportDirs
//
- this.btImportLRC.Location = new System.Drawing.Point(95, 330);
- this.btImportLRC.Name = "btImportLRC";
- this.btImportLRC.Size = new System.Drawing.Size(75, 23);
- this.btImportLRC.TabIndex = 24;
- this.btImportLRC.Text = "Import &lrc";
- this.btImportLRC.UseVisualStyleBackColor = true;
- this.btImportLRC.Click += new System.EventHandler(this.btImportLRC_Click);
+ this.btImportDirs.Location = new System.Drawing.Point(95, 330);
+ this.btImportDirs.Name = "btImportDirs";
+ this.btImportDirs.Size = new System.Drawing.Size(75, 23);
+ this.btImportDirs.TabIndex = 24;
+ this.btImportDirs.Text = "Import &dirs";
+ this.btImportDirs.UseVisualStyleBackColor = true;
+ this.btImportDirs.Click += new System.EventHandler(this.btImportDIRS_Click);
//
// lbSongs2
//
@@ -186,15 +190,15 @@
this.lbSongs.TabIndex = 22;
this.lbSongs.Text = "Songs:";
//
- // btImportSingle
+ // btImportFiles
//
- this.btImportSingle.Location = new System.Drawing.Point(14, 330);
- this.btImportSingle.Name = "btImportSingle";
- this.btImportSingle.Size = new System.Drawing.Size(75, 23);
- this.btImportSingle.TabIndex = 4;
- this.btImportSingle.Text = "Import &files";
- this.btImportSingle.UseVisualStyleBackColor = true;
- this.btImportSingle.Click += new System.EventHandler(this.btImportSingle_Click);
+ this.btImportFiles.Location = new System.Drawing.Point(14, 330);
+ this.btImportFiles.Name = "btImportFiles";
+ this.btImportFiles.Size = new System.Drawing.Size(75, 23);
+ this.btImportFiles.TabIndex = 4;
+ this.btImportFiles.Text = "Import &files";
+ this.btImportFiles.UseVisualStyleBackColor = true;
+ this.btImportFiles.Click += new System.EventHandler(this.btImportSingle_Click);
//
// lbArtists2
//
@@ -270,15 +274,14 @@
this.lbResetDatabase.Name = "lbResetDatabase";
this.lbResetDatabase.Size = new System.Drawing.Size(320, 41);
this.lbResetDatabase.TabIndex = 9;
- this.lbResetDatabase.Text = "Reset the lyrics database or the database with marked titles.\r\n\r\nAll data in each" +
- " database that is reset is lost for ever";
+ this.lbResetDatabase.Text = "Reset the lyrics database or the database with marked titles.\r\n\r\nAll data in a re" +
+ "set database is lost forever.";
//
- // openFileDialog2
+ // folderBrowserDialog1
//
- this.openFileDialog2.Filter = "lrc files (*.lrc)|*.lrc|All files (*.*)|*.*";
- this.openFileDialog2.InitialDirectory = "c:\\\\";
- this.openFileDialog2.Multiselect = true;
- this.openFileDialog2.RestoreDirectory = true;
+ this.folderBrowserDialog1.Description = "Select a directory to search for lyrics or lrc-files. All files matching the patt" +
+ "erns [Artist]-[Title].txt and *.lrc will be included to the lyrics database.";
+ this.folderBrowserDialog1.ShowNewFolderButton = false;
//
// MyLyricsSetup_LyricsLibrary
//
@@ -300,7 +303,6 @@
private System.Windows.Forms.OpenFileDialog openFileDialog1;
private MediaPortal.UserInterface.Controls.MPGroupBox gbLibrary;
private MediaPortal.UserInterface.Controls.MPTextBox tbLyrics;
- private System.Windows.Forms.TreeView treeView;
private MediaPortal.UserInterface.Controls.MPGroupBox gbResetDatabase;
private MediaPortal.UserInterface.Controls.MPLabel lbSongs;
private MediaPortal.UserInterface.Controls.MPLabel lbArtists;
@@ -309,17 +311,18 @@
internal MediaPortal.UserInterface.Controls.MPButton btSave;
internal System.Windows.Forms.Button btDelete;
internal System.Windows.Forms.Button btAdd;
- internal MediaPortal.UserInterface.Controls.MPButton btImportSingle;
- internal MediaPortal.UserInterface.Controls.MPButton btImportLRC;
- private System.Windows.Forms.OpenFileDialog openFileDialog2;
+ internal MediaPortal.UserInterface.Controls.MPButton btImportFiles;
+ internal MediaPortal.UserInterface.Controls.MPButton btImportDirs;
private MediaPortal.UserInterface.Controls.MPLabel lbDatabase;
internal System.Windows.Forms.Button btResetMarkedLyricsDatabase;
internal System.Windows.Forms.Button btResetLyricsDatabase;
private MediaPortal.UserInterface.Controls.MPLabel lbResetDatabase;
private MediaPortal.UserInterface.Controls.MPComboBox comboDatabase;
- private System.Windows.Forms.Label lbTestSecondsLeft;
+ private System.Windows.Forms.Label lbLRCTest;
private MediaPortal.UserInterface.Controls.MPLabel lbTitle;
private MediaPortal.UserInterface.Controls.MPLabel lbSource;
private System.ComponentModel.IContainer components;
+ private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
+ internal System.Windows.Forms.TreeView treeView;
}
}
Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.cs
===================================================================
--- trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.cs 2007-03-14 13:51:47 UTC (rev 187)
+++ trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.cs 2007-03-14 17:01:09 UTC (rev 188)
@@ -27,16 +27,16 @@
public partial class MyLyricsSetup_LyricsLibrary : UserControl
{
+ static string m_CurrentArtist = "";
+ static string m_CurrentTitle = "";
string m_OriginalLyric = "";
- string m_CurrentArtist = "";
- string m_CurrentTitle = "";
+
Form m_Form = null;
int m_NoOfArtists;
int m_NoOfTitles;
LRC.SimpleLRC lrc;
- IEnumerator enumerator;
System.Windows.Forms.Timer timer = null;
Stopwatch stopwatch = null;
string nextTimeToShow;
@@ -45,7 +45,11 @@
const int SHIFT_WHEN_HIT = 15;
internal static LyricsDatabase CurrentDB;
private int currentDBIndex = 0;
+ enum TYPEOFLYRICS : int {NONE, NORMAL, LRC};
+ static string lastChosenArtist = "";
+ static string lastChosenTitle = "";
+
public MyLyricsSetup_LyricsLibrary(Form form)
{
this.m_Form = form;
@@ -84,6 +88,16 @@
lbSongs2.Text = m_NoOfTitles.ToString();
}
+ private void resetFields()
+ {
+ lbArtists2.Text = "";
+ lbTitle.Text = "";
+ lbLRCTest.Text = "";
+ lbSongs2.Text = "";
+ lbSource.Text = "";
+ tbLyrics.Text = "";
+ }
+
private ArrayList getTitlesByArtist(string artist)
{
ArrayList titles = new ArrayList();
@@ -131,13 +145,22 @@
/// <param name="artist"></param>
/// <param name="title"></param>
/// <param name="lyric"></param>
- private void AddSong(string artist, string title, string lyrics, string site)
+ private bool AddSong(string artist, string title, string lyrics, string site)
{
LyricsItem item = new LyricsItem(artist, title, lyrics, site);
- CurrentDB.Add(MyLyricsUtil.CorrectKeyFormat(artist, title), item);
- AddSong(item);
- treeView.Update();
- MyLyricsSetup.SerializeDB(CurrentDB);
+
+ if (MyLyricsUtil.isTrackInLyricsDatabase(CurrentDB, artist, title).Equals(MyLyricsUtil.LYRIC_NOT_FOUND))
+ {
+ CurrentDB.Add(MyLyricsUtil.CorrectKeyFormat(artist, title), item);
+ AddSong(item);
+ treeView.Update();
+ MyLyricsSetup.SerializeDB(CurrentDB);
+ return true;
+ }
+ else
+ {
+ return false;
+ }
}
private void RemoveArtist(string artist)
@@ -198,7 +221,7 @@
return false;
}
- private void updateInfo()
+ internal void updateInfo()
{
m_CurrentArtist = "";
m_CurrentTitle = "";
@@ -316,7 +339,14 @@
private void treeView_AfterSelect(object sender, TreeViewEventArgs e)
{
updateInfo();
- lbTestSecondsLeft.Text = "The selected lyric is " + (isSelectedLyricALRC() ? "" : "NOT ") + "a valid LRC-file." ;
+ if (isSelectedLyricALRC())
+ {
+ lbLRCTest.Text = "(valid LRC)";
+ }
+ else
+ {
+ lbLRCTest.Text = "";
+ }
}
private void btAdd_Click(object sender, EventArgs e)
@@ -330,12 +360,18 @@
m_CurrentArtist = LyricUtil.capatalizeString(artist);
m_CurrentTitle = LyricUtil.capatalizeString(title);
- AddSong(m_CurrentArtist, m_CurrentTitle, lyrics, "Manual added");
- highlightSong(m_CurrentArtist, m_CurrentTitle, false);
- updateLyricDatabaseStats();
+ if (AddSong(m_CurrentArtist, m_CurrentTitle, lyrics, "Manual added"))
+ {
+ highlightSong(m_CurrentArtist, m_CurrentTitle, false);
+ updateLyricDatabaseStats();
+ }
+ else
+ {
+ MessageBox.Show("The title \"" + artist + " - " + title + "\" is already in the database");
+ }
}
- private void highlightSong(string artist, string title, bool previousSong)
+ internal void highlightSong(string artist, string title, bool previousSong)
{
if (artist.Equals("") || title.Equals(""))
{
@@ -367,48 +403,29 @@
private void btImportSingle_Click(object sender, EventArgs e)
{
- TextReader textReader = null;
-
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
try
{
-
string[] files = openFileDialog1.FileNames;
for (int i = 0; i < files.Length; i++)
{
- FileInfo fileInfo = new FileInfo(files[i]);
- string fileStringArtist = "";
- string fileStringTitle = "";
- string fileName = fileInfo.Name;
+ string fileName = new FileInfo(files[i]).Name;
if (fileName.Contains("-"))
{
- int index = fileName.IndexOf("-");
- fileStringArtist = fileName.Substring(0, index);
- fileStringTitle = fileName.Substring(index + 1);
- fileStringArtist = fileStringArtist.Trim();
- fileStringTitle = fileStringTitle.Trim();
- fileStringTitle = fileStringTitle.Replace(".txt", "");
- textReader = new StreamReader(files[i]);
- string line = "";
- string lyrics = "";
-
- while ((line = textReader.ReadLine()) != null)
+ if (inspectFileNameAndAddToDatabaseIfValidLyrics(files[i]) != (int)TYPEOFLYRICS.NONE)
{
- lyrics += line + Environment.NewLine;
+ updateLyricDatabaseStats();
}
- lyrics = lyrics.Trim();
- textReader.Close();
-
- string capArtist = LyricUtil.capatalizeString(fileStringArtist);
- string capTitle = LyricUtil.capatalizeString(fileStringTitle);
-
- AddSong(capArtist, capTitle, lyrics, "Text file");
- updateLyricDatabaseStats();
+ else
+ {
+ MessageBox.Show("The title is already in the database");
+ }
+
}
else
{
- MessageBox.Show("The file \"" + fileName + "\" do not have a valid filename (ARTIST - TITLE.txt).");
+ MessageBox.Show("The file \"" + fileName + "\" does not have a valid filename ([Artist]-[Title].txt or *.lrc).");
}
}
}
@@ -419,7 +436,77 @@
}
}
+ private int inspectFileNameAndAddToDatabaseIfValidLyrics(string filePath)
+ {
+ TextReader textReader = null;
+
+ FileInfo fileInfo = new FileInfo(filePath);
+
+
+ if (fileInfo.Extension.Equals(".txt"))
+ {
+
+ string fileStringArtist = "";
+ string fileStringTitle = "";
+ string fileName = fileInfo.Name;
+
+
+ int index = fileName.IndexOf("-");
+ fileStringArtist = fileName.Substring(0, index);
+ fileStringTitle = fileName.Substring(index + 1);
+ fileStringArtist = fileStringArtist.Trim();
+ fileStringTitle = fileStringTitle.Trim();
+
+ index = fileStringTitle.LastIndexOf('.');
+ fileStringTitle = fileStringTitle.Substring(0, index);
+
+ textReader = new StreamReader(filePath);
+ string line = "";
+ string lyrics = "";
+
+ while ((line = textReader.ReadLine()) != null)
+ {
+ lyrics += line + Environment.NewLine;
+ }
+ lyrics = lyrics.Trim();
+ textReader.Close();
+
+ string capArtist = LyricUtil.capatalizeString(fileStringArtist);
+ string capTitle = LyricUtil.capatalizeString(fileStringTitle);
+
+ if (AddSong(capArtist, capTitle, lyrics, "Text file"))
+ {
+ return (int)TYPEOFLYRICS.NORMAL;
+ }
+ else
+ {
+ return (int)TYPEOFLYRICS.NONE;
+ }
+ }
+ else
+ {
+ lrc = new LRC.SimpleLRC(filePath);
+
+ if (lrc.IsValid && !lrc.Artist.Equals("") && !lrc.Title.Equals(""))
+ {
+ if (AddSong(lrc.Artist, lrc.Title, lrc.Lyric.Trim(), "LRC-file"))
+ {
+ return (int)TYPEOFLYRICS.LRC;
+ }
+ else
+ {
+ return (int)TYPEOFLYRICS.NONE;
+ }
+ }
+ else
+ {
+ return (int)TYPEOFLYRICS.NONE;
+ }
+ }
+ }
+
+
private void btUpgradeDatabase_Click(object sender, EventArgs e)
{
if (MessageBox.Show(this, "Are you sure the lyrics database should be upgraded?", "Upgrade lyrics database", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes)
@@ -428,119 +515,94 @@
}
}
- private void btImportLRC_Click(object sender, EventArgs e)
+ private void btImportDIRS_Click(object sender, EventArgs e)
{
- if (openFileDialog2.ShowDialog() == DialogResult.OK)
+ if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
{
try
{
- string[] files = openFileDialog2.FileNames;
- for (int i = 0; i < files.Length; i++)
+ string path = folderBrowserDialog1.SelectedPath;
+
+ int numberOfLyrics = 0;
+ int numberOfLRCS = 0;
+ int numberOfExisting = 0;
+
+ DirectoryInfo dirInfo = new DirectoryInfo(path);
+ FileInfo[] fileInfos = dirInfo.GetFiles("*-*.txt", SearchOption.AllDirectories);
+
+ foreach (FileInfo fileInfo in fileInfos)
{
- lrc = new LRC.SimpleLRC(files[i]);
-
- if (lrc == null)
+ int typeAdded;
+ if ((typeAdded = inspectFileNameAndAddToDatabaseIfValidLyrics(fileInfo.FullName)) == (int)TYPEOFLYRICS.NORMAL)
{
- MessageBox.Show("The lrc-file couldn't not be read properly." + Environment.NewLine + "The reading of the files was suspended.");
- return;
+ ++numberOfLyrics;
}
- else if (lrc.IsValid == false)
+ else if (typeAdded == (int)TYPEOFLYRICS.LRC)
{
- MessageBox.Show("The selected file is not a valid lrc-file.");
- return;
+ ++numberOfLRCS;
}
- else if (lrc.Lyric.Equals(""))
+ else
{
- MessageBox.Show("The lrc-file couldn't not be read properly." + Environment.NewLine + "It seemed to be empty.");
- return;
+ ++numberOfExisting;
}
+ }
- enumerator = lrc.SimpleLRCTimeAndLineCollection.GetEnumerator();
+ dirInfo = new DirectoryInfo(path);
+ fileInfos = dirInfo.GetFiles("*.lrc", SearchOption.AllDirectories);
- if (!lrc.Artist.Equals("") && !lrc.Title.Equals(""))
+ foreach (FileInfo fileInfo in fileInfos)
+ {
+ int typeAdded;
+ if ((typeAdded = inspectFileNameAndAddToDatabaseIfValidLyrics(fileInfo.FullName)) == (int)TYPEOFLYRICS.NORMAL)
{
- AddSong(LyricUtil.capatalizeString(lrc.Artist), LyricUtil.capatalizeString(lrc.Title), lrc.Lyric.Trim(), "LRC-file");
+ ++numberOfLyrics;
}
+ else if (typeAdded == (int)TYPEOFLYRICS.LRC)
+ {
+ ++numberOfLRCS;
+ }
+ else
+ {
+ ++numberOfExisting;
+ }
+ }
- updateLyricDatabaseStats();
- }
+
+ updateLyricDatabaseStats();
+
+ MessageBox.Show("Number of lyris added :" + (numberOfLRCS + numberOfLyrics + numberOfExisting) + Environment.NewLine
+ + "Number of basic lyrics added:" + numberOfLyrics + Environment.NewLine
+ + "Number of LRCs added: " + numberOfLRCS + Environment.NewLine
+ + "Number of lyrics already in database: " + numberOfExisting);
+
}
catch (Exception ex)
{
MessageBox.Show("Error: " + ex.Message);
}
}
-
- //DialogResult result = MessageBox.Show("Vil du teste?", "Test af lrc-file", MessageBoxButtons.YesNo);
-
- //if (result == System.Windows.Forms.DialogResult.Yes)
- //{
- // tbLyrics.Enabled = true;
- // tbLyrics.Text = "";
- // // setup timer and stopwatch
- // timer = new System.Windows.Forms.Timer();
- // stopwatch = new Stopwatch();
-
- // calculateNextInterval();
-
- // timer.Enabled = true;
- // timer.Tick += new System.EventHandler(OnTimerEvent);
-
- // timer.Start();
- // stopwatch.Start();
- //}
}
- public void OnTimerEvent(object source, EventArgs e)
- {
- if (++lineCounter > SHIFT_WHEN_HIT)
- {
- lineCounter = 0;
- tbLyrics.Text = "";
- }
- tbLyrics.Text += (nextTimeToShow + " - " + nextLineToShow);
- calculateNextInterval();
- }
- private void calculateNextInterval()
- {
- if (enumerator.MoveNext())
- {
- LRC.SimpleLRCTimeAndLine currentLine = (LRC.SimpleLRCTimeAndLine)enumerator.Current;
- while (currentLine.Time == 0)
- {
- tbLyrics.Text += (currentLine.TimeString + " - " + currentLine.Line);
- ++lineCounter;
- enumerator.MoveNext();
- currentLine = (LRC.SimpleLRCTimeAndLine)enumerator.Current;
- }
-
- nextTimeToShow = currentLine.TimeString;
- nextLineToShow = currentLine.Line;
- timer.Interval = (int)(currentLine.Time - stopwatch.ElapsedMilliseconds);
- lbTestSecondsLeft.Text = ((long)(stopwatch.ElapsedMilliseconds/1000)).ToString();
- }
- else
- {
- timer.Stop();
- stopwatch.Stop();
- timer.Dispose();
- }
- }
-
private void comboDatabase_SelectedIndexChanged(object sender, EventArgs e)
{
if (comboDatabase.SelectedIndex == 0 && currentDBIndex != 0)
{
+ resetFields();
currentDBIndex = 0;
CurrentDB = MyLyricsSetup.LyricsDB;
+ btImportFiles.Enabled = true;
+ btImportDirs.Enabled = true;
updateLyricsTree();
}
else if (comboDatabase.SelectedIndex == 1 && currentDBIndex != 1)
{
+ resetFields();
currentDBIndex = 1;
CurrentDB = MyLyricsSetup.LyricsMarkedDB;
+ btImportFiles.Enabled = false;
+ btImportDirs.Enabled = false;
updateLyricsTree();
}
}
@@ -552,7 +614,8 @@
string path = MediaPortal.Configuration.Config.GetFolder(MediaPortal.Configuration.Config.Dir.Database) + "\\" + MyLyricsSetup.LyricsDBName;
FileStream fs = new FileStream(path, FileMode.Create);
BinaryFormatter bf = new BinaryFormatter();
- bf.Serialize(fs, new LyricsDatabase());
+ MyLyricsSetup.LyricsDB = new LyricsDatabase();
+ bf.Serialize(fs, MyLyricsSetup.LyricsDB);
fs.Close();
CurrentDB = MyLyricsSetup.LyricsDB;
@@ -570,10 +633,11 @@
string path = MediaPortal.Configuration.Config.GetFolder(MediaPortal.Configuration.Config.Dir.Database) + "\\" + MyLyricsSetup.LyricsMarkedDBName;
FileStream fs = new FileStream(path, FileMode.Create);
BinaryFormatter bf = new BinaryFormatter();
- bf.Serialize(fs, new LyricsDatabase());
+ MyLyricsSetup.LyricsMarkedDB = new LyricsDatabase();
+ bf.Serialize(fs, MyLyricsSetup.LyricsMarkedDB);
fs.Close();
- CurrentDB = MyLyricsSetup.LyricsDB;
+ CurrentDB = MyLyricsSetup.LyricsMarkedDB;
comboDatabase.SelectedIndex = 1;
updateLyricsTree();
updateInfo();
Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.resx
===================================================================
--- trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.resx 2007-03-14 13:51:47 UTC (rev 187)
+++ trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.resx 2007-03-14 17:01:09 UTC (rev 188)
@@ -120,7 +120,7 @@
<metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
- <metadata name="openFileDialog2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <metadata name="folderBrowserDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>147, 17</value>
</metadata>
</root>
\ No newline at end of file
Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyricsUtil.cs
===================================================================
--- trunk/plugins/MyLyrics/My Lyrics/MyLyricsUtil.cs 2007-03-14 13:51:47 UTC (rev 187)
+++ trunk/plugins/MyLyrics/My Lyrics/MyLyricsUtil.cs 2007-03-14 17:01:09 UTC (rev 188)
@@ -23,17 +23,20 @@
string capatalizedTitle = LyricUtil.capatalizeString(title);
lyricText = lyricDB[CorrectKeyFormat(capatalizedArtist, capatalizedTitle)].Lyrics;
-
}
catch
{
return LYRIC_NOT_FOUND;
}
- if (lyricText.Equals(""))
- return LYRIC_NOT_FOUND;
- else if (lyricText.Equals(MARK))
+
+ if (lyricText.Equals(MARK))
+ {
return LYRIC_MARKED;
- return LYRIC_FOUND;
+ }
+ else
+ {
+ return LYRIC_FOUND;
+ }
}
internal static int isTrackInLyricsMarkedDatabase(LyricsDatabase lyricMarkedDB, string artist, string title)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <an...@us...> - 2007-03-14 13:51:49
|
Revision: 187
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=187&view=rev
Author: and-81
Date: 2007-03-14 06:51:47 -0700 (Wed, 14 Mar 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/ComSkipLauncher TVE2/Configuration.Designer.cs
trunk/plugins/ComSkipLauncher TVE3/PluginSetup.Designer.cs
Modified: trunk/plugins/ComSkipLauncher TVE2/Configuration.Designer.cs
===================================================================
--- trunk/plugins/ComSkipLauncher TVE2/Configuration.Designer.cs 2007-03-14 13:30:54 UTC (rev 186)
+++ trunk/plugins/ComSkipLauncher TVE2/Configuration.Designer.cs 2007-03-14 13:51:47 UTC (rev 187)
@@ -47,6 +47,8 @@
this.labelProgram = new System.Windows.Forms.Label();
this.groupBoxTest = new System.Windows.Forms.GroupBox();
this.groupBoxWhen = new System.Windows.Forms.GroupBox();
+ this.labelComSkip = new System.Windows.Forms.Label();
+ this.linkLabel = new System.Windows.Forms.LinkLabel();
this.groupBoxWhat.SuspendLayout();
this.groupBoxTest.SuspendLayout();
this.groupBoxWhen.SuspendLayout();
@@ -55,10 +57,10 @@
// buttonOK
//
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonOK.Location = new System.Drawing.Point(216, 248);
+ this.buttonOK.Location = new System.Drawing.Point(216, 304);
this.buttonOK.Name = "buttonOK";
this.buttonOK.Size = new System.Drawing.Size(56, 24);
- this.buttonOK.TabIndex = 2;
+ this.buttonOK.TabIndex = 5;
this.buttonOK.Text = "OK";
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
@@ -67,10 +69,10 @@
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
- this.buttonCancel.Location = new System.Drawing.Point(280, 248);
+ this.buttonCancel.Location = new System.Drawing.Point(280, 304);
this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(56, 24);
- this.buttonCancel.TabIndex = 3;
+ this.buttonCancel.TabIndex = 6;
this.buttonCancel.Text = "Cancel";
this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
@@ -195,7 +197,7 @@
this.groupBoxWhat.Location = new System.Drawing.Point(8, 64);
this.groupBoxWhat.Name = "groupBoxWhat";
this.groupBoxWhat.Size = new System.Drawing.Size(328, 112);
- this.groupBoxWhat.TabIndex = 2;
+ this.groupBoxWhat.TabIndex = 1;
this.groupBoxWhat.TabStop = false;
this.groupBoxWhat.Text = "What to launch";
//
@@ -231,7 +233,7 @@
this.groupBoxTest.Location = new System.Drawing.Point(8, 184);
this.groupBoxTest.Name = "groupBoxTest";
this.groupBoxTest.Size = new System.Drawing.Size(328, 56);
- this.groupBoxTest.TabIndex = 1;
+ this.groupBoxTest.TabIndex = 2;
this.groupBoxTest.TabStop = false;
this.groupBoxTest.Text = "Test launch";
//
@@ -244,17 +246,42 @@
this.groupBoxWhen.Location = new System.Drawing.Point(8, 8);
this.groupBoxWhen.Name = "groupBoxWhen";
this.groupBoxWhen.Size = new System.Drawing.Size(328, 48);
- this.groupBoxWhen.TabIndex = 4;
+ this.groupBoxWhen.TabIndex = 0;
this.groupBoxWhen.TabStop = false;
this.groupBoxWhen.Text = "When to launch";
//
+ // labelComSkip
+ //
+ this.labelComSkip.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.labelComSkip.Location = new System.Drawing.Point(8, 248);
+ this.labelComSkip.Name = "labelComSkip";
+ this.labelComSkip.Size = new System.Drawing.Size(328, 16);
+ this.labelComSkip.TabIndex = 3;
+ this.labelComSkip.Text = "Get ComSkip here:";
+ this.labelComSkip.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ //
+ // linkLabel
+ //
+ this.linkLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.linkLabel.Location = new System.Drawing.Point(8, 272);
+ this.linkLabel.Name = "linkLabel";
+ this.linkLabel.Size = new System.Drawing.Size(328, 16);
+ this.linkLabel.TabIndex = 4;
+ this.linkLabel.TabStop = true;
+ this.linkLabel.Text = "http://www.kaashoek.com/comskip/";
+ this.linkLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ //
// Configuration
//
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(352, 289);
+ this.ClientSize = new System.Drawing.Size(352, 345);
+ this.Controls.Add(this.labelComSkip);
+ this.Controls.Add(this.linkLabel);
this.Controls.Add(this.groupBoxWhen);
this.Controls.Add(this.groupBoxWhat);
this.Controls.Add(this.groupBoxTest);
@@ -262,7 +289,7 @@
this.Controls.Add(this.buttonOK);
this.MaximizeBox = false;
this.MinimizeBox = false;
- this.MinimumSize = new System.Drawing.Size(360, 316);
+ this.MinimumSize = new System.Drawing.Size(360, 372);
this.Name = "Configuration";
this.ShowIcon = false;
this.ShowInTaskbar = false;
@@ -297,5 +324,7 @@
private System.Windows.Forms.Button buttonProgram;
private System.Windows.Forms.TextBox textBoxProgram;
private System.Windows.Forms.GroupBox groupBoxWhen;
+ private System.Windows.Forms.Label labelComSkip;
+ private System.Windows.Forms.LinkLabel linkLabel;
}
}
\ No newline at end of file
Modified: trunk/plugins/ComSkipLauncher TVE3/PluginSetup.Designer.cs
===================================================================
--- trunk/plugins/ComSkipLauncher TVE3/PluginSetup.Designer.cs 2007-03-14 13:30:54 UTC (rev 186)
+++ trunk/plugins/ComSkipLauncher TVE3/PluginSetup.Designer.cs 2007-03-14 13:51:47 UTC (rev 187)
@@ -44,6 +44,8 @@
this.labelProgram = new System.Windows.Forms.Label();
this.buttonProgram = new System.Windows.Forms.Button();
this.textBoxProgram = new System.Windows.Forms.TextBox();
+ this.linkLabel = new System.Windows.Forms.LinkLabel();
+ this.labelComSkip = new System.Windows.Forms.Label();
this.groupBoxTest.SuspendLayout();
this.groupBoxWhen.SuspendLayout();
this.groupBoxWhat.SuspendLayout();
@@ -57,7 +59,7 @@
this.groupBoxTest.Location = new System.Drawing.Point(8, 184);
this.groupBoxTest.Name = "groupBoxTest";
this.groupBoxTest.Size = new System.Drawing.Size(328, 56);
- this.groupBoxTest.TabIndex = 1;
+ this.groupBoxTest.TabIndex = 2;
this.groupBoxTest.TabStop = false;
this.groupBoxTest.Text = "Test";
//
@@ -103,7 +105,7 @@
this.groupBoxWhen.Location = new System.Drawing.Point(8, 8);
this.groupBoxWhen.Name = "groupBoxWhen";
this.groupBoxWhen.Size = new System.Drawing.Size(328, 48);
- this.groupBoxWhen.TabIndex = 6;
+ this.groupBoxWhen.TabIndex = 0;
this.groupBoxWhen.TabStop = false;
this.groupBoxWhen.Text = "When to launch";
//
@@ -138,7 +140,7 @@
this.groupBoxWhat.Location = new System.Drawing.Point(8, 64);
this.groupBoxWhat.Name = "groupBoxWhat";
this.groupBoxWhat.Size = new System.Drawing.Size(328, 112);
- this.groupBoxWhat.TabIndex = 5;
+ this.groupBoxWhat.TabIndex = 1;
this.groupBoxWhat.TabStop = false;
this.groupBoxWhat.Text = "What to launch";
//
@@ -204,14 +206,35 @@
this.textBoxProgram.Size = new System.Drawing.Size(280, 20);
this.textBoxProgram.TabIndex = 1;
//
+ // linkLabel
+ //
+ this.linkLabel.Location = new System.Drawing.Point(8, 272);
+ this.linkLabel.Name = "linkLabel";
+ this.linkLabel.Size = new System.Drawing.Size(328, 16);
+ this.linkLabel.TabIndex = 4;
+ this.linkLabel.TabStop = true;
+ this.linkLabel.Text = "http://www.kaashoek.com/comskip/";
+ this.linkLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ //
+ // labelComSkip
+ //
+ this.labelComSkip.Location = new System.Drawing.Point(8, 248);
+ this.labelComSkip.Name = "labelComSkip";
+ this.labelComSkip.Size = new System.Drawing.Size(328, 16);
+ this.labelComSkip.TabIndex = 3;
+ this.labelComSkip.Text = "Get ComSkip here:";
+ this.labelComSkip.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ //
// PluginSetup
//
+ this.Controls.Add(this.labelComSkip);
+ this.Controls.Add(this.linkLabel);
this.Controls.Add(this.groupBoxWhen);
this.Controls.Add(this.groupBoxWhat);
this.Controls.Add(this.groupBoxTest);
- this.MinimumSize = new System.Drawing.Size(346, 250);
+ this.MinimumSize = new System.Drawing.Size(346, 298);
this.Name = "PluginSetup";
- this.Size = new System.Drawing.Size(346, 250);
+ this.Size = new System.Drawing.Size(346, 298);
this.groupBoxTest.ResumeLayout(false);
this.groupBoxTest.PerformLayout();
this.groupBoxWhen.ResumeLayout(false);
@@ -238,6 +261,8 @@
private System.Windows.Forms.Label labelProgram;
private System.Windows.Forms.Button buttonProgram;
private System.Windows.Forms.TextBox textBoxProgram;
+ private System.Windows.Forms.LinkLabel linkLabel;
+ private System.Windows.Forms.Label labelComSkip;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <an...@us...> - 2007-03-14 13:31:06
|
Revision: 186
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=186&view=rev
Author: and-81
Date: 2007-03-14 06:30:54 -0700 (Wed, 14 Mar 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/ComSkipLauncher TVE2/AssemblyInfo.cs
trunk/plugins/ComSkipLauncher TVE2/ComSkipLauncher.cs
trunk/plugins/ComSkipLauncher TVE2/Configuration.Designer.cs
trunk/plugins/ComSkipLauncher TVE2/Configuration.cs
trunk/plugins/ComSkipLauncher TVE3/AssemblyInfo.cs
trunk/plugins/ComSkipLauncher TVE3/ComSkipLauncher.cs
trunk/plugins/ComSkipLauncher TVE3/PluginSetup.Designer.cs
trunk/plugins/ComSkipLauncher TVE3/PluginSetup.cs
Modified: trunk/plugins/ComSkipLauncher TVE2/AssemblyInfo.cs
===================================================================
--- trunk/plugins/ComSkipLauncher TVE2/AssemblyInfo.cs 2007-03-13 20:14:54 UTC (rev 185)
+++ trunk/plugins/ComSkipLauncher TVE2/AssemblyInfo.cs 2007-03-14 13:30:54 UTC (rev 186)
@@ -9,7 +9,7 @@
// associated with an assembly.
//
[assembly: AssemblyTitle("ComSkipLauncher TVE2")]
-[assembly: AssemblyDescription("Launches ComSkip when a recording completes")]
+[assembly: AssemblyDescription("Launches ComSkip on recordings")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("For MediaPortal")]
[assembly: AssemblyProduct("ComSkipLauncher plugin by and-81")]
Modified: trunk/plugins/ComSkipLauncher TVE2/ComSkipLauncher.cs
===================================================================
--- trunk/plugins/ComSkipLauncher TVE2/ComSkipLauncher.cs 2007-03-13 20:14:54 UTC (rev 185)
+++ trunk/plugins/ComSkipLauncher TVE2/ComSkipLauncher.cs 2007-03-14 13:30:54 UTC (rev 186)
@@ -21,24 +21,17 @@
public static readonly string MPConfigFile = Config.GetFolder(Config.Dir.Config) + "\\MediaPortal.xml";
- public static readonly string DefaultStartProgram = "\\Program Files\\ComSkip\\ComSkip.exe";
- public static readonly string DefaultStartParameters = "--playnice \"{0}\"";
+ public static readonly string DefaultProgram = "\\Program Files\\ComSkip\\ComSkip.exe";
+ public static readonly string DefaultParameters = "--playnice \"{0}\"";
- public static readonly string DefaultEndProgram = "\\Program Files\\ComSkip\\ComClean.bat";
- public static readonly string DefaultEndParameters = "\"{0}\"";
-
#endregion Constants
#region Members
bool _runAtStart;
- string _startProgram;
- string _startParameters;
+ string _program;
+ string _parameters;
- bool _runAtEnd;
- string _endProgram;
- string _endParameters;
-
#endregion Members
#region IPlugin Members
@@ -51,8 +44,7 @@
if (_runAtStart)
Recorder.OnTvRecordingStarted += new Recorder.OnTvRecordingHandler(Recorder_OnTvRecordingStarted);
-
- if (_runAtEnd)
+ else
Recorder.OnTvRecordingEnded += new Recorder.OnTvRecordingHandler(Recorder_OnTvRecordingEnded);
}
public void Stop()
@@ -61,8 +53,7 @@
if (_runAtStart)
Recorder.OnTvRecordingStarted -= new Recorder.OnTvRecordingHandler(Recorder_OnTvRecordingStarted);
-
- if (_runAtEnd)
+ else
Recorder.OnTvRecordingEnded -= new Recorder.OnTvRecordingHandler(Recorder_OnTvRecordingEnded);
}
@@ -73,7 +64,7 @@
public string Author() { return "and-81"; }
public bool CanEnable() { return true; }
public bool DefaultEnabled() { return true; }
- public string Description() { return "Launches ComSkip when a recording completes."; }
+ public string Description() { return "Launches ComSkip on recordings."; }
public int GetWindowId() { return 0; }
public bool HasSetup() { return true; }
public string PluginName() { return "ComSkip Launcher"; }
@@ -84,23 +75,15 @@
Configuration configuration = new Configuration();
configuration.RunAtStart = _runAtStart;
- configuration.StartProgram = _startProgram;
- configuration.StartParameters = _startParameters;
+ configuration.Program = _program;
+ configuration.Parameters = _parameters;
- configuration.RunAtEnd = _runAtEnd;
- configuration.EndProgram = _endProgram;
- configuration.EndParameters = _endParameters;
-
if (configuration.ShowDialog() == DialogResult.OK)
{
_runAtStart = configuration.RunAtStart;
- _startProgram = configuration.StartProgram;
- _startParameters = configuration.StartParameters;
+ _program = configuration.Program;
+ _parameters = configuration.Parameters;
- _runAtEnd = configuration.RunAtEnd;
- _endProgram = configuration.EndProgram;
- _endParameters = configuration.EndParameters;
-
SaveSettings();
}
}
@@ -121,16 +104,16 @@
try
{
- string parameters = ProcessParameters(_startParameters, recordingFilename);
+ string parameters = ProcessParameters(_parameters, recordingFilename);
Log.Info(
"ComSkipLauncher: Recording started ({0}), launching program ({1} {2}) ...",
recordingFilename,
- _startProgram,
+ _program,
parameters
);
- LaunchProcess(_startProgram, parameters, Path.GetDirectoryName(recordingFilename), ProcessWindowStyle.Hidden);
+ LaunchProcess(_program, parameters, Path.GetDirectoryName(recordingFilename), ProcessWindowStyle.Hidden);
}
catch (Exception ex)
{
@@ -161,16 +144,16 @@
return;
}
- string parameters = ProcessParameters(_endParameters, fileName);
+ string parameters = ProcessParameters(_parameters, fileName);
Log.Info(
"ComSkipLauncher: Recording ended ({0}), launching program ({1} {2}) ...",
fileName,
- _endProgram,
+ _program,
parameters
);
- LaunchProcess(_endProgram, parameters, Path.GetDirectoryName(fileName), ProcessWindowStyle.Hidden);
+ LaunchProcess(_program, parameters, Path.GetDirectoryName(fileName), ProcessWindowStyle.Hidden);
}
catch (Exception ex)
{
@@ -185,12 +168,8 @@
using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(MPConfigFile))
{
_runAtStart = xmlreader.GetValueAsBool("ComSkipLauncher", "RunAtStart", false);
- _startProgram = xmlreader.GetValueAsString("ComSkipLauncher", "StartProgram", DefaultStartProgram);
- _startParameters = xmlreader.GetValueAsString("ComSkipLauncher", "StartParameters", DefaultStartParameters);
-
- _runAtEnd = xmlreader.GetValueAsBool("ComSkipLauncher", "RunAtEnd", false);
- _endProgram = xmlreader.GetValueAsString("ComSkipLauncher", "EndProgram", DefaultEndProgram);
- _endParameters = xmlreader.GetValueAsString("ComSkipLauncher", "EndParameters", DefaultEndParameters);
+ _program = xmlreader.GetValueAsString("ComSkipLauncher", "Program", DefaultProgram);
+ _parameters = xmlreader.GetValueAsString("ComSkipLauncher", "Parameters", DefaultParameters);
}
}
catch (Exception ex)
@@ -205,12 +184,8 @@
using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings(MPConfigFile))
{
xmlwriter.SetValueAsBool("ComSkipLauncher", "RunAtStart", _runAtStart);
- xmlwriter.SetValue("ComSkipLauncher", "StartProgram", _startProgram);
- xmlwriter.SetValue("ComSkipLauncher", "StartParameters", _startParameters);
-
- xmlwriter.SetValueAsBool("ComSkipLauncher", "RunAtEnd", _runAtEnd);
- xmlwriter.SetValue("ComSkipLauncher", "EndProgram", _endProgram);
- xmlwriter.SetValue("ComSkipLauncher", "EndParameters", _endParameters);
+ xmlwriter.SetValue("ComSkipLauncher", "Program", _program);
+ xmlwriter.SetValue("ComSkipLauncher", "Parameters", _parameters);
}
}
catch (Exception ex)
Modified: trunk/plugins/ComSkipLauncher TVE2/Configuration.Designer.cs
===================================================================
--- trunk/plugins/ComSkipLauncher TVE2/Configuration.Designer.cs 2007-03-13 20:14:54 UTC (rev 185)
+++ trunk/plugins/ComSkipLauncher TVE2/Configuration.Designer.cs 2007-03-14 13:30:54 UTC (rev 186)
@@ -35,41 +35,27 @@
this.buttonTest = new System.Windows.Forms.Button();
this.textBoxTest = new System.Windows.Forms.TextBox();
this.buttonFindTestFile = new System.Windows.Forms.Button();
- this.radioButtonStartDoNothing = new System.Windows.Forms.RadioButton();
- this.radioButtonStartLaunch = new System.Windows.Forms.RadioButton();
+ this.radioButtonStart = new System.Windows.Forms.RadioButton();
+ this.radioButtonEnd = new System.Windows.Forms.RadioButton();
this.toolTips = new System.Windows.Forms.ToolTip(this.components);
- this.textBoxEndParameters = new System.Windows.Forms.TextBox();
- this.buttonEndParameters = new System.Windows.Forms.Button();
- this.buttonEndProgram = new System.Windows.Forms.Button();
- this.textBoxEndProgram = new System.Windows.Forms.TextBox();
- this.textBoxStartParameters = new System.Windows.Forms.TextBox();
- this.buttonStartParameters = new System.Windows.Forms.Button();
- this.buttonStartProgram = new System.Windows.Forms.Button();
- this.textBoxStartProgram = new System.Windows.Forms.TextBox();
- this.radioButtonEndDoNothing = new System.Windows.Forms.RadioButton();
- this.radioButtonEndLaunch = new System.Windows.Forms.RadioButton();
- this.tabControl = new System.Windows.Forms.TabControl();
- this.tabPageStart = new System.Windows.Forms.TabPage();
- this.groupBoxStartProgram = new System.Windows.Forms.GroupBox();
- this.labelStartParameters = new System.Windows.Forms.Label();
- this.labelStartProgram = new System.Windows.Forms.Label();
- this.tabPageEnd = new System.Windows.Forms.TabPage();
- this.groupBoxEndProgram = new System.Windows.Forms.GroupBox();
- this.labelEndParameters = new System.Windows.Forms.Label();
- this.labelEndProgram = new System.Windows.Forms.Label();
+ this.textBoxParameters = new System.Windows.Forms.TextBox();
+ this.buttonParameters = new System.Windows.Forms.Button();
+ this.buttonProgram = new System.Windows.Forms.Button();
+ this.textBoxProgram = new System.Windows.Forms.TextBox();
+ this.groupBoxWhat = new System.Windows.Forms.GroupBox();
+ this.labelParameters = new System.Windows.Forms.Label();
+ this.labelProgram = new System.Windows.Forms.Label();
this.groupBoxTest = new System.Windows.Forms.GroupBox();
- this.tabControl.SuspendLayout();
- this.tabPageStart.SuspendLayout();
- this.groupBoxStartProgram.SuspendLayout();
- this.tabPageEnd.SuspendLayout();
- this.groupBoxEndProgram.SuspendLayout();
+ this.groupBoxWhen = new System.Windows.Forms.GroupBox();
+ this.groupBoxWhat.SuspendLayout();
this.groupBoxTest.SuspendLayout();
+ this.groupBoxWhen.SuspendLayout();
this.SuspendLayout();
//
// buttonOK
//
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonOK.Location = new System.Drawing.Point(216, 288);
+ this.buttonOK.Location = new System.Drawing.Point(216, 248);
this.buttonOK.Name = "buttonOK";
this.buttonOK.Size = new System.Drawing.Size(56, 24);
this.buttonOK.TabIndex = 2;
@@ -81,7 +67,7 @@
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
- this.buttonCancel.Location = new System.Drawing.Point(280, 288);
+ this.buttonCancel.Location = new System.Drawing.Point(280, 248);
this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(56, 24);
this.buttonCancel.TabIndex = 3;
@@ -127,256 +113,114 @@
this.buttonFindTestFile.UseVisualStyleBackColor = true;
this.buttonFindTestFile.Click += new System.EventHandler(this.buttonFindTestFile_Click);
//
- // radioButtonStartDoNothing
+ // radioButtonStart
//
- this.radioButtonStartDoNothing.Location = new System.Drawing.Point(8, 8);
- this.radioButtonStartDoNothing.Name = "radioButtonStartDoNothing";
- this.radioButtonStartDoNothing.Size = new System.Drawing.Size(96, 24);
- this.radioButtonStartDoNothing.TabIndex = 0;
- this.radioButtonStartDoNothing.Text = "Do nothing";
- this.toolTips.SetToolTip(this.radioButtonStartDoNothing, "Launch ComSkip as soon as the recording starts (this requires the LiveTV setting " +
+ this.radioButtonStart.Enabled = false;
+ this.radioButtonStart.Location = new System.Drawing.Point(8, 16);
+ this.radioButtonStart.Name = "radioButtonStart";
+ this.radioButtonStart.Size = new System.Drawing.Size(120, 24);
+ this.radioButtonStart.TabIndex = 0;
+ this.radioButtonStart.Text = "Recording Start";
+ this.toolTips.SetToolTip(this.radioButtonStart, "Launch ComSkip as soon as the recording starts (this requires the LiveTV setting " +
"in comskip.ini)");
- this.radioButtonStartDoNothing.UseVisualStyleBackColor = true;
+ this.radioButtonStart.UseVisualStyleBackColor = true;
//
- // radioButtonStartLaunch
+ // radioButtonEnd
//
- this.radioButtonStartLaunch.Checked = true;
- this.radioButtonStartLaunch.Location = new System.Drawing.Point(8, 32);
- this.radioButtonStartLaunch.Name = "radioButtonStartLaunch";
- this.radioButtonStartLaunch.Size = new System.Drawing.Size(96, 24);
- this.radioButtonStartLaunch.TabIndex = 1;
- this.radioButtonStartLaunch.Text = "Launch:";
- this.toolTips.SetToolTip(this.radioButtonStartLaunch, "Launch ComSkip to process the recording after it has finished");
- this.radioButtonStartLaunch.UseVisualStyleBackColor = true;
- this.radioButtonStartLaunch.CheckedChanged += new System.EventHandler(this.radioButtonStartLaunch_CheckedChanged);
+ this.radioButtonEnd.Checked = true;
+ this.radioButtonEnd.Location = new System.Drawing.Point(144, 16);
+ this.radioButtonEnd.Name = "radioButtonEnd";
+ this.radioButtonEnd.Size = new System.Drawing.Size(120, 24);
+ this.radioButtonEnd.TabIndex = 1;
+ this.radioButtonEnd.TabStop = true;
+ this.radioButtonEnd.Text = "Recording End";
+ this.toolTips.SetToolTip(this.radioButtonEnd, "Launch ComSkip to process the recording after it has finished");
+ this.radioButtonEnd.UseVisualStyleBackColor = true;
//
- // textBoxEndParameters
+ // textBoxParameters
//
- this.textBoxEndParameters.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ this.textBoxParameters.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.textBoxEndParameters.Location = new System.Drawing.Point(8, 80);
- this.textBoxEndParameters.Name = "textBoxEndParameters";
- this.textBoxEndParameters.Size = new System.Drawing.Size(256, 20);
- this.textBoxEndParameters.TabIndex = 4;
- this.toolTips.SetToolTip(this.textBoxEndParameters, "Provide command line parameters for the program");
+ this.textBoxParameters.Location = new System.Drawing.Point(8, 80);
+ this.textBoxParameters.Name = "textBoxParameters";
+ this.textBoxParameters.Size = new System.Drawing.Size(280, 20);
+ this.textBoxParameters.TabIndex = 4;
+ this.toolTips.SetToolTip(this.textBoxParameters, "Provide command line parameters for the program");
//
- // buttonEndParameters
+ // buttonParameters
//
- this.buttonEndParameters.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonEndParameters.Location = new System.Drawing.Point(272, 80);
- this.buttonEndParameters.Name = "buttonEndParameters";
- this.buttonEndParameters.Size = new System.Drawing.Size(24, 20);
- this.buttonEndParameters.TabIndex = 5;
- this.buttonEndParameters.Text = "?";
- this.toolTips.SetToolTip(this.buttonEndParameters, "Click here for a list of additional command line parameters");
- this.buttonEndParameters.UseVisualStyleBackColor = true;
- this.buttonEndParameters.Click += new System.EventHandler(this.buttonParamQuestion_Click);
+ this.buttonParameters.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonParameters.Location = new System.Drawing.Point(296, 80);
+ this.buttonParameters.Name = "buttonParameters";
+ this.buttonParameters.Size = new System.Drawing.Size(24, 20);
+ this.buttonParameters.TabIndex = 5;
+ this.buttonParameters.Text = "?";
+ this.toolTips.SetToolTip(this.buttonParameters, "Click here for a list of additional command line parameters");
+ this.buttonParameters.UseVisualStyleBackColor = true;
+ this.buttonParameters.Click += new System.EventHandler(this.buttonParamQuestion_Click);
//
- // buttonEndProgram
+ // buttonProgram
//
- this.buttonEndProgram.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonEndProgram.Location = new System.Drawing.Point(272, 40);
- this.buttonEndProgram.Name = "buttonEndProgram";
- this.buttonEndProgram.Size = new System.Drawing.Size(24, 20);
- this.buttonEndProgram.TabIndex = 2;
- this.buttonEndProgram.Text = "...";
- this.toolTips.SetToolTip(this.buttonEndProgram, "Locate the program you wish to launch");
- this.buttonEndProgram.UseVisualStyleBackColor = true;
- this.buttonEndProgram.Click += new System.EventHandler(this.buttonEndProgram_Click);
+ this.buttonProgram.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonProgram.Location = new System.Drawing.Point(296, 40);
+ this.buttonProgram.Name = "buttonProgram";
+ this.buttonProgram.Size = new System.Drawing.Size(24, 20);
+ this.buttonProgram.TabIndex = 2;
+ this.buttonProgram.Text = "...";
+ this.toolTips.SetToolTip(this.buttonProgram, "Locate the program you wish to launch");
+ this.buttonProgram.UseVisualStyleBackColor = true;
+ this.buttonProgram.Click += new System.EventHandler(this.buttonProgram_Click);
//
- // textBoxEndProgram
+ // textBoxProgram
//
- this.textBoxEndProgram.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ this.textBoxProgram.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.textBoxEndProgram.Location = new System.Drawing.Point(8, 40);
- this.textBoxEndProgram.Name = "textBoxEndProgram";
- this.textBoxEndProgram.Size = new System.Drawing.Size(256, 20);
- this.textBoxEndProgram.TabIndex = 1;
- this.toolTips.SetToolTip(this.textBoxEndProgram, "The full location of the program to launch");
+ this.textBoxProgram.Location = new System.Drawing.Point(8, 40);
+ this.textBoxProgram.Name = "textBoxProgram";
+ this.textBoxProgram.Size = new System.Drawing.Size(280, 20);
+ this.textBoxProgram.TabIndex = 1;
+ this.toolTips.SetToolTip(this.textBoxProgram, "The full location of the program to launch");
//
- // textBoxStartParameters
+ // groupBoxWhat
//
- this.textBoxStartParameters.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.textBoxStartParameters.Location = new System.Drawing.Point(8, 80);
- this.textBoxStartParameters.Name = "textBoxStartParameters";
- this.textBoxStartParameters.Size = new System.Drawing.Size(256, 20);
- this.textBoxStartParameters.TabIndex = 4;
- this.toolTips.SetToolTip(this.textBoxStartParameters, "Provide command line parameters for the program");
- //
- // buttonStartParameters
- //
- this.buttonStartParameters.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonStartParameters.Location = new System.Drawing.Point(272, 80);
- this.buttonStartParameters.Name = "buttonStartParameters";
- this.buttonStartParameters.Size = new System.Drawing.Size(24, 20);
- this.buttonStartParameters.TabIndex = 5;
- this.buttonStartParameters.Text = "?";
- this.toolTips.SetToolTip(this.buttonStartParameters, "Click here for a list of additional command line parameters");
- this.buttonStartParameters.UseVisualStyleBackColor = true;
- this.buttonStartParameters.Click += new System.EventHandler(this.buttonParamQuestion_Click);
- //
- // buttonStartProgram
- //
- this.buttonStartProgram.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonStartProgram.Location = new System.Drawing.Point(272, 40);
- this.buttonStartProgram.Name = "buttonStartProgram";
- this.buttonStartProgram.Size = new System.Drawing.Size(24, 20);
- this.buttonStartProgram.TabIndex = 2;
- this.buttonStartProgram.Text = "...";
- this.toolTips.SetToolTip(this.buttonStartProgram, "Locate the program you wish to launch");
- this.buttonStartProgram.UseVisualStyleBackColor = true;
- this.buttonStartProgram.Click += new System.EventHandler(this.buttonStartProgram_Click);
- //
- // textBoxStartProgram
- //
- this.textBoxStartProgram.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.textBoxStartProgram.Location = new System.Drawing.Point(8, 40);
- this.textBoxStartProgram.Name = "textBoxStartProgram";
- this.textBoxStartProgram.Size = new System.Drawing.Size(256, 20);
- this.textBoxStartProgram.TabIndex = 1;
- this.toolTips.SetToolTip(this.textBoxStartProgram, "The full location of the program to launch");
- //
- // radioButtonEndDoNothing
- //
- this.radioButtonEndDoNothing.Location = new System.Drawing.Point(8, 8);
- this.radioButtonEndDoNothing.Name = "radioButtonEndDoNothing";
- this.radioButtonEndDoNothing.Size = new System.Drawing.Size(96, 24);
- this.radioButtonEndDoNothing.TabIndex = 0;
- this.radioButtonEndDoNothing.Text = "Do nothing";
- this.radioButtonEndDoNothing.UseVisualStyleBackColor = true;
- //
- // radioButtonEndLaunch
- //
- this.radioButtonEndLaunch.Checked = true;
- this.radioButtonEndLaunch.Location = new System.Drawing.Point(8, 32);
- this.radioButtonEndLaunch.Name = "radioButtonEndLaunch";
- this.radioButtonEndLaunch.Size = new System.Drawing.Size(96, 24);
- this.radioButtonEndLaunch.TabIndex = 1;
- this.radioButtonEndLaunch.Text = "Launch:";
- this.radioButtonEndLaunch.UseVisualStyleBackColor = true;
- this.radioButtonEndLaunch.CheckedChanged += new System.EventHandler(this.radioButtonEndLaunch_CheckedChanged);
- //
- // tabControl
- //
- this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ this.groupBoxWhat.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.tabControl.Controls.Add(this.tabPageStart);
- this.tabControl.Controls.Add(this.tabPageEnd);
- this.tabControl.Location = new System.Drawing.Point(8, 8);
- this.tabControl.Name = "tabControl";
- this.tabControl.SelectedIndex = 0;
- this.tabControl.Size = new System.Drawing.Size(328, 208);
- this.tabControl.TabIndex = 0;
+ this.groupBoxWhat.Controls.Add(this.labelParameters);
+ this.groupBoxWhat.Controls.Add(this.textBoxParameters);
+ this.groupBoxWhat.Controls.Add(this.buttonParameters);
+ this.groupBoxWhat.Controls.Add(this.labelProgram);
+ this.groupBoxWhat.Controls.Add(this.buttonProgram);
+ this.groupBoxWhat.Controls.Add(this.textBoxProgram);
+ this.groupBoxWhat.Location = new System.Drawing.Point(8, 64);
+ this.groupBoxWhat.Name = "groupBoxWhat";
+ this.groupBoxWhat.Size = new System.Drawing.Size(328, 112);
+ this.groupBoxWhat.TabIndex = 2;
+ this.groupBoxWhat.TabStop = false;
+ this.groupBoxWhat.Text = "What to launch";
//
- // tabPageStart
+ // labelParameters
//
- this.tabPageStart.Controls.Add(this.groupBoxStartProgram);
- this.tabPageStart.Controls.Add(this.radioButtonStartDoNothing);
- this.tabPageStart.Controls.Add(this.radioButtonStartLaunch);
- this.tabPageStart.Location = new System.Drawing.Point(4, 22);
- this.tabPageStart.Name = "tabPageStart";
- this.tabPageStart.Padding = new System.Windows.Forms.Padding(3);
- this.tabPageStart.Size = new System.Drawing.Size(320, 182);
- this.tabPageStart.TabIndex = 0;
- this.tabPageStart.Text = "When recording starts ...";
- this.tabPageStart.UseVisualStyleBackColor = true;
- //
- // groupBoxStartProgram
- //
- this.groupBoxStartProgram.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)
+ this.labelParameters.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.groupBoxStartProgram.Controls.Add(this.labelStartParameters);
- this.groupBoxStartProgram.Controls.Add(this.textBoxStartParameters);
- this.groupBoxStartProgram.Controls.Add(this.buttonStartParameters);
- this.groupBoxStartProgram.Controls.Add(this.labelStartProgram);
- this.groupBoxStartProgram.Controls.Add(this.buttonStartProgram);
- this.groupBoxStartProgram.Controls.Add(this.textBoxStartProgram);
- this.groupBoxStartProgram.Location = new System.Drawing.Point(8, 64);
- this.groupBoxStartProgram.Name = "groupBoxStartProgram";
- this.groupBoxStartProgram.Size = new System.Drawing.Size(304, 112);
- this.groupBoxStartProgram.TabIndex = 2;
- this.groupBoxStartProgram.TabStop = false;
- this.groupBoxStartProgram.Text = "What to do";
+ this.labelParameters.Location = new System.Drawing.Point(8, 64);
+ this.labelParameters.Name = "labelParameters";
+ this.labelParameters.Size = new System.Drawing.Size(280, 16);
+ this.labelParameters.TabIndex = 3;
+ this.labelParameters.Text = "Parameters:";
+ this.labelParameters.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
- // labelStartParameters
+ // labelProgram
//
- this.labelStartParameters.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ this.labelProgram.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.labelStartParameters.Location = new System.Drawing.Point(8, 64);
- this.labelStartParameters.Name = "labelStartParameters";
- this.labelStartParameters.Size = new System.Drawing.Size(256, 16);
- this.labelStartParameters.TabIndex = 3;
- this.labelStartParameters.Text = "Parameters:";
- this.labelStartParameters.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ this.labelProgram.Location = new System.Drawing.Point(8, 24);
+ this.labelProgram.Name = "labelProgram";
+ this.labelProgram.Size = new System.Drawing.Size(280, 16);
+ this.labelProgram.TabIndex = 0;
+ this.labelProgram.Text = "Program:";
+ this.labelProgram.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
- // labelStartProgram
- //
- this.labelStartProgram.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.labelStartProgram.Location = new System.Drawing.Point(8, 24);
- this.labelStartProgram.Name = "labelStartProgram";
- this.labelStartProgram.Size = new System.Drawing.Size(256, 16);
- this.labelStartProgram.TabIndex = 0;
- this.labelStartProgram.Text = "Program:";
- this.labelStartProgram.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
- // tabPageEnd
- //
- this.tabPageEnd.Controls.Add(this.groupBoxEndProgram);
- this.tabPageEnd.Controls.Add(this.radioButtonEndDoNothing);
- this.tabPageEnd.Controls.Add(this.radioButtonEndLaunch);
- this.tabPageEnd.Location = new System.Drawing.Point(4, 22);
- this.tabPageEnd.Name = "tabPageEnd";
- this.tabPageEnd.Padding = new System.Windows.Forms.Padding(3);
- this.tabPageEnd.Size = new System.Drawing.Size(320, 182);
- this.tabPageEnd.TabIndex = 1;
- this.tabPageEnd.Text = "When recording ends ...";
- this.tabPageEnd.UseVisualStyleBackColor = true;
- //
- // groupBoxEndProgram
- //
- this.groupBoxEndProgram.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.groupBoxEndProgram.Controls.Add(this.labelEndParameters);
- this.groupBoxEndProgram.Controls.Add(this.textBoxEndParameters);
- this.groupBoxEndProgram.Controls.Add(this.buttonEndParameters);
- this.groupBoxEndProgram.Controls.Add(this.labelEndProgram);
- this.groupBoxEndProgram.Controls.Add(this.buttonEndProgram);
- this.groupBoxEndProgram.Controls.Add(this.textBoxEndProgram);
- this.groupBoxEndProgram.Location = new System.Drawing.Point(8, 64);
- this.groupBoxEndProgram.Name = "groupBoxEndProgram";
- this.groupBoxEndProgram.Size = new System.Drawing.Size(304, 112);
- this.groupBoxEndProgram.TabIndex = 2;
- this.groupBoxEndProgram.TabStop = false;
- this.groupBoxEndProgram.Text = "What to do";
- //
- // labelEndParameters
- //
- this.labelEndParameters.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.labelEndParameters.Location = new System.Drawing.Point(8, 64);
- this.labelEndParameters.Name = "labelEndParameters";
- this.labelEndParameters.Size = new System.Drawing.Size(256, 16);
- this.labelEndParameters.TabIndex = 3;
- this.labelEndParameters.Text = "Parameters:";
- this.labelEndParameters.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
- // labelEndProgram
- //
- this.labelEndProgram.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.labelEndProgram.Location = new System.Drawing.Point(8, 24);
- this.labelEndProgram.Name = "labelEndProgram";
- this.labelEndProgram.Size = new System.Drawing.Size(256, 16);
- this.labelEndProgram.TabIndex = 0;
- this.labelEndProgram.Text = "Program:";
- this.labelEndProgram.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
// groupBoxTest
//
this.groupBoxTest.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
@@ -384,41 +228,51 @@
this.groupBoxTest.Controls.Add(this.textBoxTest);
this.groupBoxTest.Controls.Add(this.buttonTest);
this.groupBoxTest.Controls.Add(this.buttonFindTestFile);
- this.groupBoxTest.Location = new System.Drawing.Point(8, 224);
+ this.groupBoxTest.Location = new System.Drawing.Point(8, 184);
this.groupBoxTest.Name = "groupBoxTest";
this.groupBoxTest.Size = new System.Drawing.Size(328, 56);
this.groupBoxTest.TabIndex = 1;
this.groupBoxTest.TabStop = false;
- this.groupBoxTest.Text = "Test";
+ this.groupBoxTest.Text = "Test launch";
//
+ // groupBoxWhen
+ //
+ this.groupBoxWhen.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.groupBoxWhen.Controls.Add(this.radioButtonStart);
+ this.groupBoxWhen.Controls.Add(this.radioButtonEnd);
+ this.groupBoxWhen.Location = new System.Drawing.Point(8, 8);
+ this.groupBoxWhen.Name = "groupBoxWhen";
+ this.groupBoxWhen.Size = new System.Drawing.Size(328, 48);
+ this.groupBoxWhen.TabIndex = 4;
+ this.groupBoxWhen.TabStop = false;
+ this.groupBoxWhen.Text = "When to launch";
+ //
// Configuration
//
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(344, 320);
+ this.ClientSize = new System.Drawing.Size(352, 289);
+ this.Controls.Add(this.groupBoxWhen);
+ this.Controls.Add(this.groupBoxWhat);
this.Controls.Add(this.groupBoxTest);
- this.Controls.Add(this.tabControl);
this.Controls.Add(this.buttonCancel);
this.Controls.Add(this.buttonOK);
this.MaximizeBox = false;
this.MinimizeBox = false;
- this.MinimumSize = new System.Drawing.Size(360, 356);
+ this.MinimumSize = new System.Drawing.Size(360, 316);
this.Name = "Configuration";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "ComSkip Launcher";
- this.tabControl.ResumeLayout(false);
- this.tabPageStart.ResumeLayout(false);
- this.groupBoxStartProgram.ResumeLayout(false);
- this.groupBoxStartProgram.PerformLayout();
- this.tabPageEnd.ResumeLayout(false);
- this.groupBoxEndProgram.ResumeLayout(false);
- this.groupBoxEndProgram.PerformLayout();
+ this.groupBoxWhat.ResumeLayout(false);
+ this.groupBoxWhat.PerformLayout();
this.groupBoxTest.ResumeLayout(false);
this.groupBoxTest.PerformLayout();
+ this.groupBoxWhen.ResumeLayout(false);
this.ResumeLayout(false);
}
@@ -431,28 +285,17 @@
private System.Windows.Forms.Button buttonTest;
private System.Windows.Forms.TextBox textBoxTest;
private System.Windows.Forms.Button buttonFindTestFile;
- private System.Windows.Forms.RadioButton radioButtonStartDoNothing;
- private System.Windows.Forms.RadioButton radioButtonStartLaunch;
+ private System.Windows.Forms.RadioButton radioButtonStart;
+ private System.Windows.Forms.RadioButton radioButtonEnd;
private System.Windows.Forms.ToolTip toolTips;
- private System.Windows.Forms.TabControl tabControl;
- private System.Windows.Forms.TabPage tabPageStart;
- private System.Windows.Forms.TabPage tabPageEnd;
private System.Windows.Forms.GroupBox groupBoxTest;
- private System.Windows.Forms.RadioButton radioButtonEndDoNothing;
- private System.Windows.Forms.RadioButton radioButtonEndLaunch;
- private System.Windows.Forms.Label labelEndParameters;
- private System.Windows.Forms.TextBox textBoxEndParameters;
- private System.Windows.Forms.Button buttonEndParameters;
- private System.Windows.Forms.Label labelEndProgram;
- private System.Windows.Forms.Button buttonEndProgram;
- private System.Windows.Forms.TextBox textBoxEndProgram;
- private System.Windows.Forms.GroupBox groupBoxEndProgram;
- private System.Windows.Forms.GroupBox groupBoxStartProgram;
- private System.Windows.Forms.Label labelStartParameters;
- private System.Windows.Forms.TextBox textBoxStartParameters;
- private System.Windows.Forms.Button buttonStartParameters;
- private System.Windows.Forms.Label labelStartProgram;
- private System.Windows.Forms.Button buttonStartProgram;
- private System.Windows.Forms.TextBox textBoxStartProgram;
+ private System.Windows.Forms.GroupBox groupBoxWhat;
+ private System.Windows.Forms.Label labelParameters;
+ private System.Windows.Forms.TextBox textBoxParameters;
+ private System.Windows.Forms.Button buttonParameters;
+ private System.Windows.Forms.Label labelProgram;
+ private System.Windows.Forms.Button buttonProgram;
+ private System.Windows.Forms.TextBox textBoxProgram;
+ private System.Windows.Forms.GroupBox groupBoxWhen;
}
}
\ No newline at end of file
Modified: trunk/plugins/ComSkipLauncher TVE2/Configuration.cs
===================================================================
--- trunk/plugins/ComSkipLauncher TVE2/Configuration.cs 2007-03-13 20:14:54 UTC (rev 185)
+++ trunk/plugins/ComSkipLauncher TVE2/Configuration.cs 2007-03-14 13:30:54 UTC (rev 186)
@@ -34,49 +34,25 @@
{
get
{
- return radioButtonStartLaunch.Checked;
+ return radioButtonStart.Checked;
}
set
{
- radioButtonStartLaunch.Checked = value;
- radioButtonStartDoNothing.Checked = !value;
+ radioButtonEnd.Checked = value;
+ radioButtonStart.Checked = !value;
}
}
- public bool RunAtEnd
+ public string Program
{
- get
- {
- return radioButtonEndLaunch.Checked;
- }
- set
- {
- radioButtonEndLaunch.Checked = value;
- radioButtonEndDoNothing.Checked = !value;
- }
+ get { return textBoxProgram.Text; }
+ set { textBoxProgram.Text = value; }
}
-
- public string StartProgram
+ public string Parameters
{
- get { return textBoxStartProgram.Text; }
- set { textBoxStartProgram.Text = value; }
+ get { return textBoxParameters.Text; }
+ set { textBoxParameters.Text = value; }
}
- public string StartParameters
- {
- get { return textBoxStartParameters.Text; }
- set { textBoxStartParameters.Text = value; }
- }
- public string EndProgram
- {
- get { return textBoxEndProgram.Text; }
- set { textBoxEndProgram.Text = value; }
- }
- public string EndParameters
- {
- get { return textBoxEndParameters.Text; }
- set { textBoxEndParameters.Text = value; }
- }
-
#endregion Properties
#region Constructors
@@ -106,20 +82,9 @@
private void buttonTest_Click(object sender, EventArgs e)
{
- string program;
- string param;
+ string program = textBoxProgram.Text.Trim();
+ string param = textBoxParameters.Text;
- if (tabControl.SelectedTab == tabPageStart)
- {
- program = textBoxStartProgram.Text.Trim();
- param = textBoxStartParameters.Text;
- }
- else
- {
- program = textBoxEndProgram.Text.Trim();
- param = textBoxEndParameters.Text;
- }
-
if (program.Length == 0)
{
MessageBox.Show(this, "You must specify a program to run", "Missing program name", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
@@ -149,27 +114,12 @@
textBoxTest.Text = openFileDialog.FileName;
}
- private void radioButtonStartLaunch_CheckedChanged(object sender, EventArgs e)
+ private void buttonProgram_Click(object sender, EventArgs e)
{
- groupBoxStartProgram.Enabled = radioButtonStartLaunch.Checked;
- }
- private void radioButtonEndLaunch_CheckedChanged(object sender, EventArgs e)
- {
- groupBoxEndProgram.Enabled = radioButtonEndLaunch.Checked;
- }
-
- private void buttonStartProgram_Click(object sender, EventArgs e)
- {
openFileDialog.Title = "Select Program To Execute";
if (openFileDialog.ShowDialog(this) == DialogResult.OK)
- textBoxStartProgram.Text = openFileDialog.FileName;
+ textBoxProgram.Text = openFileDialog.FileName;
}
- private void buttonEndProgram_Click(object sender, EventArgs e)
- {
- openFileDialog.Title = "Select Program To Execute";
- if (openFileDialog.ShowDialog(this) == DialogResult.OK)
- textBoxEndProgram.Text = openFileDialog.FileName;
- }
}
Modified: trunk/plugins/ComSkipLauncher TVE3/AssemblyInfo.cs
===================================================================
--- trunk/plugins/ComSkipLauncher TVE3/AssemblyInfo.cs 2007-03-13 20:14:54 UTC (rev 185)
+++ trunk/plugins/ComSkipLauncher TVE3/AssemblyInfo.cs 2007-03-14 13:30:54 UTC (rev 186)
@@ -9,7 +9,7 @@
// associated with an assembly.
//
[assembly: AssemblyTitle("ComSkipLauncher TVE3")]
-[assembly: AssemblyDescription("Launches ComSkip when a recording completes")]
+[assembly: AssemblyDescription("Launches ComSkip on recordings")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("For MediaPortal")]
[assembly: AssemblyProduct("ComSkipLauncher plugin by and-81")]
Modified: trunk/plugins/ComSkipLauncher TVE3/ComSkipLauncher.cs
===================================================================
--- trunk/plugins/ComSkipLauncher TVE3/ComSkipLauncher.cs 2007-03-13 20:14:54 UTC (rev 185)
+++ trunk/plugins/ComSkipLauncher TVE3/ComSkipLauncher.cs 2007-03-14 13:30:54 UTC (rev 186)
@@ -1,4 +1,5 @@
using System;
+using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
@@ -22,24 +23,17 @@
#region Constants
- public static readonly string DefaultStartProgram = "\\Program Files\\ComSkip\\ComSkip.exe";
- public static readonly string DefaultStartParameters = "--playnice \"{0}\"";
+ public static readonly string DefaultProgram = "\\Program Files\\ComSkip\\ComSkip.exe";
+ public static readonly string DefaultParameters = "\"{0}\"";
- public static readonly string DefaultEndProgram = "\\Program Files\\ComSkip\\ComClean.bat";
- public static readonly string DefaultEndParameters = "\"{0}\"";
-
#endregion Constants
#region Members
bool _runAtStart;
- string _startProgram;
- string _startParameters;
+ string _program;
+ string _parameters;
- bool _runAtEnd;
- string _endProgram;
- string _endParameters;
-
#endregion Members
#region Properties
@@ -85,16 +79,14 @@
LoadSettings();
- if (_runAtStart || _runAtEnd)
- GlobalServiceProvider.Instance.Get<ITvServerEvent>().OnTvServerEvent += new TvServerEventHandler(ComSkipLauncher_OnTvServerEvent);
+ GlobalServiceProvider.Instance.Get<ITvServerEvent>().OnTvServerEvent += new TvServerEventHandler(ComSkipLauncher_OnTvServerEvent);
}
public void Stop()
{
Log.Info("ComSkipLauncher: Stop");
- if (_runAtStart || _runAtEnd)
- GlobalServiceProvider.Instance.Get<ITvServerEvent>().OnTvServerEvent -= new TvServerEventHandler(ComSkipLauncher_OnTvServerEvent);
+ GlobalServiceProvider.Instance.Get<ITvServerEvent>().OnTvServerEvent -= new TvServerEventHandler(ComSkipLauncher_OnTvServerEvent);
}
[CLSCompliant(false)]
@@ -114,38 +106,27 @@
TvServerEventArgs tvEvent = (TvServerEventArgs)eventArgs;
string parameters;
- if (tvEvent.EventType == TvServerEventType.RecordingStarted)
+ if (tvEvent.EventType == TvServerEventType.RecordingStarted && _runAtStart)
{
- parameters = ProcessParameters(_startParameters, tvEvent.Recording.FileName);
+ parameters = ProcessParameters(_parameters, tvEvent.Recording.FileName);
- Log.Info(
- "ComSkipLauncher: Recording started ({0}), launching program ({1} {2}) ...",
- tvEvent.Recording.FileName,
- _startProgram,
- parameters
- );
+ Log.Info("ComSkipLauncher: Recording started ({0}), launching program ({1} {2}) ...", tvEvent.Recording.FileName, _program, parameters);
- LaunchProcess(_startProgram, parameters, Path.GetDirectoryName(tvEvent.Recording.FileName), ProcessWindowStyle.Hidden);
+ LaunchProcess(_program, parameters, Path.GetDirectoryName(tvEvent.Recording.FileName), ProcessWindowStyle.Hidden);
}
- else if (tvEvent.EventType == TvServerEventType.RecordingEnded)
+ else if (tvEvent.EventType == TvServerEventType.RecordingEnded && !_runAtStart)
{
- parameters = ProcessParameters(_endParameters, tvEvent.Recording.FileName);
+ parameters = ProcessParameters(_parameters, tvEvent.Recording.FileName);
- Log.Info(
- "ComSkipLauncher: Recording ended ({0}), launching program ({1} {2}) ...",
- tvEvent.Recording.FileName,
- _endProgram,
- parameters
- );
+ Log.Info("ComSkipLauncher: Recording ended ({0}), launching program ({1} {2}) ...", tvEvent.Recording.FileName, _program, parameters);
- LaunchProcess(_endProgram, parameters, Path.GetDirectoryName(tvEvent.Recording.FileName), ProcessWindowStyle.Hidden);
+ LaunchProcess(_program, parameters, Path.GetDirectoryName(tvEvent.Recording.FileName), ProcessWindowStyle.Hidden);
}
}
catch (Exception ex)
{
- Log.Error("ComSkipLauncher: {0}", ex.Message);
+ Log.Error("ComSkipLauncher - ComSkipLauncher_OnTvServerEvent(): {0}", ex.Message);
}
-
}
void LoadSettings()
@@ -154,30 +135,33 @@
{
TvBusinessLayer layer = new TvBusinessLayer();
- _runAtStart = Convert.ToBoolean(layer.GetSetting("ComSkipLauncher_RunAtStart", "False").Value);
- _startProgram = layer.GetSetting("ComSkipLauncher_StartProgram", DefaultStartProgram).Value;
- _startParameters = layer.GetSetting("ComSkipLauncher_StartParameters", DefaultStartParameters).Value;
-
- _runAtEnd = Convert.ToBoolean(layer.GetSetting("ComSkipLauncher_RunAtEnd", "False").Value);
- _endProgram = layer.GetSetting("ComSkipLauncher_EndProgram", DefaultEndProgram).Value;
- _endParameters = layer.GetSetting("ComSkipLauncher_EndParameters", DefaultEndParameters).Value;
+ _runAtStart = Convert.ToBoolean(layer.GetSetting("ComSkipLauncher_RunAtStart", "False").Value);
+ _program = layer.GetSetting("ComSkipLauncher_Program", DefaultProgram).Value;
+ _parameters = layer.GetSetting("ComSkipLauncher_Parameters", DefaultParameters).Value;
}
catch (Exception ex)
{
- Log.Error("ComSkipLauncher: {0}", ex.Message);
+ Log.Error("ComSkipLauncher - LoadSettings(): {0}", ex.Message);
}
}
void LaunchProcess(string program, string parameters, string workingFolder, ProcessWindowStyle windowStyle)
{
- Process process = new Process();
- process.StartInfo = new ProcessStartInfo();
- process.StartInfo.Arguments = parameters;
- process.StartInfo.FileName = program;
- process.StartInfo.WindowStyle = windowStyle;
- process.StartInfo.WorkingDirectory = workingFolder;
+ try
+ {
+ Process process = new Process();
+ process.StartInfo = new ProcessStartInfo();
+ process.StartInfo.Arguments = parameters;
+ process.StartInfo.FileName = program;
+ process.StartInfo.WindowStyle = windowStyle;
+ process.StartInfo.WorkingDirectory = workingFolder;
- process.Start();
+ process.Start();
+ }
+ catch (Exception ex)
+ {
+ Log.Error("ComSkipLauncher - LaunchProcess(): {0}", ex.Message);
+ }
}
internal static string ProcessParameters(string input, string fileName)
@@ -198,7 +182,7 @@
}
catch (Exception ex)
{
- Log.Error("ComSkipLauncher: {0}", ex.Message);
+ Log.Error("ComSkipLauncher - ProcessParameters(): {0}", ex.Message);
}
return output;
Modified: trunk/plugins/ComSkipLauncher TVE3/PluginSetup.Designer.cs
===================================================================
--- trunk/plugins/ComSkipLauncher TVE3/PluginSetup.Designer.cs 2007-03-13 20:14:54 UTC (rev 185)
+++ trunk/plugins/ComSkipLauncher TVE3/PluginSetup.Designer.cs 2007-03-14 13:30:54 UTC (rev 186)
@@ -33,34 +33,20 @@
this.textBoxTest = new System.Windows.Forms.TextBox();
this.buttonTest = new System.Windows.Forms.Button();
this.buttonFindTestFile = new System.Windows.Forms.Button();
- this.tabControl = new System.Windows.Forms.TabControl();
- this.tabPageStart = new System.Windows.Forms.TabPage();
- this.groupBoxStartProgram = new System.Windows.Forms.GroupBox();
- this.labelStartParameters = new System.Windows.Forms.Label();
- this.textBoxStartParameters = new System.Windows.Forms.TextBox();
- this.buttonStartParameters = new System.Windows.Forms.Button();
- this.labelStartProgram = new System.Windows.Forms.Label();
- this.buttonStartProgram = new System.Windows.Forms.Button();
- this.textBoxStartProgram = new System.Windows.Forms.TextBox();
- this.radioButtonStartDoNothing = new System.Windows.Forms.RadioButton();
- this.radioButtonStartLaunch = new System.Windows.Forms.RadioButton();
- this.tabPageEnd = new System.Windows.Forms.TabPage();
- this.groupBoxEndProgram = new System.Windows.Forms.GroupBox();
- this.labelEndParameters = new System.Windows.Forms.Label();
- this.textBoxEndParameters = new System.Windows.Forms.TextBox();
- this.buttonEndParameters = new System.Windows.Forms.Button();
- this.labelEndProgram = new System.Windows.Forms.Label();
- this.buttonEndProgram = new System.Windows.Forms.Button();
- this.textBoxEndProgram = new System.Windows.Forms.TextBox();
- this.radioButtonEndDoNothing = new System.Windows.Forms.RadioButton();
- this.radioButtonEndLaunch = new System.Windows.Forms.RadioButton();
this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
+ this.groupBoxWhen = new System.Windows.Forms.GroupBox();
+ this.radioButtonStart = new System.Windows.Forms.RadioButton();
+ this.radioButtonEnd = new System.Windows.Forms.RadioButton();
+ this.groupBoxWhat = new System.Windows.Forms.GroupBox();
+ this.labelParameters = new System.Windows.Forms.Label();
+ this.textBoxParameters = new System.Windows.Forms.TextBox();
+ this.buttonParameters = new System.Windows.Forms.Button();
+ this.labelProgram = new System.Windows.Forms.Label();
+ this.buttonProgram = new System.Windows.Forms.Button();
+ this.textBoxProgram = new System.Windows.Forms.TextBox();
this.groupBoxTest.SuspendLayout();
- this.tabControl.SuspendLayout();
- this.tabPageStart.SuspendLayout();
- this.groupBoxStartProgram.SuspendLayout();
- this.tabPageEnd.SuspendLayout();
- this.groupBoxEndProgram.SuspendLayout();
+ this.groupBoxWhen.SuspendLayout();
+ this.groupBoxWhat.SuspendLayout();
this.SuspendLayout();
//
// groupBoxTest
@@ -68,7 +54,7 @@
this.groupBoxTest.Controls.Add(this.textBoxTest);
this.groupBoxTest.Controls.Add(this.buttonTest);
this.groupBoxTest.Controls.Add(this.buttonFindTestFile);
- this.groupBoxTest.Location = new System.Drawing.Point(8, 224);
+ this.groupBoxTest.Location = new System.Drawing.Point(8, 184);
this.groupBoxTest.Name = "groupBoxTest";
this.groupBoxTest.Size = new System.Drawing.Size(328, 56);
this.groupBoxTest.TabIndex = 1;
@@ -106,264 +92,131 @@
this.buttonFindTestFile.UseVisualStyleBackColor = true;
this.buttonFindTestFile.Click += new System.EventHandler(this.buttonFindTestFile_Click);
//
- // tabControl
+ // openFileDialog
//
- this.tabControl.Controls.Add(this.tabPageStart);
- this.tabControl.Controls.Add(this.tabPageEnd);
- this.tabControl.Location = new System.Drawing.Point(8, 8);
- this.tabControl.Name = "tabControl";
- this.tabControl.SelectedIndex = 0;
- this.tabControl.Size = new System.Drawing.Size(328, 208);
- this.tabControl.TabIndex = 0;
+ this.openFileDialog.Filter = "All files|*.*";
//
- // tabPageStart
+ // groupBoxWhen
//
- this.tabPageStart.Controls.Add(this.groupBoxStartProgram);
- this.tabPageStart.Controls.Add(this.radioButtonStartDoNothing);
- this.tabPageStart.Controls.Add(this.radioButtonStartLaunch);
- this.tabPageStart.Location = new System.Drawing.Point(4, 22);
- this.tabPageStart.Name = "tabPageStart";
- this.tabPageStart.Padding = new System.Windows.Forms.Padding(3);
- this.tabPageStart.Size = new System.Drawing.Size(320, 182);
- this.tabPageStart.TabIndex = 0;
- this.tabPageStart.Text = "When recording starts ...";
- this.tabPageStart.UseVisualStyleBackColor = true;
+ this.groupBoxWhen.Controls.Add(this.radioButtonStart);
+ this.groupBoxWhen.Controls.Add(this.radioButtonEnd);
+ this.groupBoxWhen.Location = new System.Drawing.Point(8, 8);
+ this.groupBoxWhen.Name = "groupBoxWhen";
+ this.groupBoxWhen.Size = new System.Drawing.Size(328, 48);
+ this.groupBoxWhen.TabIndex = 6;
+ this.groupBoxWhen.TabStop = false;
+ this.groupBoxWhen.Text = "When to launch";
//
- // groupBoxStartProgram
+ // radioButtonStart
//
- this.groupBoxStartProgram.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.groupBoxStartProgram.Controls.Add(this.labelStartParameters);
- this.groupBoxStartProgram.Controls.Add(this.textBoxStartParameters);
- this.groupBoxStartProgram.Controls.Add(this.buttonStartParameters);
- this.groupBoxStartProgram.Controls.Add(this.labelStartProgram);
- this.groupBoxStartProgram.Controls.Add(this.buttonStartProgram);
- this.groupBoxStartProgram.Controls.Add(this.textBoxStartProgram);
- this.groupBoxStartProgram.Location = new System.Drawing.Point(8, 64);
- this.groupBoxStartProgram.Name = "groupBoxStartProgram";
- this.groupBoxStartProgram.Size = new System.Drawing.Size(304, 112);
- this.groupBoxStartProgram.TabIndex = 2;
- this.groupBoxStartProgram.TabStop = false;
- this.groupBoxStartProgram.Text = "What to do";
+ this.radioButtonStart.Location = new System.Drawing.Point(8, 16);
+ this.radioButtonStart.Name = "radioButtonStart";
+ this.radioButtonStart.Size = new System.Drawing.Size(120, 24);
+ this.radioButtonStart.TabIndex = 0;
+ this.radioButtonStart.Text = "Recording Start";
+ this.radioButtonStart.UseVisualStyleBackColor = true;
//
- // labelStartParameters
+ // radioButtonEnd
//
- this.labelStartParameters.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.labelStartParameters.Location = new System.Drawing.Point(8, 64);
- this.labelStartParameters.Name = "labelStartParameters";
- this.labelStartParameters.Size = new System.Drawing.Size(256, 16);
- this.labelStartParameters.TabIndex = 3;
- this.labelStartParameters.Text = "Parameters:";
- this.labelStartParameters.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ this.radioButtonEnd.Checked = true;
+ this.radioButtonEnd.Location = new System.Drawing.Point(144, 16);
+ this.radioButtonEnd.Name = "radioButtonEnd";
+ this.radioButtonEnd.Size = new System.Drawing.Size(120, 24);
+ this.radioButtonEnd.TabIndex = 1;
+ this.radioButtonEnd.TabStop = true;
+ this.radioButtonEnd.Text = "Recording End";
+ this.radioButtonEnd.UseVisualStyleBackColor = true;
//
- // textBoxStartParameters
+ // groupBoxWhat
//
- this.textBoxStartParameters.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.textBoxStartParameters.Location = new System.Drawing.Point(8, 80);
- this.textBoxStartParameters.Name = "textBoxStartParameters";
- this.textBoxStartParameters.Size = new System.Drawing.Size(256, 20);
- this.textBoxStartParameters.TabIndex = 4;
+ this.groupBoxWhat.Controls.Add(this.labelParameters);
+ this.groupBoxWhat.Controls.Add(this.textBoxParameters);
+ this.groupBoxWhat.Controls.Add(this.buttonParameters);
+ this.groupBoxWhat.Controls.Add(this.labelProgram);
+ this.groupBoxWhat.Controls.Add(this.buttonProgram);
+ this.groupBoxWhat.Controls.Add(this.textBoxProgram);
+ this.groupBoxWhat.Location = new System.Drawing.Point(8, 64);
+ this.groupBoxWhat.Name = "groupBoxWhat";
+ this.groupBoxWhat.Size = new System.Drawing.Size(328, 112);
+ this.groupBoxWhat.TabIndex = 5;
+ this.groupBoxWhat.TabStop = false;
+ this.groupBoxWhat.Text = "What to launch";
//
- // buttonStartParameters
+ // labelParameters
//
- this.buttonStartParameters.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonStartParameters.Location = new System.Drawing.Point(272, 80);
- this.buttonStartParameters.Name = "buttonStartParameters";
- this.buttonStartParameters.Size = new System.Drawing.Size(24, 20);
- this.buttonStartParameters.TabIndex = 5;
- this.buttonStartParameters.Text = "?";
- this.buttonStartParameters.UseVisualStyleBackColor = true;
- this.buttonStartParameters.Click += new System.EventHandler(this.buttonParamQuestion_Click);
- //
- // labelStartProgram
- //
- this.labelStartProgram.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms...
[truncated message content] |
|
From: <du...@us...> - 2007-03-13 20:15:43
|
Revision: 185
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=185&view=rev
Author: dukus
Date: 2007-03-13 13:14:54 -0700 (Tue, 13 Mar 2007)
Log Message:
-----------
Sorting bug fixed.
Update option now working.
Modified Paths:
--------------
trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs
trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs
trunk/plugins/mpinstaler/MPInstaler/download_form.cs
trunk/plugins/mpinstaler/MPInstaler/start_form.Designer.cs
trunk/plugins/mpinstaler/MPInstaler/start_form.cs
trunk/plugins/mpinstaler/MPInstaler/start_form.resx
trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.Designer.cs
trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.cs
trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.resx
trunk/plugins/mpinstaler/MPInstaler.suo
Added Paths:
-----------
trunk/plugins/mpinstaler/MPInstaler/background.jpg
Modified: trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs
===================================================================
--- trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-03-13 03:38:40 UTC (rev 184)
+++ trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-03-13 20:14:54 UTC (rev 185)
@@ -55,7 +55,7 @@
get { return _update; }
set
{
- if (value == null) _update = ""; else _update = value;
+ if (value == null) _update = ""; else _update = value.Trim();
}
}
@@ -391,10 +391,10 @@
}
if (flst.Type == OTHER_TYPE)
{
- if (String.IsNullOrEmpty(flst.SubType))
- ret = Config.GetFolder(Config.Dir.Thumbs) + @"\" + flst.SubType + @"\" + Path.GetFileName(flst.FileName);
+ if (String.IsNullOrEmpty(flst.SubType.Trim()))
+ ret = Config.GetFolder(Config.Dir.Base) + @"\" + Path.GetFileName(flst.FileName);
else
- ret = Config.GetFolder(Config.Dir.Thumbs) + @"\" + flst.SubType + @"\" + Path.GetFileName(flst.FileName);
+ ret = Config.GetFolder(Config.Dir.Base) + @"\" + flst.SubType + @"\" + Path.GetFileName(flst.FileName);
}
if (flst.Type == TEXT_TYPE)
{
Modified: trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs
===================================================================
--- trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs 2007-03-13 03:38:40 UTC (rev 184)
+++ trunk/plugins/mpinstaler/MPInstaler/MPpackageStruct.cs 2007-03-13 20:14:54 UTC (rev 185)
@@ -98,13 +98,15 @@
{
LanguageString firstLs = this._intalerStruct.Language[0];
mpih.Load(firstLs.language);
- lb.Items.Add("Adding language :" + firstLs.language);
+ if (lb != null)
+ lb.Items.Add("Adding language :" + firstLs.language);
foreach (LanguageString ls in this._intalerStruct.Language)
{
if (firstLs.language != ls.language)
{
mpih.Language.Sort(new LanguageStringComparer());
- lb.Items.Add("Adding language :" + ls.language);
+ if (lb != null)
+ lb.Items.Add("Adding language :" + ls.language);
mpih.Save();
mpih.Load(ls.language);
}
@@ -239,6 +241,15 @@
return -1;
}
+ public MPpackageStruct Find(string name)
+ {
+ for (int i = 0; i < lst.Count; i++)
+ {
+ if (((MPpackageStruct)lst[i])._intalerStruct.Name.Trim() ==name.Trim())
+ return (MPpackageStruct)lst[i];
+ }
+ return null;
+ }
public void SaveToFile()
{
if (!Directory.Exists(InstalDir))
Added: trunk/plugins/mpinstaler/MPInstaler/background.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/plugins/mpinstaler/MPInstaler/background.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/plugins/mpinstaler/MPInstaler/download_form.cs
===================================================================
--- trunk/plugins/mpinstaler/MPInstaler/download_form.cs 2007-03-13 03:38:40 UTC (rev 184)
+++ trunk/plugins/mpinstaler/MPInstaler/download_form.cs 2007-03-13 20:14:54 UTC (rev 185)
@@ -47,7 +47,7 @@
private void DownloadEnd(object sender, AsyncCompletedEventArgs e)
{
if (e.Error!=null)
- MessageBox.Show(e.Error.Message);
+ MessageBox.Show(e.Error.Message+"\n"+e.Error.InnerException);
button1.Enabled = false;
this.Close();
}
Modified: trunk/plugins/mpinstaler/MPInstaler/start_form.Designer.cs
===================================================================
--- trunk/plugins/mpinstaler/MPInstaler/start_form.Designer.cs 2007-03-13 03:38:40 UTC (rev 184)
+++ trunk/plugins/mpinstaler/MPInstaler/start_form.Designer.cs 2007-03-13 20:14:54 UTC (rev 185)
@@ -28,10 +28,12 @@
/// </summary>
private void InitializeComponent()
{
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(start_form));
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
+ this.button4 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// button1
@@ -68,15 +70,27 @@
//
this.openFileDialog1.Filter = "MPI files|*.mpi|ZIP files|*.zip|All files|*.*";
//
+ // button4
+ //
+ this.button4.Location = new System.Drawing.Point(254, 231);
+ this.button4.Name = "button4";
+ this.button4.Size = new System.Drawing.Size(26, 23);
+ this.button4.TabIndex = 3;
+ this.button4.Text = "X";
+ this.button4.UseVisualStyleBackColor = true;
+ this.button4.Click += new System.EventHandler(this.button4_Click);
+ //
// start_form
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
this.ClientSize = new System.Drawing.Size(292, 266);
+ this.Controls.Add(this.button4);
this.Controls.Add(this.button3);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "start_form";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.ResumeLayout(false);
@@ -89,5 +103,6 @@
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.OpenFileDialog openFileDialog1;
+ private System.Windows.Forms.Button button4;
}
}
\ No newline at end of file
Modified: trunk/plugins/mpinstaler/MPInstaler/start_form.cs
===================================================================
--- trunk/plugins/mpinstaler/MPInstaler/start_form.cs 2007-03-13 03:38:40 UTC (rev 184)
+++ trunk/plugins/mpinstaler/MPInstaler/start_form.cs 2007-03-13 20:14:54 UTC (rev 185)
@@ -52,5 +52,10 @@
cnt.ShowDialog();
this.Show();
}
+
+ private void button4_Click(object sender, EventArgs e)
+ {
+ this.Close();
+ }
}
}
\ No newline at end of file
Modified: trunk/plugins/mpinstaler/MPInstaler/start_form.resx
===================================================================
--- trunk/plugins/mpinstaler/MPInstaler/start_form.resx 2007-03-13 03:38:40 UTC (rev 184)
+++ trunk/plugins/mpinstaler/MPInstaler/start_form.resx 2007-03-13 20:14:54 UTC (rev 185)
@@ -120,4 +120,73 @@
<metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>39, 17</value>
</metadata>
+ <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <data name="$this.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ /9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYa
+ HSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgo
+ KCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAEKAUwDASIAAhEBAxEB/8QA
+ HwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIh
+ MUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVW
+ V1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXG
+ x8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQF
+ BgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAV
+ YnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOE
+ hYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq
+ 8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDzTFKBSilxX0xwiYopaUUAJijFOApcUANxRin4oAoAbijFPxRi
+ gBmKXFP20YoAbilxTsUAUANxS4p+KXFADAKXFPxRtoAZilxTwtG2mBHilxUm2jbQBHijFS7aNtAEWKNt
+ S7aNtAEW32o21Lto20ARbaNtS7aXbQBDijFTbaNlAEO2jbU2yl20AQ7aNtTbaNtAEO2jbU22k20ARYox
+ Uu2k20ARYoxUu2k20AUhS0ClpAJS4paUUAApRQBSgUAAFKBSgUoFMBMUAU8ClxQA0CjbTwKXFADMUbak
+ 20u2gBgWlC0/bTgtAEe2l21KEpQlAEQWlC1MEpQlMCDbS7an2UbKAIdtG2p9lG2gZDso2VPto2UCINtG
+ 2rGyjZQMr7aXbU+yjZQBBso2VPto20AQbaNtT7aTbQBDto21NtpNtAEO2kIqbbSYoAi20mKlxSYoAixS
+ YqUikxQBmUopBSipELSigUooAUUuKBThTAAKUCgCnAUAAFOApQKcBQA0CnhacBTgtMY0LTglPC08LQBE
+ FpwSpQtOCUARBKcEqUJTglMCEJTglTBKcEoAg2UbKsbKXZQBX2UbKsbKNlAFfZS7asbKNlAFfZRsqxso
+ 2UAV9lGyrGykKUAQbaQrVjbTdtAEO2kK1MVpCtAEO2m4qYrTSKAIiKQipSKaRQBFikxUhFNIpAMIpMU8
+ ikoEY4pRTRSipAeKcKYKcKAHCnCkFOFMBwpwFIBT1FACgVIopFFSKKYwUU8LSqtSBaAEC08LTlWpFWmB
+ GFp4WpFSpAlAEQSnhKmCU8JQBAEpwSpwlLspgQbKXZU+yl2UAQbKNntU+yl20DK+yjZ7VY20uygRW2Um
+ yrJWkK0AV9lIVqcrTStICArTStWCKaRQBXK00rU5WmEUAQkU0ipSKaRQBCRTSKlIphFAEZFNIp5pppAM
+ NJSmkoAxAacKjFOFSIkFOFMFPFADxTxTBTxTAeKkUVGtSqKAJFFSKKaoqVRTGOUVIopFFSqKYCqtSKtC
+ ipVWgAVakVaVVqVVpjGqlSBKcopwFADNtLtqQCl20AR7aXbUm2lxQBHto21LtoxQBFto21NikIoAhK00
+ rUxFNIoAhK00rUxFMIoAhIppFSkVG1IRGRTGFSNUbUARmmGntTGoAYaYacxphNIBpqM05jTGNACGm5pG
+ NNJoEYwpwqMGnA1IEgp4qMGpFNAEgp61GpqRaYEqipkFQrUyUASqKlUVGtSrTGSKKmUVGtSrTAlQVKoq
+ NalU0ASLT1qNTUgNMZIKeKjBp4NAx4pRTQadmgBaXFJmjNMB1FJmjNIBaQ0ZpCaAA0w0pNNJoAaaY1OJ
+ phNAhjVG1PY1ExpANY1ExpzGomagQjGmMaGaomakArGo2akZqiZqAHM1RM1IzVGzUhDi1MLUwtTS1IDM
+ FOBqMGnA0hEqmnqagBqRTTGTqalU1XU1KhoAsKamQ1XU1KppgWVNSqaroamU0xlhTUqmqytUqtQBYU1K
+ pqsrVIrUwLKmnhqrhqeGoGWA1ODVAGpwamBYDUu6oA1LvoAn3Uu6oN9G+gCfdRuqHdRvoAm3U0tUW+kL
+ 0ASFqaWphamFqAJC1MZqYWpjPSAczVEzUjNUTNQIVmqFmoZqiZqQAzVGzU12qJmpAOZqiZqazVGzUCHM
+ 1RM1NZqiZqQD2embqYTSbqAKYNOBqENTwakRKDTwahBp4NMCZTUyGqqmplamMsqalVqrK1SK1AFtWqVW
+ qorVIr0wLatUgaqivTw9MZbV6kD1TD08PQBcD08PVIPTxJQBdD04PVMSU4SUwLgel31U8yjzKALfmUvm
+ VT8yjzKALnmUeZVPzKPMoAt+ZQZKqeZR5lAFkyU0vVYyUhkoAsF6YXqAyUwvSAmZ6jZ6iL1Gz0ASM9RO
+ 9RtJUTPSAe71CzU1nqJnpCHs9Rs9MZ6jZqAHM1RlqaWppakA8tTd3vUZak3UCKoNPBqIGnCkBMDTgaiW
+ pAaAJAalU1ApqRaYE6mpVNV1NSKaYycGpA1QKakBoAmDU8NUANPBpgTBqcGqEGnA0AThqeGquDUgNMZO
+ GpwaoQacDQBLuo3VHmkzQBLuo3VFmjNAEu6jdUWaUGgCXdRuqPNGaAHlqaWppNNJoAcWphakJphNACs1
+ Rs1BNMJpCEY1GxpWNRsaQDWNRMacxqJqAEJphNKaYaQCE00mgmmmgQhNNzQabmkBEKcKQCngUgFFPFIo
+ p4FMBVqRaYBUgpgPWpFpgp60xkgp4pi1IKAFFPFNAp4pgKKWgUooAcKeKYKeKAHinU0U4Uxi5pKWkoAK
+ KKXFIQlOFJSigBRS0gpaYDTTTT6aaBjDTDUhFMIpCGGo2qQ0w0ARtUbVK1RtSAhaomqZhUTCgCKmmnmm
+ mkBGaYakIppFIREabUhFNxQA0CnhacFpQtACAU8CgCngUwEAp6ilC09VoGCipVFIq1Kq0wEUVIBShakC
+ 0ANApwWnhaeEpgRhacFqUJThHQMiC08LUgjp4SgCMLShamCUoSmBDto21Y2UbKAINtG2rASl8ukBW20u
+ 2rHl0eXTAg20ban2e1GygCuVpCtWNlIUoArFaYVq0UphSkBVK0xlq0UpjJQIqMtRstW2SomSkBVZahZa
+ uMlRMlAFUimkVYKUwrSArkUwirDLUZWgRCRTdtTEUm2kAm2lC08LTgtMYwLUgWnBakVaAGBaeq1IqVIs
+ dMBirUqpUiR1MkdAESpUqx1OkdSrHTGQLHUix1ZWKpFioArCOnCP2q2IqeIqBlMRU8RVcENPENAFIRU8
+ RVdENPENAFARe1L5XtWgIKXyKAM7yjR5VaPkUeRQBneVR5RrR8mjyaAM7yqPLrQ8ikMNAGd5dIY60DDT
+ TFTAzzHTDHWiYqYYqQGcY6Y0daDRVG0VAGc0dRNHWk0VRPFSEZrR1G0daDRVG0VAGe0dRslX2jqNo6AK
+ DJUbJV9o6jaOgRRKUm2rZjphjpAQhaeq05VqVUpgMVKlVKkVKlVKAGKlSqlSKlTIlAyNI6nSOnolTolA
+ DEjqZI6kRKmRKBkaRVKsVTIlTKlAyBYqkWKp1SpVSgCuIvaniH2qysdSLHQBWEPtTxD7VaWOniP2oAqC
+ H2p3k+1XNntS+XQMpeT7UeT7Vd2UbKLiKXk+1Hk+1XfLo2H0ouMo+T7Uhg9q0PL9qaY/ai4GeYPamGD2
+ rRMftTDH7U7iM4w+1RtDWk0dRtHQBmtDUbQ+1aTJUTR0gM5ofaoWi9q0mT2qJo6BGa0NRNDWk0ftUTR0
+ AZjRVE0VabR1C0dAjOaL2qJoq0WjqJo6AKBjpnl1eaOmmOgDNVKmVKcq1Ki0AIqVKiU5VqZFoAaiVOiU
+ qLUyLQMREqZEpUWpkWgARKnRKEWpkWgYJHUyx0qLUyikA1UqVUpyipFFAxqpUqpSqKlUUANWOniOnqKe
+ BQBHso2VLijFAyPZRsqXFGKBEWyl8upcUYouBFsoMdS4pcUXArmOmGOrRFMIouBVaOo2jq2RTGWi4FNo
+ 6iaKrrLUTLRcCi0dRNHV11qJloEUmjqJo6ustRMtMCk0dRNHV1lqJloEUmjqJo6vMtRstAFFo6b5dXGS
+ m7KBGKq1Mi0ItTotACItTItCrUyrQMFWpUWlValVaABFqZFoRamRaQwRanRaRFqZFoGORalUUiCpVFAA
+ oqVRSKtSqKQwUVIooUVIooAAKdilApaQDaXFLiloAbilpaWgBuKXFOoxQA3FLinUtADSKYRUtBFAFcim
+ MtWCKYwpgVmWo2WrLLUbLQIqstQstXGWomWmBTZaiZauMlRMlAioy1Gy1bZajZaAKjLUbLVtlqNloAqF
+ absq0VpuymIwUWpkWkRamRaQCqtSqtCrUyrQMFWpVWhVqZVoAEWpkWkRamUUhiqtTIKai1Mi0AORalVa
+ RBUqigYKKkUUKKeopAKop4FAFOAoAMUuKXFGKQCYpcUtLigBtLS0UAFFLiigBBS0oooABRS4paAGEUwi
+ psU0imBAVpjLVgrTGWgCqy1Gy1aZajZaAKjLUbLVtlqNkpiKjLTClWmSoytAFVkqMpVtlphWgCoUpuyr
+ RSm7KYjmkFToKjSpkoAkUVKq0xamSgB6rUqrTFqZaQx6ipVWmLUyUAPVamVajWplpDHqKlApi1KKAFUV
+ IBTRTxSAUCnAUgp1AABS4oooAKXFAooAKUCkp1ACYoxS0UDAUuKBRQAClxQKKBCgUYoFLQAwrTStSUh6
+ UAQFaYy1M1MNAEDLTGWp2phpgV2SmFKsNUZoArlKYUqw1RtTEQlabsqY000Af//Z
+</value>
+ </data>
</root>
\ No newline at end of file
Modified: trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.Designer.cs
===================================================================
--- trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.Designer.cs 2007-03-13 03:38:40 UTC (rev 184)
+++ trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.Designer.cs 2007-03-13 20:14:54 UTC (rev 185)
@@ -53,6 +53,7 @@
this.columnHeader6 = new System.Windows.Forms.ColumnHeader();
this.columnHeader7 = new System.Windows.Forms.ColumnHeader();
this.columnHeader8 = new System.Windows.Forms.ColumnHeader();
+ this.columnHeader10 = new System.Windows.Forms.ColumnHeader();
this.label1 = new System.Windows.Forms.Label();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.tabControl1.SuspendLayout();
@@ -149,6 +150,7 @@
this.button3.TabIndex = 3;
this.button3.Text = "Update";
this.button3.UseVisualStyleBackColor = true;
+ this.button3.Click += new System.EventHandler(this.button3_Click);
//
// button4
//
@@ -192,6 +194,7 @@
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "Local";
this.tabPage1.UseVisualStyleBackColor = true;
+ this.tabPage1.Enter += new System.EventHandler(this.tabPage1_Enter);
//
// label2
//
@@ -239,6 +242,7 @@
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "Online";
this.tabPage2.UseVisualStyleBackColor = true;
+ this.tabPage2.Enter += new System.EventHandler(this.tabPage2_Enter);
//
// button5
//
@@ -260,7 +264,8 @@
this.columnHeader5,
this.columnHeader6,
this.columnHeader7,
- this.columnHeader8});
+ this.columnHeader8,
+ this.columnHeader10});
this.listView2.FullRowSelect = true;
this.listView2.Location = new System.Drawing.Point(7, 48);
this.listView2.Name = "listView2";
@@ -268,6 +273,7 @@
this.listView2.TabIndex = 2;
this.listView2.UseCompatibleStateImageBehavior = false;
this.listView2.View = System.Windows.Forms.View.Details;
+ this.listView2.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.listView2_ColumnClick);
//
// columnHeader5
//
@@ -287,7 +293,12 @@
// columnHeader8
//
this.columnHeader8.Text = "File";
+ this.columnHeader8.Width = 131;
//
+ // columnHeader10
+ //
+ this.columnHeader10.Text = "Group";
+ //
// label1
//
this.label1.AutoSize = true;
@@ -355,5 +366,6 @@
private System.Windows.Forms.ColumnHeader columnHeader9;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ComboBox comboBox2;
+ private System.Windows.Forms.ColumnHeader columnHeader10;
}
}
\ No newline at end of file
Modified: trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.cs
===================================================================
--- trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.cs 2007-03-13 03:38:40 UTC (rev 184)
+++ trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.cs 2007-03-13 20:14:54 UTC (rev 185)
@@ -91,6 +91,7 @@
// Sort the groups and add them to myListView.
Array.Sort(groupsArray, new ListViewGroupSorter(myListView.Sorting));
+ myListView.Groups.Clear();
myListView.Groups.AddRange(groupsArray);
// Iterate through the items in myListView, assigning each
@@ -202,8 +203,6 @@
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
- //MPExtensionFileList.xml
- //Path.GetFullPath(Environment.GetEnvironmentVariable("TEMP"))+@"\" +
string temp_file = Path.GetFullPath(Environment.GetEnvironmentVariable("TEMP")) + @"\" + "MPExtensionFileList.xml";
if (MPInstallHelper.Download(comboBox1.Text + "/" + "MPExtensionFileList.xml",temp_file))
{
@@ -285,9 +284,113 @@
private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
{
if (comboBox2.Text == "Icons")
+ {
+ SetGroups(4, listView1);
listView1.View = System.Windows.Forms.View.LargeIcon;
+ }
else listView1.View = System.Windows.Forms.View.Details;
}
+
+ private void tabPage2_Enter(object sender, EventArgs e)
+ {
+ InitGroups(listView2);
+ SetGroups(0, listView2);
+ }
+
+ private void tabPage1_Enter(object sender, EventArgs e)
+ {
+ InitGroups(listView1);
+ SetGroups(0, listView1);
+ }
+
+ private void listView2_ColumnClick(object sender, ColumnClickEventArgs e)
+ {
+ // Set the sort order to ascending when changing
+ // column groups; otherwise, reverse the sort order.
+ if (listView2.Sorting == SortOrder.Descending ||
+ ((e.Column != groupColumn)))
+ {
+ listView2.Sorting = SortOrder.Ascending;
+ }
+ else
+ {
+ listView2.Sorting = SortOrder.Descending;
+ }
+ groupColumn = e.Column;
+
+ // Set the groups to those created for the clicked column.
+ SetGroups(e.Column, listView2);
+ }
+
+ private void button3_Click(object sender, EventArgs e)
+ {
+ if (listView1.SelectedItems.Count > 0)
+ {
+ MPpackageStruct pk = lst.Find(listView1.SelectedItems[0].SubItems[0].Text);
+ if (pk != null)
+ {
+ if (!String.IsNullOrEmpty(pk._intalerStruct.UpdateURL.Trim()))
+ {
+ string file_name = "MPExtensionFileList.xml";
+ string temp_file = Path.GetFullPath(Environment.GetEnvironmentVariable("TEMP")) + @"\" + file_name;
+ download_form dw = new download_form(pk._intalerStruct.UpdateURL + "/" + file_name, temp_file);
+ dw.Text = listView1.SelectedItems[0].SubItems[3].Text;
+ dw.ShowDialog();
+ if (File.Exists(temp_file))
+ {
+ MPInstallHelper temp_mpih = new MPInstallHelper();
+ temp_mpih.LoadFromFile(temp_file);
+ int idx = temp_mpih.IndexOf(pk);
+ if (idx > -1)
+ {
+ if (((MPpackageStruct)temp_mpih.lst[idx])._intalerStruct.Version.CompareTo(pk._intalerStruct.Version) > 0)
+ {
+ if (MessageBox.Show("New version found!. Do you want download and install ?", "", MessageBoxButtons.YesNo) == DialogResult.Yes)
+ {
+ MPpackageStruct pk1 = ((MPpackageStruct)temp_mpih.lst[idx]);
+ file_name = pk1.FileName;
+ temp_file = Path.GetFullPath(Environment.GetEnvironmentVariable("TEMP")) + @"\" + file_name;
+ download_form dw1 = new download_form(pk1._intalerStruct.UpdateURL + "/" + file_name, temp_file);
+ dw1.Text = pk1._intalerStruct.UpdateURL+"/"+pk1.FileName+"/"+pk1._intalerStruct.Version;
+ dw1.ShowDialog();
+ if (File.Exists(temp_file))
+ {
+ wizard_1 wiz = new wizard_1();
+ wiz.package.LoadFromFile(temp_file);
+ if (wiz.package.isValid)
+ {
+ wiz.starStep();
+ listView1.Items.Clear();
+ lst.LoadFromFile();
+ LoadToListview();
+ }
+ else
+ MessageBox.Show("Invalid package !");
+ }
+ }
+ }
+ else
+ {
+ MessageBox.Show("No updates were found !");
+ }
+ }
+ else
+ {
+ MessageBox.Show("Wrong udapte URL !");
+ }
+ }
+ }
+ else
+ {
+ MessageBox.Show("Update information not found !");
+ }
+ }
+ else
+ {
+ MessageBox.Show("Error processing package !");
+ }
+ }
+ }
}
public class ListViewGroupSorter : IComparer
{
Modified: trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.resx
===================================================================
--- trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.resx 2007-03-13 03:38:40 UTC (rev 184)
+++ trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.resx 2007-03-13 20:14:54 UTC (rev 185)
@@ -126,129 +126,129 @@
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACS
HQAAAk1TRnQBSQFMAwEBAAEEAQABBAEAASABAAEgAQAE/wEhAQAI/wFCAU0BNgcAATYDAAEoAwABgAMA
- ASADAAEBAQABIAYAAUAqAAEHASUBbgH/AQgBKwF/Af8BCAEvAYgB/wEJATUBmQH/AQkBNgGfAf8BCQE8
- AbAB/wEJAT4BtgH/AQoBPgG2Af8BCgE+AbYB/wEKAT4BtgH/AQoBPgG2Af8BCgE+AbYB/wEKAT4BtgH/
- AQoBPgG2Af8BCQE6AaoB/wEJATYBnwH/AQkBNAGWAf8BCAEvAYgB/wEIASkBeQH/AQcBJAFrAf//AKEA
- AQkBMwGTAf8BDAE/AbYB/wERAUUBuAH/ARUBSQG7Af8BGgFNAb8B/wEeAVIBwwH/ASMBVgHHAf8BKAFb
- AcoB/wEsAWABzgH/ATEBZQHRAf8BNgFpAdQB/wE6AW4B1wH/AT4BcgHaAf8BQQF1AdwB/wFEAXgB3gH/
- AUgBewHgAf8BSQF8AeEB/wFKAX0B4gH/AUoBfgHiAf8BSQF9AeEB/wFHAXoB4AH/AUQBdwHeAf8BPwFz
- AdoB/wE6AW0B1gH/ATIBZgHRAf8BKQFdAcsB/wETAUcBvAH/AQkBMgGQAf//AI0AAQkBNAGWAf8BEAFC
- AbMB/wEbAU0BtwH/AR8BUQG8Af8BIgFVAcEB/wElAVgBxQH/ASgBXAHJAf8BKwFfAc0B/wEuAWIBzwH/
- ATIBZQHRAf8BNQFoAdMB/wE4AWsB1QH/ATsBbgHXAf8BPgFyAdoB/wFBAXQB3AH/AUQBeAHeAf8BRwF7
- AeAB/wFKAX4B4gH/AU4BgQHkAf8BUQGBAeYB/wFUAYIB6QH/AVcBhQHrAf8BWgGIAe0B/wFdAYsB7wH/
- AWABjgHxAf8BYwGSAfMB/wFmAZQB9QH/AWYBlAH1Af8BLQFgAc4B/wEIATMBkwH//wCJAAELAT4BswH/
- ARcBSQGwAf8BGwFNAbUB/wEeAVABugH/ASIBVAG/Af8BJQFXAcMB/wEoAVsByAH/ASsBXwHMAf8BLgFi
- Ac8B/wExAWUB0QH/ATQBaAHTAf8BOAFrAdUB/wE7AW4B1wH/AT4BcQHZAf8BQQF0AdwB/wFEAXcB3gH/
- AUcBewHgAf8BSgF9AeIB/wFNAYEB5AH/AVABgQHmAf8BVAGCAegB/wFXAYUB6gH/AVoBiAHsAf8BXQGL
- Ae8B/wFgAY4B8QH/AWMBkQHzAf8BZgGUAfUB/wFpAZcB9wH/AWgBlgH2Af8BFQFJAb4B//8AiQABDgFA
- Aa8B/wEXAUgBrgH/ARsBTAGzAf8BHgFQAbgB/wEhAVMBvQH/ASQBVwHBAf8BJwFaAcYB/wErAV4BygH/
- AS4BYQHOAf8BMQFkAdAB/wE0AWgB0wH/ATcBawHVAf8BOgFuAdcB/wE9AXEB2QH/AUABdAHbAf8BQwF3
- Ad0B/wFHAXoB3wH/AUoBfQHhAf8BTQGAAeQB/wFQAYEB5gH/AVMBgQHoAf8BVgGEAeoB/wFZAYcB7AH/
- AVwBigHuAf8BXwGNAfAB/wFiAZAB8gH/AWQBkwH0Af8BZgGUAfUB/wFnAZUB9gH/AS4BYgHOAf//AIkA
- AQ8BQQGsAf8BFwFHAawB/wEaAUsBsQH/AR4BTwG2Af8BIQFSAbsB/wEkAVYBvwH/AScBWQHEAf8BKgFd
- AcgB/wEtAWEBzQH/ATABZAHQAf8BMwFnAdIB/wE3AWoB1AH/AToBbQHWAf8BPQFwAdkB/wFAAXMB2wH/
- AUMBdgHdAf8BRgF5Ad8B/wFJAXwB4QH/AUwBfwHjAf8BTwGBAeUB/wFSAYEB5wH/AVUBgwHpAf8BWAGG
- AesB/wFbAYkB7QH/AV0BjAHvAf8BYAGOAfEB/wFiAZAB8gH/AWQBkgHzAf8BZAGTAfQB/wE3AWsB1QH/
- /wCFAAEIASgBdgH/ARABQAGpAf8BFgFGAakB/wEZAUoBrwH/ARwBTgG0Af8BIAFRAbkB/wEjAVUBvQH/
- ASYBWQHCAf8BKQFcAcYB/wEsAV8BywH/ATABYwHPAf8BMwFmAdIB/wE2AWkB1AH/ATkBbAHWAf8BPAFv
- AdgB/wE/AXIB2gH/AUIBdQHcAf8BPgFyAd4B/wEwAWgB2wH/AUIBeQHfAf8BNgFwAd8B/wFIAX4B5wH/
- AWMBjgHrAf8BRwF+AeoB/wFZAYcB7AH/AVwBigHuAf8BXgGMAe8B/wFgAY4B8QH/AWEBjwHxAf8BYQGQ
- AfIB/wE+AXIB2gH/AQgBKAF2Af//AIEAAQgBLQGCAf8BFAFDAacB/wEVAUUBpwH/ARgBSQGsAf8BHAFN
- AbIB/wEfAVABtwH/ASMBVAG7Af8BJgFYAcAB/wEpAVsBxAH/ASwBXwHJAf8BLwFiAc0B/wEyAWUB0QH/
- ATUBaAHTAf8BOAFrAdUB/wE7AW4B1wH/AT4BcQHZAf8BQQF0AdsB/wE1AWsB3gH/AvwG/wF8AZwB7gH/
- AeQB6wH9Bf8BWQGGAesB/wFRAYEB6wH/AVkBiAHsAf8BWwGKAe4B/wFdAYsB7wH/AV4BjAHvAf8BXgGN
- AfAB/wFEAXgB3gH/AQgBLQGCAf//AIEAAQgBMQGNAf8BPQFkAbMB/wEuAVgBrgH/ARkBSAGqAf8BGwFL
- Aa8B/wEeAU8BtAH/ASIBUwG5Af8BJQFWAb4B/wEoAVoBwgH/ASsBXQHHAf8BLgFhAcsB/wExAWQBzwH/
- ATQBZwHSAf8BNwFqAdUB/wE6AW0B1wH/AT0BcAHZAf8BOQFuAdsB/wEXAVgB1wP/Af4F/wH9Af4B/Qn/
- AYsBrgHyAf8BMwFwAeYB/wFLAYEB6wH/AVkBhwHsAf8BWgGIAe0B/wFbAYkB7QH/AVwBigHuAf8BSQF8
- AeEB/wEIATEBjgH//wCBAAEJATYBnwH/AUwBbwG1Af8BSQFtAbYB/wE4AWEBtAH/ARQBRgGtAf8BHQFO
- AbIB/wEgAVEBtwH/ASQBVQG7Af8BJwFYAcAB/wEqAVwBxAH/AS0BXwHJAf8BMAFjAc0B/wEzAWYB0QH/
- ATUBaQHUAf8BOQFsAdYB/wExAWkB1wH/ATwBbQHdAf8BaQGLAecF/wFWAYIB4wH/ASIBXwHbAf8BIwFh
- Ad0B/wGJAakB7wn/AW0BlgHsAf8BUgGEAeoB/wFXAYYB6wH/AVgBhwHsAf8BWQGHAewB/wFMAX8B4wH/
- AQkBNgGfAf//AIEAAQoBOAGkAf8BYgGAAbsB/wFQAXMBtwH/AUoBbwG4Af8BPAFmAbUB/wEWAUcBrwH/
- AR8BUAG0Af8BIgFTAbkB/wEmAVcBvgH/ASkBWgHCAf8BLAFeAcYB/wEuAWEBygH/ATEBZAHOAf8BNAFo
- AdIB/wE3AWsB1QH/ASkBYAHSAf8B2wHlAfUF/wG/AdIB9QH/ASUBYAHYAf8BRwF7AeAB/wFKAX0B4QH/
- ASQBYgHfAf8C/gH9Af8B5AHqAfwB/wFXAYcB6gH/AVMBggHoAf8BVQGDAekB/wFVAYQB6gH/AVYBhAHq
- Af8BTgGBAeQB/wEJATgBpQH//wCBAAEOAUABtQH/AXUBigHCAf8BWAF5AbkB/wFRAXQBuQH/AVIBcwG+
- Af8BMgFdAbUB/wEaAUoBsQH/ASEBUgG2Af8BJAFVAbsB/wEnAVkBwAH/ASQBVAHEAf8BFQFNAcIB/wEj
- AVkBygH/AScBXAHQAf8BNQFpAdMB/wEgAVsB1gH/AYMBowHmBf8BrwHHAe8B/wEmAWEB2QH/AUUBeQHe
- Af8BSAF7AeAB/wEnAWIB2wH/AfQB+AH9Af8BTgGBAeoB/wE7AXQB5QH/AVEBgQHmAf8BUgGBAecB/wFS
- AYEB6AH/AVMBgQHoAf8BTgGBAeUB/wEJAT4BtgH//wCBAAERAUMBtQH/AYMBmQHIAf8BXgF9AboB/wFZ
- AXkBugH/AVMBdgG7Af8BUwF2Ab8B/wEUAUkBsAH/AR8BUAG0Af8BIgFUAbgB/wEmAVcBvQH/ARMBSgG7
- Af8ByAHUAfEF/wEFAT8BwQH/ARABTQHJAf8BaAGJAd8B/wFYAYEB3gH/ASYBYQHUBf8BIAFbAdYB/wEp
- AWEB2QH/AScBYgHaAf8BRAF6AeIF/wHUAeEB9AH/AUIBeAHjAf8BTgGBAeQB/wFPAYEB5QH/AVABgQHm
- Af8BUAGBAeYB/wFOAYEB5QH/AQoBPgG1Af//AIEAARQBRQG1Af8BlAGmAc4B/wFlAYEBuwH/AWABfwG7
- Af8BWgF7AbwB/wFbAX4BwAH/ATMBWQG0Af8BCgE/AasB/wEnAVYBuQH/AQUBNgGsAf8BBQEpAa4B/wHd
- AeIB9AX/AdMB3AHyAf8BjwGpAeMJ/wF4AZYB4Qn/AaIBugHuAf8BsAHEAe8N/wE3AW8B4gH/AUsBfgHi
- Af8BTAF/AeMB/wFNAYAB4wH/AU0BgAHkAf8BTQGAAeQB/wEKAT4BtgH//wCBAAEXAUgBtgH/AaMBswHU
- Af8BbAGCAbwB/wFnAYEBvQH/AWEBgAG9Af8BXgF/Ab0B/wFHAW4BugH/ARIBQwGqBf8B3wHlAfUB/wHh
- AeUB9Bn/AS4BZAHQBf8BiAGrAesD/wH+Bf8BngG3Ae0B/wEUAVYB1wH/ATQBbAHfAf8BPwFzAd8B/wFI
- AXwB4AH/AUkBfAHhAf8BSgF9AeEB/wFKAX0B4gH/AUoBfQHiAf8BCgE+AbYB//8AgQABGQFJAbcB/wGy
- Ab8B2gH/AXIBhwG8Af8BbgGEAb4B/wFoAYEBvgH/AWIBgQG/Af8BYwGBAcIB/wEYAUgBrA3/AZYBrgHg
- Af8BHgFQAb4B/wEFATwBvAH/AUMBcAHPAf8B4wHnAfgF/wHJAdcB9AH/AZIBrQHrAf8BPgFyAdcB/wFA
- AXIB2AH/Ae0B8wH9Af8BVAGAAeEB/wE3AW0B2wH/AUMBdwHdAf8BRAF4Ad4B/wFFAXkB3wH/AUYBegHf
- Af8BRwF6AeAB/wFHAXsB4AH/AUcBewHgAf8BCwE/AbYB//8AgQABGQFJAbcB/wHAAcsB4QH/AXkBjAG+
- Af8BdAGJAb8B/wFvAYYBvwH/AWkBgQHAAf8BagGEAcAB/wEFAS4BmQH/AZIBqAHXBf8BcQGLAdEB/wEF
- ATsBrQH/AR4BUgG/Af8BJgFXAcIB/wEdAVQBwQH/AQUBQQHDAf8B5wHvAfoJ/wHiAeoB9wH/AR0BVwHP
- Af8BKQFjAdcB/wEwAWgB2QH/AT8BcgHaAf8BQAF0AdsB/wFBAXUB3AH/AUMBdgHdAf8BQwF3Ad0B/wFE
- AXcB3gH/AUQBeAHeAf8BRAF4Ad4B/wEKAT4BtgH//wCBAAEYAUgBtwH/Ac0B1gHmAf8BgQGTAcAB/wF7
- AY4BvwH/AXYBiwHBAf8BcAGHAcEB/wFpAYIBvgH/ATwBZwGxCf8BBQEqAaIB/wEaAVQBtwH/ASUBVgG7
- Af8BKAFZAb8B/wErAVwBwwH/AR0BUwHCAf8BUAF6AdMJ/wExAWYB1AH/AS4BZAHVAf8BOQFsAdYB/wE7
- AW4B1wH/ATwBcAHYAf8BPQFxAdkB/wE/AXIB2gH/AUABcwHbAf8BQAF0AdsB/wFBAXQB3AH/AUEBdQHc
- Af8BQQF1AdwB/wEKAT4BtgH//wCBAAEVAUYBtgH/AdgB3gHrAf8BhgGaAcQB/wGBAZMBwQH/AXwBkAHB
- Af8BbQGFAb0B/wGzAcQB4Qn/Ac0B1gHtAf8BBQEvAaIB/wEgAVEBtAH/ASMBVAG4Af8BJgFXAbwB/wEo
- AVoBwAH/ASQBWQHEAf8BFAFPAcQF/wG4AckB7wH/AQYBRQHJAf8BMQFjAdIB/wE2AWoB1AH/ATgBawHV
- Af8BOQFtAdYB/wE7AW4B1wH/ATwBbwHYAf8BPQFwAdkB/wE9AXEB2QH/AT4BcgHaAf8BPgFyAdoB/wE9
- AXAB2QH/AQoBPgG1Af//AIEAARABQwG1Af8B3wHkAe8B/wGRAaMByQH/AYUBmgHEAf8BgQGUAcIB/wF3
- AY0BwgH/AZsBrgHUAf8B+QH4Af0F/wL1AfoB/wEFASYBmwH/AR4BTwGwAf8BIQFSAbUB/wEjAVUBuQH/
- ASYBVwG9Af8BHAFRAcEB/wE0AWQByAn/AWcBhwHeAf8BIgFYAdEB/wE0AWcB0wH/ATUBaQHTAf8BNwFq
- AdUB/wE4AWsB1QH/ATkBbAHWAf8BOgFtAdcB/wE7AW4B1wH/ATsBbwHYAf8BPAFvAdgB/wE4AWwB1gH/
- AQkBPQG2Af//AIEAAQoBOAGhAf8B4wHoAfEB/wGcAa0BzgH/AY4BoAHHAf8BhgGaAcUB/wGBAZUBwwH/
- AXYBigHAAf8BVAF2AbUB/wHIAdIB6AX/AS8BWAGuAf8BBQE6AaUB/wEfAU8BsQH/ASEBUgG1Af8BGgFR
- AbkB/wEFATgBsQH/AbkBxQHsDf8BGAFRAcgB/wExAWUB0QH/ATMBZgHSAf8BNAFoAdMB/wE1AWkB0wH/
- ATYBagHUAf8BNwFrAdUB/wE4AWsB1QH/ATgBbAHWAf8BOQFsAdYB/wEzAWcB0gH/AQkBNwGiAf//AIEA
- AQkBNgGfAf8B3gHkAfAB/wGpAbcB0wH/AZYBpwHKAf8BjgGhAcgB/wGGAZoBxQH/AYEBlgHFAf8BawGE
- Ab4B/wG3AcYB4wn/ATgBXwG0Af8BBQElAZsB/wEFAS8BogH/AQUBMQGqAf8BlAGrAd4F/wGVAa0B4wH/
- ATwBbAHLAf8BYQGCAdUB/wEeAVMBxgH/AS4BYgHOAf8BMAFkAdAB/wExAWUB0QH/ATIBZgHSAf8BMwFn
- AdIB/wE0AWgB0wH/ATUBaAHTAf8BNQFpAdMB/wE2AWkB1AH/AS4BYgHPAf8BCQE2AZ8B//8AgQABCAEw
+ ASADAAEBAQABIAYAAUAqAAENASsBdAH/AQ4BMQGBAf8BDgE1AYgB/wEPATsBmQH/AQ8BPAGfAf8BDwFC
+ AbAB/wEPAUQBtgH/ARABRAG2Af8BEAFEAbYB/wEQAUQBtgH/ARABRAG2Af8BEAFEAbYB/wEQAUQBtgH/
+ ARABRAG2Af8BDwFAAaoB/wEPATwBnwH/AQ8BOgGWAf8BDgE1AYgB/wEOAS8BfwH/AQ0BKgFxAf//AKEA
+ AQ8BOQGTAf8BEgFFAbYB/wEXAUsBuAH/ARsBTwG7Af8BIAFTAb8B/wEkAVgBwwH/ASkBXAHHAf8BLgFh
+ AcoB/wEyAWYBzgH/ATcBawHRAf8BPAFvAdQB/wFAAXQB1wH/AUQBeAHaAf8BRwF7AdwB/wFKAX4B3gH/
+ AU4BgQHgAf8BTwGBAeEB/wFQAYEB4gH/AVABgQHiAf8BTwGBAeEB/wFNAYAB4AH/AUoBfQHeAf8BRQF5
+ AdoB/wFAAXMB1gH/ATgBbAHRAf8BLwFjAcsB/wEZAU0BvAH/AQ8BOAGQAf//AI0AAQ8BOgGWAf8BFgFI
+ AbMB/wEhAVMBtwH/ASUBVwG8Af8BKAFbAcEB/wErAV4BxQH/AS4BYgHJAf8BMQFlAc0B/wE0AWgBzwH/
+ ATgBawHRAf8BOwFuAdMB/wE+AXEB1QH/AUEBdAHXAf8BRAF4AdoB/wFHAXoB3AH/AUoBfgHeAf8BTQGB
+ AeAB/wFQAYEB4gH/AVQBgQHkAf8BVwGBAeYB/wFaAYIB6QH/AV0BhQHrAf8BYAGIAe0B/wFjAYsB7wH/
+ AWYBjgHxAf8BaQGSAfMB/wFsAZQB9QH/AWwBlAH1Af8BMwFmAc4B/wEOATkBkwH//wCJAAERAUQBswH/
+ AR0BTwGwAf8BIQFTAbUB/wEkAVYBugH/ASgBWgG/Af8BKwFdAcMB/wEuAWEByAH/ATEBZQHMAf8BNAFo
+ Ac8B/wE3AWsB0QH/AToBbgHTAf8BPgFxAdUB/wFBAXQB1wH/AUQBdwHZAf8BRwF6AdwB/wFKAX0B3gH/
+ AU0BgQHgAf8BUAGBAeIB/wFTAYEB5AH/AVYBgQHmAf8BWgGCAegB/wFdAYUB6gH/AWABiAHsAf8BYwGL
+ Ae8B/wFmAY4B8QH/AWkBkQHzAf8BbAGUAfUB/wFvAZcB9wH/AW4BlgH2Af8BGwFPAb4B//8AiQABFAFG
+ Aa8B/wEdAU4BrgH/ASEBUgGzAf8BJAFWAbgB/wEnAVkBvQH/ASoBXQHBAf8BLQFgAcYB/wExAWQBygH/
+ ATQBZwHOAf8BNwFqAdAB/wE6AW4B0wH/AT0BcQHVAf8BQAF0AdcB/wFDAXcB2QH/AUYBegHbAf8BSQF9
+ Ad0B/wFNAYAB3wH/AVABgQHhAf8BUwGBAeQB/wFWAYEB5gH/AVkBgQHoAf8BXAGEAeoB/wFfAYcB7AH/
+ AWIBigHuAf8BZQGNAfAB/wFoAZAB8gH/AWoBkwH0Af8BbAGUAfUB/wFtAZUB9gH/ATQBaAHOAf//AIkA
+ ARUBRwGsAf8BHQFNAawB/wEgAVEBsQH/ASQBVQG2Af8BJwFYAbsB/wEqAVwBvwH/AS0BXwHEAf8BMAFj
+ AcgB/wEzAWcBzQH/ATYBagHQAf8BOQFtAdIB/wE9AXAB1AH/AUABcwHWAf8BQwF2AdkB/wFGAXkB2wH/
+ AUkBfAHdAf8BTAF/Ad8B/wFPAYEB4QH/AVIBgQHjAf8BVQGBAeUB/wFYAYEB5wH/AVsBgwHpAf8BXgGG
+ AesB/wFhAYkB7QH/AWMBjAHvAf8BZgGOAfEB/wFoAZAB8gH/AWoBkgHzAf8BagGTAfQB/wE9AXEB1QH/
+ /wCFAAEOAS4BfAH/ARYBRgGpAf8BHAFMAakB/wEfAVABrwH/ASIBVAG0Af8BJgFXAbkB/wEpAVsBvQH/
+ ASwBXwHCAf8BLwFiAcYB/wEyAWUBywH/ATYBaQHPAf8BOQFsAdIB/wE8AW8B1AH/AT8BcgHWAf8BQgF1
+ AdgB/wFFAXgB2gH/AUgBewHcAf8BRAF4Ad4B/wE2AW4B2wH/AUgBfwHfAf8BPAF2Ad8B/wFOAYEB5wH/
+ AWkBjgHrAf8BTQGBAeoB/wFfAYcB7AH/AWIBigHuAf8BZAGMAe8B/wFmAY4B8QH/AWcBjwHxAf8BZwGQ
+ AfIB/wFEAXgB2gH/AQ4BLgF8Af//AIEAAQ4BMwGCAf8BGgFJAacB/wEbAUsBpwH/AR4BTwGsAf8BIgFT
+ AbIB/wElAVYBtwH/ASkBWgG7Af8BLAFeAcAB/wEvAWEBxAH/ATIBZQHJAf8BNQFoAc0B/wE4AWsB0QH/
+ ATsBbgHTAf8BPgFxAdUB/wFBAXQB1wH/AUQBdwHZAf8BRwF6AdsB/wE7AXEB3gH/AvwG/wGBAZwB7gH/
+ AeQB6wH9Bf8BXwGGAesB/wFXAYEB6wH/AV8BiAHsAf8BYQGKAe4B/wFjAYsB7wH/AWQBjAHvAf8BZAGN
+ AfAB/wFKAX4B3gH/AQ4BMwGCAf//AIEAAQ4BNwGNAf8BQwFqAbMB/wE0AV4BrgH/AR8BTgGqAf8BIQFR
+ Aa8B/wEkAVUBtAH/ASgBWQG5Af8BKwFcAb4B/wEuAWABwgH/ATEBYwHHAf8BNAFnAcsB/wE3AWoBzwH/
+ AToBbQHSAf8BPQFwAdUB/wFAAXMB1wH/AUMBdgHZAf8BPwF0AdsB/wEdAV4B1wP/Af4F/wH9Af4B/Qn/
+ AYsBrgHyAf8BOQF2AeYB/wFRAYEB6wH/AV8BhwHsAf8BYAGIAe0B/wFhAYkB7QH/AWIBigHuAf8BTwGB
+ AeEB/wEOATcBjgH//wCBAAEPATwBnwH/AVIBdQG1Af8BTwFzAbYB/wE+AWcBtAH/ARoBTAGtAf8BIwFU
+ AbIB/wEmAVcBtwH/ASoBWwG7Af8BLQFeAcAB/wEwAWIBxAH/ATMBZQHJAf8BNgFpAc0B/wE5AWwB0QH/
+ ATsBbwHUAf8BPwFyAdYB/wE3AW8B1wH/AUIBcwHdAf8BbwGLAecF/wFcAYIB4wH/ASgBZQHbAf8BKQFn
+ Ad0B/wGJAakB7wn/AXMBlgHsAf8BWAGEAeoB/wFdAYYB6wH/AV4BhwHsAf8BXwGHAewB/wFSAYEB4wH/
+ AQ8BPAGfAf//AIEAARABPgGkAf8BaAGBAbsB/wFWAXkBtwH/AVABdQG4Af8BQgFsAbUB/wEcAU0BrwH/
+ ASUBVgG0Af8BKAFZAbkB/wEsAV0BvgH/AS8BYAHCAf8BMgFkAcYB/wE0AWcBygH/ATcBagHOAf8BOgFu
+ AdIB/wE9AXEB1QH/AS8BZgHSAf8B2wHlAfUF/wG/AdIB9QH/ASsBZgHYAf8BTQGBAeAB/wFQAYEB4QH/
+ ASoBaAHfAf8C/gH9Af8B5AHqAfwB/wFdAYcB6gH/AVkBggHoAf8BWwGDAekB/wFbAYQB6gH/AVwBhAHq
+ Af8BVAGBAeQB/wEPAT4BpQH//wCBAAEUAUYBtQH/AXsBigHCAf8BXgF/AbkB/wFXAXoBuQH/AVgBeQG+
+ Af8BOAFjAbUB/wEgAVABsQH/AScBWAG2Af8BKgFbAbsB/wEtAV8BwAH/ASoBWgHEAf8BGwFTAcIB/wEp
+ AV8BygH/AS0BYgHQAf8BOwFvAdMB/wEmAWEB1gH/AYMBowHmBf8BrwHHAe8B/wEsAWcB2QH/AUsBfwHe
+ Af8BTgGBAeAB/wEtAWgB2wH/AfQB+AH9Af8BVAGBAeoB/wFBAXoB5QH/AVcBgQHmAf8BWAGBAecB/wFY
+ AYEB6AH/AVkBgQHoAf8BVAGBAeUB/wEPAUQBtgH//wCBAAEXAUkBtQH/AYMBmQHIAf8BZAGBAboB/wFf
+ AX8BugH/AVkBfAG7Af8BWQF8Ab8B/wEaAU8BsAH/ASUBVgG0Af8BKAFaAbgB/wEsAV0BvQH/ARkBUAG7
+ Af8ByAHUAfEF/wELAUUBwQH/ARYBUwHJAf8BbgGJAd8B/wFeAYEB3gH/ASwBZwHUBf8BJgFhAdYB/wEv
+ AWcB2QH/AS0BaAHaAf8BSgGAAeIF/wHUAeEB9AH/AUgBfgHjAf8BVAGBAeQB/wFVAYEB5QH/AVYBgQHm
+ Af8BVgGBAeYB/wFUAYEB5QH/ARABRAG1Af//AIEAARoBSwG1Af8BlAGmAc4B/wFrAYEBuwH/AWYBgQG7
+ Af8BYAGBAbwB/wFhAYEBwAH/ATkBXwG0Af8BEAFFAasB/wEtAVwBuQH/AQsBPAGsAf8BCwEvAa4B/wHd
+ AeIB9AX/AdMB3AHyAf8BjwGpAeMJ/wF+AZYB4Qn/AaIBugHuAf8BsAHEAe8N/wE9AXUB4gH/AVEBgQHi
+ Af8BUgGBAeMB/wFTAYEB4wH/AVMBgQHkAf8BUwGBAeQB/wEQAUQBtgH//wCBAAEdAU4BtgH/AaMBswHU
+ Af8BcgGCAbwB/wFtAYEBvQH/AWcBgQG9Af8BZAGBAb0B/wFNAXQBugH/ARgBSQGqBf8B3wHlAfUB/wHh
+ AeUB9Bn/ATQBagHQBf8BiAGrAesD/wH+Bf8BngG3Ae0B/wEaAVwB1wH/AToBcgHfAf8BRQF5Ad8B/wFO
+ AYEB4AH/AU8BgQHhAf8BUAGBAeEB/wFQAYEB4gH/AVABgQHiAf8BEAFEAbYB//8AgQABHwFPAbcB/wGy
+ Ab8B2gH/AXgBhwG8Af8BdAGEAb4B/wFuAYEBvgH/AWgBgQG/Af8BaQGBAcIB/wEeAU4BrA3/AZYBrgHg
+ Af8BJAFWAb4B/wELAUIBvAH/AUkBdgHPAf8B4wHnAfgF/wHJAdcB9AH/AZIBrQHrAf8BRAF4AdcB/wFG
+ AXgB2AH/Ae0B8wH9Af8BWgGBAeEB/wE9AXMB2wH/AUkBfQHdAf8BSgF+Ad4B/wFLAX8B3wH/AUwBgAHf
+ Af8BTQGAAeAB/wFNAYEB4AH/AU0BgQHgAf8BEQFFAbYB//8AgQABHwFPAbcB/wHAAcsB4QH/AX8BjAG+
+ Af8BegGJAb8B/wF1AYYBvwH/AW8BgQHAAf8BcAGEAcAB/wELATQBmQH/AZIBqAHXBf8BdwGLAdEB/wEL
+ AUEBrQH/ASQBWAG/Af8BLAFdAcIB/wEjAVoBwQH/AQsBRwHDAf8B5wHvAfoJ/wHiAeoB9wH/ASMBXQHP
+ Af8BLwFpAdcB/wE2AW4B2QH/AUUBeAHaAf8BRgF6AdsB/wFHAXsB3AH/AUkBfAHdAf8BSQF9Ad0B/wFK
+ AX0B3gH/AUoBfgHeAf8BSgF+Ad4B/wEQAUQBtgH//wCBAAEeAU4BtwH/Ac0B1gHmAf8BgQGTAcAB/wGB
+ AY4BvwH/AXwBiwHBAf8BdgGHAcEB/wFvAYIBvgH/AUIBbQGxCf8BCwEwAaIB/wEgAVoBtwH/ASsBXAG7
+ Af8BLgFfAb8B/wExAWIBwwH/ASMBWQHCAf8BVgGAAdMJ/wE3AWwB1AH/ATQBagHVAf8BPwFyAdYB/wFB
+ AXQB1wH/AUIBdgHYAf8BQwF3AdkB/wFFAXgB2gH/AUYBeQHbAf8BRgF6AdsB/wFHAXoB3AH/AUcBewHc
+ Af8BRwF7AdwB/wEQAUQBtgH//wCBAAEbAUwBtgH/AdgB3gHrAf8BhgGaAcQB/wGBAZMBwQH/AYEBkAHB
+ Af8BcwGFAb0B/wGzAcQB4Qn/Ac0B1gHtAf8BCwE1AaIB/wEmAVcBtAH/ASkBWgG4Af8BLAFdAbwB/wEu
+ AWABwAH/ASoBXwHEAf8BGgFVAcQF/wG4AckB7wH/AQwBSwHJAf8BNwFpAdIB/wE8AXAB1AH/AT4BcQHV
+ Af8BPwFzAdYB/wFBAXQB1wH/AUIBdQHYAf8BQwF2AdkB/wFDAXcB2QH/AUQBeAHaAf8BRAF4AdoB/wFD
+ AXYB2QH/ARABRAG1Af//AIEAARYBSQG1Af8B3wHkAe8B/wGRAaMByQH/AYUBmgHEAf8BgQGUAcIB/wF9
+ AY0BwgH/AZsBrgHUAf8B+QH4Af0F/wL1AfoB/wELASwBmwH/ASQBVQGwAf8BJwFYAbUB/wEpAVsBuQH/
+ ASwBXQG9Af8BIgFXAcEB/wE6AWoByAn/AW0BhwHeAf8BKAFeAdEB/wE6AW0B0wH/ATsBbwHTAf8BPQFw
+ AdUB/wE+AXEB1QH/AT8BcgHWAf8BQAFzAdcB/wFBAXQB1wH/AUEBdQHYAf8BQgF1AdgB/wE+AXIB1gH/
+ AQ8BQwG2Af//AIEAARABPgGhAf8B4wHoAfEB/wGcAa0BzgH/AY4BoAHHAf8BhgGaAcUB/wGBAZUBwwH/
+ AXwBigHAAf8BWgF8AbUB/wHIAdIB6AX/ATUBXgGuAf8BCwFAAaUB/wElAVUBsQH/AScBWAG1Af8BIAFX
+ AbkB/wELAT4BsQH/AbkBxQHsDf8BHgFXAcgB/wE3AWsB0QH/ATkBbAHSAf8BOgFuAdMB/wE7AW8B0wH/
+ ATwBcAHUAf8BPQFxAdUB/wE+AXEB1QH/AT4BcgHWAf8BPwFyAdYB/wE5AW0B0gH/AQ8BPQGiAf//AIEA
+ AQ8BPAGfAf8B3gHkAfAB/wGpAbcB0wH/AZYBpwHKAf8BjgGhAcgB/wGGAZoBxQH/AYEBlgHFAf8BcQGE
+ Ab4B/wG3AcYB4wn/AT4BZQG0Af8BCwErAZsB/wELATUBogH/AQsBNwGqAf8BlAGrAd4F/wGVAa0B4wH/
+ AUIBcgHLAf8BZwGCAdUB/wEkAVkBxgH/ATQBaAHOAf8BNgFqAdAB/wE3AWsB0QH/ATgBbAHSAf8BOQFt
+ AdIB/wE6AW4B0wH/ATsBbgHTAf8BOwFvAdMB/wE8AW8B1AH/ATQBaAHPAf8BDwE8AZ8B//8AgQABDgE2
AYsB/wHUAdwB7wH/AbYBwgHZAf8BngGuAc4B/wGWAagBywH/AY4BoQHIAf8BhgGbAcYB/wGBAZMBwxX/
- AeQB7QH0Df8BBQEjAasB/wEVAUwBvQH/ASEBVQHFAf8BKgFdAcgB/wEsAV8BywH/AS0BYQHOAf8BLgFi
- Ac8B/wEvAWMB0AH/ATABZAHQAf8BMQFlAdEB/wEyAWYB0QH/ATIBZgHSAf8BMwFmAdIB/wEpAV0BywH/
- AQgBMAGLAf//AIEAAQgBLQGBAf8BxAHPAeoB/wHDAc0B3wH/AaYBtQHRAf8BngGuAc4B/wGXAagBywH/
- AY8BogHIAf8BgQGSAb4B/wGjAbMB1QH/AWMBgQG8Af8BBQERAYUB/wHrAfAB9Qn/AakBuwHhCf8BZQGC
- Ac4B/wEdAVABvQH/ASYBWAHBAf8BKAFaAcUB/wEpAVwByAH/ASoBXgHLAf8BLAFfAc0B/wEtAWABzgH/
- AS4BYQHOAf8BLgFiAc8B/wEvAWMBzwH/AS8BYwHQAf8BMAFkAdAB/wEkAVcBxwH/AQgBLQGBAf//AIEA
- AQcBJwFzAf8BrgG+AeQB/wHPAdcB5QH/Aa4BuwHVAf8BpgG1AdEB/wGfAa8BzwH/AZcBqAHMAf8BjwGi
- AckB/wGHAZwBxwH/AYQBmwHGAf8BcQGHAcQB/wHQAdwB7QX/ATUBXwGwAf8BBQEWAZUB/wEJAT8BqQH/
- AakBuAHhAf8BBgE8Aa0B/wERAUgBswH/AR0BTwG9Af8BHgFRAcEB/wEgAVkBxAH/ASgBWwHHAf8BKQFc
- AcoB/wEqAV4BzAH/ASsBXgHMAf8BLAFfAc0B/wEsAWABzQH/AS0BYAHNAf8BLQFgAc4B/wEfAVIBxAH/
- AQgBJwFzAf//AIUAAZYBqwHdAf8B2gHgAesB/wG3AcIB2AH/Aa8BvAHVAf8BpwG1AdIB/wGfAa8BzwH/
- AZcBqQHMAf8BjwGiAcoB/wGHAZwBxwH/AYEBmAHGAf8BgQGXAc0B/wGnAbYB1wH/AXYBjQHIAf8BZgGC
- AcEB/wFcAX8BwwH/AVIBfAHEAf8BVAF5AcUB/wFWAXwBxQH/AVEBdwHGAf8BTAF1AcYB/wFCAW8ByQH/
- AToBaAHJAf8BNQFlAcsB/wEwAWIBywH/ASsBXgHLAf8BKQFcAcsB/wEpAV0BywH/ASoBXQHMAf8BKgFe
- AcwB/wEaAU0BwAH//wCJAAGAAZYB1gH/AeQB6AHwAf8BvwHJAdwB/wG3AcMB2QH/Aa8BvAHVAf8BpwG2
- AdIB/wGfAa8BzwH/AZgBqQHNAf8BkAGiAcoB/wGIAZwByAH/AYEBlwHHAf8BfQGUAcgB/wF7AZABxwH/
- AXcBiwHGAf8BcQGHAcYB/wFnAYIBxwH/AWEBgQHHAf8BWwF/AccB/wFVAXoBxwH/AU8BdgHIAf8BSQFy
- AcgB/wFDAW4ByQH/AT0BagHKAf8BNwFmAcoB/wEwAWEBywH/ASoBXQHKAf8BJwFaAckB/wEnAVsBygH/
- AScBWwHKAf8BFQFJAb0B//8AiQABYQGBAc0B/wHtAfAB9QH/AccB0AHgAf8BvwHJAd0B/wG3AcMB2QH/
- Aa8BvAHWAf8BpwG2AdMB/wGgAbAB0AH/AZgBqQHNAf8BkAGjAcsB/wGIAZ0ByAH/AYEBlwHGAf8BgAGT
- AccB/wF6AZAByAH/AXQBiwHHAf8BbgGHAccB/wFnAYIBxwH/AWEBgQHHAf8BWgF+AccB/wFUAXoBxwH/
- AU4BdQHIAf8BSAFxAcgB/wFCAW0ByQH/ATsBaAHJAf8BNQFkAcoB/wEuAV8BygH/ASgBWwHJAf8BJAFY
- AcgB/wEkAVgByAH/ARABRAG6Af//AIkAASABTwG7Af8B8AHyAfgB/wHTAdkB5gH/AcgB0AHhAf8BwAHK
+ AeQB7QH0Df8BCwEpAasB/wEbAVIBvQH/AScBWwHFAf8BMAFjAcgB/wEyAWUBywH/ATMBZwHOAf8BNAFo
+ Ac8B/wE1AWkB0AH/ATYBagHQAf8BNwFrAdEB/wE4AWwB0QH/ATgBbAHSAf8BOQFsAdIB/wEvAWMBywH/
+ AQ4BNgGLAf//AIEAAQ4BMwGBAf8BxAHPAeoB/wHDAc0B3wH/AaYBtQHRAf8BngGuAc4B/wGXAagBywH/
+ AY8BogHIAf8BgQGSAb4B/wGjAbMB1QH/AWkBgQG8Af8BCwEXAYUB/wHrAfAB9Qn/AakBuwHhCf8BawGC
+ Ac4B/wEjAVYBvQH/ASwBXgHBAf8BLgFgAcUB/wEvAWIByAH/ATABZAHLAf8BMgFlAc0B/wEzAWYBzgH/
+ ATQBZwHOAf8BNAFoAc8B/wE1AWkBzwH/ATUBaQHQAf8BNgFqAdAB/wEqAV0BxwH/AQ4BMwGBAf//AIEA
+ AQ0BLQF5Af8BrgG+AeQB/wHPAdcB5QH/Aa4BuwHVAf8BpgG1AdEB/wGfAa8BzwH/AZcBqAHMAf8BjwGi
+ AckB/wGHAZwBxwH/AYQBmwHGAf8BdwGHAcQB/wHQAdwB7QX/ATsBZQGwAf8BCwEcAZUB/wEPAUUBqQH/
+ AakBuAHhAf8BDAFCAa0B/wEXAU4BswH/ASMBVQG9Af8BJAFXAcEB/wEmAV8BxAH/AS4BYQHHAf8BLwFi
+ AcoB/wEwAWQBzAH/ATEBZAHMAf8BMgFlAc0B/wEyAWYBzQH/ATMBZgHNAf8BMwFmAc4B/wElAVgBxAH/
+ AQ4BLQF5Af//AIUAAZYBqwHdAf8B2gHgAesB/wG3AcIB2AH/Aa8BvAHVAf8BpwG1AdIB/wGfAa8BzwH/
+ AZcBqQHMAf8BjwGiAcoB/wGHAZwBxwH/AYEBmAHGAf8BgQGXAc0B/wGnAbYB1wH/AXwBjQHIAf8BbAGC
+ AcEB/wFiAYEBwwH/AVgBgQHEAf8BWgF/AcUB/wFcAYEBxQH/AVcBfQHGAf8BUgF7AcYB/wFIAXUByQH/
+ AUABbgHJAf8BOwFrAcsB/wE2AWgBywH/ATEBZAHLAf8BLwFiAcsB/wEvAWMBywH/ATABYwHMAf8BMAFk
+ AcwB/wEgAVMBwAH//wCJAAGBAZYB1gH/AeQB6AHwAf8BvwHJAdwB/wG3AcMB2QH/Aa8BvAHVAf8BpwG2
+ AdIB/wGfAa8BzwH/AZgBqQHNAf8BkAGiAcoB/wGIAZwByAH/AYEBlwHHAf8BgQGUAcgB/wGBAZABxwH/
+ AX0BiwHGAf8BdwGHAcYB/wFtAYIBxwH/AWcBgQHHAf8BYQGBAccB/wFbAYABxwH/AVUBfAHIAf8BTwF4
+ AcgB/wFJAXQByQH/AUMBcAHKAf8BPQFsAcoB/wE2AWcBywH/ATABYwHKAf8BLQFgAckB/wEtAWEBygH/
+ AS0BYQHKAf8BGwFPAb0B//8AiQABZwGBAc0B/wHtAfAB9QH/AccB0AHgAf8BvwHJAd0B/wG3AcMB2QH/
+ Aa8BvAHWAf8BpwG2AdMB/wGgAbAB0AH/AZgBqQHNAf8BkAGjAcsB/wGIAZ0ByAH/AYEBlwHGAf8BgQGT
+ AccB/wGAAZAByAH/AXoBiwHHAf8BdAGHAccB/wFtAYIBxwH/AWcBgQHHAf8BYAGBAccB/wFaAYABxwH/
+ AVQBewHIAf8BTgF3AcgB/wFIAXMByQH/AUEBbgHJAf8BOwFqAcoB/wE0AWUBygH/AS4BYQHJAf8BKgFe
+ AcgB/wEqAV4ByAH/ARYBSgG6Af//AIkAASYBVQG7Af8B8AHyAfgB/wHTAdkB5gH/AcgB0AHhAf8BwAHK
Ad0B/wG4AcMB2gH/AbABvQHWAf8BqAG2AdMB/wGgAbAB0AH/AZgBqgHOAf8BkAGjAcsB/wGIAZ0ByQH/
- AYEBlwHGAf8BfgGSAcYB/wF5AY8BxwH/AXQBiwHHAf8BbQGGAccB/wFnAYIBxwH/AWABgQHHAf8BWgF+
- AccB/wFUAXkBxwH/AU0BdAHHAf8BRwFwAcgB/wFAAWwByAH/AToBZwHIAf8BMwFiAckB/wEsAV4ByAH/
- ASYBWAHHAf8BHwFTAcQB/wEKAT0BswH//wCJAAEHASoBfAH/AV8BgQHOAf8B8AHyAfkB/wHlAekB8QH/
+ AYEBlwHGAf8BgQGSAcYB/wF/AY8BxwH/AXoBiwHHAf8BcwGGAccB/wFtAYIBxwH/AWYBgQHHAf8BYAGB
+ AccB/wFaAX8BxwH/AVMBegHHAf8BTQF2AcgB/wFGAXIByAH/AUABbQHIAf8BOQFoAckB/wEyAWQByAH/
+ ASwBXgHHAf8BJQFZAcQB/wEQAUMBswH//wCJAAENATABgQH/AWUBgQHOAf8B8AHyAfkB/wHlAekB8QH/
AdcB3QHpAf8BywHTAeMB/wG+AckB3QH/AbEBvgHYAf8BqAG3AdQB/wGgAbAB0QH/AZkBqgHOAf8BkQGk
- AcwB/wGIAZ0ByQH/AYEBlwHHAf8BfQGRAcUB/wF3AYwBxQH/AXIBiQHGAf8BbQGGAccB/wFmAYEBxwH/
- AV8BgQHGAf8BWQF9AcYB/wFTAXgBxgH/AUwBcwHHAf8BRgFuAccB/wE/AWoBxwH/ATgBZQHIAf8BMQFh
- AcgB/wEnAVgBxQH/AQ8BQwG5Af8BBwEmAXEB//8AjQABCAEqAXwB/wEdAU0BugH/AVkBfAHMAf8BeAGQ
+ AcwB/wGIAZ0ByQH/AYEBlwHHAf8BgQGRAcUB/wF9AYwBxQH/AXgBiQHGAf8BcwGGAccB/wFsAYEBxwH/
+ AWUBgQHGAf8BXwGBAcYB/wFZAX4BxgH/AVIBeQHHAf8BTAF0AccB/wFFAXABxwH/AT4BawHIAf8BNwFn
+ AcgB/wEtAV4BxQH/ARUBSQG5Af8BDQEsAXcB//8AjQABDgEwAYEB/wEjAVMBugH/AV8BgQHMAf8BfgGQ
AdUB/wGOAaUB3AH/AaUBuAHjAf8BuwHJAeoB/wHJAdQB7AH/Ac4B1wHtAf8B0QHZAesB/wHQAdgB6QH/
- AcsB1AHnAf8BwQHMAeMB/wG3AcQB3wH/AawBuwHbAf8BnwGwAdcB/wGRAaYB0wH/AYIBmgHQAf8BdQGN
- AcwB/wFjAYEByQH/AVABdgHFAf8BPQFnAcIB/wEyAV4BwAH/AScBVgG+Af8BHgFPAb0B/wEWAUgBugH/
- AQsBPwG2Af8BBwEnAXQB//8ApQABCAEpAXkB/wEIAS8BiAH/AQkBNAGWAf8BCQE2AZ8B/wEJATsBrQH/
- AQoBPgG2Af8BCQE+AbYB/wEMAT8BtgH/AQ0BQAG2Af8BDQFAAbYB/wELAT4BtgH/AQkBPgG2Af8BCgE+
- AbYB/wEJATkBpwH/AQkBNgGfAf8BCQEyAZAB/wEIAS4BhQH/AQgBKAF2Af//AJ0AAUIBTQE+BwABPgMA
+ AcsB1AHnAf8BwQHMAeMB/wG3AcQB3wH/AawBuwHbAf8BnwGwAdcB/wGRAaYB0wH/AYIBmgHQAf8BewGN
+ AcwB/wFpAYEByQH/AVYBfAHFAf8BQwFtAcIB/wE4AWQBwAH/AS0BXAG+Af8BJAFVAb0B/wEcAU4BugH/
+ AREBRQG2Af8BDQEtAXoB//8ApQABDgEvAX8B/wEOATUBiAH/AQ8BOgGWAf8BDwE8AZ8B/wEPAUEBrQH/
+ ARABRAG2Af8BDwFEAbYB/wESAUUBtgH/ARMBRgG2Af8BEwFGAbYB/wERAUQBtgH/AQ8BRAG2Af8BEAFE
+ AbYB/wEPAT8BpwH/AQ8BPAGfAf8BDwE4AZAB/wEOATQBhQH/AQ4BLgF8Af//AJ0AAUIBTQE+BwABPgMA
ASgDAAGAAwABIAMAAQEBAAEBBgABAhYAA/8BAAH8AgABPwwAAcACAAEDDAABgAIAAQEMAAGAAgABAQwA
AYACAAEBDAABgAIAAQH/AD0AAYACAAEBDAABgAIAAQEMAAGAAgABAQwAAYACAAEBDAABgAIAAQEMAAHA
AgABAwwAAf4CAAF/DAAL
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: <se...@us...> - 2007-03-13 03:38:42
|
Revision: 184
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=184&view=rev
Author: sergem1
Date: 2007-03-12 20:38:40 -0700 (Mon, 12 Mar 2007)
Log Message:
-----------
new page format support
Modified Paths:
--------------
trunk/plugins/ETVNet/ETVNet/ETVBrowser.cs
Modified: trunk/plugins/ETVNet/ETVNet/ETVBrowser.cs
===================================================================
--- trunk/plugins/ETVNet/ETVNet/ETVBrowser.cs 2007-03-11 20:43:19 UTC (rev 183)
+++ trunk/plugins/ETVNet/ETVNet/ETVBrowser.cs 2007-03-13 03:38:40 UTC (rev 184)
@@ -84,9 +84,10 @@
);
regexArchivedEntries = new Regex(
@"<td[^>]*?>\d\d(\d\d-\d\d-\d\d)\s(\d\d:\d\d)</td>\s*" + "\r\n" + @"<td[^>]"
- + @"*?>(\d+)</td>\s*" + "\r\n" + @"<td[^>]*?>\s*\[<a\s+href=""([^""]*?)""\s*>"
- + @"[^<]*?</a>\]\s*</td>\s*" + "\r\n" + @"<td[^>]*?>.*?<a\s+href=""([^""]*?)""\s"
- + @"*>([^<]*?)</a>.*?</td>\s*" + "\r\n" + @"<td[^>]*?>(.*?)</td>" + "\r\n" + @"",
+ + @"*?>.*?</td>\s*" + "\r\n" + @"<td[^>]*?>(\d+)</td>\s*" + "\r\n" + @"<td[^>]*?>\s*\[<a\s"
+ + @"+href=""([^""]*?)""\s*>[^<]*?</a>\]\s*</td>\s*<td[^>]*?>.*?<"
+ + @"a\s+href=""([^""]*?)""\s*>([^<]*?)</a>.*?</td>\s*" + "\r\n" + @"<td[^>]*?"
+ + @">(.*?)</td>",
RegexOptions.IgnoreCase
| RegexOptions.Singleline
| RegexOptions.CultureInvariant
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sa...@us...> - 2007-03-11 20:43:21
|
Revision: 183
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=183&view=rev
Author: saamand
Date: 2007-03-11 13:43:19 -0700 (Sun, 11 Mar 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/MyLyrics/LyricsEngine/LyricSearch.cs
trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj
trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs
trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.cs
trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.Designer.cs
trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.cs
trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_test.cs
trunk/plugins/MyLyrics/My Lyrics/MyLyricsUtil.cs
trunk/plugins/MyLyrics/MyLyric Windows Application/MyLyric Windows Application/LyricsEngine Tester.cs
Added Paths:
-----------
trunk/plugins/MyLyrics/LyricsEngine/LyricsController.cs
trunk/plugins/MyLyrics/LyricsEngine/LyricsDatabase/
trunk/plugins/MyLyrics/LyricsEngine/LyricsDatabase/LyricsDatabase.cs
trunk/plugins/MyLyrics/LyricsEngine/LyricsDatabase/LyricsItem.cs
trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/
trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/EvilLabs.cs
trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/HotLyrics.cs
trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/Lyrics007.cs
trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricsOnDemand.cs
trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/SeekLyrics.cs
trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/Wiki.cs
trunk/plugins/MyLyrics/MyLyrics.sln
Removed Paths:
-------------
trunk/plugins/MyLyrics/LRC/
trunk/plugins/MyLyrics/LyricWiki/
trunk/plugins/MyLyrics/LyricsEngine/LyricController.cs
Deleted: trunk/plugins/MyLyrics/LyricsEngine/LyricController.cs
===================================================================
--- trunk/plugins/MyLyrics/LyricsEngine/LyricController.cs 2007-03-11 15:18:13 UTC (rev 182)
+++ trunk/plugins/MyLyrics/LyricsEngine/LyricController.cs 2007-03-11 20:43:19 UTC (rev 183)
@@ -1,305 +0,0 @@
-using System;
-using System.Drawing;
-using System.Collections;
-using System.ComponentModel;
-using System.Windows.Forms;
-using System.Data;
-using System.Threading;
-using System.IO;
-using System.Diagnostics;
-using LyricsEngineConfig;
-using LyricsEngine;
-
-namespace LyricsEngine
-{
-
- #region Public Delegates
- // delegates used to call MainForm functions from worker thread
- public delegate void Delegate_LC_updateString(String s);
- public delegate void Delegate_LC_UpdateStatus(Boolean b1);
- public delegate void Delegate_LC_ErrorLog_LyricNotFound(String s);
- public delegate void Delegate_LC_WriteFoundLyric(String[] s, String artist, String track);
- public delegate void Delegate_LC_ThreadFinished();
- #endregion
-
- public class LyricController : IDisposable
- {
- private ILyricForm m_Form;
-
- // status
- private static int noOfLyricsToSearch;
- private static int noOfLyricsSearched;
- private static int noOfLyricsFound;
- private static int noOfLyricsNotFound;
-
- private bool m_StopSearches = false;
- public static event EventHandler StopTheSearchAndAbort = null;
-
- 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;
-
- // Lyric sites
- private string[] lyricSites;
- private string[] eastSites;
-
- public LyricController(ILyricForm mainForm,
- ManualResetEvent eventStopThread, ManualResetEvent eventThreadStopped,
- string[] lyricSites)
- {
- this.m_Form = mainForm;
-
- LyricController.noOfLyricsToSearch = 1;
- LyricController.noOfLyricsSearched = 0;
- LyricController.noOfLyricsFound = 0;
- LyricController.noOfLyricsNotFound = 0;
-
- this.lyricSites = lyricSites;
-
- ArrayList easySitesArrayList = new ArrayList();
-
- foreach (string site in lyricSites)
- {
- if (Setup.IsMemberOfEasySites(site))
- {
- easySitesArrayList.Add(site);
- }
- }
- eastSites = (string[])easySitesArrayList.ToArray(typeof(string));
- LyricSearch.EasySites = eastSites;
-
- // initialize events
- m_EventStop_LyricController = eventStopThread;
- m_EventStopped_LyricController = eventThreadStopped;
-
- m_EventStop_LyricSearches = new ManualResetEvent(false);
- m_EventStop_LyricSearches.Set();
-
- LyricSearch.Abort = false;
- }
-
-
- public void Run()
- {
- // check if thread is cancelled
- while (true)
- {
- Thread.Sleep(500);
-
- // check if thread is cancelled
- if (m_EventStop_LyricController.WaitOne(0, true))
- {
- // clean-up operations may be placed here
- for (int i=0; i<threadList.Count; i++)
- {
- ((Thread)threadList[i]).Abort();
- }
-
- bool stillThreadsAlive = true;
- while (stillThreadsAlive)
- {
- for (int i = 0; i < threadList.Count; i++)
- {
- stillThreadsAlive = false; ;
- if (((Thread)threadList[i]).IsAlive)
- stillThreadsAlive = true;
- }
- }
-
- Thread.Sleep(500);
- m_EventStopped_LyricController.Set();
- break;
- }
- }
- }
-
-
- public void Dispose()
- {
- // clean-up operations may be placed here
- for (int i = 0; i < threadList.Count; i++)
- {
- ((Thread)threadList[i]).Abort();
- }
-
- bool stillThreadsAlive = true;
- while (stillThreadsAlive)
- {
- for (int i = 0; i < threadList.Count; i++)
- {
- stillThreadsAlive = false; ;
- if (((Thread)threadList[i]).IsAlive)
- stillThreadsAlive = true;
- }
- }
-
- Thread.Sleep(500);
-
- // inform main thread that this thread stopped
- m_EventStopped_LyricController.Set();
- finishThread("", "", "The search has ended.", "");
- }
-
- public void updateManualResetEvents(ManualResetEvent eventStopThread, ManualResetEvent eventThreadStopped)
- {
- this.m_EventStop_LyricController = eventStopThread;
- this.m_EventStopped_LyricController = eventThreadStopped;
- }
-
- public void addNewLyricSearch(string artist, string title)
- {
- if (eastSites.Length > 0)
- {
- // create worker thread instance
- ThreadStart easySitesThreadInstance = delegate
- {
-
- LyricSearch lyricSearch_EasySites = new LyricSearch(m_EventStop_LyricController, m_EventStopped_LyricController, this);
- lyricSearch_EasySites.setLyricInfo(artist, title);
- lyricSearch_EasySites.Run();
- };
-
- Thread lyricSearchThread = new Thread(easySitesThreadInstance);
- lyricSearchThread.Name = "BasicSearch for " + artist + " - " + title; // looks nice in Output window
- lyricSearchThread.IsBackground = true;
- lyricSearchThread.Start();
- threadList.Add(lyricSearchThread);
- }
- }
-
- public void suspendAllSearchThreadsExceptMe(int managedThreadId)
- {
- //// clean-up operations may be placed here
- //for (int i = 0; i < threadList.Count; i++)
- //{
- // if (((Thread)threadList[i]).ManagedThreadId != managedThreadId)
- // ((Thread)threadList[i]).Suspend();
- //}
-
- m_managedThreadId = managedThreadId;
- m_EventStop_LyricSearches.Reset();
- }
-
- public void resumeAllSearchThreads()
- {
- m_EventStop_LyricSearches.Reset();
- }
-
- internal void updateString(String message, String site)
- {
- m_Form.UpdateString = new Object[] { message, site };
- }
-
- internal void statusUpdate(string artist, string title, string site, bool lyricFound)
- {
- //LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Information, 0, LyricDiagnostics.elapsedTimeString() + artist + " - " + title + " - " + site + " - " +lyricFound.ToString() );
- if (lyricFound)
- ++noOfLyricsFound;
- else
- ++noOfLyricsNotFound;
-
- ++noOfLyricsSearched;
-
- m_Form.UpdateStatus = new Object[] { noOfLyricsToSearch, noOfLyricsSearched, noOfLyricsFound, noOfLyricsNotFound };
-
- if (noOfLyricsSearched >= noOfLyricsToSearch)
- {
- finishThread(artist, title, "All songs have been searched!", site);
- }
- }
-
-
- internal void lyricFound(String lyricStrings, String artist, String title, String site)
- {
- if (m_StopSearches == false)
- {
- m_Form.LyricFound = new Object[] { lyricStrings, artist, title, site };
- statusUpdate(artist, title, site, true);
- }
- }
-
- internal void lyricNotFound(String artist, String title, String message, String site)
- {
- if (m_StopSearches == false)
- {
- m_Form.LyricNotFound = new Object[] { artist, title, message, site };
- statusUpdate(artist, title, site, false);
- }
- }
-
- public void finishThread(String artist, String title, String message, String site)
- {
- m_EventStop_LyricController.Set();
- m_EventStopped_LyricController.Set();
- m_Form.ThreadFinished = new Object[] { artist, title, message, site };
- }
-
- internal void ThreadException(String s)
- {
- m_Form.ThreadException = s;
- }
-
- public string GoogleLicenseKey
- {
- get { return m_GoogleLicenseKey; }
- set { m_GoogleLicenseKey = value; }
- }
-
- public bool StopSearches
- {
- get { return m_StopSearches; }
- set {
- if (value == true)
- {
- m_StopSearches = true;
- m_EventStop_LyricSearches.Reset();
- LyricSearch.Abort = true;
- //StopTheSearchAndAbort.Invoke(this, EventArgs.Empty);
- }
- else
- {
- m_StopSearches = false;
- m_EventStop_LyricSearches.Set();
- LyricSearch.Abort = false;
- }
- }
- }
-
- public ArrayList GoogleLicenseKeysUsed
- {
- get { return m_GoogleLicenseKeysUsed; }
- }
-
- public void addToGoogleLicenseKeysUsed(string key)
- {
- if (!m_GoogleLicenseKeysUsed.Contains(key))
- {
- m_GoogleLicenseKeysUsed.Add(key);
- }
- }
-
- public int NoOfLyricsToSearch
- {
- set { LyricController.noOfLyricsToSearch = value; }
- }
-
- public bool NoMoreValidLicenseKeys
- {
- get { return m_noMoreValidLicenseKeys; }
- set { m_noMoreValidLicenseKeys = value; }
- }
- }
-}
Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricSearch.cs
===================================================================
(Binary files differ)
Added: trunk/plugins/MyLyrics/LyricsEngine/LyricsController.cs
===================================================================
--- trunk/plugins/MyLyrics/LyricsEngine/LyricsController.cs (rev 0)
+++ trunk/plugins/MyLyrics/LyricsEngine/LyricsController.cs 2007-03-11 20:43:19 UTC (rev 183)
@@ -0,0 +1,305 @@
+using System;
+using System.Drawing;
+using System.Collections;
+using System.ComponentModel;
+using System.Windows.Forms;
+using System.Data;
+using System.Threading;
+using System.IO;
+using System.Diagnostics;
+using LyricsEngineConfig;
+using LyricsEngine;
+
+namespace LyricsEngine
+{
+
+ #region Public Delegates
+ // delegates used to call MainForm functions from worker thread
+ public delegate void Delegate_LC_updateString(String s);
+ public delegate void Delegate_LC_UpdateStatus(Boolean b1);
+ public delegate void Delegate_LC_ErrorLog_LyricNotFound(String s);
+ public delegate void Delegate_LC_WriteFoundLyric(String[] s, String artist, String track);
+ public delegate void Delegate_LC_ThreadFinished();
+ #endregion
+
+ public class LyricsController : IDisposable
+ {
+ private ILyricForm m_Form;
+
+ // status
+ private static int noOfLyricsToSearch;
+ private static int noOfLyricsSearched;
+ private static int noOfLyricsFound;
+ private static int noOfLyricsNotFound;
+
+ private bool m_StopSearches = false;
+ public static event EventHandler StopTheSearchAndAbort = null;
+
+ 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;
+
+ // Lyric sites
+ private string[] lyricSites;
+ private string[] eastSites;
+
+ public LyricsController(ILyricForm mainForm,
+ ManualResetEvent eventStopThread, ManualResetEvent eventThreadStopped,
+ string[] lyricSites)
+ {
+ this.m_Form = mainForm;
+
+ LyricsController.noOfLyricsToSearch = 1;
+ LyricsController.noOfLyricsSearched = 0;
+ LyricsController.noOfLyricsFound = 0;
+ LyricsController.noOfLyricsNotFound = 0;
+
+ this.lyricSites = lyricSites;
+
+ ArrayList easySitesArrayList = new ArrayList();
+
+ foreach (string site in lyricSites)
+ {
+ if (Setup.IsMemberOfEasySites(site))
+ {
+ easySitesArrayList.Add(site);
+ }
+ }
+ eastSites = (string[])easySitesArrayList.ToArray(typeof(string));
+ LyricSearch.EasySites = eastSites;
+
+ // initialize events
+ m_EventStop_LyricController = eventStopThread;
+ m_EventStopped_LyricController = eventThreadStopped;
+
+ m_EventStop_LyricSearches = new ManualResetEvent(false);
+ m_EventStop_LyricSearches.Set();
+
+ LyricSearch.Abort = false;
+ }
+
+
+ public void Run()
+ {
+ // check if thread is cancelled
+ while (true)
+ {
+ Thread.Sleep(500);
+
+ // check if thread is cancelled
+ if (m_EventStop_LyricController.WaitOne(0, true))
+ {
+ // clean-up operations may be placed here
+ for (int i=0; i<threadList.Count; i++)
+ {
+ ((Thread)threadList[i]).Abort();
+ }
+
+ bool stillThreadsAlive = true;
+ while (stillThreadsAlive)
+ {
+ for (int i = 0; i < threadList.Count; i++)
+ {
+ stillThreadsAlive = false; ;
+ if (((Thread)threadList[i]).IsAlive)
+ stillThreadsAlive = true;
+ }
+ }
+
+ Thread.Sleep(500);
+ m_EventStopped_LyricController.Set();
+ break;
+ }
+ }
+ }
+
+
+ public void Dispose()
+ {
+ // clean-up operations may be placed here
+ for (int i = 0; i < threadList.Count; i++)
+ {
+ ((Thread)threadList[i]).Abort();
+ }
+
+ bool stillThreadsAlive = true;
+ while (stillThreadsAlive)
+ {
+ for (int i = 0; i < threadList.Count; i++)
+ {
+ stillThreadsAlive = false; ;
+ if (((Thread)threadList[i]).IsAlive)
+ stillThreadsAlive = true;
+ }
+ }
+
+ Thread.Sleep(500);
+
+ // inform main thread that this thread stopped
+ m_EventStopped_LyricController.Set();
+ finishThread("", "", "The search has ended.", "");
+ }
+
+ public void updateManualResetEvents(ManualResetEvent eventStopThread, ManualResetEvent eventThreadStopped)
+ {
+ this.m_EventStop_LyricController = eventStopThread;
+ this.m_EventStopped_LyricController = eventThreadStopped;
+ }
+
+ public void addNewLyricSearch(string artist, string title)
+ {
+ if (eastSites.Length > 0)
+ {
+ // create worker thread instance
+ ThreadStart easySitesThreadInstance = delegate
+ {
+
+ LyricSearch lyricSearch_EasySites = new LyricSearch(m_EventStop_LyricController, m_EventStopped_LyricController, this);
+ lyricSearch_EasySites.setLyricInfo(artist, title);
+ lyricSearch_EasySites.Run();
+ };
+
+ Thread lyricSearchThread = new Thread(easySitesThreadInstance);
+ lyricSearchThread.Name = "BasicSearch for " + artist + " - " + title; // looks nice in Output window
+ lyricSearchThread.IsBackground = true;
+ lyricSearchThread.Start();
+ threadList.Add(lyricSearchThread);
+ }
+ }
+
+ public void suspendAllSearchThreadsExceptMe(int managedThreadId)
+ {
+ //// clean-up operations may be placed here
+ //for (int i = 0; i < threadList.Count; i++)
+ //{
+ // if (((Thread)threadList[i]).ManagedThreadId != managedThreadId)
+ // ((Thread)threadList[i]).Suspend();
+ //}
+
+ m_managedThreadId = managedThreadId;
+ m_EventStop_LyricSearches.Reset();
+ }
+
+ public void resumeAllSearchThreads()
+ {
+ m_EventStop_LyricSearches.Reset();
+ }
+
+ internal void updateString(String message, String site)
+ {
+ m_Form.UpdateString = new Object[] { message, site };
+ }
+
+ internal void statusUpdate(string artist, string title, string site, bool lyricFound)
+ {
+ //LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Information, 0, LyricDiagnostics.elapsedTimeString() + artist + " - " + title + " - " + site + " - " +lyricFound.ToString() );
+ if (lyricFound)
+ ++noOfLyricsFound;
+ else
+ ++noOfLyricsNotFound;
+
+ ++noOfLyricsSearched;
+
+ m_Form.UpdateStatus = new Object[] { noOfLyricsToSearch, noOfLyricsSearched, noOfLyricsFound, noOfLyricsNotFound };
+
+ if (noOfLyricsSearched >= noOfLyricsToSearch)
+ {
+ finishThread(artist, title, "All songs have been searched!", site);
+ }
+ }
+
+
+ internal void lyricFound(String lyricStrings, String artist, String title, String site)
+ {
+ if (m_StopSearches == false)
+ {
+ m_Form.LyricFound = new Object[] { lyricStrings, artist, title, site };
+ statusUpdate(artist, title, site, true);
+ }
+ }
+
+ internal void lyricNotFound(String artist, String title, String message, String site)
+ {
+ if (m_StopSearches == false)
+ {
+ m_Form.LyricNotFound = new Object[] { artist, title, message, site };
+ statusUpdate(artist, title, site, false);
+ }
+ }
+
+ public void finishThread(String artist, String title, String message, String site)
+ {
+ m_EventStop_LyricController.Set();
+ m_EventStopped_LyricController.Set();
+ m_Form.ThreadFinished = new Object[] { artist, title, message, site };
+ }
+
+ internal void ThreadException(String s)
+ {
+ m_Form.ThreadException = s;
+ }
+
+ public string GoogleLicenseKey
+ {
+ get { return m_GoogleLicenseKey; }
+ set { m_GoogleLicenseKey = value; }
+ }
+
+ public bool StopSearches
+ {
+ get { return m_StopSearches; }
+ set {
+ if (value == true)
+ {
+ m_StopSearches = true;
+ m_EventStop_LyricSearches.Reset();
+ LyricSearch.Abort = true;
+ //StopTheSearchAndAbort.Invoke(this, EventArgs.Empty);
+ }
+ else
+ {
+ m_StopSearches = false;
+ m_EventStop_LyricSearches.Set();
+ LyricSearch.Abort = false;
+ }
+ }
+ }
+
+ public ArrayList GoogleLicenseKeysUsed
+ {
+ get { return m_GoogleLicenseKeysUsed; }
+ }
+
+ public void addToGoogleLicenseKeysUsed(string key)
+ {
+ if (!m_GoogleLicenseKeysUsed.Contains(key))
+ {
+ m_GoogleLicenseKeysUsed.Add(key);
+ }
+ }
+
+ public int NoOfLyricsToSearch
+ {
+ set { LyricsController.noOfLyricsToSearch = value; }
+ }
+
+ public bool NoMoreValidLicenseKeys
+ {
+ get { return m_noMoreValidLicenseKeys; }
+ set { m_noMoreValidLicenseKeys = value; }
+ }
+ }
+}
Added: trunk/plugins/MyLyrics/LyricsEngine/LyricsDatabase/LyricsDatabase.cs
===================================================================
--- trunk/plugins/MyLyrics/LyricsEngine/LyricsDatabase/LyricsDatabase.cs (rev 0)
+++ trunk/plugins/MyLyrics/LyricsEngine/LyricsDatabase/LyricsDatabase.cs 2007-03-11 20:43:19 UTC (rev 183)
@@ -0,0 +1,154 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Runtime.Serialization;
+
+namespace MyLyrics
+{
+ [Serializable]
+ public class LyricsDatabase : IDictionary<string, LyricsItem>, ISerializable
+ {
+ private DateTime created;
+ private DateTime lastModified;
+
+ private Dictionary<string, LyricsItem> db;
+
+ public LyricsDatabase()
+ {
+ created = DateTime.Now;
+ lastModified = DateTime.Now;
+ db = new Dictionary<string, LyricsItem>();
+ }
+
+ #region Serialization methods
+ protected LyricsDatabase(SerializationInfo info, StreamingContext context)
+ {
+ Dictionary<string, LyricsItem> dbTemp = new Dictionary<string, LyricsItem>();
+ db = (Dictionary<string, LyricsItem>)info.GetValue("db", dbTemp.GetType());
+ created = info.GetDateTime("created");
+ lastModified = info.GetDateTime("lastModified");
+ }
+
+ public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
+ {
+ info.AddValue("db", db);
+ info.AddValue("created", created);
+ info.AddValue("lastModified", lastModified);
+ }
+ #endregion
+
+ public void SetLastModified()
+ {
+ lastModified = DateTime.Now;
+ }
+
+ #region IDictionary<string,LyricsItem> Members
+
+ public void Add(string key, LyricsItem value)
+ {
+ db.Add(key, value);
+ }
+
+ public bool ContainsKey(string key)
+ {
+ return db.ContainsKey(key);
+ }
+
+ public ICollection<string> Keys
+ {
+ get { return db.Keys; }
+ }
+
+ public bool Remove(string key)
+ {
+ return db.Remove(key);
+ }
+
+ public bool TryGetValue(string key, out LyricsItem value)
+ {
+ return db.TryGetValue(key, out value);
+ }
+
+ public ICollection<LyricsItem> Values
+ {
+ get { return db.Values; }
+ }
+
+ public LyricsItem this[string key]
+ {
+ get
+ {
+ return db[key];
+ }
+ set
+ {
+ db[key] = value;
+ }
+ }
+
+ #endregion
+
+ #region ICollection<KeyValuePair<string,LyricsItem>> Members
+
+ public void Add(KeyValuePair<string, LyricsItem> item)
+ {
+ db.Add(item.Key, item.Value);
+ }
+
+ public void Clear()
+ {
+ db.Clear();
+ }
+
+ public bool Contains(KeyValuePair<string, LyricsItem> item)
+ {
+ return db.ContainsKey(item.Key);
+ }
+
+ public void CopyTo(KeyValuePair<string, LyricsItem>[] array, int arrayIndex)
+ {
+ throw new Exception("The method or operation is not implemented.");
+ }
+
+ public int Count
+ {
+ get { return db.Count; }
+ }
+
+ public bool IsReadOnly
+ {
+ get { return false; }
+ }
+
+ public bool Remove(KeyValuePair<string, LyricsItem> item)
+ {
+ return db.Remove(item.Key);
+ }
+
+ #endregion
+
+ #region IEnumerable<KeyValuePair<string,LyricsItem>> Members
+
+ public IEnumerator<KeyValuePair<string, LyricsItem>> GetEnumerator()
+ {
+ foreach (KeyValuePair<string, LyricsItem> kvp in db)
+ {
+ yield return kvp;
+ }
+ }
+
+ #endregion
+
+ #region IEnumerable Members
+
+ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
+ {
+ foreach (KeyValuePair<string, LyricsItem> kvp in db)
+ {
+ yield return kvp;
+ }
+ }
+
+ #endregion
+ }
+}
Added: trunk/plugins/MyLyrics/LyricsEngine/LyricsDatabase/LyricsItem.cs
===================================================================
--- trunk/plugins/MyLyrics/LyricsEngine/LyricsDatabase/LyricsItem.cs (rev 0)
+++ trunk/plugins/MyLyrics/LyricsEngine/LyricsDatabase/LyricsItem.cs 2007-03-11 20:43:19 UTC (rev 183)
@@ -0,0 +1,50 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Runtime.Serialization;
+
+namespace MyLyrics
+{
+ [Serializable]
+ public class LyricsItem
+ {
+ private string artist;
+ private string title;
+ private string lyrics;
+ private string source;
+
+ public LyricsItem(string artist, string title, string lyrics, string source)
+ {
+ this.artist = artist;
+ this.title = title;
+ this.lyrics = lyrics;
+ this.source = source;
+ }
+
+ #region Properties
+ public string Artist
+ {
+ get { return artist; }
+ set { artist = value; }
+ }
+
+ public string Title
+ {
+ get { return title; }
+ set { title = value; }
+ }
+
+ public string Lyrics
+ {
+ get { return lyrics; }
+ set { lyrics = value; }
+ }
+
+ public string Source
+ {
+ get { return source; }
+ set { source = value; }
+ }
+ #endregion
+ }
+}
\ No newline at end of file
Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj
===================================================================
--- trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj 2007-03-11 15:18:13 UTC (rev 182)
+++ trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj 2007-03-11 20:43:19 UTC (rev 183)
@@ -40,17 +40,23 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="LRC\SimpleLRC.cs" />
+ <Compile Include="LRC\SimpleLRCFormat.cs" />
+ <Compile Include="LRC\SimpleLRCTimeAndLine.cs" />
+ <Compile Include="LRC\SimpleLRCTimeAndLineCollection.cs" />
+ <Compile Include="LyricsDatabase\LyricsDatabase.cs" />
+ <Compile Include="LyricsDatabase\LyricsItem.cs" />
<Compile Include="LyricSearch.cs" />
<Compile Include="LyricDiagnostics.cs" />
- <Compile Include="LyricSites\HotLyrics.cs" />
- <Compile Include="LyricSites\EvilLabs.cs" />
- <Compile Include="LyricSites\Lyrics007.cs" />
- <Compile Include="LyricSites\LyricsOnDemand.cs" />
- <Compile Include="LyricSites\SeekLyrics.cs" />
+ <Compile Include="LyricsSites\HotLyrics.cs" />
+ <Compile Include="LyricsSites\EvilLabs.cs" />
+ <Compile Include="LyricsSites\Lyrics007.cs" />
+ <Compile Include="LyricsSites\LyricsOnDemand.cs" />
+ <Compile Include="LyricsSites\SeekLyrics.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ICommand.cs" />
<Compile Include="ILyricForm.cs" />
- <Compile Include="LyricController.cs" />
+ <Compile Include="LyricsController.cs" />
<Compile Include="LyricSiteInfo.cs" />
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
@@ -92,7 +98,7 @@
<DesignTime>True</DesignTime>
<DependentUpon>Reference.map</DependentUpon>
</Compile>
- <Compile Include="LyricSites\Wiki.cs" />
+ <Compile Include="LyricsSites\Wiki.cs" />
</ItemGroup>
<ItemGroup>
<WebReferences Include="Web References\" />
Added: trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/EvilLabs.cs
===================================================================
--- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/EvilLabs.cs (rev 0)
+++ trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/EvilLabs.cs 2007-03-11 20:43:19 UTC (rev 183)
@@ -0,0 +1,96 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.IO;
+using System.Diagnostics;
+
+namespace LyricsEngine.LyricSites
+{
+ class EvilLabs
+ {
+ string lyric = "";
+ LyricSearch lyricSearch = null;
+
+ public string Lyric
+ {
+ get { return lyric; }
+ }
+
+ public EvilLabs(LyricSearch lyricSearch, string artist, string title)
+ {
+ this.lyricSearch = lyricSearch;
+ if (LyricDiagnostics.TraceSource != null) LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Information, 0, LyricDiagnostics.elapsedTimeString() + "EvilLabs(" + artist + ", " + title + ")");
+ bool thisMayBeTheCorrectLyric = true;
+ System.Collections.ArrayList strLyric = new System.Collections.ArrayList();
+
+ string lyricTemp = "";
+
+ artist = LyricUtil.removeFeatComment(artist);
+ LyricUtil.trimForParenthesis(ref artist);
+ artist = artist.Replace(" ", "+");
+ title = LyricUtil.removeFeatComment(title);
+ LyricUtil.trimForParenthesis(ref title);
+ title = title.Replace(" ", "+");
+ string urlString = "http://www.evillabs.sk/lyrics/" + artist + "+-+" + title;
+
+ System.Net.WebClient client = new System.Net.WebClient();
+ System.Byte[] bytes = null;
+
+
+ try
+ {
+ bytes = client.DownloadData(urlString);
+ }
+ catch (System.Net.WebException)
+ {
+ //return false;
+ }
+ finally
+ {
+ client.Dispose();
+ }
+
+ int byteIndex = 0;
+ while (byteIndex < bytes.Length && lyricSearch.SearchHasEnded == false)
+ {
+ lyricTemp += System.Char.ConvertFromUtf32(bytes[byteIndex]);
+ ++byteIndex;
+ }
+
+ MemoryStream memoryStream = new MemoryStream(System.Text.Encoding.Default.GetBytes(lyricTemp));
+
+ if (memoryStream != null)
+ {
+ string line = "";
+ int noOfLinesCount = 0;
+
+ System.IO.StreamReader sr = new System.IO.StreamReader(memoryStream);
+
+ while (line.IndexOf("</style>") == -1)
+ {
+ if (sr.EndOfStream || ++noOfLinesCount > 300)
+ {
+ thisMayBeTheCorrectLyric = false;
+ break;
+ }
+ else
+ {
+ line = sr.ReadLine();
+ }
+ }
+
+ if (thisMayBeTheCorrectLyric)
+ {
+ line = sr.ReadLine();
+ lyric = line.Replace("<br>", "\r\n").Trim();
+
+ // if warning message from Evil Labs' sql-server, then lyric isn't found
+ if (lyric.Contains("<b>Warning</b>"))
+ {
+ lyric = "Not found";
+ }
+ }
+ }
+ }
+ }
+}
Added: trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/HotLyrics.cs
===================================================================
--- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/HotLyrics.cs (rev 0)
+++ trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/HotLyrics.cs 2007-03-11 20:43:19 UTC (rev 183)
@@ -0,0 +1,180 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.IO;
+using System.Diagnostics;
+
+namespace LyricsEngine.LyricSites
+{
+ class HotLyrics
+ {
+ string lyric = "";
+ LyricSearch lyricSearch = null;
+
+ public string Lyric
+ {
+ get { return lyric; }
+ }
+
+ public HotLyrics(LyricSearch lyricSearch, string artist, string title)
+ {
+ this.lyricSearch = lyricSearch;
+ if (LyricDiagnostics.TraceSource != null) LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Information, 0, LyricDiagnostics.elapsedTimeString() + "SeekLyrics(" + artist + ", " + title + ")");
+ bool thisMayBeTheCorrectLyric = true;
+ System.Collections.ArrayList strLyric = new System.Collections.ArrayList();
+
+ StringBuilder lyricTemp = new StringBuilder();
+
+ artist = LyricUtil.removeFeatComment(artist);
+ LyricUtil.trimForParenthesis(ref artist);
+ artist = LyricUtil.capatalizeString(artist);
+
+ artist = artist.Replace(" ", "_");
+ artist = artist.Replace(",", "_");
+ artist = artist.Replace(".", "_");
+ artist = artist.Replace("'", "_");
+ artist = artist.Replace("(", "%28");
+ artist = artist.Replace(")", "%29");
+ artist = artist.Replace(",", "");
+ artist = artist.Replace("#", "");
+ artist = artist.Replace("%", "");
+ artist = artist.Replace("+", "%2B");
+ artist = artist.Replace("=", "%3D");
+ artist = artist.Replace("-", "_");
+
+ // German letters
+ artist = artist.Replace("\xFC", "%FC");
+ artist = artist.Replace("\xDC", "");
+ artist = artist.Replace("\xE4", "%E4");
+ artist = artist.Replace("\xC4", "");
+ artist = artist.Replace("\xF6", "%E4"); // Not correct!!!
+ artist = artist.Replace("\xD6", "");
+ artist = artist.Replace("\xDF", "%DF");
+
+ // French letters
+ artist = artist.Replace("\xE9", "%E9");
+
+ title = LyricUtil.removeFeatComment(title);
+ LyricUtil.trimForParenthesis(ref title);
+ title = LyricUtil.capatalizeString(title);
+
+ title = title.Replace(" ", "_");
+ title = title.Replace(",", "_");
+ title = title.Replace(".", "_");
+ title = title.Replace("'", "_");
+ title = title.Replace("(", "%28");
+ title = title.Replace(")", "%29");
+ title = title.Replace(",", "_");
+ title = title.Replace("#", "_");
+ title = title.Replace("%", "_");
+ title = title.Replace("?", "_");
+ title = title.Replace("+", "%2B");
+ title = title.Replace("=", "%3D");
+ title = title.Replace("-", "_");
+ title = title.Replace(":", "_");
+
+ // German letters
+ title = title.Replace("\xFC", "%FC");
+ title = title.Replace("\xDC", "");
+ title = title.Replace("\xE4", "%E4");
+ title = title.Replace("\xC4", "");
+ title = title.Replace("\xF6", "%E4"); // Not correct!!!
+ title = title.Replace("\xD6", "");
+ title = title.Replace("\xDF", "%DF");
+
+ // Danish letters
+ title = title.Replace("\xE5", "%E5");
+ title = title.Replace("\xC5", "%C5");
+ title = title.Replace("\xE6", "%E6");
+ title = title.Replace("\xF8", "%F8");
+
+ // French letters
+ title = title.Replace("\xE9", "%E9");
+
+ string firstLetter = "";
+ if (artist.Length > 0)
+ firstLetter = artist[0].ToString();
+
+ string urlString = "http://www.hotlyrics.net/lyrics/" + firstLetter + "/" + artist + "/" + title + ".html";
+
+ System.Net.WebClient client = new System.Net.WebClient();
+ Stream stream = null;
+
+ try
+ {
+ stream = client.OpenRead(urlString);
+ }
+ catch (System.Net.WebException)
+ {
+ //return false;
+ }
+ finally
+ {
+ client.Dispose();
+ }
+
+
+ if (stream != null)
+ {
+ string line = "";
+
+ System.IO.StreamReader sr = new System.IO.StreamReader(stream);
+ //sr.BaseStream.Position = 18000;
+
+ while (line.IndexOf("GOOGLE END") == -1)
+ {
+ if (sr.EndOfStream)
+ {
+ thisMayBeTheCorrectLyric = false;
+ break;
+ }
+ else
+ {
+ line = sr.ReadLine();
+ }
+ }
+
+ if (thisMayBeTheCorrectLyric)
+ {
+ lyricTemp = new StringBuilder();
+ line = sr.ReadLine();
+
+ while (line.IndexOf("<script type") == -1)
+ {
+ lyricTemp.Append(line);
+ if (sr.EndOfStream)
+ {
+ thisMayBeTheCorrectLyric = false;
+ break;
+ }
+ else
+ {
+ line = sr.ReadLine();
+ }
+ }
+
+ lyricTemp.Replace("?s", "'s");
+ lyricTemp.Replace("?t", "'t");
+ lyricTemp.Replace("?m", "'m");
+ lyricTemp.Replace("?l", "'l");
+ lyricTemp.Replace("?v", "'v");
+ lyricTemp.Replace("<br>", "\r\n");
+ lyricTemp.Replace("<br />", "\r\n");
+ lyricTemp.Replace(""", "\"");
+ lyricTemp.Replace("</p>", "");
+ lyricTemp.Replace("<BR>", "");
+ lyricTemp.Replace("<br/>", "\r\n");
+
+ lyric = lyricTemp.ToString().Trim();
+
+ // if warning message from Evil Labs' sql-server, then lyric isn't found
+ if (lyric.Contains("<td"))
+ {
+ lyric = "Not found";
+ }
+ }
+ sr.Close();
+ }
+ }
+ }
+}
Added: trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/Lyrics007.cs
===================================================================
--- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/Lyrics007.cs (rev 0)
+++ trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/Lyrics007.cs 2007-03-11 20:43:19 UTC (rev 183)
@@ -0,0 +1,126 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.IO;
+using System.Diagnostics;
+
+namespace LyricsEngine.LyricSites
+{
+ class Lyrics007
+ {
+ string lyric = "";
+ LyricSearch lyricSearch = null;
+
+ public string Lyric
+ {
+ get { return lyric; }
+ }
+
+ public Lyrics007(LyricSearch lyricSearch, string artist, string title)
+ {
+ this.lyricSearch = lyricSearch;
+ if (LyricDiagnostics.TraceSource != null) LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Information, 0, LyricDiagnostics.elapsedTimeString() + "Lyrics007(" + artist + ", " + title + ")");
+ bool thisMayBeTheCorrectLyric = true;
+ System.Collections.ArrayList strLyric = new System.Collections.ArrayList();
+
+ StringBuilder lyricTemp = new StringBuilder();
+
+ artist = LyricUtil.removeFeatComment(artist);
+ LyricUtil.trimForParenthesis(ref artist);
+ artist = artist.Replace("#", "");
+ title = LyricUtil.removeFeatComment(title);
+ LyricUtil.trimForParenthesis(ref title);
+ title = title.Replace("#", "");
+
+ // Cannot find lyrics contaning non-English letters!
+
+ string urlString = "http://www.lyrics007.com/" + artist + " Lyrics/" + title + " Lyrics.html";
+
+ System.Net.WebClient client = new System.Net.WebClient();
+ Stream stream = null;
+
+ try
+ {
+ stream = client.OpenRead(urlString);
+ }
+ catch (System.Net.WebException)
+ {
+ //return false;
+ }
+ finally
+ {
+ client.Dispose();
+ }
+
+
+ if (stream != null)
+ {
+ string line = "";
+ int noOfLinesCount = 0;
+
+ System.IO.StreamReader sr = new System.IO.StreamReader(stream);
+
+ // 1. Find beginning of lyric
+ while (line.IndexOf("<td>Song: <strong>") == -1 && line.IndexOf("polyphonic ringtone to your cell phone") == -1)
+ {
+ if (sr.EndOfStream || ++noOfLinesCount > 300)
+ {
+ thisMayBeTheCorrectLyric = false;
+ break;
+ }
+ else
+ {
+ line = sr.ReadLine();
+ }
+ }
+
+ // 2. If start of lyric found, then continue with work
+ if (thisMayBeTheCorrectLyric)
+ {
+ lyricTemp = new StringBuilder();
+ string textToCutFrom = @"<tr><td width=10></td><td>";
+ int indexToCutFrom = line.LastIndexOf(textToCutFrom) + textToCutFrom.Length;
+ lyricTemp.Append(line.Substring(indexToCutFrom));
+ line = sr.ReadLine();
+
+ while (line.IndexOf("The hottest songs") == -1 && line.IndexOf("Maybe you are looking for:") == -1)
+ {
+ lyricTemp.Append(line);
+ if (sr.EndOfStream || ++noOfLinesCount > 300)
+ {
+ thisMayBeTheCorrectLyric = false;
+ break;
+ }
+ else
+ {
+ line = sr.ReadLine();
+ }
+ }
+
+ lyricTemp.Replace("??s", "'s");
+ lyricTemp.Replace("??t", "'t");
+ lyricTemp.Replace("??m", "'m");
+ lyricTemp.Replace("??l", "'l");
+ lyricTemp.Replace("??v", "'v");
+ lyricTemp.Replace("?s", "'s");
+ lyricTemp.Replace("?t", "'t");
+ lyricTemp.Replace("?m", "'m");
+ lyricTemp.Replace("?l", "'l");
+ lyricTemp.Replace("?v", "'v");
+ lyricTemp.Replace("<br>", "\r\n");
+ lyricTemp.Replace("<br />", "\r\n");
+ lyricTemp.Replace("<BR>", "\r\n");
+
+ lyric = lyricTemp.ToString().Trim();
+
+ // if warning message from Evil Labs' sql-server, then lyric isn't found
+ if (lyric.Contains("<td"))
+ {
+ lyric = "Not found";
+ }
+ }
+ sr.Close();
+ }
+ }
+ }
+}
Added: trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricsOnDemand.cs
===================================================================
--- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricsOnDemand.cs (rev 0)
+++ trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricsOnDemand.cs 2007-03-11 20:43:19 UTC (rev 183)
@@ -0,0 +1,154 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.IO;
+using System.Diagnostics;
+
+namespace LyricsEngine.LyricSites
+{
+ class LyricsOnDemand
+ {
+ string lyric = "";
+ LyricSearch lyricSearch = null;
+
+ public string Lyric
+ {
+ get { return lyric; }
+ }
+
+ public LyricsOnDemand(LyricSearch lyricSearch, string artist, string title)
+ {
+ this.lyricSearch = lyricSearch;
+ if (LyricDiagnostics.TraceSource != null) LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Information, 0, LyricDiagnostics.elapsedTimeString() + "LyricsOnDemand(" + artist + ", " + title + ")");
+ bool thisMayBeTheCorrectLyric = true;
+ System.Collections.ArrayList strLyric = new System.Collections.ArrayList();
+
+ StringBuilder lyricTemp = new StringBuilder();
+
+ artist = LyricUtil.removeFeatComment(artist);
+ LyricUtil.trimForParenthesis(ref artist);
+ LyricUtil.deleteSpecificChars(ref artist);
+ artist = artist.Replace(" ", "");
+ artist = artist.Replace("The ", "");
+ artist = artist.Replace("the ", "");
+ artist = artist.Replace("-", "");
+
+ artist = artist.ToLower();
+
+ // Cannot find lyrics contaning non-English letters!
+
+ title = LyricUtil.removeFeatComment(title);
+ LyricUtil.trimForParenthesis(ref title);
+ LyricUtil.deleteSpecificChars(ref title);
+ title = title.Replace(" ", "");
+ title = title.Replace("#", "");
+ artist = artist.Replace("-", "");
+
+ // Danish letters
+ title = title.Replace("\xE6", "");
+ title = title.Replace("\xF8", "");
+ title = title.Replace("\xE5", "");
+ title = title.Replace("\xC6", "");
+ title = title.Replace("\xD8", "");
+ title = title.Replace("\xC5", "");
+
+ title = title.ToLower();
+
+ string firstLetter = "";
+ if (artist.Length > 0)
+ firstLetter = artist[0].ToString();
+
+ try
+ {
+ int.Parse(firstLetter);
+ firstLetter = "0";
+ }
+ catch { ;};
+
+ string urlString = "http://www.lyricsondemand.com/" + firstLetter + "/" + artist + "lyrics/" + title + "lyrics.html";
+
+ System.Net.WebClient client = new System.Net.WebClient();
+ System.Byte[] bytes = null;
+ Stream stream = null;
+
+ try
+ {
+ stream = client.OpenRead(urlString);
+ }
+ catch (System.Net.WebException)
+ {
+ //return false;
+ }
+ finally
+ {
+ client.Dispose();
+ }
+
+ if (stream != null)
+ {
+ string line = "";
+ int noOfLinesCount = 0;
+
+ System.IO.StreamReader sr = new System.IO.StreamReader(stream);
+
+ while (line.IndexOf(@"<font size=""2"" face=""Verdana"">") == -1)
+ {
+ if (sr.EndOfStream || ++noOfLinesCount > 300)
+ {
+ thisMayBeTheCorrectLyric = false;
+ break;
+ }
+ else
+ {
+ line = sr.ReadLine();
+ }
+ }
+
+ if (thisMayBeTheCorrectLyric)
+ {
+ lyricTemp = new StringBuilder();
+ line = sr.ReadLine().Trim();
+
+ while (line.IndexOf("<BR><BR>") == -1)
+ {
+ lyricTemp.Append(line);
+ if (sr.EndOfStream || ++noOfLinesCount > 300)
+ {
+ thisMayBeTheCorrectLyric = false;
+ break;
+ }
+ else
+ {
+ line = sr.ReadLine().Trim();
+ }
+ }
+
+ lyricTemp.Replace("<br>", " \r\n");
+ lyricTemp.Replace("</font></p>", " \r\n");
+ lyricTemp.Replace("<p><font size=\"2\" face=\"Verdana\">", " \r\n");
+ lyricTemp.Replace("<i>", "");
+ lyricTemp.Replace("</i>", "");
+ lyricTemp.Replace("?s", "'s");
+ lyricTemp.Replace("?t", "'t");
+ lyricTemp.Replace("?m", "'m");
+ lyricTemp.Replace("?l", "'l");
+ lyricTemp.Replace("?v", "'v");
+ lyricTemp.Replace("<p>", " \r\n");
+ lyricTemp.Replace("<BR>", " \r\n");
+
+ lyric = lyricTemp.ToString().Trim();
+
+ // if warning message from Evil Labs' sql-server, then lyric isn't found
+ if (lyric.Contains("<td"))
+ {
+ lyric = "Not found";
+ }
+ }
+ sr.Close();
+ }
+ }
+ }
+}
+
+
+
Added: trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/SeekLyrics.cs
===================================================================
--- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/SeekLyrics.cs (rev 0)
+++ trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/SeekLyrics.cs 2007-03-11 20:43:19 UTC (rev 183)
@@ -0,0 +1,177 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.IO;
+using System.Diagnostics;
+
+namespace LyricsEngine.LyricSites
+{
+ class SeekLyrics
+ {
+ string lyric = "";
+ LyricSearch lyricSearch = null;
+
+ public string Lyric
+ {
+ get { return lyric; }
+ }
+
+ public SeekLyrics(LyricSearch lyricSearch, string artist, string title)
+ {
+ this.lyricSearch = lyricSearch;
+ if (LyricDiagnostics.TraceSource != null) LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Information, 0, LyricDiagnostics.elapsedTimeString() + "SeekLyrics(" + artist + ", " + title + ")");
+ bool thisMayBeTheCorrectLyric = true;
+ System.Collections.ArrayList strLyric = new System.Collections.ArrayList();
+
+ StringBuilder lyricTemp = new StringBuilder();
+
+ artist = LyricUtil.removeFeatComment(artist);
+ LyricUtil.trimForParenthesis(ref artist);
+ artist = artist.Replace(" ", "-");
+ artist = artist.Replace("'", "-");
+ artist = artist.Replace("(", "");
+ artist = artist.Replace(")", "");
+ artist = artist.Replace(",", "");
+ artist = artist.Replace("#", "");
+
+ // German letters
+ artist = artist.Replace("\xFC", "%FC");
+ artist = artist.Replace("\xDC", "");
+ artist = artist.Replace("\xE4", "%E4");
+ artist = artist.Replace("\xC4", "");
+ artist = artist.Replace("\xF6", "%E4"); // Not correct!!!
+ artist = artist.Replace("\xD6", "");
+ artist = artist.Replace("\xDF", "%DF");
+
+ // French letters
+ artist = artist.Replace("\xE9", "%E9");
+
+ title = LyricUtil.removeFeatComment(title);
+ LyricUtil.trimForParenthesis(ref title);
+ title = title.Replace(" ", "-");
+ title = title.Replace("'", "-");
+ title = title.Replace("(", "");
+ title = title.Replace(")", "");
+ title = title.Replace(",", "");
+ title = title.Replace("#", "");
+ title = title.Replace("?", "");
+
+ // German letters
+ title = title.Replace("\xFC", "%FC");
+ title = title.Replace("\xDC", "");
+ title = title.Replace("\xE4", "%E4");
+ title = title.Replace("\xC4", "");
+ title = title.Replace("\xF6", "%E4"); // Not correct!!!
+ title = title.Replace("\xD6", "");
+ title = title.Replace("\xDF", "%DF");
+
+ // French letters
+ title = title.Replace("\xE9", "%E9");
+
+
+ string urlString = "http://www.seeklyrics.com/lyrics/" + artist + "/" + title + ".html";
+
+ System.Net.WebClient client = new System.Net.WebClient();
+ System.Byte[] bytes = null;
+
+ try
+ {
+ bytes = client.DownloadData(urlString);
+ }
+ catch (System.Net.WebException)
+ {
+ //return false;
+ }
+ finally
+ {
+ client.Dispose();
+ }
+
+
+
+ if (bytes != null)
+ {
+ int byteIndex = 3900;
+
+ while (byteIndex < bytes.Length && lyricSearch.SearchHasEnded == false)
+ {
+ lyricTemp.Append(System.Char.ConvertFromUtf32(bytes[byteIndex]));
+ ++byteIndex;
+ }
+
+ MemoryStream memoryStream = new MemoryStream(System.Text.Encoding.Default.GetBytes(lyricTemp.ToString()));
+
+ if (memoryStream != null)
+ {
+ string line = "";
+ int noOfLinesCount = 0;
+
+ System.IO.StreamReader sr = new System.IO.StreamReader(memoryStream);
+
+ while (line.IndexOf("<pre>") == -1)
+ {
+ if (sr.EndOfStream || ++noOfLinesCount > 300)
+ {
+ thisMayBeTheCorrectLyric = false;
+ break;
+ }
+ else
+ {
+ line = sr.ReadLine();
+ }
+ }
+
+ if (thisMayBeTheCorrectLyric)
+ {
+ lyricTemp = new StringBuilder();
+ string textToCutFrom = "<pre>";
+ int indexToCutFrom = line.LastIndexOf(textToCutFrom) + textToCutFrom.Length;
+ lyricTemp.Append(line.Substring(indexToCutFrom));
+ if (line.Substring(indexToCutFrom).Contains("<F"))
+ lyricTemp = new StringBuilder();
+
+ line = sr.ReadLine();
+
+ while (line.IndexOf("</pre>") == -1)
+ {
+ lyricTemp.Append(line);
+ if (sr.EndOfStream || ++noOfLinesCount > 300)
+ {
+ thisMayBeTheCorrectLyric = false;
+ break;
+ }
+ else
+ {
+ line = sr.ReadLine();
+ }
+ }
+
+ textToCutFrom = "</pre>";
+ indexToCutFrom = line.LastIndexOf(textToCutFrom);
+ lyricTemp.Append(line.Substring(0, indexToCutFrom));
+
+ lyricTemp.Replace("?s", "'s");
+ lyricTemp.Replace("?t", "'t");
+ lyricTemp.Replace("?m", "'m");
+ lyricTemp.Replace("?l", "'l");
+ lyricTemp.Replace("?v", "'v");
+ lyricTemp.Replace("<br>", "\r\n");
+ lyricTemp.Replace("<br />", "\r\n");
+ lyricTemp.Replace("'", "'");
+ lyricTemp.Replace("</p>", "");
+ lyricTemp.Replace("<BR>", "");
+ lyricTemp.Replace("<br/>", "\r\n");
+
+ lyric = lyricTemp.ToString().Trim();
+
+ // if warning message from Evil Labs' sql-server, then lyric isn't found
+ if (lyric.Contains("<td"))
+ {
+ lyric = "Not found";
+ }
+ }
+ }
+ }
+ }
+ }
+}
Added: trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/Wiki.cs
===================================================================
--- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/Wiki.cs (rev 0)
+++ trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/Wiki.cs 2007-03-11 20:43:19 UTC (rev 183)
@@ -0,0 +1,142 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using LyricsEngine.org.lyricwiki;
+using LyricsEngine;
+
+namespace MyLyricWiki
+{
+ public class Wiki
+ {
+
+ private LyricWiki lyricWiki;
+ private LyricsResult lyricsResult = null;
+ private string artist = "";
+ private string...
[truncated message content] |
|
From: <an...@us...> - 2007-03-11 15:18:17
|
Revision: 182
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=182&view=rev
Author: and-81
Date: 2007-03-11 08:18:13 -0700 (Sun, 11 Mar 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/ComSkipLauncher TVE2/AssemblyInfo.cs
trunk/plugins/ComSkipLauncher TVE2/ComSkipLauncher.cs
trunk/plugins/ComSkipLauncher TVE3/AssemblyInfo.cs
trunk/plugins/ComSkipLauncher TVE3/ComSkipLauncher.cs
trunk/plugins/MCEReplacement/Forms/MacroEditor.cs
trunk/plugins/MCEReplacement/MCEReplacement.cs
trunk/plugins/MCEReplacement/MCEReplacement.csproj
trunk/plugins/TV3MceBlaster/TV3MceBlaster.cs
Added Paths:
-----------
trunk/plugins/ComSkipLauncher TVE2/ComSkipLauncher TVE2.csproj
trunk/plugins/ComSkipLauncher TVE3/ComSkipLauncher TVE3.csproj
trunk/plugins/ComSkipLauncher TVE3/PluginSetup.Designer.cs
trunk/plugins/ComSkipLauncher TVE3/PluginSetup.cs
trunk/plugins/ComSkipLauncher TVE3/PluginSetup.resx
Removed Paths:
-------------
trunk/plugins/ComSkipLauncher TVE2/ComSkipLauncher.csproj
trunk/plugins/ComSkipLauncher TVE3/ComSkipLauncher.csproj
trunk/plugins/ComSkipLauncher TVE3/Configuration.Designer.cs
trunk/plugins/ComSkipLauncher TVE3/Configuration.cs
trunk/plugins/ComSkipLauncher TVE3/Configuration.resx
Modified: trunk/plugins/ComSkipLauncher TVE2/AssemblyInfo.cs
===================================================================
--- trunk/plugins/ComSkipLauncher TVE2/AssemblyInfo.cs 2007-03-11 13:44:57 UTC (rev 181)
+++ trunk/plugins/ComSkipLauncher TVE2/AssemblyInfo.cs 2007-03-11 15:18:13 UTC (rev 182)
@@ -8,7 +8,7 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
//
-[assembly: AssemblyTitle("ComSkipLauncher")]
+[assembly: AssemblyTitle("ComSkipLauncher TVE2")]
[assembly: AssemblyDescription("Launches ComSkip when a recording completes")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("For MediaPortal")]
Added: trunk/plugins/ComSkipLauncher TVE2/ComSkipLauncher TVE2.csproj
===================================================================
--- trunk/plugins/ComSkipLauncher TVE2/ComSkipLauncher TVE2.csproj (rev 0)
+++ trunk/plugins/ComSkipLauncher TVE2/ComSkipLauncher TVE2.csproj 2007-03-11 15:18:13 UTC (rev 182)
@@ -0,0 +1,87 @@
+<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>{35EE9B81-1774-498E-94A0-0FD47E213FB5}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>MediaPortal.Plugins</RootNamespace>
+ <AssemblyName>ComSkipLauncher</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>false</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>none</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>
+ </DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Core, Version=1.0.2581.1884, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\MediaPortal\Core\bin\Release\Core.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="Databases, Version=1.0.2623.6915, Culture=neutral, processorArchitecture=x86">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\MediaPortal\xbmc\bin\Release\Databases.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Windows.Forms" />
+ <Reference Include="System.Xml" />
+ <Reference Include="TVCapture, Version=1.0.2623.6917, Culture=neutral, processorArchitecture=x86">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\MediaPortal\xbmc\bin\Release\TVCapture.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="Utils, Version=1.0.2622.31921, Culture=neutral, processorArchitecture=x86">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\MediaPortal\Utils\bin\Release\Utils.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="ComSkipLauncher.cs" />
+ <Compile Include="AssemblyInfo.cs" />
+ <Compile Include="Configuration.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="Configuration.designer.cs">
+ <DependentUpon>Configuration.cs</DependentUpon>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="Configuration.resx">
+ <DependentUpon>Configuration.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>
+ -->
+ <PropertyGroup>
+ <PostBuildEvent>copy "*.*" "\MediaPortal Development\Plugin Releases\ComSkip Launcher TVE2\"</PostBuildEvent>
+ </PropertyGroup>
+</Project>
\ No newline at end of file
Modified: trunk/plugins/ComSkipLauncher TVE2/ComSkipLauncher.cs
===================================================================
--- trunk/plugins/ComSkipLauncher TVE2/ComSkipLauncher.cs 2007-03-11 13:44:57 UTC (rev 181)
+++ trunk/plugins/ComSkipLauncher TVE2/ComSkipLauncher.cs 2007-03-11 15:18:13 UTC (rev 182)
@@ -21,9 +21,12 @@
public static readonly string MPConfigFile = Config.GetFolder(Config.Dir.Config) + "\\MediaPortal.xml";
- public static readonly string DefaultProgram = "C:\\Program Files\\ComSkip\\ComSkip.exe";
- public static readonly string DefaultParameters = "--playnice \"{0}\"";
+ public static readonly string DefaultStartProgram = "\\Program Files\\ComSkip\\ComSkip.exe";
+ public static readonly string DefaultStartParameters = "--playnice \"{0}\"";
+ public static readonly string DefaultEndProgram = "\\Program Files\\ComSkip\\ComClean.bat";
+ public static readonly string DefaultEndParameters = "\"{0}\"";
+
#endregion Constants
#region Members
@@ -182,12 +185,12 @@
using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(MPConfigFile))
{
_runAtStart = xmlreader.GetValueAsBool("ComSkipLauncher", "RunAtStart", false);
- _startProgram = xmlreader.GetValueAsString("ComSkipLauncher", "StartProgram", DefaultProgram);
- _startParameters = xmlreader.GetValueAsString("ComSkipLauncher", "StartParameters", DefaultParameters);
+ _startProgram = xmlreader.GetValueAsString("ComSkipLauncher", "StartProgram", DefaultStartProgram);
+ _startParameters = xmlreader.GetValueAsString("ComSkipLauncher", "StartParameters", DefaultStartParameters);
_runAtEnd = xmlreader.GetValueAsBool("ComSkipLauncher", "RunAtEnd", false);
- _endProgram = xmlreader.GetValueAsString("ComSkipLauncher", "EndProgram", DefaultProgram);
- _endParameters = xmlreader.GetValueAsString("ComSkipLauncher", "EndParameters", DefaultParameters);
+ _endProgram = xmlreader.GetValueAsString("ComSkipLauncher", "EndProgram", DefaultEndProgram);
+ _endParameters = xmlreader.GetValueAsString("ComSkipLauncher", "EndParameters", DefaultEndParameters);
}
}
catch (Exception ex)
Deleted: trunk/plugins/ComSkipLauncher TVE2/ComSkipLauncher.csproj
===================================================================
--- trunk/plugins/ComSkipLauncher TVE2/ComSkipLauncher.csproj 2007-03-11 13:44:57 UTC (rev 181)
+++ trunk/plugins/ComSkipLauncher TVE2/ComSkipLauncher.csproj 2007-03-11 15:18:13 UTC (rev 182)
@@ -1,87 +0,0 @@
-<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>{35EE9B81-1774-498E-94A0-0FD47E213FB5}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>MediaPortal.Plugins</RootNamespace>
- <AssemblyName>ComSkipLauncher</AssemblyName>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>false</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>none</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>
- </DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="Core, Version=1.0.2581.1884, Culture=neutral, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\MediaPortal\Core\bin\Release\Core.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="Databases, Version=1.0.2623.6915, Culture=neutral, processorArchitecture=x86">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\MediaPortal\xbmc\bin\Release\Databases.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Drawing" />
- <Reference Include="System.Windows.Forms" />
- <Reference Include="System.Xml" />
- <Reference Include="TVCapture, Version=1.0.2623.6917, Culture=neutral, processorArchitecture=x86">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\MediaPortal\xbmc\bin\Release\TVCapture.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="Utils, Version=1.0.2622.31921, Culture=neutral, processorArchitecture=x86">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\MediaPortal\Utils\bin\Release\Utils.dll</HintPath>
- <Private>False</Private>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="ComSkipLauncher.cs" />
- <Compile Include="AssemblyInfo.cs" />
- <Compile Include="Configuration.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="Configuration.designer.cs">
- <DependentUpon>Configuration.cs</DependentUpon>
- </Compile>
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Configuration.resx">
- <DependentUpon>Configuration.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>
- -->
- <PropertyGroup>
- <PostBuildEvent>copy "*.*" "\MediaPortal Development\Plugin Releases\ComSkip Launcher\"</PostBuildEvent>
- </PropertyGroup>
-</Project>
\ No newline at end of file
Modified: trunk/plugins/ComSkipLauncher TVE3/AssemblyInfo.cs
===================================================================
--- trunk/plugins/ComSkipLauncher TVE3/AssemblyInfo.cs 2007-03-11 13:44:57 UTC (rev 181)
+++ trunk/plugins/ComSkipLauncher TVE3/AssemblyInfo.cs 2007-03-11 15:18:13 UTC (rev 182)
@@ -8,7 +8,7 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
//
-[assembly: AssemblyTitle("ComSkipLauncher")]
+[assembly: AssemblyTitle("ComSkipLauncher TVE3")]
[assembly: AssemblyDescription("Launches ComSkip when a recording completes")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("For MediaPortal")]
Added: trunk/plugins/ComSkipLauncher TVE3/ComSkipLauncher TVE3.csproj
===================================================================
--- trunk/plugins/ComSkipLauncher TVE3/ComSkipLauncher TVE3.csproj (rev 0)
+++ trunk/plugins/ComSkipLauncher TVE3/ComSkipLauncher TVE3.csproj 2007-03-11 15:18:13 UTC (rev 182)
@@ -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>{AD20D519-D1AF-484E-ADDE-251F7CA912D9}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>TvEngine</RootNamespace>
+ <AssemblyName>ComSkipLauncher</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>false</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>none</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>
+ </DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Gentle.Common, Version=1.2.9.1285, Culture=neutral, PublicKeyToken=80b5de62e27be49b">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\TV Engine\TVLibrary\TVDatabase\bin\Release\\Gentle.Common.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="Gentle.Framework, Version=1.2.9.1286, Culture=neutral, PublicKeyToken=80b5de62e27be49b">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\TV Engine\TVLibrary\TVDatabase\bin\Release\\Gentle.Framework.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="PluginBase, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\TV Engine\TVLibrary\Plugins\PluginBase\bin\Release\PluginBase.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="SetupControls, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\TV Engine\TVLibrary\SetupControls\bin\Release\SetupControls.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Windows.Forms" />
+ <Reference Include="System.Xml" />
+ <Reference Include="TvBusinessLayer, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\TV Engine\TVLibrary\TvService\bin\Release\TvBusinessLayer.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="TvControl, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\TV Engine\TVLibrary\TvService\bin\Release\TvControl.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="TVDatabase, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\TV Engine\TVLibrary\TVDatabase\bin\Release\\TVDatabase.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="TvLibrary.Interfaces, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\TV Engine\TVLibrary\TvLibrary.Interfaces\bin\Release\TvLibrary.Interfaces.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="ComSkipLauncher.cs" />
+ <Compile Include="AssemblyInfo.cs" />
+ <Compile Include="PluginSetup.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
+ <Compile Include="PluginSetup.Designer.cs">
+ <DependentUpon>PluginSetup.cs</DependentUpon>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="PluginSetup.resx">
+ <DependentUpon>PluginSetup.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>
+ -->
+ <PropertyGroup>
+ <PostBuildEvent>copy "*.*" "\MediaPortal Development\Plugin Releases\ComSkip Launcher TVE3\"</PostBuildEvent>
+ </PropertyGroup>
+</Project>
\ No newline at end of file
Modified: trunk/plugins/ComSkipLauncher TVE3/ComSkipLauncher.cs
===================================================================
--- trunk/plugins/ComSkipLauncher TVE3/ComSkipLauncher.cs 2007-03-11 13:44:57 UTC (rev 181)
+++ trunk/plugins/ComSkipLauncher TVE3/ComSkipLauncher.cs 2007-03-11 15:18:13 UTC (rev 182)
@@ -5,24 +5,28 @@
using System.Text;
using System.Windows.Forms;
-using MediaPortal.Configuration;
-using MediaPortal.GUI.Library;
-using MediaPortal.TV.Database;
-using MediaPortal.TV.Recording;
-using MediaPortal.Util;
+using TvLibrary.Log;
+using TvControl;
+using SetupTv;
+using TvEngine;
+using TvEngine.Events;
+using TvLibrary.Interfaces;
+using TvLibrary.Implementations;
+using TvDatabase;
-namespace MediaPortal.Plugins
+namespace TvEngine
{
- public class ComSkipLauncher : IPlugin, ISetupForm
+ public class ComSkipLauncher : ITvServerPlugin
{
#region Constants
- public static readonly string MPConfigFile = Config.GetFolder(Config.Dir.Config) + "\\MediaPortal.xml";
+ public static readonly string DefaultStartProgram = "\\Program Files\\ComSkip\\ComSkip.exe";
+ public static readonly string DefaultStartParameters = "--playnice \"{0}\"";
- public static readonly string DefaultProgram = "C:\\Program Files\\ComSkip\\ComSkip.exe";
- public static readonly string DefaultParameters = "--playnice \"{0}\"";
+ public static readonly string DefaultEndProgram = "\\Program Files\\ComSkip\\ComClean.bat";
+ public static readonly string DefaultEndParameters = "\"{0}\"";
#endregion Constants
@@ -38,177 +42,125 @@
#endregion Members
- #region IPlugin Members
+ #region Properties
- public void Start()
+ /// <summary>
+ /// returns the name of the plugin
+ /// </summary>
+ public string Name
{
- Log.Info("ComSkipLauncher: Start");
-
- LoadSettings();
-
- if (_runAtStart)
- Recorder.OnTvRecordingStarted += new Recorder.OnTvRecordingHandler(Recorder_OnTvRecordingStarted);
-
- if (_runAtEnd)
- Recorder.OnTvRecordingEnded += new Recorder.OnTvRecordingHandler(Recorder_OnTvRecordingEnded);
+ get { return "ComSkipLauncher"; }
}
- public void Stop()
+ /// <summary>
+ /// returns the version of the plugin
+ /// </summary>
+ public string Version
{
- Log.Info("ComSkipLauncher: Stop");
-
- if (_runAtStart)
- Recorder.OnTvRecordingStarted -= new Recorder.OnTvRecordingHandler(Recorder_OnTvRecordingStarted);
-
- if (_runAtEnd)
- Recorder.OnTvRecordingEnded -= new Recorder.OnTvRecordingHandler(Recorder_OnTvRecordingEnded);
+ get { return "1.0.2.0"; }
}
+ /// <summary>
+ /// returns the author of the plugin
+ /// </summary>
+ public string Author
+ {
+ get { return "and-81"; }
+ }
+ /// <summary>
+ /// returns if the plugin should only run on the master server
+ /// or also on slave servers
+ /// </summary>
+ public bool MasterOnly
+ {
+ get { return false; }
+ }
- #endregion
+ #endregion Properties
- #region ISetupForm Members
+ #region IPlugin Members
- public string Author() { return "and-81"; }
- public bool CanEnable() { return true; }
- public bool DefaultEnabled() { return true; }
- public string Description() { return "Launches ComSkip when a recording completes."; }
- public int GetWindowId() { return 0; }
- public bool HasSetup() { return true; }
- public string PluginName() { return "ComSkip Launcher"; }
-
- public void ShowPlugin()
+ [CLSCompliant(false)]
+ public void Start(IController controller)
{
+ Log.Info("ComSkipLauncher: Start");
+
LoadSettings();
- Configuration configuration = new Configuration();
- configuration.RunAtStart = _runAtStart;
- configuration.StartProgram = _startProgram;
- configuration.StartParameters = _startParameters;
+ if (_runAtStart || _runAtEnd)
+ GlobalServiceProvider.Instance.Get<ITvServerEvent>().OnTvServerEvent += new TvServerEventHandler(ComSkipLauncher_OnTvServerEvent);
+ }
- configuration.RunAtEnd = _runAtEnd;
- configuration.EndProgram = _endProgram;
- configuration.EndParameters = _endParameters;
+ public void Stop()
+ {
+ Log.Info("ComSkipLauncher: Stop");
- if (configuration.ShowDialog() == DialogResult.OK)
- {
- _runAtStart = configuration.RunAtStart;
- _startProgram = configuration.StartProgram;
- _startParameters = configuration.StartParameters;
-
- _runAtEnd = configuration.RunAtEnd;
- _endProgram = configuration.EndProgram;
- _endParameters = configuration.EndParameters;
-
- SaveSettings();
- }
+ if (_runAtStart || _runAtEnd)
+ GlobalServiceProvider.Instance.Get<ITvServerEvent>().OnTvServerEvent -= new TvServerEventHandler(ComSkipLauncher_OnTvServerEvent);
}
- public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage)
+ [CLSCompliant(false)]
+ public SetupTv.SectionSettings Setup
{
- strButtonText = strButtonImage = strButtonImageFocus = strPictureImage = "";
- return false;
+ get { return new SetupTv.Sections.PluginSetup(); }
}
#endregion
#region Implementation
- void Recorder_OnTvRecordingStarted(string recordingFilename, TVRecording recording, TVProgram program)
+ void ComSkipLauncher_OnTvServerEvent(object sender, EventArgs eventArgs)
{
- Log.Debug("ComSkipLauncher: Recorder_OnTvRecordingStarted {0}", recordingFilename);
-
try
{
- string parameters = ProcessParameters(_startParameters, recordingFilename);
+ TvServerEventArgs tvEvent = (TvServerEventArgs)eventArgs;
+ string parameters;
- Log.Info(
+ if (tvEvent.EventType == TvServerEventType.RecordingStarted)
+ {
+ parameters = ProcessParameters(_startParameters, tvEvent.Recording.FileName);
+
+ Log.Info(
"ComSkipLauncher: Recording started ({0}), launching program ({1} {2}) ...",
- recordingFilename,
+ tvEvent.Recording.FileName,
_startProgram,
parameters
- );
+ );
- LaunchProcess(_startProgram, parameters, Path.GetDirectoryName(recordingFilename), ProcessWindowStyle.Hidden);
- }
- catch (Exception ex)
- {
- Log.Error("ComSkipLauncher: {0}", ex.Message);
- }
- }
- void Recorder_OnTvRecordingEnded(string recordingFilename, TVRecording recording, TVProgram program)
- {
- Log.Debug("ComSkipLauncher: Recorder_OnTvRecordingEnded {0}", recordingFilename);
-
- try
- {
- string fileName = String.Empty;
- List<TVRecorded> recorded = new List<TVRecorded>();
- TVDatabase.GetRecordedTV(ref recorded);
- foreach (TVRecorded rec in recorded)
- {
- if (rec.Title == recording.Title && rec.StartTime == recording.StartTime)
- {
- fileName = rec.FileName;
- break;
- }
+ LaunchProcess(_startProgram, parameters, Path.GetDirectoryName(tvEvent.Recording.FileName), ProcessWindowStyle.Hidden);
}
-
- if (String.IsNullOrEmpty(fileName))
+ else if (tvEvent.EventType == TvServerEventType.RecordingEnded)
{
- Log.Warn("ComSkipLauncher: Couldn't process recording titled {0}, no filename found.", recording.Title);
- return;
- }
+ parameters = ProcessParameters(_endParameters, tvEvent.Recording.FileName);
- string parameters = ProcessParameters(_endParameters, fileName);
+ Log.Info(
+ "ComSkipLauncher: Recording ended ({0}), launching program ({1} {2}) ...",
+ tvEvent.Recording.FileName,
+ _endProgram,
+ parameters
+ );
- Log.Info(
- "ComSkipLauncher: Recording ended ({0}), launching program ({1} {2}) ...",
- fileName,
- _endProgram,
- parameters
- );
-
- LaunchProcess(_endProgram, parameters, Path.GetDirectoryName(fileName), ProcessWindowStyle.Hidden);
+ LaunchProcess(_endProgram, parameters, Path.GetDirectoryName(tvEvent.Recording.FileName), ProcessWindowStyle.Hidden);
+ }
}
catch (Exception ex)
{
Log.Error("ComSkipLauncher: {0}", ex.Message);
}
+
}
void LoadSettings()
{
try
{
- using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(MPConfigFile))
- {
- _runAtStart = xmlreader.GetValueAsBool("ComSkipLauncher", "RunAtStart", false);
- _startProgram = xmlreader.GetValueAsString("ComSkipLauncher", "StartProgram", DefaultProgram);
- _startParameters = xmlreader.GetValueAsString("ComSkipLauncher", "StartParameters", DefaultParameters);
+ TvBusinessLayer layer = new TvBusinessLayer();
- _runAtEnd = xmlreader.GetValueAsBool("ComSkipLauncher", "RunAtEnd", false);
- _endProgram = xmlreader.GetValueAsString("ComSkipLauncher", "EndProgram", DefaultProgram);
- _endParameters = xmlreader.GetValueAsString("ComSkipLauncher", "EndParameters", DefaultParameters);
- }
- }
- catch (Exception ex)
- {
- Log.Error("ComSkipLauncher: {0}", ex.Message);
- }
- }
- void SaveSettings()
- {
- try
- {
- using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings(MPConfigFile))
- {
- xmlwriter.SetValueAsBool("ComSkipLauncher", "RunAtStart", _runAtStart);
- xmlwriter.SetValue("ComSkipLauncher", "StartProgram", _startProgram);
- xmlwriter.SetValue("ComSkipLauncher", "StartParameters", _startParameters);
+ _runAtStart = Convert.ToBoolean(layer.GetSetting("ComSkipLauncher_RunAtStart", "False").Value);
+ _startProgram = layer.GetSetting("ComSkipLauncher_StartProgram", DefaultStartProgram).Value;
+ _startParameters = layer.GetSetting("ComSkipLauncher_StartParameters", DefaultStartParameters).Value;
- xmlwriter.SetValueAsBool("ComSkipLauncher", "RunAtEnd", _runAtEnd);
- xmlwriter.SetValue("ComSkipLauncher", "EndProgram", _endProgram);
- xmlwriter.SetValue("ComSkipLauncher", "EndParameters", _endParameters);
- }
+ _runAtEnd = Convert.ToBoolean(layer.GetSetting("ComSkipLauncher_RunAtEnd", "False").Value);
+ _endProgram = layer.GetSetting("ComSkipLauncher_EndProgram", DefaultEndProgram).Value;
+ _endParameters = layer.GetSetting("ComSkipLauncher_EndParameters", DefaultEndParameters).Value;
}
catch (Exception ex)
{
Deleted: trunk/plugins/ComSkipLauncher TVE3/ComSkipLauncher.csproj
===================================================================
--- trunk/plugins/ComSkipLauncher TVE3/ComSkipLauncher.csproj 2007-03-11 13:44:57 UTC (rev 181)
+++ trunk/plugins/ComSkipLauncher TVE3/ComSkipLauncher.csproj 2007-03-11 15:18:13 UTC (rev 182)
@@ -1,87 +0,0 @@
-<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>{35EE9B81-1774-498E-94A0-0FD47E213FB5}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>MediaPortal.Plugins</RootNamespace>
- <AssemblyName>ComSkipLauncher</AssemblyName>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>false</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>none</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>
- </DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="Core, Version=1.0.2581.1884, Culture=neutral, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\MediaPortal\Core\bin\Release\Core.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="Databases, Version=1.0.2623.6915, Culture=neutral, processorArchitecture=x86">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\MediaPortal\xbmc\bin\Release\Databases.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Drawing" />
- <Reference Include="System.Windows.Forms" />
- <Reference Include="System.Xml" />
- <Reference Include="TVCapture, Version=1.0.2623.6917, Culture=neutral, processorArchitecture=x86">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\MediaPortal\xbmc\bin\Release\TVCapture.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="Utils, Version=1.0.2622.31921, Culture=neutral, processorArchitecture=x86">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\MediaPortal\Utils\bin\Release\Utils.dll</HintPath>
- <Private>False</Private>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="ComSkipLauncher.cs" />
- <Compile Include="AssemblyInfo.cs" />
- <Compile Include="Configuration.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="Configuration.designer.cs">
- <DependentUpon>Configuration.cs</DependentUpon>
- </Compile>
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Configuration.resx">
- <DependentUpon>Configuration.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>
- -->
- <PropertyGroup>
- <PostBuildEvent>copy "*.*" "\MediaPortal Development\Plugin Releases\ComSkip Launcher\"</PostBuildEvent>
- </PropertyGroup>
-</Project>
\ No newline at end of file
Deleted: trunk/plugins/ComSkipLauncher TVE3/Configuration.Designer.cs
===================================================================
--- trunk/plugins/ComSkipLauncher TVE3/Configuration.Designer.cs 2007-03-11 13:44:57 UTC (rev 181)
+++ trunk/plugins/ComSkipLauncher TVE3/Configuration.Designer.cs 2007-03-11 15:18:13 UTC (rev 182)
@@ -1,458 +0,0 @@
-namespace MediaPortal.Plugins
-{
- partial class Configuration
- {
- /// <summary>
- /// Required designer variable.
- /// </summary>
- private System.ComponentModel.IContainer components = null;
-
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region Windows Form Designer generated code
-
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- private void InitializeComponent()
- {
- this.components = new System.ComponentModel.Container();
- this.buttonOK = new System.Windows.Forms.Button();
- this.buttonCancel = new System.Windows.Forms.Button();
- this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
- this.buttonTest = new System.Windows.Forms.Button();
- this.textBoxTest = new System.Windows.Forms.TextBox();
- this.buttonFindTestFile = new System.Windows.Forms.Button();
- this.radioButtonStartDoNothing = new System.Windows.Forms.RadioButton();
- this.radioButtonStartLaunch = new System.Windows.Forms.RadioButton();
- this.toolTips = new System.Windows.Forms.ToolTip(this.components);
- this.textBoxEndParameters = new System.Windows.Forms.TextBox();
- this.buttonEndParameters = new System.Windows.Forms.Button();
- this.buttonEndProgram = new System.Windows.Forms.Button();
- this.textBoxEndProgram = new System.Windows.Forms.TextBox();
- this.textBoxStartParameters = new System.Windows.Forms.TextBox();
- this.buttonStartParameters = new System.Windows.Forms.Button();
- this.buttonStartProgram = new System.Windows.Forms.Button();
- this.textBoxStartProgram = new System.Windows.Forms.TextBox();
- this.radioButtonEndDoNothing = new System.Windows.Forms.RadioButton();
- this.radioButtonEndLaunch = new System.Windows.Forms.RadioButton();
- this.tabControl = new System.Windows.Forms.TabControl();
- this.tabPageStart = new System.Windows.Forms.TabPage();
- this.groupBoxStartProgram = new System.Windows.Forms.GroupBox();
- this.labelStartParameters = new System.Windows.Forms.Label();
- this.labelStartProgram = new System.Windows.Forms.Label();
- this.tabPageEnd = new System.Windows.Forms.TabPage();
- this.groupBoxEndProgram = new System.Windows.Forms.GroupBox();
- this.labelEndParameters = new System.Windows.Forms.Label();
- this.labelEndProgram = new System.Windows.Forms.Label();
- this.groupBoxTest = new System.Windows.Forms.GroupBox();
- this.tabControl.SuspendLayout();
- this.tabPageStart.SuspendLayout();
- this.groupBoxStartProgram.SuspendLayout();
- this.tabPageEnd.SuspendLayout();
- this.groupBoxEndProgram.SuspendLayout();
- this.groupBoxTest.SuspendLayout();
- this.SuspendLayout();
- //
- // buttonOK
- //
- this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonOK.Location = new System.Drawing.Point(216, 288);
- this.buttonOK.Name = "buttonOK";
- this.buttonOK.Size = new System.Drawing.Size(56, 24);
- this.buttonOK.TabIndex = 2;
- this.buttonOK.Text = "OK";
- this.buttonOK.UseVisualStyleBackColor = true;
- this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
- //
- // buttonCancel
- //
- this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
- this.buttonCancel.Location = new System.Drawing.Point(280, 288);
- this.buttonCancel.Name = "buttonCancel";
- this.buttonCancel.Size = new System.Drawing.Size(56, 24);
- this.buttonCancel.TabIndex = 3;
- this.buttonCancel.Text = "Cancel";
- this.buttonCancel.UseVisualStyleBackColor = true;
- this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
- //
- // openFileDialog
- //
- this.openFileDialog.Filter = "All files|*.*";
- //
- // 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(272, 24);
- this.buttonTest.Name = "buttonTest";
- this.buttonTest.Size = new System.Drawing.Size(48, 20);
- this.buttonTest.TabIndex = 2;
- this.buttonTest.Text = "Test";
- this.toolTips.SetToolTip(this.buttonTest, "Click here to test the above settings");
- this.buttonTest.UseVisualStyleBackColor = true;
- this.buttonTest.Click += new System.EventHandler(this.buttonTest_Click);
- //
- // textBoxTest
- //
- this.textBoxTest.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.textBoxTest.Location = new System.Drawing.Point(8, 24);
- this.textBoxTest.Name = "textBoxTest";
- this.textBoxTest.Size = new System.Drawing.Size(224, 20);
- this.textBoxTest.TabIndex = 0;
- this.toolTips.SetToolTip(this.textBoxTest, "File to test launch with");
- //
- // buttonFindTestFile
- //
- this.buttonFindTestFile.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonFindTestFile.Location = new System.Drawing.Point(240, 24);
- this.buttonFindTestFile.Name = "buttonFindTestFile";
- this.buttonFindTestFile.Size = new System.Drawing.Size(24, 20);
- this.buttonFindTestFile.TabIndex = 1;
- this.buttonFindTestFile.Text = "...";
- this.toolTips.SetToolTip(this.buttonFindTestFile, "Click here to locate a file to test with");
- this.buttonFindTestFile.UseVisualStyleBackColor = true;
- this.buttonFindTestFile.Click += new System.EventHandler(this.buttonFindTestFile_Click);
- //
- // radioButtonStartDoNothing
- //
- this.radioButtonStartDoNothing.Location = new System.Drawing.Point(8, 8);
- this.radioButtonStartDoNothing.Name = "radioButtonStartDoNothing";
- this.radioButtonStartDoNothing.Size = new System.Drawing.Size(96, 24);
- this.radioButtonStartDoNothing.TabIndex = 0;
- this.radioButtonStartDoNothing.Text = "Do nothing";
- this.toolTips.SetToolTip(this.radioButtonStartDoNothing, "Launch ComSkip as soon as the recording starts (this requires the LiveTV setting " +
- "in comskip.ini)");
- this.radioButtonStartDoNothing.UseVisualStyleBackColor = true;
- //
- // radioButtonStartLaunch
- //
- this.radioButtonStartLaunch.Checked = true;
- this.radioButtonStartLaunch.Location = new System.Drawing.Point(8, 32);
- this.radioButtonStartLaunch.Name = "radioButtonStartLaunch";
- this.radioButtonStartLaunch.Size = new System.Drawing.Size(96, 24);
- this.radioButtonStartLaunch.TabIndex = 1;
- this.radioButtonStartLaunch.Text = "Launch:";
- this.toolTips.SetToolTip(this.radioButtonStartLaunch, "Launch ComSkip to process the recording after it has finished");
- this.radioButtonStartLaunch.UseVisualStyleBackColor = true;
- this.radioButtonStartLaunch.CheckedChanged += new System.EventHandler(this.radioButtonStartLaunch_CheckedChanged);
- //
- // textBoxEndParameters
- //
- this.textBoxEndParameters.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.textBoxEndParameters.Location = new System.Drawing.Point(8, 80);
- this.textBoxEndParameters.Name = "textBoxEndParameters";
- this.textBoxEndParameters.Size = new System.Drawing.Size(256, 20);
- this.textBoxEndParameters.TabIndex = 4;
- this.toolTips.SetToolTip(this.textBoxEndParameters, "Provide command line parameters for the program");
- //
- // buttonEndParameters
- //
- this.buttonEndParameters.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonEndParameters.Location = new System.Drawing.Point(272, 80);
- this.buttonEndParameters.Name = "buttonEndParameters";
- this.buttonEndParameters.Size = new System.Drawing.Size(24, 20);
- this.buttonEndParameters.TabIndex = 5;
- this.buttonEndParameters.Text = "?";
- this.toolTips.SetToolTip(this.buttonEndParameters, "Click here for a list of additional command line parameters");
- this.buttonEndParameters.UseVisualStyleBackColor = true;
- this.buttonEndParameters.Click += new System.EventHandler(this.buttonParamQuestion_Click);
- //
- // buttonEndProgram
- //
- this.buttonEndProgram.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonEndProgram.Location = new System.Drawing.Point(272, 40);
- this.buttonEndProgram.Name = "buttonEndProgram";
- this.buttonEndProgram.Size = new System.Drawing.Size(24, 20);
- this.buttonEndProgram.TabIndex = 2;
- this.buttonEndProgram.Text = "...";
- this.toolTips.SetToolTip(this.buttonEndProgram, "Locate the program you wish to launch");
- this.buttonEndProgram.UseVisualStyleBackColor = true;
- this.buttonEndProgram.Click += new System.EventHandler(this.buttonEndProgram_Click);
- //
- // textBoxEndProgram
- //
- this.textBoxEndProgram.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.textBoxEndProgram.Location = new System.Drawing.Point(8, 40);
- this.textBoxEndProgram.Name = "textBoxEndProgram";
- this.textBoxEndProgram.Size = new System.Drawing.Size(256, 20);
- this.textBoxEndProgram.TabIndex = 1;
- this.toolTips.SetToolTip(this.textBoxEndProgram, "The full location of the program to launch");
- //
- // textBoxStartParameters
- //
- this.textBoxStartParameters.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.textBoxStartParameters.Location = new System.Drawing.Point(8, 80);
- this.textBoxStartParameters.Name = "textBoxStartParameters";
- this.textBoxStartParameters.Size = new System.Drawing.Size(256, 20);
- this.textBoxStartParameters.TabIndex = 4;
- this.toolTips.SetToolTip(this.textBoxStartParameters, "Provide command line parameters for the program");
- //
- // buttonStartParameters
- //
- this.buttonStartParameters.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonStartParameters.Location = new System.Drawing.Point(272, 80);
- this.buttonStartParameters.Name = "buttonStartParameters";
- this.buttonStartParameters.Size = new System.Drawing.Size(24, 20);
- this.buttonStartParameters.TabIndex = 5;
- this.buttonStartParameters.Text = "?";
- this.toolTips.SetToolTip(this.buttonStartParameters, "Click here for a list of additional command line parameters");
- this.buttonStartParameters.UseVisualStyleBackColor = true;
- this.buttonStartParameters.Click += new System.EventHandler(this.buttonParamQuestion_Click);
- //
- // buttonStartProgram
- //
- this.buttonStartProgram.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonStartProgram.Location = new System.Drawing.Point(272, 40);
- this.buttonStartProgram.Name = "buttonStartProgram";
- this.buttonStartProgram.Size = new System.Drawing.Size(24, 20);
- this.buttonStartProgram.TabIndex = 2;
- this.buttonStartProgram.Text = "...";
- this.toolTips.SetToolTip(this.buttonStartProgram, "Locate the program you wish to launch");
- this.buttonStartProgram.UseVisualStyleBackColor = true;
- this.buttonStartProgram.Click += new System.EventHandler(this.buttonStartProgram_Click);
- //
- // textBoxStartProgram
- //
- this.textBoxStartProgram.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.textBoxStartProgram.Location = new System.Drawing.Point(8, 40);
- this.textBoxStartProgram.Name = "textBoxStartProgram";
- this.textBoxStartProgram.Size = new System.Drawing.Size(256, 20);
- this.textBoxStartProgram.TabIndex = 1;
- this.toolTips.SetToolTip(this.textBoxStartProgram, "The full location of the program to launch");
- //
- // radioButtonEndDoNothing
- //
- this.radioButtonEndDoNothing.Location = new System.Drawing.Point(8, 8);
- this.radioButtonEndDoNothing.Name = "radioButtonEndDoNothing";
- this.radioButtonEndDoNothing.Size = new System.Drawing.Size(96, 24);
- this.radioButtonEndDoNothing.TabIndex = 0;
- this.radioButtonEndDoNothing.Text = "Do nothing";
- this.radioButtonEndDoNothing.UseVisualStyleBackColor = true;
- //
- // radioButtonEndLaunch
- //
- this.radioButtonEndLaunch.Checked = true;
- this.radioButtonEndLaunch.Location = new System.Drawing.Point(8, 32);
- this.radioButtonEndLaunch.Name = "radioButtonEndLaunch";
- this.radioButtonEndLaunch.Size = new System.Drawing.Size(96, 24);
- this.radioButtonEndLaunch.TabIndex = 1;
- this.radioButtonEndLaunch.Text = "Launch:";
- this.radioButtonEndLaunch.UseVisualStyleBackColor = true;
- this.radioButtonEndLaunch.CheckedChanged += new System.EventHandler(this.radioButtonEndLaunch_CheckedChanged);
- //
- // tabControl
- //
- this.tabControl.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.tabControl.Controls.Add(this.tabPageStart);
- this.tabControl.Controls.Add(this.tabPageEnd);
- this.tabControl.Location = new System.Drawing.Point(8, 8);
- this.tabControl.Name = "tabControl";
- this.tabControl.SelectedIndex = 0;
- this.tabControl.Size = new System.Drawing.Size(328, 208);
- this.tabControl.TabIndex = 0;
- //
- // tabPageStart
- //
- this.tabPageStart.Controls.Add(this.groupBoxStartProgram);
- this.tabPageStart.Controls.Add(this.radioButtonStartDoNothing);
- this.tabPageStart.Controls.Add(this.radioButtonStartLaunch);
- this.tabPageStart.Location = new System.Drawing.Point(4, 22);
- this.tabPageStart.Name = "tabPageStart";
- this.tabPageStart.Padding = new System.Windows.Forms.Padding(3);
- this.tabPageStart.Size = new System.Drawing.Size(320, 182);
- this.tabPageStart.TabIndex = 0;
- this.tabPageStart.Text = "When recording starts ...";
- this.tabPageStart.UseVisualStyleBackColor = true;
- //
- // groupBoxStartProgram
- //
- this.groupBoxStartProgram.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.groupBoxStartProgram.Controls.Add(this.labelStartParameters);
- this.groupBoxStartProgram.Controls.Add(this.textBoxStartParameters);
- this.groupBoxStartProgram.Controls.Add(this.buttonStartParameters);
- this.groupBoxStartProgram.Controls.Add(this.labelStartProgram);
- this.groupBoxStartProgram.Controls.Add(this.buttonStartProgram);
- this.groupBoxStartProgram.Controls.Add(this.textBoxStartProgram);
- this.groupBoxStartProgram.Location = new System.Drawing.Point(8, 64);
- this.groupBoxStartProgram.Name = "groupBoxStartProgram";
- this.groupBoxStartProgram.Size = new System.Drawing.Size(304, 112);
- this.groupBoxStartProgram.TabIndex = 2;
- this.groupBoxStartProgram.TabStop = false;
- this.groupBoxStartProgram.Text = "What to do";
- //
- // labelStartParameters
- //
- this.labelStartParameters.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.labelStartParameters.Location = new System.Drawing.Point(8, 64);
- this.labelStartParameters.Name = "labelStartParameters";
- this.labelStartParameters.Size = new System.Drawing.Size(256, 16);
- this.labelStartParameters.TabIndex = 3;
- this.labelStartParameters.Text = "Parameters:";
- this.labelStartParameters.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
- // labelStartProgram
- //
- this.labelStartProgram.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.labelStartProgram.Location = new System.Drawing.Point(8, 24);
- this.labelStartProgram.Name = "labelStartProgram";
- this.labelStartProgram.Size = new System.Drawing.Size(256, 16);
- this.labelStartProgram.TabIndex = 0;
- this.labelStartProgram.Text = "Program:";
- this.labelStartProgram.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
- // tabPageEnd
- //
- this.tabPageEnd.Controls.Add(this.groupBoxEndProgram);
- this.tabPageEnd.Controls.Add(this.radioButtonEndDoNothing);
- this.tabPageEnd.Controls.Add(this.radioButtonEndLaunch);
- this.tabPageEnd.Location = new System.Drawing.Point(4, 22);
- this.tabPageEnd.Name = "tabPageEnd";
- this.tabPageEnd.Padding = new System.Windows.Forms.Padding(3);
- this.tabPageEnd.Size = new System.Drawing.Size(320, 182);
- this.tabPageEnd.TabIndex = 1;
- this.tabPageEnd.Text = "When recording ends ...";
- this.tabPageEnd.UseVisualStyleBackColor = true;
- //
- // groupBoxEndProgram
- //
- this.groupBoxEndProgram.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.groupBoxEndProgram.Controls.Add(this.labelEndParameters);
- this.groupBoxEndProgram.Controls.Add(this.textBoxEndParameters);
- this.groupBoxEndProgram.Controls.Add(this.buttonEndParameters);
- this.groupBoxEndProgram.Controls.Add(this.labelEndProgram);
- this.groupBoxEndProgram.Controls.Add(this.buttonEndProgram);
- this.groupBoxEndProgram.Controls.Add(this.textBoxEndProgram);
- this.groupBoxEndProgram.Location = new System.Drawing.Point(8, 64);
- this.groupBoxEndProgram.Name = "groupBoxEndProgram";
- this.groupBoxEndProgram.Size = new System.Drawing.Size(304, 112);
- this.groupBoxEndProgram.TabIndex = 2;
- this.groupBoxEndProgram.TabStop = false;
- this.groupBoxEndProgram.Text = "What to do";
- //
- // labelEndParameters
- //
- this.labelEndParameters.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.labelEndParameters.Location = new System.Drawing.Point(8, 64);
- this.labelEndParameters.Name = "labelEndParameters";
- this.labelEndParameters.Size = new System.Drawing.Size(256, 16);
- this.labelEndParameters.TabIndex = 3;
- this.labelEndParameters.Text = "Parameters:";
- this.labelEndParameters.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
- // labelEndProgram
- //
- this.labelEndProgram.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.labelEndProgram.Location = new System.Drawing.Point(8, 24);
- this.labelEndProgram.Name = "labelEndProgram";
- this.labelEndProgram.Size = new System.Drawing.Size(256, 16);
- this.labelEndProgram.TabIndex = 0;
- this.labelEndProgram.Text = "Program:";
- this.labelEndProgram.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
- // groupBoxTest
- //
- this.groupBoxTest.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.groupBoxTest.Controls.Add(this.textBoxTest);
- this.groupBoxTest.Controls.Add(this.buttonTest);
- this.groupBoxTest.Controls.Add(this.buttonFindTestFile);
- this.groupBoxTest.Location = new System.Drawing.Point(8, 224);
- this.groupBoxTest.Name = "groupBoxTest";
- this.groupBoxTest.Size = new System.Drawing.Size(328, 56);
- this.groupBoxTest.TabIndex = 1;
- this.groupBoxTest.TabStop = false;
- this.groupBoxTest.Text = "Test";
- //
- // Configuration
- //
- 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(344, 320);
- this.Controls.Add(this.groupBoxTest);
- this.Controls.Add(this.tabControl);
- this.Controls.Add(this.buttonCancel);
- this.Controls.Add(this.buttonOK);
- this.MaximizeBox = false;
- this.MinimizeBox = false;
- this.MinimumSize = new System.Drawing.Size(360, 356);
- this.Name = "Configuration";
- this.ShowIcon = false;
- this.ShowInTaskbar = false;
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
- this.Text = "ComSkip Launcher";
- this.tabControl.ResumeLayout(false);
- this.tabPageStart.ResumeLayout(false);
- this.groupBoxStartProgram.ResumeLayout(false);
- this.groupBoxStartProgram.PerformLayout();
- this.tabPageEnd.ResumeLayout(false);
- this.groupBoxEndProgram.ResumeLayout(false);
- this.groupBoxEndProgram.PerformLayout();
- this.groupBoxTest.ResumeLayout(false);
- this.groupBoxTest.PerformLayout();
- this.ResumeLayout(false);
-
- }
-
- #endregion
-
- private System.Windows.Forms.Button buttonOK;
- private System.Windows.Forms.Button buttonCancel;
- private System.Windows.Forms.OpenFileDialog openFileDialog;
- private System.Windows.Forms.Button buttonTest;
- private System.Windows.Forms.TextBox textBoxTest;
- private System.Windows.Forms.Button buttonFindTestFile;
- private System.Windows.Forms.RadioButton radioButtonStartDoNothing;
- private System.Windows.Forms.RadioButton radioButtonStartLaunch;
- private System.Windows.Forms.ToolTip toolTips;
- private System.Windows.Forms.TabControl tabControl;
- private System.Windows.Forms.TabPage tabPageStart;
- private System.Windows.Forms.TabPage tabPageEnd;
- private System.Windows.Forms.GroupBox groupBoxTest;
- private System.Windows.Forms.RadioButton radioButtonEndDoNothing;
- private System.Windows.Forms.RadioButton radioButtonEndLaunch;
- private System.Windows.Forms.Label labelEndParameters;
- private System.Windows.Forms.TextBox textBoxEndParameters;
- private System.Windows.Forms.Button buttonEndParameters;
- private System.Windows.Forms.Label labelEndProgram;
- private System.Windows.Forms.Button buttonEndProgram;
- private System.Windows.Forms.TextBox textBoxEndProgram;
- private System.Windows.Forms.GroupBox groupBoxEndProgram;
- private System.Windows.Forms.GroupBox groupBoxStartProgram;
- private System.Windows.Forms.Label labelStartParameters;
- private System.Windows.Forms.TextBox textBoxStartParameters;
- private System.Windows.Forms.Button buttonStartParameters;
- private System.Windows.Forms.Label labelStartProgram;
- private System.Windows.Forms.Button buttonStartProgram;
- private System.Windows.Forms.TextBox textBoxStartProgram;
- }
-}
\ No newline at end of file
Deleted: trunk/plugins/ComSkipLauncher TVE3/Configuration.cs
===================================================================
--- trunk/plugins/ComSkipLauncher TVE3/Configuration.cs 2007-03-11 13:44:57 UTC (rev 181)
+++ trunk/plugins/ComSkipLauncher TVE3/Configuration.cs 2007-03-11 15:18:13 UTC (rev 182)
@@ -1,176 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Diagnostics;
-using System.Drawing;
-using System.IO;
-using System.Text;
-using System.Windows.Forms;
-
-using MediaPortal.GUI.Library;
-
-namespace MediaPortal.Plugins
-{
-
- public partial class Configuration : Form
- {
-
- #region Constants
-
- const string ParametersMessage =
-@"{0} = Recorded filename (includes path)
-{1} = Reco...
[truncated message content] |
|
From: <an...@us...> - 2007-03-11 13:44:58
|
Revision: 181
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=181&view=rev
Author: and-81
Date: 2007-03-11 06:44:57 -0700 (Sun, 11 Mar 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/ComSkipLauncher TVE2/ComSkipLauncher.cs
trunk/plugins/ComSkipLauncher TVE2/Configuration.Designer.cs
trunk/plugins/ComSkipLauncher TVE2/Configuration.cs
trunk/plugins/ComSkipLauncher TVE2/Configuration.resx
trunk/plugins/ComSkipLauncher TVE3/ComSkipLauncher.cs
trunk/plugins/ComSkipLauncher TVE3/Configuration.Designer.cs
trunk/plugins/ComSkipLauncher TVE3/Configuration.cs
trunk/plugins/ComSkipLauncher TVE3/Configuration.resx
trunk/plugins/MCEReplacement/Forms/MacroEditor.cs
trunk/plugins/MCEReplacement/Forms/SetupForm.cs
trunk/plugins/MCEReplacement/InputMapper/InputHandler.cs
trunk/plugins/MCEReplacement/MCEReplacement.cs
trunk/plugins/MCEReplacementTray/Properties/AssemblyInfo.cs
trunk/plugins/TV3ExtChannelChanger/AssemblyInfo.cs
Added Paths:
-----------
trunk/plugins/ComSkipLauncher TVE2/
trunk/plugins/ComSkipLauncher TVE3/
Removed Paths:
-------------
trunk/plugins/ComSkipLauncher/
Copied: trunk/plugins/ComSkipLauncher TVE2 (from rev 180, trunk/plugins/ComSkipLauncher)
Modified: trunk/plugins/ComSkipLauncher TVE2/ComSkipLauncher.cs
===================================================================
--- trunk/plugins/ComSkipLauncher/ComSkipLauncher.cs 2007-03-11 10:03:18 UTC (rev 180)
+++ trunk/plugins/ComSkipLauncher TVE2/ComSkipLauncher.cs 2007-03-11 13:44:57 UTC (rev 181)
@@ -22,7 +22,7 @@
public static readonly string MPConfigFile = Config.GetFolder(Config.Dir.Config) + "\\MediaPortal.xml";
public static readonly string DefaultProgram = "C:\\Program Files\\ComSkip\\ComSkip.exe";
- public static readonly string DefaultParameters = "--playnice --zpcut \"{0}\"";
+ public static readonly string DefaultParameters = "--playnice \"{0}\"";
#endregion Constants
@@ -79,10 +79,15 @@
{
LoadSettings();
- Configuration configuration = new Configuration(
- _startProgram, _startParameters, _runAtStart,
- _endProgram, _endParameters, _runAtEnd);
-
+ Configuration configuration = new Configuration();
+ configuration.RunAtStart = _runAtStart;
+ configuration.StartProgram = _startProgram;
+ configuration.StartParameters = _startParameters;
+
+ configuration.RunAtEnd = _runAtEnd;
+ configuration.EndProgram = _endProgram;
+ configuration.EndParameters = _endParameters;
+
if (configuration.ShowDialog() == DialogResult.OK)
{
_runAtStart = configuration.RunAtStart;
@@ -93,7 +98,6 @@
_endProgram = configuration.EndProgram;
_endParameters = configuration.EndParameters;
-
SaveSettings();
}
}
@@ -200,6 +204,10 @@
xmlwriter.SetValueAsBool("ComSkipLauncher", "RunAtStart", _runAtStart);
xmlwriter.SetValue("ComSkipLauncher", "StartProgram", _startProgram);
xmlwriter.SetValue("ComSkipLauncher", "StartParameters", _startParameters);
+
+ xmlwriter.SetValueAsBool("ComSkipLauncher", "RunAtEnd", _runAtEnd);
+ xmlwriter.SetValue("ComSkipLauncher", "EndProgram", _endProgram);
+ xmlwriter.SetValue("ComSkipLauncher", "EndParameters", _endParameters);
}
}
catch (Exception ex)
Modified: trunk/plugins/ComSkipLauncher TVE2/Configuration.Designer.cs
===================================================================
--- trunk/plugins/ComSkipLauncher/Configuration.Designer.cs 2007-03-11 10:03:18 UTC (rev 180)
+++ trunk/plugins/ComSkipLauncher TVE2/Configuration.Designer.cs 2007-03-11 13:44:57 UTC (rev 181)
@@ -68,6 +68,7 @@
//
// buttonOK
//
+ this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonOK.Location = new System.Drawing.Point(216, 288);
this.buttonOK.Name = "buttonOK";
this.buttonOK.Size = new System.Drawing.Size(56, 24);
@@ -78,6 +79,7 @@
//
// buttonCancel
//
+ this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.Location = new System.Drawing.Point(280, 288);
this.buttonCancel.Name = "buttonCancel";
@@ -93,6 +95,7 @@
//
// 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(272, 24);
this.buttonTest.Name = "buttonTest";
this.buttonTest.Size = new System.Drawing.Size(48, 20);
@@ -104,6 +107,8 @@
//
// textBoxTest
//
+ this.textBoxTest.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
this.textBoxTest.Location = new System.Drawing.Point(8, 24);
this.textBoxTest.Name = "textBoxTest";
this.textBoxTest.Size = new System.Drawing.Size(224, 20);
@@ -112,6 +117,7 @@
//
// buttonFindTestFile
//
+ this.buttonFindTestFile.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonFindTestFile.Location = new System.Drawing.Point(240, 24);
this.buttonFindTestFile.Name = "buttonFindTestFile";
this.buttonFindTestFile.Size = new System.Drawing.Size(24, 20);
@@ -139,7 +145,6 @@
this.radioButtonStartLaunch.Name = "radioButtonStartLaunch";
this.radioButtonStartLaunch.Size = new System.Drawing.Size(96, 24);
this.radioButtonStartLaunch.TabIndex = 1;
- this.radioButtonStartLaunch.TabStop = true;
this.radioButtonStartLaunch.Text = "Launch:";
this.toolTips.SetToolTip(this.radioButtonStartLaunch, "Launch ComSkip to process the recording after it has finished");
this.radioButtonStartLaunch.UseVisualStyleBackColor = true;
@@ -147,18 +152,21 @@
//
// textBoxEndParameters
//
+ this.textBoxEndParameters.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
this.textBoxEndParameters.Location = new System.Drawing.Point(8, 80);
this.textBoxEndParameters.Name = "textBoxEndParameters";
this.textBoxEndParameters.Size = new System.Drawing.Size(256, 20);
- this.textBoxEndParameters.TabIndex = 6;
+ this.textBoxEndParameters.TabIndex = 4;
this.toolTips.SetToolTip(this.textBoxEndParameters, "Provide command line parameters for the program");
//
// buttonEndParameters
//
+ this.buttonEndParameters.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonEndParameters.Location = new System.Drawing.Point(272, 80);
this.buttonEndParameters.Name = "buttonEndParameters";
this.buttonEndParameters.Size = new System.Drawing.Size(24, 20);
- this.buttonEndParameters.TabIndex = 7;
+ this.buttonEndParameters.TabIndex = 5;
this.buttonEndParameters.Text = "?";
this.toolTips.SetToolTip(this.buttonEndParameters, "Click here for a list of additional command line parameters");
this.buttonEndParameters.UseVisualStyleBackColor = true;
@@ -166,10 +174,11 @@
//
// buttonEndProgram
//
+ this.buttonEndProgram.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonEndProgram.Location = new System.Drawing.Point(272, 40);
this.buttonEndProgram.Name = "buttonEndProgram";
this.buttonEndProgram.Size = new System.Drawing.Size(24, 20);
- this.buttonEndProgram.TabIndex = 4;
+ this.buttonEndProgram.TabIndex = 2;
this.buttonEndProgram.Text = "...";
this.toolTips.SetToolTip(this.buttonEndProgram, "Locate the program you wish to launch");
this.buttonEndProgram.UseVisualStyleBackColor = true;
@@ -177,14 +186,18 @@
//
// textBoxEndProgram
//
+ this.textBoxEndProgram.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
this.textBoxEndProgram.Location = new System.Drawing.Point(8, 40);
this.textBoxEndProgram.Name = "textBoxEndProgram";
this.textBoxEndProgram.Size = new System.Drawing.Size(256, 20);
- this.textBoxEndProgram.TabIndex = 3;
+ this.textBoxEndProgram.TabIndex = 1;
this.toolTips.SetToolTip(this.textBoxEndProgram, "The full location of the program to launch");
//
// textBoxStartParameters
//
+ this.textBoxStartParameters.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
this.textBoxStartParameters.Location = new System.Drawing.Point(8, 80);
this.textBoxStartParameters.Name = "textBoxStartParameters";
this.textBoxStartParameters.Size = new System.Drawing.Size(256, 20);
@@ -193,6 +206,7 @@
//
// buttonStartParameters
//
+ this.buttonStartParameters.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonStartParameters.Location = new System.Drawing.Point(272, 80);
this.buttonStartParameters.Name = "buttonStartParameters";
this.buttonStartParameters.Size = new System.Drawing.Size(24, 20);
@@ -204,6 +218,7 @@
//
// buttonStartProgram
//
+ this.buttonStartProgram.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonStartProgram.Location = new System.Drawing.Point(272, 40);
this.buttonStartProgram.Name = "buttonStartProgram";
this.buttonStartProgram.Size = new System.Drawing.Size(24, 20);
@@ -215,6 +230,8 @@
//
// textBoxStartProgram
//
+ this.textBoxStartProgram.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
this.textBoxStartProgram.Location = new System.Drawing.Point(8, 40);
this.textBoxStartProgram.Name = "textBoxStartProgram";
this.textBoxStartProgram.Size = new System.Drawing.Size(256, 20);
@@ -237,13 +254,15 @@
this.radioButtonEndLaunch.Name = "radioButtonEndLaunch";
this.radioButtonEndLaunch.Size = new System.Drawing.Size(96, 24);
this.radioButtonEndLaunch.TabIndex = 1;
- this.radioButtonEndLaunch.TabStop = true;
this.radioButtonEndLaunch.Text = "Launch:";
this.radioButtonEndLaunch.UseVisualStyleBackColor = true;
this.radioButtonEndLaunch.CheckedChanged += new System.EventHandler(this.radioButtonEndLaunch_CheckedChanged);
//
// tabControl
//
+ this.tabControl.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.tabControl.Controls.Add(this.tabPageStart);
this.tabControl.Controls.Add(this.tabPageEnd);
this.tabControl.Location = new System.Drawing.Point(8, 8);
@@ -262,11 +281,14 @@
this.tabPageStart.Padding = new System.Windows.Forms.Padding(3);
this.tabPageStart.Size = new System.Drawing.Size(320, 182);
this.tabPageStart.TabIndex = 0;
- this.tabPageStart.Text = "When recording starts";
+ this.tabPageStart.Text = "When recording starts ...";
this.tabPageStart.UseVisualStyleBackColor = true;
//
// groupBoxStartProgram
//
+ this.groupBoxStartProgram.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.groupBoxStartProgram.Controls.Add(this.labelStartParameters);
this.groupBoxStartProgram.Controls.Add(this.textBoxStartParameters);
this.groupBoxStartProgram.Controls.Add(this.buttonStartParameters);
@@ -282,6 +304,8 @@
//
// labelStartParameters
//
+ this.labelStartParameters.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
this.labelStartParameters.Location = new System.Drawing.Point(8, 64);
this.labelStartParameters.Name = "labelStartParameters";
this.labelStartParameters.Size = new System.Drawing.Size(256, 16);
@@ -291,6 +315,8 @@
//
// labelStartProgram
//
+ this.labelStartProgram.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
this.labelStartProgram.Location = new System.Drawing.Point(8, 24);
this.labelStartProgram.Name = "labelStartProgram";
this.labelStartProgram.Size = new System.Drawing.Size(256, 16);
@@ -308,11 +334,14 @@
this.tabPageEnd.Padding = new System.Windows.Forms.Padding(3);
this.tabPageEnd.Size = new System.Drawing.Size(320, 182);
this.tabPageEnd.TabIndex = 1;
- this.tabPageEnd.Text = "When recording ends";
+ this.tabPageEnd.Text = "When recording ends ...";
this.tabPageEnd.UseVisualStyleBackColor = true;
//
// groupBoxEndProgram
//
+ this.groupBoxEndProgram.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.groupBoxEndProgram.Controls.Add(this.labelEndParameters);
this.groupBoxEndProgram.Controls.Add(this.textBoxEndParameters);
this.groupBoxEndProgram.Controls.Add(this.buttonEndParameters);
@@ -322,30 +351,36 @@
this.groupBoxEndProgram.Location = new System.Drawing.Point(8, 64);
this.groupBoxEndProgram.Name = "groupBoxEndProgram";
this.groupBoxEndProgram.Size = new System.Drawing.Size(304, 112);
- this.groupBoxEndProgram.TabIndex = 8;
+ this.groupBoxEndProgram.TabIndex = 2;
this.groupBoxEndProgram.TabStop = false;
this.groupBoxEndProgram.Text = "What to do";
//
// labelEndParameters
//
+ this.labelEndParameters.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
this.labelEndParameters.Location = new System.Drawing.Point(8, 64);
this.labelEndParameters.Name = "labelEndParameters";
this.labelEndParameters.Size = new System.Drawing.Size(256, 16);
- this.labelEndParameters.TabIndex = 5;
+ this.labelEndParameters.TabIndex = 3;
this.labelEndParameters.Text = "Parameters:";
this.labelEndParameters.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// labelEndProgram
//
+ this.labelEndProgram.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
this.labelEndProgram.Location = new System.Drawing.Point(8, 24);
this.labelEndProgram.Name = "labelEndProgram";
this.labelEndProgram.Size = new System.Drawing.Size(256, 16);
- this.labelEndProgram.TabIndex = 2;
+ this.labelEndProgram.TabIndex = 0;
this.labelEndProgram.Text = "Program:";
this.labelEndProgram.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// groupBoxTest
//
+ this.groupBoxTest.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
this.groupBoxTest.Controls.Add(this.textBoxTest);
this.groupBoxTest.Controls.Add(this.buttonTest);
this.groupBoxTest.Controls.Add(this.buttonFindTestFile);
@@ -356,7 +391,7 @@
this.groupBoxTest.TabStop = false;
this.groupBoxTest.Text = "Test";
//
- // ExternalProgram
+ // Configuration
//
this.AcceptButton = this.buttonOK;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -370,7 +405,7 @@
this.MaximizeBox = false;
this.MinimizeBox = false;
this.MinimumSize = new System.Drawing.Size(360, 356);
- this.Name = "ExternalProgram";
+ this.Name = "Configuration";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
Modified: trunk/plugins/ComSkipLauncher TVE2/Configuration.cs
===================================================================
--- trunk/plugins/ComSkipLauncher/Configuration.cs 2007-03-11 10:03:18 UTC (rev 180)
+++ trunk/plugins/ComSkipLauncher TVE2/Configuration.cs 2007-03-11 13:44:57 UTC (rev 181)
@@ -32,50 +32,58 @@
public bool RunAtStart
{
- get { return radioButtonStartLaunch.Checked; }
- set { radioButtonStartLaunch.Checked = value; }
+ get
+ {
+ return radioButtonStartLaunch.Checked;
+ }
+ set
+ {
+ radioButtonStartLaunch.Checked = value;
+ radioButtonStartDoNothing.Checked = !value;
+ }
}
public bool RunAtEnd
{
- get { return radioButtonEndLaunch.Checked; }
- set { radioButtonEndLaunch.Checked = value; }
+ get
+ {
+ return radioButtonEndLaunch.Checked;
+ }
+ set
+ {
+ radioButtonEndLaunch.Checked = value;
+ radioButtonEndDoNothing.Checked = !value;
+ }
}
public string StartProgram
{
get { return textBoxStartProgram.Text; }
+ set { textBoxStartProgram.Text = value; }
}
public string StartParameters
{
get { return textBoxStartParameters.Text; }
+ set { textBoxStartParameters.Text = value; }
}
public string EndProgram
{
get { return textBoxEndProgram.Text; }
+ set { textBoxEndProgram.Text = value; }
}
public string EndParameters
{
get { return textBoxEndParameters.Text; }
+ set { textBoxEndParameters.Text = value; }
}
#endregion Properties
#region Constructors
- public Configuration(
- string startProgram, string startParameters, bool runAtStart,
- string endProgram, string endParameters, bool runAtEnd)
+ public Configuration()
{
InitializeComponent();
-
- radioButtonStartLaunch.Checked = runAtStart;
- textBoxStartProgram.Text = startProgram;
- textBoxStartParameters.Text = startParameters;
-
- radioButtonEndLaunch.Checked = runAtEnd;
- textBoxEndProgram.Text = endProgram;
- textBoxEndParameters.Text = endParameters;
}
#endregion Constructors
@@ -85,7 +93,6 @@
this.DialogResult = DialogResult.OK;
this.Close();
}
-
private void buttonCancel_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
Modified: trunk/plugins/ComSkipLauncher TVE2/Configuration.resx
===================================================================
--- trunk/plugins/ComSkipLauncher/Configuration.resx 2007-03-11 10:03:18 UTC (rev 180)
+++ trunk/plugins/ComSkipLauncher TVE2/Configuration.resx 2007-03-11 13:44:57 UTC (rev 181)
@@ -123,7 +123,4 @@
<metadata name="toolTips.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>150, 17</value>
</metadata>
- <metadata name="toolTips.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>150, 17</value>
- </metadata>
</root>
\ No newline at end of file
Copied: trunk/plugins/ComSkipLauncher TVE3 (from rev 180, trunk/plugins/ComSkipLauncher)
Modified: trunk/plugins/ComSkipLauncher TVE3/ComSkipLauncher.cs
===================================================================
--- trunk/plugins/ComSkipLauncher/ComSkipLauncher.cs 2007-03-11 10:03:18 UTC (rev 180)
+++ trunk/plugins/ComSkipLauncher TVE3/ComSkipLauncher.cs 2007-03-11 13:44:57 UTC (rev 181)
@@ -22,7 +22,7 @@
public static readonly string MPConfigFile = Config.GetFolder(Config.Dir.Config) + "\\MediaPortal.xml";
public static readonly string DefaultProgram = "C:\\Program Files\\ComSkip\\ComSkip.exe";
- public static readonly string DefaultParameters = "--playnice --zpcut \"{0}\"";
+ public static readonly string DefaultParameters = "--playnice \"{0}\"";
#endregion Constants
@@ -79,10 +79,15 @@
{
LoadSettings();
- Configuration configuration = new Configuration(
- _startProgram, _startParameters, _runAtStart,
- _endProgram, _endParameters, _runAtEnd);
-
+ Configuration configuration = new Configuration();
+ configuration.RunAtStart = _runAtStart;
+ configuration.StartProgram = _startProgram;
+ configuration.StartParameters = _startParameters;
+
+ configuration.RunAtEnd = _runAtEnd;
+ configuration.EndProgram = _endProgram;
+ configuration.EndParameters = _endParameters;
+
if (configuration.ShowDialog() == DialogResult.OK)
{
_runAtStart = configuration.RunAtStart;
@@ -93,7 +98,6 @@
_endProgram = configuration.EndProgram;
_endParameters = configuration.EndParameters;
-
SaveSettings();
}
}
@@ -200,6 +204,10 @@
xmlwriter.SetValueAsBool("ComSkipLauncher", "RunAtStart", _runAtStart);
xmlwriter.SetValue("ComSkipLauncher", "StartProgram", _startProgram);
xmlwriter.SetValue("ComSkipLauncher", "StartParameters", _startParameters);
+
+ xmlwriter.SetValueAsBool("ComSkipLauncher", "RunAtEnd", _runAtEnd);
+ xmlwriter.SetValue("ComSkipLauncher", "EndProgram", _endProgram);
+ xmlwriter.SetValue("ComSkipLauncher", "EndParameters", _endParameters);
}
}
catch (Exception ex)
Modified: trunk/plugins/ComSkipLauncher TVE3/Configuration.Designer.cs
===================================================================
--- trunk/plugins/ComSkipLauncher/Configuration.Designer.cs 2007-03-11 10:03:18 UTC (rev 180)
+++ trunk/plugins/ComSkipLauncher TVE3/Configuration.Designer.cs 2007-03-11 13:44:57 UTC (rev 181)
@@ -68,6 +68,7 @@
//
// buttonOK
//
+ this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonOK.Location = new System.Drawing.Point(216, 288);
this.buttonOK.Name = "buttonOK";
this.buttonOK.Size = new System.Drawing.Size(56, 24);
@@ -78,6 +79,7 @@
//
// buttonCancel
//
+ this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.Location = new System.Drawing.Point(280, 288);
this.buttonCancel.Name = "buttonCancel";
@@ -93,6 +95,7 @@
//
// 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(272, 24);
this.buttonTest.Name = "buttonTest";
this.buttonTest.Size = new System.Drawing.Size(48, 20);
@@ -104,6 +107,8 @@
//
// textBoxTest
//
+ this.textBoxTest.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
this.textBoxTest.Location = new System.Drawing.Point(8, 24);
this.textBoxTest.Name = "textBoxTest";
this.textBoxTest.Size = new System.Drawing.Size(224, 20);
@@ -112,6 +117,7 @@
//
// buttonFindTestFile
//
+ this.buttonFindTestFile.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonFindTestFile.Location = new System.Drawing.Point(240, 24);
this.buttonFindTestFile.Name = "buttonFindTestFile";
this.buttonFindTestFile.Size = new System.Drawing.Size(24, 20);
@@ -139,7 +145,6 @@
this.radioButtonStartLaunch.Name = "radioButtonStartLaunch";
this.radioButtonStartLaunch.Size = new System.Drawing.Size(96, 24);
this.radioButtonStartLaunch.TabIndex = 1;
- this.radioButtonStartLaunch.TabStop = true;
this.radioButtonStartLaunch.Text = "Launch:";
this.toolTips.SetToolTip(this.radioButtonStartLaunch, "Launch ComSkip to process the recording after it has finished");
this.radioButtonStartLaunch.UseVisualStyleBackColor = true;
@@ -147,18 +152,21 @@
//
// textBoxEndParameters
//
+ this.textBoxEndParameters.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
this.textBoxEndParameters.Location = new System.Drawing.Point(8, 80);
this.textBoxEndParameters.Name = "textBoxEndParameters";
this.textBoxEndParameters.Size = new System.Drawing.Size(256, 20);
- this.textBoxEndParameters.TabIndex = 6;
+ this.textBoxEndParameters.TabIndex = 4;
this.toolTips.SetToolTip(this.textBoxEndParameters, "Provide command line parameters for the program");
//
// buttonEndParameters
//
+ this.buttonEndParameters.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonEndParameters.Location = new System.Drawing.Point(272, 80);
this.buttonEndParameters.Name = "buttonEndParameters";
this.buttonEndParameters.Size = new System.Drawing.Size(24, 20);
- this.buttonEndParameters.TabIndex = 7;
+ this.buttonEndParameters.TabIndex = 5;
this.buttonEndParameters.Text = "?";
this.toolTips.SetToolTip(this.buttonEndParameters, "Click here for a list of additional command line parameters");
this.buttonEndParameters.UseVisualStyleBackColor = true;
@@ -166,10 +174,11 @@
//
// buttonEndProgram
//
+ this.buttonEndProgram.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonEndProgram.Location = new System.Drawing.Point(272, 40);
this.buttonEndProgram.Name = "buttonEndProgram";
this.buttonEndProgram.Size = new System.Drawing.Size(24, 20);
- this.buttonEndProgram.TabIndex = 4;
+ this.buttonEndProgram.TabIndex = 2;
this.buttonEndProgram.Text = "...";
this.toolTips.SetToolTip(this.buttonEndProgram, "Locate the program you wish to launch");
this.buttonEndProgram.UseVisualStyleBackColor = true;
@@ -177,14 +186,18 @@
//
// textBoxEndProgram
//
+ this.textBoxEndProgram.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
this.textBoxEndProgram.Location = new System.Drawing.Point(8, 40);
this.textBoxEndProgram.Name = "textBoxEndProgram";
this.textBoxEndProgram.Size = new System.Drawing.Size(256, 20);
- this.textBoxEndProgram.TabIndex = 3;
+ this.textBoxEndProgram.TabIndex = 1;
this.toolTips.SetToolTip(this.textBoxEndProgram, "The full location of the program to launch");
//
// textBoxStartParameters
//
+ this.textBoxStartParameters.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
this.textBoxStartParameters.Location = new System.Drawing.Point(8, 80);
this.textBoxStartParameters.Name = "textBoxStartParameters";
this.textBoxStartParameters.Size = new System.Drawing.Size(256, 20);
@@ -193,6 +206,7 @@
//
// buttonStartParameters
//
+ this.buttonStartParameters.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonStartParameters.Location = new System.Drawing.Point(272, 80);
this.buttonStartParameters.Name = "buttonStartParameters";
this.buttonStartParameters.Size = new System.Drawing.Size(24, 20);
@@ -204,6 +218,7 @@
//
// buttonStartProgram
//
+ this.buttonStartProgram.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonStartProgram.Location = new System.Drawing.Point(272, 40);
this.buttonStartProgram.Name = "buttonStartProgram";
this.buttonStartProgram.Size = new System.Drawing.Size(24, 20);
@@ -215,6 +230,8 @@
//
// textBoxStartProgram
//
+ this.textBoxStartProgram.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
this.textBoxStartProgram.Location = new System.Drawing.Point(8, 40);
this.textBoxStartProgram.Name = "textBoxStartProgram";
this.textBoxStartProgram.Size = new System.Drawing.Size(256, 20);
@@ -237,13 +254,15 @@
this.radioButtonEndLaunch.Name = "radioButtonEndLaunch";
this.radioButtonEndLaunch.Size = new System.Drawing.Size(96, 24);
this.radioButtonEndLaunch.TabIndex = 1;
- this.radioButtonEndLaunch.TabStop = true;
this.radioButtonEndLaunch.Text = "Launch:";
this.radioButtonEndLaunch.UseVisualStyleBackColor = true;
this.radioButtonEndLaunch.CheckedChanged += new System.EventHandler(this.radioButtonEndLaunch_CheckedChanged);
//
// tabControl
//
+ this.tabControl.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.tabControl.Controls.Add(this.tabPageStart);
this.tabControl.Controls.Add(this.tabPageEnd);
this.tabControl.Location = new System.Drawing.Point(8, 8);
@@ -262,11 +281,14 @@
this.tabPageStart.Padding = new System.Windows.Forms.Padding(3);
this.tabPageStart.Size = new System.Drawing.Size(320, 182);
this.tabPageStart.TabIndex = 0;
- this.tabPageStart.Text = "When recording starts";
+ this.tabPageStart.Text = "When recording starts ...";
this.tabPageStart.UseVisualStyleBackColor = true;
//
// groupBoxStartProgram
//
+ this.groupBoxStartProgram.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.groupBoxStartProgram.Controls.Add(this.labelStartParameters);
this.groupBoxStartProgram.Controls.Add(this.textBoxStartParameters);
this.groupBoxStartProgram.Controls.Add(this.buttonStartParameters);
@@ -282,6 +304,8 @@
//
// labelStartParameters
//
+ this.labelStartParameters.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
this.labelStartParameters.Location = new System.Drawing.Point(8, 64);
this.labelStartParameters.Name = "labelStartParameters";
this.labelStartParameters.Size = new System.Drawing.Size(256, 16);
@@ -291,6 +315,8 @@
//
// labelStartProgram
//
+ this.labelStartProgram.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
this.labelStartProgram.Location = new System.Drawing.Point(8, 24);
this.labelStartProgram.Name = "labelStartProgram";
this.labelStartProgram.Size = new System.Drawing.Size(256, 16);
@@ -308,11 +334,14 @@
this.tabPageEnd.Padding = new System.Windows.Forms.Padding(3);
this.tabPageEnd.Size = new System.Drawing.Size(320, 182);
this.tabPageEnd.TabIndex = 1;
- this.tabPageEnd.Text = "When recording ends";
+ this.tabPageEnd.Text = "When recording ends ...";
this.tabPageEnd.UseVisualStyleBackColor = true;
//
// groupBoxEndProgram
//
+ this.groupBoxEndProgram.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.groupBoxEndProgram.Controls.Add(this.labelEndParameters);
this.groupBoxEndProgram.Controls.Add(this.textBoxEndParameters);
this.groupBoxEndProgram.Controls.Add(this.buttonEndParameters);
@@ -322,30 +351,36 @@
this.groupBoxEndProgram.Location = new System.Drawing.Point(8, 64);
this.groupBoxEndProgram.Name = "groupBoxEndProgram";
this.groupBoxEndProgram.Size = new System.Drawing.Size(304, 112);
- this.groupBoxEndProgram.TabIndex = 8;
+ this.groupBoxEndProgram.TabIndex = 2;
this.groupBoxEndProgram.TabStop = false;
this.groupBoxEndProgram.Text = "What to do";
//
// labelEndParameters
//
+ this.labelEndParameters.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
this.labelEndParameters.Location = new System.Drawing.Point(8, 64);
this.labelEndParameters.Name = "labelEndParameters";
this.labelEndParameters.Size = new System.Drawing.Size(256, 16);
- this.labelEndParameters.TabIndex = 5;
+ this.labelEndParameters.TabIndex = 3;
this.labelEndParameters.Text = "Parameters:";
this.labelEndParameters.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// labelEndProgram
//
+ this.labelEndProgram.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
this.labelEndProgram.Location = new System.Drawing.Point(8, 24);
this.labelEndProgram.Name = "labelEndProgram";
this.labelEndProgram.Size = new System.Drawing.Size(256, 16);
- this.labelEndProgram.TabIndex = 2;
+ this.labelEndProgram.TabIndex = 0;
this.labelEndProgram.Text = "Program:";
this.labelEndProgram.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// groupBoxTest
//
+ this.groupBoxTest.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
this.groupBoxTest.Controls.Add(this.textBoxTest);
this.groupBoxTest.Controls.Add(this.buttonTest);
this.groupBoxTest.Controls.Add(this.buttonFindTestFile);
@@ -356,7 +391,7 @@
this.groupBoxTest.TabStop = false;
this.groupBoxTest.Text = "Test";
//
- // ExternalProgram
+ // Configuration
//
this.AcceptButton = this.buttonOK;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -370,7 +405,7 @@
this.MaximizeBox = false;
this.MinimizeBox = false;
this.MinimumSize = new System.Drawing.Size(360, 356);
- this.Name = "ExternalProgram";
+ this.Name = "Configuration";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
Modified: trunk/plugins/ComSkipLauncher TVE3/Configuration.cs
===================================================================
--- trunk/plugins/ComSkipLauncher/Configuration.cs 2007-03-11 10:03:18 UTC (rev 180)
+++ trunk/plugins/ComSkipLauncher TVE3/Configuration.cs 2007-03-11 13:44:57 UTC (rev 181)
@@ -32,50 +32,58 @@
public bool RunAtStart
{
- get { return radioButtonStartLaunch.Checked; }
- set { radioButtonStartLaunch.Checked = value; }
+ get
+ {
+ return radioButtonStartLaunch.Checked;
+ }
+ set
+ {
+ radioButtonStartLaunch.Checked = value;
+ radioButtonStartDoNothing.Checked = !value;
+ }
}
public bool RunAtEnd
{
- get { return radioButtonEndLaunch.Checked; }
- set { radioButtonEndLaunch.Checked = value; }
+ get
+ {
+ return radioButtonEndLaunch.Checked;
+ }
+ set
+ {
+ radioButtonEndLaunch.Checked = value;
+ radioButtonEndDoNothing.Checked = !value;
+ }
}
public string StartProgram
{
get { return textBoxStartProgram.Text; }
+ set { textBoxStartProgram.Text = value; }
}
public string StartParameters
{
get { return textBoxStartParameters.Text; }
+ set { textBoxStartParameters.Text = value; }
}
public string EndProgram
{
get { return textBoxEndProgram.Text; }
+ set { textBoxEndProgram.Text = value; }
}
public string EndParameters
{
get { return textBoxEndParameters.Text; }
+ set { textBoxEndParameters.Text = value; }
}
#endregion Properties
#region Constructors
- public Configuration(
- string startProgram, string startParameters, bool runAtStart,
- string endProgram, string endParameters, bool runAtEnd)
+ public Configuration()
{
InitializeComponent();
-
- radioButtonStartLaunch.Checked = runAtStart;
- textBoxStartProgram.Text = startProgram;
- textBoxStartParameters.Text = startParameters;
-
- radioButtonEndLaunch.Checked = runAtEnd;
- textBoxEndProgram.Text = endProgram;
- textBoxEndParameters.Text = endParameters;
}
#endregion Constructors
@@ -85,7 +93,6 @@
this.DialogResult = DialogResult.OK;
this.Close();
}
-
private void buttonCancel_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
Modified: trunk/plugins/ComSkipLauncher TVE3/Configuration.resx
===================================================================
--- trunk/plugins/ComSkipLauncher/Configuration.resx 2007-03-11 10:03:18 UTC (rev 180)
+++ trunk/plugins/ComSkipLauncher TVE3/Configuration.resx 2007-03-11 13:44:57 UTC (rev 181)
@@ -123,7 +123,4 @@
<metadata name="toolTips.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>150, 17</value>
</metadata>
- <metadata name="toolTips.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>150, 17</value>
- </metadata>
</root>
\ No newline at end of file
Modified: trunk/plugins/MCEReplacement/Forms/MacroEditor.cs
===================================================================
--- trunk/plugins/MCEReplacement/Forms/MacroEditor.cs 2007-03-11 10:03:18 UTC (rev 180)
+++ trunk/plugins/MCEReplacement/Forms/MacroEditor.cs 2007-03-11 13:44:57 UTC (rev 181)
@@ -18,6 +18,25 @@
public partial class MacroEditor : Form
{
+ #region Constants
+
+ public const string RunProgramText = "Run Program";
+ public const string PauseText = "Pause";
+ public const string SerialCommandText = "Serial Command";
+ public const string MessageCommandText = "Message Command";
+ public const string KeystrokesCommandText = "Keystrokes Command";
+ public const string GoToScreenText = "Go To Screen";
+ public const string PopupMessageText = "Popup Message";
+ public const string ForceBlasterPortText = "Force Blaster Port";
+ public const string ForceBlasterSpeedText = "Force Blaster Speed";
+ public const string SetMultiMappingText = "Set Multi-Mapping";
+ public const string SetMouseModeText = "Set Mouse Mode";
+ public const string ToggleInputLayerText = "Toggle Input Handler Layer";
+ public const string ChangeWindowStateText = "Change Window State";
+ public const string GetFocusText = "Get Focus";
+
+ #endregion Constants
+
#region Variables
MceIrApi.BlasterPort _blastPort;
@@ -47,15 +66,20 @@
{
comboBoxCommands.Items.Clear();
- comboBoxCommands.Items.Add("Run Program");
- comboBoxCommands.Items.Add("Pause");
- comboBoxCommands.Items.Add("Serial Command");
- comboBoxCommands.Items.Add("Message Command");
- comboBoxCommands.Items.Add("Keystrokes Command");
- comboBoxCommands.Items.Add("Go To Screen");
- comboBoxCommands.Items.Add("Popup Message");
- comboBoxCommands.Items.Add("Force Blaster Port");
- comboBoxCommands.Items.Add("Force Blaster Speed");
+ comboBoxCommands.Items.Add(RunProgramText);
+ comboBoxCommands.Items.Add(PauseText);
+ comboBoxCommands.Items.Add(SerialCommandText);
+ comboBoxCommands.Items.Add(MessageCommandText);
+ comboBoxCommands.Items.Add(KeystrokesCommandText);
+ comboBoxCommands.Items.Add(GoToScreenText);
+ comboBoxCommands.Items.Add(PopupMessageText);
+ comboBoxCommands.Items.Add(ForceBlasterPortText);
+ comboBoxCommands.Items.Add(ForceBlasterSpeedText);
+ comboBoxCommands.Items.Add(SetMultiMappingText);
+ comboBoxCommands.Items.Add(SetMouseModeText);
+ comboBoxCommands.Items.Add(ToggleInputLayerText);
+ comboBoxCommands.Items.Add(ChangeWindowStateText);
+ comboBoxCommands.Items.Add(GetFocusText);
comboBoxCommands.Items.AddRange(MCEReplacement.GetIRList());
}
@@ -129,6 +153,31 @@
writer.WriteAttributeString("command", "SPEED");
writer.WriteAttributeString("cmdproperty", item.Substring(MCEReplacement.SpeedCommandPrefix.Length));
}
+ else if (item.StartsWith(MCEReplacement.SetMapCommandPrefix))
+ {
+ writer.WriteAttributeString("command", "MULTI_MAPPING");
+ writer.WriteAttributeString("cmdproperty", item.Substring(MCEReplacement.ChangeMMCommandPrefix.Length));
+ }
+ else if (item.StartsWith(MCEReplacement.SetMouseCommandPrefix))
+ {
+ writer.WriteAttributeString("command", "MOUSE_MODE");
+ writer.WriteAttributeString("cmdproperty", item.Substring(MCEReplacement.SetMouseCommandPrefix.Length));
+ }
+ else if (item.StartsWith(MCEReplacement.InputLayerCommand))
+ {
+ writer.WriteAttributeString("command", "INPUT_LAYER");
+ writer.WriteAttributeString("cmdproperty", "TOGGLE");
+ }
+ else if (item.StartsWith(MCEReplacement.WindowStateCommand))
+ {
+ writer.WriteAttributeString("command", "WINDOW_STATE");
+ writer.WriteAttributeString("cmdproperty", "TOGGLE");
+ }
+ else if (item.StartsWith(MCEReplacement.GetFocusCommand))
+ {
+ writer.WriteAttributeString("command", "GET_FOCUS");
+ writer.WriteAttributeString("cmdproperty", "");
+ }
writer.WriteEndElement();
}
@@ -204,6 +253,26 @@
case "SPEED":
listBoxMacro.Items.Add(MCEReplacement.SpeedCommandPrefix + commandProperty);
break;
+
+ case "MULTI_MAPPING":
+ listBoxMacro.Items.Add(MCEReplacement.SetMapCommandPrefix + commandProperty);
+ break;
+
+ case "MOUSE_MODE":
+ listBoxMacro.Items.Add(MCEReplacement.SetMouseCommandPrefix + commandProperty);
+ break;
+
+ case "INPUT_LAYER":
+ listBoxMacro.Items.Add(MCEReplacement.InputLayerCommand);
+ break;
+
+ case "WINDOW_STATE":
+ listBoxMacro.Items.Add(MCEReplacement.WindowStateCommand);
+ break;
+
+ case "GET_FOCUS":
+ listBoxMacro.Items.Add(MCEReplacement.GetFocusCommand);
+ break;
}
}
}
@@ -228,7 +297,7 @@
string selected = (string)comboBoxCommands.SelectedItem;
- if (selected == "Run Program")
+ if (selected == RunProgramText)
{
ExternalProgram externalProgram = new ExternalProgram();
@@ -237,7 +306,7 @@
listBoxMacro.Items.Add(MCEReplacement.RunCommandPrefix + externalProgram.CommandString);
}
- else if (selected == "Pause")
+ else if (selected == PauseText)
{
PauseTime pauseTime = new PauseTime();
@@ -246,7 +315,7 @@
listBoxMacro.Items.Add(MCEReplacement.PauseCommandPrefix + pauseTime.Time.ToString());
}
- else if (selected == "Serial Command")
+ else if (selected == SerialCommandText)
{
SerialCommand serialCommand = new SerialCommand();
if (serialCommand.ShowDialog(this) == DialogResult.Cancel)
@@ -254,7 +323,7 @@
listBoxMacro.Items.Add(MCEReplacement.SerialCommandPrefix + serialCommand.CommandString);
}
- else if (selected == "Message Command")
+ else if (selected == MessageCommandText)
{
MessageCommand messageCommand = new MessageCommand();
if (messageCommand.ShowDialog(this) == DialogResult.Cancel)
@@ -262,7 +331,7 @@
listBoxMacro.Items.Add(MCEReplacement.MessageCommandPrefix + messageCommand.CommandString);
}
- else if (selected == "Keystrokes Command")
+ else if (selected == KeystrokesCommandText)
{
KeysCommand keysCommand = new KeysCommand();
if (keysCommand.ShowDialog(this) == DialogResult.Cancel)
@@ -270,7 +339,7 @@
listBoxMacro.Items.Add(MCEReplacement.KeyCommandPrefix + keysCommand.CommandString);
}
- else if (selected == "Go To Screen")
+ else if (selected == GoToScreenText)
{
GoToScreen goToScreen = new GoToScreen();
if (goToScreen.ShowDialog(this) == DialogResult.Cancel)
@@ -278,7 +347,7 @@
listBoxMacro.Items.Add(MCEReplacement.GoToCommandPrefix + goToScreen.Screen);
}
- else if (selected == "Popup Message")
+ else if (selected == PopupMessageText)
{
PopupMessage popupMessage = new PopupMessage();
if (popupMessage.ShowDialog(this) == DialogResult.Cancel)
@@ -286,7 +355,7 @@
listBoxMacro.Items.Add(MCEReplacement.PopupCommandPrefix + popupMessage.CommandString);
}
- else if (selected == "Force Blaster Port")
+ else if (selected == ForceBlasterPortText)
{
SelectBlasterPort selectBlasterPort = new SelectBlasterPort(_blastPort);
if (selectBlasterPort.ShowDialog(this) == DialogResult.Cancel)
@@ -294,7 +363,7 @@
listBoxMacro.Items.Add(MCEReplacement.PortCommandPrefix + selectBlasterPort.CommandString);
}
- else if (selected == "Force Blaster Speed")
+ else if (selected == ForceBlasterSpeedText)
{
SelectBlasterSpeed selectBlasterSpeed = new SelectBlasterSpeed(_blastSpeed);
if (selectBlasterSpeed.ShowDialog(this) == DialogResult.Cancel)
@@ -302,6 +371,34 @@
listBoxMacro.Items.Add(MCEReplacement.SpeedCommandPrefix + selectBlasterSpeed.CommandString);
}
+ else if (selected == SetMultiMappingText)
+ {
+ //SelectBlasterSpeed selectBlasterSpeed = new SelectBlasterSpeed(_blastSpeed);
+ //if (selectBlasterSpeed.ShowDialog(this) == DialogResult.Cancel)
+ //return;
+
+ listBoxMacro.Items.Add(MCEReplacement.SetMapCommandPrefix + "");
+ }
+ else if (selected == SetMouseModeText)
+ {
+ //SelectBlasterSpeed selectBlasterSpeed = new SelectBlasterSpeed(_blastSpeed);
+ //if (selectBlasterSpeed.ShowDialog(this) == DialogResult.Cancel)
+ //return;
+
+ listBoxMacro.Items.Add(MCEReplacement.SetMouseCommandPrefix + "TOGGLE");
+ }
+ else if (selected == ToggleInputLayerText)
+ {
+ listBoxMacro.Items.Add(MCEReplacement.InputLayerCommand);
+ }
+ else if (selected == ChangeWindowStateText)
+ {
+ listBoxMacro.Items.Add(MCEReplacement.WindowStateCommand);
+ }
+ else if (selected == GetFocusText)
+ {
+ listBoxMacro.Items.Add(MCEReplacement.GetFocusCommand);
+ }
else
{
listBoxMacro.Items.Add(MCEReplacement.BlastCommandPrefix + selected);
Modified: trunk/plugins/MCEReplacement/Forms/SetupForm.cs
===================================================================
--- trunk/plugins/MCEReplacement/Forms/SetupForm.cs 2007-03-11 10:03:18 UTC (rev 180)
+++ trunk/plugins/MCEReplacement/Forms/SetupForm.cs 2007-03-11 13:44:57 UTC (rev 181)
@@ -86,12 +86,8 @@
numericUpDownButtonHeldDelay.Value = new Decimal(MCEReplacement.ButtonHeldDelay);
// Multi-Mapping ...
- foreach (string button in Enum.GetNames(typeof(RemoteButton)))
- if (button != "None")
- comboBoxMultiButton.Items.Add(button);
-
+ comboBoxMultiButton.Items.AddRange(Enum.GetNames(typeof(RemoteButton)));
comboBoxMultiButton.SelectedItem = Enum.GetName(typeof(RemoteButton), MCEReplacement.MultiMappingButton);
-
foreach (string map in MCEReplacement.MultiMaps)
listBoxMappings.Items.Add(map);
Modified: trunk/plugins/MCEReplacement/InputMapper/InputHandler.cs
===================================================================
--- trunk/plugins/MCEReplacement/InputMapper/InputHandler.cs 2007-03-11 10:03:18 UTC (rev 180)
+++ trunk/plugins/MCEReplacement/InputMapper/InputHandler.cs 2007-03-11 13:44:57 UTC (rev 181)
@@ -58,7 +58,11 @@
/// <summary>
/// Get current Layer (Multi-Layer support)
/// </summary>
- public int CurrentLayer { get { return _currentLayer; } }
+ public int CurrentLayer
+ {
+ get { return _currentLayer; }
+ set { _currentLayer = value; }
+ }
/// <summary>
Modified: trunk/plugins/MCEReplacement/MCEReplacement.cs
===================================================================
--- trunk/plugins/MCEReplacement/MCEReplacement.cs 2007-03-11 10:03:18 UTC (rev 180)
+++ trunk/plugins/MCEReplacement/MCEReplacement.cs 2007-03-11 13:44:57 UTC (rev 181)
@@ -26,7 +26,7 @@
#region Constants
- public const string PluginVersion = "MCE Replacement Plugin 1.0.2.0 for MediaPortal + SVN";
+ public const string PluginVersion = "MCE Replacement Plugin 1.0.3.0 for MediaPortal + SVN";
public const int MessageModeCommand = 0x0018;
@@ -37,6 +37,7 @@
public const string IRExtension = ".IR";
public const string MacroExtension = ".MACRO";
+ // Macro Commands
public const string RunCommandPrefix = "Run: ";
public const string BlastCommandPrefix = "Blast: ";
public const string PauseCommandPrefix = "Pause: ";
@@ -47,6 +48,11 @@
public const string PopupCommandPrefix = "Popup: ";
public const string PortCommandPrefix = "Port: ";
public const string SpeedCommandPrefix = "Speed: ";
+ public const string SetMapCommandPrefix = "Multi-Mapping: ";
+ public const string SetMouseCommandPrefix = "Mouse Mode: ";
+ public const string InputLayerCommand = "Toggle Input Layer";
+ public const string WindowStateCommand = "Toggle Window State";
+ public const string GetFocusCommand = "Get Focus";
public static readonly string AppDataFolder =
Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) +
@@ -870,7 +876,28 @@
ShowNotifyDialog("Multi-Mapping", setName, 2);
}
+ static void ChangeMultiMapping(string multiMapping)
+ {
+ for (int index = 0; index < MultiMaps.Length; index++)
+ {
+ if (MultiMaps[index] == multiMapping)
+ {
+ _multiMappingSet = index;
+ // Show the mapping set name on screen ...
+ string setName = MultiMaps[_multiMappingSet];
+
+ if (LogVerbose)
+ Log.Info("MCEReplacement: Multi-Mapping has changed to \"{0}\"", setName);
+
+ ShowNotifyDialog("Multi-Mapping", setName, 2);
+
+ return;
+ }
+ }
+
+ }
+
static void ShowNotifyDialog(string heading, string text, int timeout)
{
GUIDialogNotify dlgNotify = (GUIDialogNotify)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_NOTIFY);
@@ -885,7 +912,7 @@
dlgNotify.SetHeading(heading);
dlgNotify.SetText(text);
dlgNotify.TimeOut = timeout;
- dlgNotify.DoModal(GUIWindowManager.ActiveWindow);
+ dlgNotify.DoModal(GUIWindowManager.ActiveWindow);
}
static void LoadSettings()
@@ -913,7 +940,7 @@
MouseModeEnabled = xmlreader.GetValueAsBool("MCEReplacement", "MouseModeEnabled", false);
MouseModeStep = xmlreader.GetValueAsInt("MCEReplacement", "MouseModeStep", 10);
MouseModeAcceleration = xmlreader.GetValueAsBool("MCEReplacement", "MouseModeAcceleration", true);
-
+
// MediaPortal settings ...
_mpBasicHome = xmlreader.GetValueAsBool("general", "startbasichome", false);
_mpMCERemote = xmlreader.GetValueAsBool("remote", "MCE", false);
@@ -965,7 +992,7 @@
try
{
- using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(remoteFile))
+ using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(remoteFile))
{
int i = 0;
int codeValue;
@@ -1045,44 +1072,44 @@
switch (mappedEvent.Param)
{
- case "Label 1":
- matched = (msg.Label == paramValueString);
+ case "Label 1":
+ matched = (msg.Label == paramValueString);
break;
- case "Label 2":
- matched = (msg.Label2 == paramValueString);
+ case "Label 2":
+ matched = (msg.Label2 == paramValueString);
break;
- case "Label 3":
- matched = (msg.Label3 == paramValueString);
+ case "Label 3":
+ matched = (msg.Label3 == paramValueString);
break;
- case "Label 4":
- matched = (msg.Label4 == paramValueString);
+ case "Label 4":
+ matched = (msg.Label4 == paramValueString);
break;
- case "Parameter 1":
- matched = (msg.Param1 == paramValueInt);
+ case "Parameter 1":
+ matched = (msg.Param1 == paramValueInt);
break;
- case "Parameter 2":
- matched = (msg.Param2 == paramValueInt);
+ case "Parameter 2":
+ matched = (msg.Param2 == paramValueInt);
break;
- case "Parameter 3":
- matched = (msg.Param3 == paramValueInt);
+ case "Parameter 3":
+ matched = (msg.Param3 == paramValueInt);
break;
- case "Parameter 4":
- matched = (msg.Param4 == paramValueInt);
+ case "Parameter 4":
+ matched = (msg.Param4 == paramValueInt);
break;
- case "Sender Control ID":
- matched = (msg.SenderControlId == paramValueInt);
+ case "Sender Control ID":
+ matched = (msg.SenderControlId == paramValueInt);
break;
- case "Send To Target Window":
- matched = (msg.SendToTargetWindow == paramValueBool);
+ case "Send To Target Window":
+ matched = (msg.SendToTargetWindow == paramValueBool);
break;
- case "Target Control ID":
- matched = (msg.TargetControlId == paramValueInt);
+ case "Target Control ID":
+ matched = (msg.TargetControlId == paramValueInt);
break;
- case "Target Window ID":
- matched = (msg.TargetWindowId == paramValueInt);
+ case "Target Window ID":
+ matched = (msg.TargetWindowId == paramValueInt);
break;
- default:
- matched = false;
+ default:
+ matched = false;
break;
}
}
@@ -1118,7 +1145,7 @@
{
if (mappedEvent.MatchParam)
continue;
-
+
if (LogVerbose)
Log.Info("MCEReplacement: Event Mapper - Event \"{0}\"", Enum.GetName(typeof(MappedEvent.MappingEvent), eventType));
@@ -1552,9 +1579,110 @@
break;
}
- /*
+ case "MULTI_MAPPING":
+ {
+ if (InConfiguration)
+ MessageBox.Show(commandProperty, "Change Multi-Mapping Command", MessageBoxButtons.OK, MessageBoxIcon.Information);
+ else if (MultiMappingEnabled)
+ ChangeMultiMapping(commandProperty);
+
+ break;
+ }
+
+ case "MOUSE_MODE":
+ {
+ if (InConfiguration)
+ {
+ MessageBox.Show("Command to toggle the Mouse Mode cannot be processed in configuration.", "Mouse Mode Command", MessageBoxButtons.OK, MessageBoxIcon.Information);
+ break;
+ }
+
+ if (!MouseModeEnabled)
+ break;
+
+ switch (commandProperty)
+ {
+ case "ON":
+ MouseModeActive = true;
+ break;
+
+ case "OFF":
+ MouseModeActive = false;
+ break;
+
+ case "TOGGLE":
+ MouseModeActive = !MouseModeActive;
+ break;
+ }
+
+ string notifyMessage;
+
+ if (MouseModeActive...
[truncated message content] |
|
From: <an...@us...> - 2007-03-11 10:03:22
|
Revision: 180
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=180&view=rev
Author: and-81
Date: 2007-03-11 03:03:18 -0700 (Sun, 11 Mar 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/ComSkipLauncher/Configuration.cs
Modified: trunk/plugins/ComSkipLauncher/Configuration.cs
===================================================================
--- trunk/plugins/ComSkipLauncher/Configuration.cs 2007-03-11 09:59:23 UTC (rev 179)
+++ trunk/plugins/ComSkipLauncher/Configuration.cs 2007-03-11 10:03:18 UTC (rev 180)
@@ -164,7 +164,6 @@
textBoxEndProgram.Text = openFileDialog.FileName;
}
-
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <an...@us...> - 2007-03-11 09:59:24
|
Revision: 179
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=179&view=rev
Author: and-81
Date: 2007-03-11 01:59:23 -0800 (Sun, 11 Mar 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/ComSkipLauncher/ComSkipLauncher.cs
trunk/plugins/ComSkipLauncher/ComSkipLauncher.csproj
Added Paths:
-----------
trunk/plugins/ComSkipLauncher/Configuration.Designer.cs
trunk/plugins/ComSkipLauncher/Configuration.cs
trunk/plugins/ComSkipLauncher/Configuration.resx
Removed Paths:
-------------
trunk/plugins/ComSkipLauncher/ExternalProgram.Designer.cs
trunk/plugins/ComSkipLauncher/ExternalProgram.cs
trunk/plugins/ComSkipLauncher/ExternalProgram.resx
Modified: trunk/plugins/ComSkipLauncher/ComSkipLauncher.cs
===================================================================
--- trunk/plugins/ComSkipLauncher/ComSkipLauncher.cs 2007-03-11 06:50:10 UTC (rev 178)
+++ trunk/plugins/ComSkipLauncher/ComSkipLauncher.cs 2007-03-11 09:59:23 UTC (rev 179)
@@ -29,9 +29,13 @@
#region Members
bool _runAtStart;
- string _program;
- string _parameters;
+ string _startProgram;
+ string _startParameters;
+ bool _runAtEnd;
+ string _endProgram;
+ string _endParameters;
+
#endregion Members
#region IPlugin Members
@@ -41,10 +45,12 @@
Log.Info("ComSkipLauncher: Start");
LoadSettings();
+
if (_runAtStart)
Recorder.OnTvRecordingStarted += new Recorder.OnTvRecordingHandler(Recorder_OnTvRecordingStarted);
- else
- Recorder.OnTvRecordingEnded += new MediaPortal.TV.Recording.Recorder.OnTvRecordingHandler(Recorder_OnTvRecordingEnded);
+
+ if (_runAtEnd)
+ Recorder.OnTvRecordingEnded += new Recorder.OnTvRecordingHandler(Recorder_OnTvRecordingEnded);
}
public void Stop()
{
@@ -52,8 +58,9 @@
if (_runAtStart)
Recorder.OnTvRecordingStarted -= new Recorder.OnTvRecordingHandler(Recorder_OnTvRecordingStarted);
- else
- Recorder.OnTvRecordingEnded -= new MediaPortal.TV.Recording.Recorder.OnTvRecordingHandler(Recorder_OnTvRecordingEnded);
+
+ if (_runAtEnd)
+ Recorder.OnTvRecordingEnded -= new Recorder.OnTvRecordingHandler(Recorder_OnTvRecordingEnded);
}
#endregion
@@ -72,13 +79,21 @@
{
LoadSettings();
- ExternalProgram externalProgram = new ExternalProgram(_program, _parameters, _runAtStart);
- if (externalProgram.ShowDialog() == DialogResult.OK)
+ Configuration configuration = new Configuration(
+ _startProgram, _startParameters, _runAtStart,
+ _endProgram, _endParameters, _runAtEnd);
+
+ if (configuration.ShowDialog() == DialogResult.OK)
{
- _runAtStart = externalProgram.RunAtStart;
- _program = externalProgram.Program;
- _parameters = externalProgram.Parameters;
+ _runAtStart = configuration.RunAtStart;
+ _startProgram = configuration.StartProgram;
+ _startParameters = configuration.StartParameters;
+ _runAtEnd = configuration.RunAtEnd;
+ _endProgram = configuration.EndProgram;
+ _endParameters = configuration.EndParameters;
+
+
SaveSettings();
}
}
@@ -99,23 +114,22 @@
try
{
- string parameters = ProcessParameters(_parameters, recordingFilename);
+ string parameters = ProcessParameters(_startParameters, recordingFilename);
Log.Info(
"ComSkipLauncher: Recording started ({0}), launching program ({1} {2}) ...",
recordingFilename,
- _program,
+ _startProgram,
parameters
);
- LaunchProcess(_program, parameters, Path.GetDirectoryName(recordingFilename), ProcessWindowStyle.Hidden);
+ LaunchProcess(_startProgram, parameters, Path.GetDirectoryName(recordingFilename), ProcessWindowStyle.Hidden);
}
catch (Exception ex)
{
Log.Error("ComSkipLauncher: {0}", ex.Message);
}
}
-
void Recorder_OnTvRecordingEnded(string recordingFilename, TVRecording recording, TVProgram program)
{
Log.Debug("ComSkipLauncher: Recorder_OnTvRecordingEnded {0}", recordingFilename);
@@ -140,16 +154,16 @@
return;
}
- string parameters = ProcessParameters(_parameters, fileName);
+ string parameters = ProcessParameters(_endParameters, fileName);
Log.Info(
"ComSkipLauncher: Recording ended ({0}), launching program ({1} {2}) ...",
fileName,
- _program,
+ _endProgram,
parameters
);
- LaunchProcess(_program, parameters, Path.GetDirectoryName(fileName), ProcessWindowStyle.Hidden);
+ LaunchProcess(_endProgram, parameters, Path.GetDirectoryName(fileName), ProcessWindowStyle.Hidden);
}
catch (Exception ex)
{
@@ -164,8 +178,12 @@
using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(MPConfigFile))
{
_runAtStart = xmlreader.GetValueAsBool("ComSkipLauncher", "RunAtStart", false);
- _program = xmlreader.GetValueAsString("ComSkipLauncher", "Program", DefaultProgram);
- _parameters = xmlreader.GetValueAsString("ComSkipLauncher", "Parameters", DefaultParameters);
+ _startProgram = xmlreader.GetValueAsString("ComSkipLauncher", "StartProgram", DefaultProgram);
+ _startParameters = xmlreader.GetValueAsString("ComSkipLauncher", "StartParameters", DefaultParameters);
+
+ _runAtEnd = xmlreader.GetValueAsBool("ComSkipLauncher", "RunAtEnd", false);
+ _endProgram = xmlreader.GetValueAsString("ComSkipLauncher", "EndProgram", DefaultProgram);
+ _endParameters = xmlreader.GetValueAsString("ComSkipLauncher", "EndParameters", DefaultParameters);
}
}
catch (Exception ex)
@@ -173,7 +191,6 @@
Log.Error("ComSkipLauncher: {0}", ex.Message);
}
}
-
void SaveSettings()
{
try
@@ -181,8 +198,8 @@
using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings(MPConfigFile))
{
xmlwriter.SetValueAsBool("ComSkipLauncher", "RunAtStart", _runAtStart);
- xmlwriter.SetValue("ComSkipLauncher", "Program", _program);
- xmlwriter.SetValue("ComSkipLauncher", "Parameters", _parameters);
+ xmlwriter.SetValue("ComSkipLauncher", "StartProgram", _startProgram);
+ xmlwriter.SetValue("ComSkipLauncher", "StartParameters", _startParameters);
}
}
catch (Exception ex)
@@ -195,10 +212,10 @@
{
Process process = new Process();
process.StartInfo = new ProcessStartInfo();
- process.StartInfo.Arguments = parameters;
- process.StartInfo.FileName = program;
- process.StartInfo.WindowStyle = windowStyle;
- process.StartInfo.WorkingDirectory = workingFolder;
+ process.StartInfo.Arguments = parameters;
+ process.StartInfo.FileName = program;
+ process.StartInfo.WindowStyle = windowStyle;
+ process.StartInfo.WorkingDirectory = workingFolder;
process.Start();
}
Modified: trunk/plugins/ComSkipLauncher/ComSkipLauncher.csproj
===================================================================
--- trunk/plugins/ComSkipLauncher/ComSkipLauncher.csproj 2007-03-11 06:50:10 UTC (rev 178)
+++ trunk/plugins/ComSkipLauncher/ComSkipLauncher.csproj 2007-03-11 09:59:23 UTC (rev 179)
@@ -60,16 +60,16 @@
<ItemGroup>
<Compile Include="ComSkipLauncher.cs" />
<Compile Include="AssemblyInfo.cs" />
- <Compile Include="ExternalProgram.cs">
+ <Compile Include="Configuration.cs">
<SubType>Form</SubType>
</Compile>
- <Compile Include="ExternalProgram.Designer.cs">
- <DependentUpon>ExternalProgram.cs</DependentUpon>
+ <Compile Include="Configuration.designer.cs">
+ <DependentUpon>Configuration.cs</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
- <EmbeddedResource Include="ExternalProgram.resx">
- <DependentUpon>ExternalProgram.cs</DependentUpon>
+ <EmbeddedResource Include="Configuration.resx">
+ <DependentUpon>Configuration.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
Copied: trunk/plugins/ComSkipLauncher/Configuration.Designer.cs (from rev 178, trunk/plugins/ComSkipLauncher/ExternalProgram.Designer.cs)
===================================================================
--- trunk/plugins/ComSkipLauncher/Configuration.Designer.cs (rev 0)
+++ trunk/plugins/ComSkipLauncher/Configuration.Designer.cs 2007-03-11 09:59:23 UTC (rev 179)
@@ -0,0 +1,423 @@
+namespace MediaPortal.Plugins
+{
+ partial class Configuration
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
+ this.buttonOK = new System.Windows.Forms.Button();
+ this.buttonCancel = new System.Windows.Forms.Button();
+ this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
+ this.buttonTest = new System.Windows.Forms.Button();
+ this.textBoxTest = new System.Windows.Forms.TextBox();
+ this.buttonFindTestFile = new System.Windows.Forms.Button();
+ this.radioButtonStartDoNothing = new System.Windows.Forms.RadioButton();
+ this.radioButtonStartLaunch = new System.Windows.Forms.RadioButton();
+ this.toolTips = new System.Windows.Forms.ToolTip(this.components);
+ this.textBoxEndParameters = new System.Windows.Forms.TextBox();
+ this.buttonEndParameters = new System.Windows.Forms.Button();
+ this.buttonEndProgram = new System.Windows.Forms.Button();
+ this.textBoxEndProgram = new System.Windows.Forms.TextBox();
+ this.textBoxStartParameters = new System.Windows.Forms.TextBox();
+ this.buttonStartParameters = new System.Windows.Forms.Button();
+ this.buttonStartProgram = new System.Windows.Forms.Button();
+ this.textBoxStartProgram = new System.Windows.Forms.TextBox();
+ this.radioButtonEndDoNothing = new System.Windows.Forms.RadioButton();
+ this.radioButtonEndLaunch = new System.Windows.Forms.RadioButton();
+ this.tabControl = new System.Windows.Forms.TabControl();
+ this.tabPageStart = new System.Windows.Forms.TabPage();
+ this.groupBoxStartProgram = new System.Windows.Forms.GroupBox();
+ this.labelStartParameters = new System.Windows.Forms.Label();
+ this.labelStartProgram = new System.Windows.Forms.Label();
+ this.tabPageEnd = new System.Windows.Forms.TabPage();
+ this.groupBoxEndProgram = new System.Windows.Forms.GroupBox();
+ this.labelEndParameters = new System.Windows.Forms.Label();
+ this.labelEndProgram = new System.Windows.Forms.Label();
+ this.groupBoxTest = new System.Windows.Forms.GroupBox();
+ this.tabControl.SuspendLayout();
+ this.tabPageStart.SuspendLayout();
+ this.groupBoxStartProgram.SuspendLayout();
+ this.tabPageEnd.SuspendLayout();
+ this.groupBoxEndProgram.SuspendLayout();
+ this.groupBoxTest.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // buttonOK
+ //
+ this.buttonOK.Location = new System.Drawing.Point(216, 288);
+ this.buttonOK.Name = "buttonOK";
+ this.buttonOK.Size = new System.Drawing.Size(56, 24);
+ this.buttonOK.TabIndex = 2;
+ this.buttonOK.Text = "OK";
+ this.buttonOK.UseVisualStyleBackColor = true;
+ this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
+ //
+ // buttonCancel
+ //
+ this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.buttonCancel.Location = new System.Drawing.Point(280, 288);
+ this.buttonCancel.Name = "buttonCancel";
+ this.buttonCancel.Size = new System.Drawing.Size(56, 24);
+ this.buttonCancel.TabIndex = 3;
+ this.buttonCancel.Text = "Cancel";
+ this.buttonCancel.UseVisualStyleBackColor = true;
+ this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
+ //
+ // openFileDialog
+ //
+ this.openFileDialog.Filter = "All files|*.*";
+ //
+ // buttonTest
+ //
+ this.buttonTest.Location = new System.Drawing.Point(272, 24);
+ this.buttonTest.Name = "buttonTest";
+ this.buttonTest.Size = new System.Drawing.Size(48, 20);
+ this.buttonTest.TabIndex = 2;
+ this.buttonTest.Text = "Test";
+ this.toolTips.SetToolTip(this.buttonTest, "Click here to test the above settings");
+ this.buttonTest.UseVisualStyleBackColor = true;
+ this.buttonTest.Click += new System.EventHandler(this.buttonTest_Click);
+ //
+ // textBoxTest
+ //
+ this.textBoxTest.Location = new System.Drawing.Point(8, 24);
+ this.textBoxTest.Name = "textBoxTest";
+ this.textBoxTest.Size = new System.Drawing.Size(224, 20);
+ this.textBoxTest.TabIndex = 0;
+ this.toolTips.SetToolTip(this.textBoxTest, "File to test launch with");
+ //
+ // buttonFindTestFile
+ //
+ this.buttonFindTestFile.Location = new System.Drawing.Point(240, 24);
+ this.buttonFindTestFile.Name = "buttonFindTestFile";
+ this.buttonFindTestFile.Size = new System.Drawing.Size(24, 20);
+ this.buttonFindTestFile.TabIndex = 1;
+ this.buttonFindTestFile.Text = "...";
+ this.toolTips.SetToolTip(this.buttonFindTestFile, "Click here to locate a file to test with");
+ this.buttonFindTestFile.UseVisualStyleBackColor = true;
+ this.buttonFindTestFile.Click += new System.EventHandler(this.buttonFindTestFile_Click);
+ //
+ // radioButtonStartDoNothing
+ //
+ this.radioButtonStartDoNothing.Location = new System.Drawing.Point(8, 8);
+ this.radioButtonStartDoNothing.Name = "radioButtonStartDoNothing";
+ this.radioButtonStartDoNothing.Size = new System.Drawing.Size(96, 24);
+ this.radioButtonStartDoNothing.TabIndex = 0;
+ this.radioButtonStartDoNothing.Text = "Do nothing";
+ this.toolTips.SetToolTip(this.radioButtonStartDoNothing, "Launch ComSkip as soon as the recording starts (this requires the LiveTV setting " +
+ "in comskip.ini)");
+ this.radioButtonStartDoNothing.UseVisualStyleBackColor = true;
+ //
+ // radioButtonStartLaunch
+ //
+ this.radioButtonStartLaunch.Checked = true;
+ this.radioButtonStartLaunch.Location = new System.Drawing.Point(8, 32);
+ this.radioButtonStartLaunch.Name = "radioButtonStartLaunch";
+ this.radioButtonStartLaunch.Size = new System.Drawing.Size(96, 24);
+ this.radioButtonStartLaunch.TabIndex = 1;
+ this.radioButtonStartLaunch.TabStop = true;
+ this.radioButtonStartLaunch.Text = "Launch:";
+ this.toolTips.SetToolTip(this.radioButtonStartLaunch, "Launch ComSkip to process the recording after it has finished");
+ this.radioButtonStartLaunch.UseVisualStyleBackColor = true;
+ this.radioButtonStartLaunch.CheckedChanged += new System.EventHandler(this.radioButtonStartLaunch_CheckedChanged);
+ //
+ // textBoxEndParameters
+ //
+ this.textBoxEndParameters.Location = new System.Drawing.Point(8, 80);
+ this.textBoxEndParameters.Name = "textBoxEndParameters";
+ this.textBoxEndParameters.Size = new System.Drawing.Size(256, 20);
+ this.textBoxEndParameters.TabIndex = 6;
+ this.toolTips.SetToolTip(this.textBoxEndParameters, "Provide command line parameters for the program");
+ //
+ // buttonEndParameters
+ //
+ this.buttonEndParameters.Location = new System.Drawing.Point(272, 80);
+ this.buttonEndParameters.Name = "buttonEndParameters";
+ this.buttonEndParameters.Size = new System.Drawing.Size(24, 20);
+ this.buttonEndParameters.TabIndex = 7;
+ this.buttonEndParameters.Text = "?";
+ this.toolTips.SetToolTip(this.buttonEndParameters, "Click here for a list of additional command line parameters");
+ this.buttonEndParameters.UseVisualStyleBackColor = true;
+ this.buttonEndParameters.Click += new System.EventHandler(this.buttonParamQuestion_Click);
+ //
+ // buttonEndProgram
+ //
+ this.buttonEndProgram.Location = new System.Drawing.Point(272, 40);
+ this.buttonEndProgram.Name = "buttonEndProgram";
+ this.buttonEndProgram.Size = new System.Drawing.Size(24, 20);
+ this.buttonEndProgram.TabIndex = 4;
+ this.buttonEndProgram.Text = "...";
+ this.toolTips.SetToolTip(this.buttonEndProgram, "Locate the program you wish to launch");
+ this.buttonEndProgram.UseVisualStyleBackColor = true;
+ this.buttonEndProgram.Click += new System.EventHandler(this.buttonEndProgram_Click);
+ //
+ // textBoxEndProgram
+ //
+ this.textBoxEndProgram.Location = new System.Drawing.Point(8, 40);
+ this.textBoxEndProgram.Name = "textBoxEndProgram";
+ this.textBoxEndProgram.Size = new System.Drawing.Size(256, 20);
+ this.textBoxEndProgram.TabIndex = 3;
+ this.toolTips.SetToolTip(this.textBoxEndProgram, "The full location of the program to launch");
+ //
+ // textBoxStartParameters
+ //
+ this.textBoxStartParameters.Location = new System.Drawing.Point(8, 80);
+ this.textBoxStartParameters.Name = "textBoxStartParameters";
+ this.textBoxStartParameters.Size = new System.Drawing.Size(256, 20);
+ this.textBoxStartParameters.TabIndex = 4;
+ this.toolTips.SetToolTip(this.textBoxStartParameters, "Provide command line parameters for the program");
+ //
+ // buttonStartParameters
+ //
+ this.buttonStartParameters.Location = new System.Drawing.Point(272, 80);
+ this.buttonStartParameters.Name = "buttonStartParameters";
+ this.buttonStartParameters.Size = new System.Drawing.Size(24, 20);
+ this.buttonStartParameters.TabIndex = 5;
+ this.buttonStartParameters.Text = "?";
+ this.toolTips.SetToolTip(this.buttonStartParameters, "Click here for a list of additional command line parameters");
+ this.buttonStartParameters.UseVisualStyleBackColor = true;
+ this.buttonStartParameters.Click += new System.EventHandler(this.buttonParamQuestion_Click);
+ //
+ // buttonStartProgram
+ //
+ this.buttonStartProgram.Location = new System.Drawing.Point(272, 40);
+ this.buttonStartProgram.Name = "buttonStartProgram";
+ this.buttonStartProgram.Size = new System.Drawing.Size(24, 20);
+ this.buttonStartProgram.TabIndex = 2;
+ this.buttonStartProgram.Text = "...";
+ this.toolTips.SetToolTip(this.buttonStartProgram, "Locate the program you wish to launch");
+ this.buttonStartProgram.UseVisualStyleBackColor = true;
+ this.buttonStartProgram.Click += new System.EventHandler(this.buttonStartProgram_Click);
+ //
+ // textBoxStartProgram
+ //
+ this.textBoxStartProgram.Location = new System.Drawing.Point(8, 40);
+ this.textBoxStartProgram.Name = "textBoxStartProgram";
+ this.textBoxStartProgram.Size = new System.Drawing.Size(256, 20);
+ this.textBoxStartProgram.TabIndex = 1;
+ this.toolTips.SetToolTip(this.textBoxStartProgram, "The full location of the program to launch");
+ //
+ // radioButtonEndDoNothing
+ //
+ this.radioButtonEndDoNothing.Location = new System.Drawing.Point(8, 8);
+ this.radioButtonEndDoNothing.Name = "radioButtonEndDoNothing";
+ this.radioButtonEndDoNothing.Size = new System.Drawing.Size(96, 24);
+ this.radioButtonEndDoNothing.TabIndex = 0;
+ this.radioButtonEndDoNothing.Text = "Do nothing";
+ this.radioButtonEndDoNothing.UseVisualStyleBackColor = true;
+ //
+ // radioButtonEndLaunch
+ //
+ this.radioButtonEndLaunch.Checked = true;
+ this.radioButtonEndLaunch.Location = new System.Drawing.Point(8, 32);
+ this.radioButtonEndLaunch.Name = "radioButtonEndLaunch";
+ this.radioButtonEndLaunch.Size = new System.Drawing.Size(96, 24);
+ this.radioButtonEndLaunch.TabIndex = 1;
+ this.radioButtonEndLaunch.TabStop = true;
+ this.radioButtonEndLaunch.Text = "Launch:";
+ this.radioButtonEndLaunch.UseVisualStyleBackColor = true;
+ this.radioButtonEndLaunch.CheckedChanged += new System.EventHandler(this.radioButtonEndLaunch_CheckedChanged);
+ //
+ // tabControl
+ //
+ this.tabControl.Controls.Add(this.tabPageStart);
+ this.tabControl.Controls.Add(this.tabPageEnd);
+ this.tabControl.Location = new System.Drawing.Point(8, 8);
+ this.tabControl.Name = "tabControl";
+ this.tabControl.SelectedIndex = 0;
+ this.tabControl.Size = new System.Drawing.Size(328, 208);
+ this.tabControl.TabIndex = 0;
+ //
+ // tabPageStart
+ //
+ this.tabPageStart.Controls.Add(this.groupBoxStartProgram);
+ this.tabPageStart.Controls.Add(this.radioButtonStartDoNothing);
+ this.tabPageStart.Controls.Add(this.radioButtonStartLaunch);
+ this.tabPageStart.Location = new System.Drawing.Point(4, 22);
+ this.tabPageStart.Name = "tabPageStart";
+ this.tabPageStart.Padding = new System.Windows.Forms.Padding(3);
+ this.tabPageStart.Size = new System.Drawing.Size(320, 182);
+ this.tabPageStart.TabIndex = 0;
+ this.tabPageStart.Text = "When recording starts";
+ this.tabPageStart.UseVisualStyleBackColor = true;
+ //
+ // groupBoxStartProgram
+ //
+ this.groupBoxStartProgram.Controls.Add(this.labelStartParameters);
+ this.groupBoxStartProgram.Controls.Add(this.textBoxStartParameters);
+ this.groupBoxStartProgram.Controls.Add(this.buttonStartParameters);
+ this.groupBoxStartProgram.Controls.Add(this.labelStartProgram);
+ this.groupBoxStartProgram.Controls.Add(this.buttonStartProgram);
+ this.groupBoxStartProgram.Controls.Add(this.textBoxStartProgram);
+ this.groupBoxStartProgram.Location = new System.Drawing.Point(8, 64);
+ this.groupBoxStartProgram.Name = "groupBoxStartProgram";
+ this.groupBoxStartProgram.Size = new System.Drawing.Size(304, 112);
+ this.groupBoxStartProgram.TabIndex = 2;
+ this.groupBoxStartProgram.TabStop = false;
+ this.groupBoxStartProgram.Text = "What to do";
+ //
+ // labelStartParameters
+ //
+ this.labelStartParameters.Location = new System.Drawing.Point(8, 64);
+ this.labelStartParameters.Name = "labelStartParameters";
+ this.labelStartParameters.Size = new System.Drawing.Size(256, 16);
+ this.labelStartParameters.TabIndex = 3;
+ this.labelStartParameters.Text = "Parameters:";
+ this.labelStartParameters.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // labelStartProgram
+ //
+ this.labelStartProgram.Location = new System.Drawing.Point(8, 24);
+ this.labelStartProgram.Name = "labelStartProgram";
+ this.labelStartProgram.Size = new System.Drawing.Size(256, 16);
+ this.labelStartProgram.TabIndex = 0;
+ this.labelStartProgram.Text = "Program:";
+ this.labelStartProgram.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // tabPageEnd
+ //
+ this.tabPageEnd.Controls.Add(this.groupBoxEndProgram);
+ this.tabPageEnd.Controls.Add(this.radioButtonEndDoNothing);
+ this.tabPageEnd.Controls.Add(this.radioButtonEndLaunch);
+ this.tabPageEnd.Location = new System.Drawing.Point(4, 22);
+ this.tabPageEnd.Name = "tabPageEnd";
+ this.tabPageEnd.Padding = new System.Windows.Forms.Padding(3);
+ this.tabPageEnd.Size = new System.Drawing.Size(320, 182);
+ this.tabPageEnd.TabIndex = 1;
+ this.tabPageEnd.Text = "When recording ends";
+ this.tabPageEnd.UseVisualStyleBackColor = true;
+ //
+ // groupBoxEndProgram
+ //
+ this.groupBoxEndProgram.Controls.Add(this.labelEndParameters);
+ this.groupBoxEndProgram.Controls.Add(this.textBoxEndParameters);
+ this.groupBoxEndProgram.Controls.Add(this.buttonEndParameters);
+ this.groupBoxEndProgram.Controls.Add(this.labelEndProgram);
+ this.groupBoxEndProgram.Controls.Add(this.buttonEndProgram);
+ this.groupBoxEndProgram.Controls.Add(this.textBoxEndProgram);
+ this.groupBoxEndProgram.Location = new System.Drawing.Point(8, 64);
+ this.groupBoxEndProgram.Name = "groupBoxEndProgram";
+ this.groupBoxEndProgram.Size = new System.Drawing.Size(304, 112);
+ this.groupBoxEndProgram.TabIndex = 8;
+ this.groupBoxEndProgram.TabStop = false;
+ this.groupBoxEndProgram.Text = "What to do";
+ //
+ // labelEndParameters
+ //
+ this.labelEndParameters.Location = new System.Drawing.Point(8, 64);
+ this.labelEndParameters.Name = "labelEndParameters";
+ this.labelEndParameters.Size = new System.Drawing.Size(256, 16);
+ this.labelEndParameters.TabIndex = 5;
+ this.labelEndParameters.Text = "Parameters:";
+ this.labelEndParameters.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // labelEndProgram
+ //
+ this.labelEndProgram.Location = new System.Drawing.Point(8, 24);
+ this.labelEndProgram.Name = "labelEndProgram";
+ this.labelEndProgram.Size = new System.Drawing.Size(256, 16);
+ this.labelEndProgram.TabIndex = 2;
+ this.labelEndProgram.Text = "Program:";
+ this.labelEndProgram.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // groupBoxTest
+ //
+ this.groupBoxTest.Controls.Add(this.textBoxTest);
+ this.groupBoxTest.Controls.Add(this.buttonTest);
+ this.groupBoxTest.Controls.Add(this.buttonFindTestFile);
+ this.groupBoxTest.Location = new System.Drawing.Point(8, 224);
+ this.groupBoxTest.Name = "groupBoxTest";
+ this.groupBoxTest.Size = new System.Drawing.Size(328, 56);
+ this.groupBoxTest.TabIndex = 1;
+ this.groupBoxTest.TabStop = false;
+ this.groupBoxTest.Text = "Test";
+ //
+ // ExternalProgram
+ //
+ this.AcceptButton = this.buttonOK;
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.CancelButton = this.buttonCancel;
+ this.ClientSize = new System.Drawing.Size(344, 320);
+ this.Controls.Add(this.groupBoxTest);
+ this.Controls.Add(this.tabControl);
+ this.Controls.Add(this.buttonCancel);
+ this.Controls.Add(this.buttonOK);
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.MinimumSize = new System.Drawing.Size(360, 356);
+ this.Name = "ExternalProgram";
+ this.ShowIcon = false;
+ this.ShowInTaskbar = false;
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+ this.Text = "ComSkip Launcher";
+ this.tabControl.ResumeLayout(false);
+ this.tabPageStart.ResumeLayout(false);
+ this.groupBoxStartProgram.ResumeLayout(false);
+ this.groupBoxStartProgram.PerformLayout();
+ this.tabPageEnd.ResumeLayout(false);
+ this.groupBoxEndProgram.ResumeLayout(false);
+ this.groupBoxEndProgram.PerformLayout();
+ this.groupBoxTest.ResumeLayout(false);
+ this.groupBoxTest.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Button buttonOK;
+ private System.Windows.Forms.Button buttonCancel;
+ private System.Windows.Forms.OpenFileDialog openFileDialog;
+ private System.Windows.Forms.Button buttonTest;
+ private System.Windows.Forms.TextBox textBoxTest;
+ private System.Windows.Forms.Button buttonFindTestFile;
+ private System.Windows.Forms.RadioButton radioButtonStartDoNothing;
+ private System.Windows.Forms.RadioButton radioButtonStartLaunch;
+ private System.Windows.Forms.ToolTip toolTips;
+ private System.Windows.Forms.TabControl tabControl;
+ private System.Windows.Forms.TabPage tabPageStart;
+ private System.Windows.Forms.TabPage tabPageEnd;
+ private System.Windows.Forms.GroupBox groupBoxTest;
+ private System.Windows.Forms.RadioButton radioButtonEndDoNothing;
+ private System.Windows.Forms.RadioButton radioButtonEndLaunch;
+ private System.Windows.Forms.Label labelEndParameters;
+ private System.Windows.Forms.TextBox textBoxEndParameters;
+ private System.Windows.Forms.Button buttonEndParameters;
+ private System.Windows.Forms.Label labelEndProgram;
+ private System.Windows.Forms.Button buttonEndProgram;
+ private System.Windows.Forms.TextBox textBoxEndProgram;
+ private System.Windows.Forms.GroupBox groupBoxEndProgram;
+ private System.Windows.Forms.GroupBox groupBoxStartProgram;
+ private System.Windows.Forms.Label labelStartParameters;
+ private System.Windows.Forms.TextBox textBoxStartParameters;
+ private System.Windows.Forms.Button buttonStartParameters;
+ private System.Windows.Forms.Label labelStartProgram;
+ private System.Windows.Forms.Button buttonStartProgram;
+ private System.Windows.Forms.TextBox textBoxStartProgram;
+ }
+}
\ No newline at end of file
Copied: trunk/plugins/ComSkipLauncher/Configuration.cs (from rev 178, trunk/plugins/ComSkipLauncher/ExternalProgram.cs)
===================================================================
--- trunk/plugins/ComSkipLauncher/Configuration.cs (rev 0)
+++ trunk/plugins/ComSkipLauncher/Configuration.cs 2007-03-11 09:59:23 UTC (rev 179)
@@ -0,0 +1,170 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Diagnostics;
+using System.Drawing;
+using System.IO;
+using System.Text;
+using System.Windows.Forms;
+
+using MediaPortal.GUI.Library;
+
+namespace MediaPortal.Plugins
+{
+
+ public partial class Configuration : Form
+ {
+
+ #region Constants
+
+ const string ParametersMessage =
+@"{0} = Recorded filename (includes path)
+{1} = Recorded filename (w/o path)
+{2} = Recorded filename (w/o path or extension)
+{3} = Recorded file path
+{4} = Current date
+{5} = Current time";
+
+ #endregion Constants
+
+ #region Properties
+
+ public bool RunAtStart
+ {
+ get { return radioButtonStartLaunch.Checked; }
+ set { radioButtonStartLaunch.Checked = value; }
+ }
+ public bool RunAtEnd
+ {
+ get { return radioButtonEndLaunch.Checked; }
+ set { radioButtonEndLaunch.Checked = value; }
+ }
+
+ public string StartProgram
+ {
+ get { return textBoxStartProgram.Text; }
+ }
+ public string StartParameters
+ {
+ get { return textBoxStartParameters.Text; }
+ }
+
+ public string EndProgram
+ {
+ get { return textBoxEndProgram.Text; }
+ }
+ public string EndParameters
+ {
+ get { return textBoxEndParameters.Text; }
+ }
+
+ #endregion Properties
+
+ #region Constructors
+
+ public Configuration(
+ string startProgram, string startParameters, bool runAtStart,
+ string endProgram, string endParameters, bool runAtEnd)
+ {
+ InitializeComponent();
+
+ radioButtonStartLaunch.Checked = runAtStart;
+ textBoxStartProgram.Text = startProgram;
+ textBoxStartParameters.Text = startParameters;
+
+ radioButtonEndLaunch.Checked = runAtEnd;
+ textBoxEndProgram.Text = endProgram;
+ textBoxEndParameters.Text = endParameters;
+ }
+
+ #endregion Constructors
+
+ private void buttonOK_Click(object sender, EventArgs e)
+ {
+ this.DialogResult = DialogResult.OK;
+ this.Close();
+ }
+
+ private void buttonCancel_Click(object sender, EventArgs e)
+ {
+ this.DialogResult = DialogResult.Cancel;
+ this.Close();
+ }
+
+ private void buttonParamQuestion_Click(object sender, EventArgs e)
+ {
+ MessageBox.Show(this, ParametersMessage, "Parameters", MessageBoxButtons.OK, MessageBoxIcon.Information);
+ }
+
+ private void buttonTest_Click(object sender, EventArgs e)
+ {
+ string program;
+ string param;
+
+ if (tabControl.SelectedTab == tabPageStart)
+ {
+ program = textBoxStartProgram.Text.Trim();
+ param = textBoxStartParameters.Text;
+ }
+ else
+ {
+ program = textBoxEndProgram.Text.Trim();
+ param = textBoxEndParameters.Text;
+ }
+
+ if (program.Length == 0)
+ {
+ MessageBox.Show(this, "You must specify a program to run", "Missing program name", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
+ return;
+ }
+
+ try
+ {
+ string parameters = ComSkipLauncher.ProcessParameters(param, textBoxTest.Text);
+
+ Process process = new Process();
+ process.StartInfo.Arguments = parameters;
+ process.StartInfo.FileName = program;
+ process.StartInfo.WorkingDirectory = Path.GetDirectoryName(program);
+
+ process.Start();
+ }
+ catch (Exception ex)
+ {
+ Log.Error("ComSkipLauncher: {0}", ex.Message);
+ }
+ }
+ private void buttonFindTestFile_Click(object sender, EventArgs e)
+ {
+ openFileDialog.Title = "Select Test File";
+ if (openFileDialog.ShowDialog(this) == DialogResult.OK)
+ textBoxTest.Text = openFileDialog.FileName;
+ }
+
+ private void radioButtonStartLaunch_CheckedChanged(object sender, EventArgs e)
+ {
+ groupBoxStartProgram.Enabled = radioButtonStartLaunch.Checked;
+ }
+ private void radioButtonEndLaunch_CheckedChanged(object sender, EventArgs e)
+ {
+ groupBoxEndProgram.Enabled = radioButtonEndLaunch.Checked;
+ }
+
+ private void buttonStartProgram_Click(object sender, EventArgs e)
+ {
+ openFileDialog.Title = "Select Program To Execute";
+ if (openFileDialog.ShowDialog(this) == DialogResult.OK)
+ textBoxStartProgram.Text = openFileDialog.FileName;
+ }
+ private void buttonEndProgram_Click(object sender, EventArgs e)
+ {
+ openFileDialog.Title = "Select Program To Execute";
+ if (openFileDialog.ShowDialog(this) == DialogResult.OK)
+ textBoxEndProgram.Text = openFileDialog.FileName;
+ }
+
+
+ }
+
+}
Copied: trunk/plugins/ComSkipLauncher/Configuration.resx (from rev 178, trunk/plugins/ComSkipLauncher/ExternalProgram.resx)
===================================================================
--- trunk/plugins/ComSkipLauncher/Configuration.resx (rev 0)
+++ trunk/plugins/ComSkipLauncher/Configuration.resx 2007-03-11 09:59:23 UTC (rev 179)
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <metadata name="openFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>17, 17</value>
+ </metadata>
+ <metadata name="toolTips.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>150, 17</value>
+ </metadata>
+ <metadata name="toolTips.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>150, 17</value>
+ </metadata>
+</root>
\ No newline at end of file
Deleted: trunk/plugins/ComSkipLauncher/ExternalProgram.Designer.cs
===================================================================
--- trunk/plugins/ComSkipLauncher/ExternalProgram.Designer.cs 2007-03-11 06:50:10 UTC (rev 178)
+++ trunk/plugins/ComSkipLauncher/ExternalProgram.Designer.cs 2007-03-11 09:59:23 UTC (rev 179)
@@ -1,313 +0,0 @@
-namespace MediaPortal.Plugins
-{
- partial class ExternalProgram
- {
- /// <summary>
- /// Required designer variable.
- /// </summary>
- private System.ComponentModel.IContainer components = null;
-
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region Windows Form Designer generated code
-
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- private void InitializeComponent()
- {
- this.components = new System.ComponentModel.Container();
- this.textBoxProgram = new System.Windows.Forms.TextBox();
- this.labelProgram = new System.Windows.Forms.Label();
- this.buttonProgam = new System.Windows.Forms.Button();
- this.buttonOK = new System.Windows.Forms.Button();
- this.buttonCancel = new System.Windows.Forms.Button();
- this.labelParameters = new System.Windows.Forms.Label();
- this.textBoxParameters = new System.Windows.Forms.TextBox();
- this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
- this.buttonParamQuestion = new System.Windows.Forms.Button();
- this.buttonTest = new System.Windows.Forms.Button();
- this.labelFile = new System.Windows.Forms.Label();
- this.textBoxTestFile = new System.Windows.Forms.TextBox();
- this.groupBoxTest = new System.Windows.Forms.GroupBox();
- this.buttonFindTestFile = new System.Windows.Forms.Button();
- this.radioButtonLaunchAtStart = new System.Windows.Forms.RadioButton();
- this.radioButtonLaunchAtEnd = new System.Windows.Forms.RadioButton();
- this.groupBoxWhen = new System.Windows.Forms.GroupBox();
- this.groupBoxHow = new System.Windows.Forms.GroupBox();
- this.toolTips = new System.Windows.Forms.ToolTip(this.components);
- this.groupBoxTest.SuspendLayout();
- this.groupBoxWhen.SuspendLayout();
- this.groupBoxHow.SuspendLayout();
- this.SuspendLayout();
- //
- // textBoxProgram
- //
- this.textBoxProgram.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.textBoxProgram.Location = new System.Drawing.Point(8, 40);
- this.textBoxProgram.Name = "textBoxProgram";
- this.textBoxProgram.Size = new System.Drawing.Size(272, 20);
- this.textBoxProgram.TabIndex = 1;
- this.toolTips.SetToolTip(this.textBoxProgram, "The full location of the program to launch");
- //
- // labelProgram
- //
- this.labelProgram.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.labelProgram.Location = new System.Drawing.Point(8, 24);
- this.labelProgram.Name = "labelProgram";
- this.labelProgram.Size = new System.Drawing.Size(272, 16);
- this.labelProgram.TabIndex = 0;
- this.labelProgram.Text = "Program:";
- this.labelProgram.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
- // buttonProgam
- //
- this.buttonProgam.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonProgam.Location = new System.Drawing.Point(288, 40);
- this.buttonProgam.Name = "buttonProgam";
- this.buttonProgam.Size = new System.Drawing.Size(24, 20);
- this.buttonProgam.TabIndex = 2;
- this.buttonProgam.Text = "...";
- this.toolTips.SetToolTip(this.buttonProgam, "Locate the program you wish to launch");
- this.buttonProgam.UseVisualStyleBackColor = true;
- this.buttonProgam.Click += new System.EventHandler(this.buttonProgam_Click);
- //
- // buttonOK
- //
- this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonOK.Location = new System.Drawing.Point(208, 264);
- this.buttonOK.Name = "buttonOK";
- this.buttonOK.Size = new System.Drawing.Size(56, 24);
- this.buttonOK.TabIndex = 3;
- this.buttonOK.Text = "OK";
- this.buttonOK.UseVisualStyleBackColor = true;
- this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
- //
- // buttonCancel
- //
- this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
- this.buttonCancel.Location = new System.Drawing.Point(272, 264);
- this.buttonCancel.Name = "buttonCancel";
- this.buttonCancel.Size = new System.Drawing.Size(56, 24);
- this.buttonCancel.TabIndex = 4;
- this.buttonCancel.Text = "Cancel";
- this.buttonCancel.UseVisualStyleBackColor = true;
- this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
- //
- // labelParameters
- //
- this.labelParameters.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.labelParameters.Location = new System.Drawing.Point(8, 64);
- this.labelParameters.Name = "labelParameters";
- this.labelParameters.Size = new System.Drawing.Size(272, 16);
- this.labelParameters.TabIndex = 3;
- this.labelParameters.Text = "Parameters:";
- this.labelParameters.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
- // textBoxParameters
- //
- this.textBoxParameters.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.textBoxParameters.Location = new System.Drawing.Point(8, 80);
- this.textBoxParameters.Name = "textBoxParameters";
- this.textBoxParameters.Size = new System.Drawing.Size(272, 20);
- this.textBoxParameters.TabIndex = 4;
- this.toolTips.SetToolTip(this.textBoxParameters, "Provide command line parameters for the program");
- //
- // openFileDialog
- //
- this.openFileDialog.Filter = "All files|*.*";
- //
- // buttonParamQuestion
- //
- this.buttonParamQuestion.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonParamQuestion.Location = new System.Drawing.Point(288, 80);
- this.buttonParamQuestion.Name = "buttonParamQuestion";
- this.buttonParamQuestion.Size = new System.Drawing.Size(24, 20);
- this.buttonParamQuestion.TabIndex = 5;
- this.buttonParamQuestion.Text = "?";
- this.toolTips.SetToolTip(this.buttonParamQuestion, "Click here for a list of additional command line parameters");
- this.buttonParamQuestion.UseVisualStyleBackColor = true;
- this.buttonParamQuestion.Click += new System.EventHandler(this.buttonParamQuestion_Click);
- //
- // buttonTest
- //
- this.buttonTest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonTest.Location = new System.Drawing.Point(256, 40);
- this.buttonTest.Name = "buttonTest";
- this.buttonTest.Size = new System.Drawing.Size(56, 24);
- this.buttonTest.TabIndex = 3;
- this.buttonTest.Text = "Test";
- this.toolTips.SetToolTip(this.buttonTest, "Click here to test the above settings");
- this.buttonTest.UseVisualStyleBackColor = true;
- this.buttonTest.Click += new System.EventHandler(this.buttonTest_Click);
- //
- // labelFile
- //
- this.labelFile.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.labelFile.Location = new System.Drawing.Point(8, 24);
- this.labelFile.Name = "labelFile";
- this.labelFile.Size = new System.Drawing.Size(208, 16);
- this.labelFile.TabIndex = 0;
- this.labelFile.Text = "File to test with:";
- this.labelFile.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
- // textBoxTestFile
- //
- this.textBoxTestFile.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.textBoxTestFile.Location = new System.Drawing.Point(8, 40);
- this.textBoxTestFile.Name = "textBoxTestFile";
- this.textBoxTestFile.Size = new System.Drawing.Size(208, 20);
- this.textBoxTestFile.TabIndex = 1;
- this.toolTips.SetToolTip(this.textBoxTestFile, "File to test launch with");
- //
- // groupBoxTest
- //
- this.groupBoxTest.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.groupBoxTest.Controls.Add(this.buttonFindTestFile);
- this.groupBoxTest.Controls.Add(this.textBoxTestFile);
- this.groupBoxTest.Controls.Add(this.buttonTest);
- this.groupBoxTest.Controls.Add(this.labelFile);
- this.groupBoxTest.Location = new System.Drawing.Point(8, 184);
- this.groupBoxTest.Name = "groupBoxTest";
- this.groupBoxTest.Size = new System.Drawing.Size(320, 72);
- this.groupBoxTest.TabIndex = 2;
- this.groupBoxTest.TabStop = false;
- this.groupBoxTest.Text = "Test run";
- //
- // buttonFindTestFile
- //
- this.buttonFindTestFile.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonFindTestFile.Location = new System.Drawing.Point(224, 40);
- this.buttonFindTestFile.Name = "buttonFindTestFile";
- this.buttonFindTestFile.Size = new System.Drawing.Size(24, 20);
- this.buttonFindTestFile.TabIndex = 2;
- this.buttonFindTestFile.Text = "...";
- this.toolTips.SetToolTip(this.buttonFindTestFile, "Click here to locate a file to test with");
- this.buttonFindTestFile.UseVisualStyleBackColor = true;
- this.buttonFindTestFile.Click += new System.EventHandler(this.buttonFindTestFile_Click);
- //
- // radioButtonLaunchAtStart
- //
- this.radioButtonLaunchAtStart.Anchor = System.Windows.Forms.AnchorStyles.Top;
- this.radioButtonLaunchAtStart.Location = new System.Drawing.Point(8, 16);
- this.radioButtonLaunchAtStart.Name = "radioButtonLaunchAtStart";
- this.radioButtonLaunchAtStart.Size = new System.Drawing.Size(144, 24);
- this.radioButtonLaunchAtStart.TabIndex = 0;
- this.radioButtonLaunchAtStart.Text = "When recording starts";
- this.toolTips.SetToolTip(this.radioButtonLaunchAtStart, "Launch ComSkip as soon as the recording starts (this requires the LiveTV setting " +
- "in comskip.ini)");
- this.radioButtonLaunchAtStart.UseVisualStyleBackColor = true;
- //
- // radioButtonLaunchAtEnd
- //
- this.radioButtonLaunchAtEnd.Anchor = System.Windows.Forms.AnchorStyles.Top;
- this.radioButtonLaunchAtEnd.Checked = true;
- this.radioButtonLaunchAtEnd.Location = new System.Drawing.Point(168, 16);
- this.radioButtonLaunchAtEnd.Name = "radioButtonLaunchAtEnd";
- this.radioButtonLaunchAtEnd.Size = new System.Drawing.Size(144, 24);
- this.radioButtonLaunchAtEnd.TabIndex = 1;
- this.radioButtonLaunchAtEnd.TabStop = true;
- this.radioButtonLaunchAtEnd.Text = "When recording ends";
- this.toolTips.SetToolTip(this.radioButtonLaunchAtEnd, "Launch ComSkip to process the recording after it has finished");
- this.radioButtonLaunchAtEnd.UseVisualStyleBackColor = true;
- //
- // groupBoxWhen
- //
- this.groupBoxWhen.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.groupBoxWhen.Controls.Add(this.radioButtonLaunchAtStart);
- this.groupBoxWhen.Controls.Add(this.radioButtonLaunchAtEnd);
- this.groupBoxWhen.Location = new System.Drawing.Point(8, 8);
- this.groupBoxWhen.Name = "groupBoxWhen";
- this.groupBoxWhen.Size = new System.Drawing.Size(320, 48);
- this.groupBoxWhen.TabIndex = 0;
- this.groupBoxWhen.TabStop = false;
- this.groupBoxWhen.Text = "When to run";
- //
- // groupBoxHow
- //
- this.groupBoxHow.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.groupBoxHow.Controls.Add(this.labelProgram);
- this.groupBoxHow.Controls.Add(this.textBoxProgram);
- this.groupBoxHow.Controls.Add(this.buttonProgam);
- this.groupBoxHow.Controls.Add(this.buttonParamQuestion);
- this.groupBoxHow.Controls.Add(this.textBoxParameters);
- this.groupBoxHow.Controls.Add(this.labelParameters);
- this.groupBoxHow.Location = new System.Drawing.Point(8, 64);
- this.groupBoxHow.Name = "groupBoxHow";
- this.groupBoxHow.Size = new System.Drawing.Size(320, 112);
- this.groupBoxHow.TabIndex = 1;
- this.groupBoxHow.TabStop = false;
- this.groupBoxHow.Text = "How to run";
- //
- // ExternalProgram
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(336, 296);
- this.Controls.Add(this.groupBoxHow);
- this.Controls.Add(this.groupBoxWhen);
- this.Controls.Add(this.groupBoxTest);
- this.Controls.Add(this.buttonCancel);
- this.Controls.Add(this.buttonOK);
- this.MaximizeBox = false;
- this.MinimizeBox = false;
- this.MinimumSize = new System.Drawing.Size(352, 332);
- this.Name = "ExternalProgram";
- this.ShowIcon = false;
- this.ShowInTaskbar = false;
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
- this.Text = "ComSkip Launcher";
- this.groupBoxTest.ResumeLayout(false);
- this.groupBoxTest.PerformLayout();
- this.groupBoxWhen.ResumeLayout(false);
- this.groupBoxHow.ResumeLayout(false);
- this.groupBoxHow.PerformLayout();
- this.ResumeLayout(false);
-
- }
-
- #endregion
-
- private System.Windows.Forms.TextBox textBoxProgram;
- private System.Windows.Forms.Label labelProgram;
- private System.Windows.Forms.Button buttonProgam;
- private System.Windows.Forms.Button buttonOK;
- private System.Windows.Forms.Button buttonCancel;
- private System.Windows.Forms.Label labelParameters;
- private System.Windows.Forms.TextBox textBoxParameters;
- private System.Windows.Forms.OpenFileDialog openFileDialog;
- private System.Windows.Forms.Button buttonParamQuestion;
- private System.Windows.Forms.Button buttonTest;
- private System.Windows.Forms.Label labelFile;
- private System.Windows.Forms.TextBox textBoxTestFile;
- private System.Windows.Forms.GroupBox groupBoxTest;
- private System.Windows.Forms.Button buttonFindTestFile;
- private System.Windows.Forms.RadioButton radioButtonLaunchAtStart;
- private System.Windows.Forms.RadioButton radioButtonLaunchAtEnd;
- private System.Windows.Forms.GroupBox groupBoxWhen;
- private System.Windows.Forms.GroupBox groupBoxHow;
- private System.Windows.Forms.ToolTip toolTips;
- }
-}
\ No newline at end of file
Deleted: trunk/plugins/ComSkipLauncher/ExternalProgram.cs
===================================================================
--- trunk/plugins/ComSkipLauncher/ExternalProgram.cs 2007-03-11 06:50:10 UTC (rev 178)
+++ trunk/plugins/ComSkipLauncher/ExternalProgram.cs 2007-03-11 09:59:23 UTC (rev 179)
@@ -1,126 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Diagnostics;
-using System.Drawing;
-using System.IO;
-using System.Text;
-using System.Windows.Forms;
-
-using MediaPortal.GUI.Library;
-
-namespace MediaPortal.Plugins
-{
-
- public partial class ExternalProgram : Form
- {
-
- #region Constants
-
- const string ParametersMessage =
-@"{0} = Recorded filename (includes path)
-{1} = Recorded filename (w/o path)
-{2} = Recorded filename (w/o path or extension)
-{3} = Recorded file path
-{4} = Current date
-{5} = Current time";
-
- #endregion Constants
-
- #region Properties
-
- public bool RunAtStart
- {
- get { return radioButtonLaunchAtStart.Checked; }
- set { radioButtonLaunchAtStart.Checked = value; }
- }
- public string Program
- {
- get { return textBoxProgram.Text; }
- }
- public string Parameters
- {
- get { return textBoxParameters.Text; }
- }
-
- #endregion Properties
-
- #region Constructors
-
- public ExternalProgram(string program, string parameters, bool runAtStart)
- {
- InitializeComponent();
-
- radioButtonLaunchAtStart.Checked = runAtStart;
- textBoxProgram.Text = program;
- textBoxParameters.Text = parameters;
- }
-
- #endregion Constructors
-
- private void buttonProgam_Click(object sender, EventArgs e)
- {
- openFileDialog.Title = "Select Program To Execute";
- if (openFileDialog.ShowDialog(this) == DialogResult.OK)
- textBoxProgram.Text = openFileDialog.FileName;
- }
-
- private void buttonOK_Click(object sender, EventA...
[truncated message content] |
|
From: <an...@us...> - 2007-03-11 06:50:11
|
Revision: 178
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=178&view=rev
Author: and-81
Date: 2007-03-10 22:50:10 -0800 (Sat, 10 Mar 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/ComSkipLauncher/ComSkipLauncher.cs
Modified: trunk/plugins/ComSkipLauncher/ComSkipLauncher.cs
===================================================================
--- trunk/plugins/ComSkipLauncher/ComSkipLauncher.cs 2007-03-10 23:27:29 UTC (rev 177)
+++ trunk/plugins/ComSkipLauncher/ComSkipLauncher.cs 2007-03-11 06:50:10 UTC (rev 178)
@@ -21,6 +21,9 @@
public static readonly string MPConfigFile = Config.GetFolder(Config.Dir.Config) + "\\MediaPortal.xml";
+ public static readonly string DefaultProgram = "C:\\Program Files\\ComSkip\\ComSkip.exe";
+ public static readonly string DefaultParameters = "--playnice --zpcut \"{0}\"";
+
#endregion Constants
#region Members
@@ -43,7 +46,6 @@
else
Recorder.OnTvRecordingEnded += new MediaPortal.TV.Recording.Recorder.OnTvRecordingHandler(Recorder_OnTvRecordingEnded);
}
-
public void Stop()
{
Log.Info("ComSkipLauncher: Stop");
@@ -162,8 +164,8 @@
using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(MPConfigFile))
{
_runAtStart = xmlreader.GetValueAsBool("ComSkipLauncher", "RunAtStart", false);
- _program = xmlreader.GetValueAsString("ComSkipLauncher", "Program", "C:\\ComSkip\\ComSkip.exe");
- _parameters = xmlreader.GetValueAsString("ComSkipLauncher", "Parameters", "--playnice --zpcut \"{0}\"");
+ _program = xmlreader.GetValueAsString("ComSkipLauncher", "Program", DefaultProgram);
+ _parameters = xmlreader.GetValueAsString("ComSkipLauncher", "Parameters", DefaultParameters);
}
}
catch (Exception ex)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ze...@us...> - 2007-03-10 23:27:31
|
Revision: 177
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=177&view=rev
Author: zebons
Date: 2007-03-10 15:27:29 -0800 (Sat, 10 Mar 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/MyFilms/MesFilms.cs
trunk/plugins/MyFilms/MesFilms.csproj
trunk/plugins/MyFilms/MesFilms.suo
trunk/plugins/MyFilms/MesFilmsSetup.Designer.cs
trunk/plugins/MyFilms/MesFilmsSetup.cs
Modified: trunk/plugins/MyFilms/MesFilms.cs
===================================================================
--- trunk/plugins/MyFilms/MesFilms.cs 2007-03-10 14:46:25 UTC (rev 176)
+++ trunk/plugins/MyFilms/MesFilms.cs 2007-03-10 23:27:29 UTC (rev 177)
@@ -580,8 +580,8 @@
if (boolselect)
{
string sLabel = lsCtlFilm.SelectedListItem.Label;
- if (WStrSort == "DateAdded")
- StrSelect = "Date" + " like '" + DateTime.Parse(sLabel).ToShortDateString() + "'";
+ if (WStrSort == "Date")
+ StrSelect = "Date" + " like '" + string.Format("{0:dd/MM/yyyy}",DateTime.Parse(sLabel).ToShortDateString()) + "'";
else
{
if (sLabel == "")
@@ -1006,13 +1006,13 @@
else
{
champselect = enr[WStrSort].ToString();
- arSplit = champselect.Split(Sep, StringSplitOptions.None);//will add "" entries also, //StringSplitOptions.RemoveEmptyEntries
- for (wi = 0; wi < arSplit.Length; wi++)
- if (arSplit[wi].IndexOf("(") > 0)
- w_tableau.Add(arSplit[wi].Substring(0, arSplit[wi].IndexOf("(")).Trim());
- else
- w_tableau.Add(arSplit[wi].Trim());
}
+ arSplit = champselect.Split(Sep, StringSplitOptions.None);//will add "" entries also, //StringSplitOptions.RemoveEmptyEntries
+ for (wi = 0; wi < arSplit.Length; wi++)
+ if (arSplit[wi].IndexOf("(") > 0)
+ w_tableau.Add(arSplit[wi].Substring(0, arSplit[wi].IndexOf("(")).Trim());
+ else
+ w_tableau.Add(arSplit[wi].Trim());
}
if (WStrSortSens == " ASC")
w_tableau.Sort(0, w_tableau.Count, null);
@@ -1225,7 +1225,10 @@
{
if (StrViewDfltText.Length == 0)
{
- Change_view(StrViewDfltItem);
+ if (StrViewDfltItem == StrViewItem1)
+ Change_view("View1");
+ else
+ Change_view("View2");
}
else
// View List as selected
@@ -1315,7 +1318,7 @@
return;
}
if (choice_view == "View1")
- {
+ {
// Change View by "View1":
WStrSort = StrViewItem1; // specific user View1
WStrSortSens = " ASC";
Modified: trunk/plugins/MyFilms/MesFilms.csproj
===================================================================
--- trunk/plugins/MyFilms/MesFilms.csproj 2007-03-10 14:46:25 UTC (rev 176)
+++ trunk/plugins/MyFilms/MesFilms.csproj 2007-03-10 23:27:29 UTC (rev 177)
@@ -31,7 +31,7 @@
<ItemGroup>
<Reference Include="Core, Version=1.0.2548.1824, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\MesFilms\Core_Stable\Core.DLL</HintPath>
+ <HintPath>..\..\mediaportal_plugin\MesFilms\Core_Svn\Core.dll</HintPath>
</Reference>
<Reference Include="Databases, Version=1.0.2548.1828, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
@@ -50,7 +50,7 @@
<Reference Include="System.Xml" />
<Reference Include="Utils, Version=1.0.2548.1816, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\MesFilms\Core_Stable\Utils.DLL</HintPath>
+ <HintPath>..\..\mediaportal_plugin\MesFilms\Core_Svn\Utils.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Modified: trunk/plugins/MyFilms/MesFilms.suo
===================================================================
(Binary files differ)
Modified: trunk/plugins/MyFilms/MesFilmsSetup.Designer.cs
===================================================================
--- trunk/plugins/MyFilms/MesFilmsSetup.Designer.cs 2007-03-10 14:46:25 UTC (rev 176)
+++ trunk/plugins/MyFilms/MesFilmsSetup.Designer.cs 2007-03-10 23:27:29 UTC (rev 177)
@@ -141,6 +141,7 @@
this.AntUpdItem1 = new System.Windows.Forms.ComboBox();
this.AntUpdText1 = new System.Windows.Forms.TextBox();
this.groupBox5 = new System.Windows.Forms.GroupBox();
+ this.TitleDelim = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.AntTitle2 = new System.Windows.Forms.ComboBox();
@@ -160,7 +161,6 @@
this.View_Dflt_Text = new System.Windows.Forms.TextBox();
this.ButDelet = new System.Windows.Forms.Button();
this.Config_Dflt = new System.Windows.Forms.CheckBox();
- this.TitleDelim = new System.Windows.Forms.TextBox();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
@@ -618,6 +618,14 @@
this.groupBox5.TabStop = false;
this.groupBox5.Text = "AnTitle Order";
//
+ // TitleDelim
+ //
+ this.TitleDelim.Location = new System.Drawing.Point(357, 19);
+ this.TitleDelim.MaxLength = 1;
+ this.TitleDelim.Name = "TitleDelim";
+ this.TitleDelim.Size = new System.Drawing.Size(20, 20);
+ this.TitleDelim.TabIndex = 20;
+ //
// label9
//
this.label9.AutoSize = true;
@@ -689,11 +697,11 @@
// label10
//
this.label10.AutoSize = true;
- this.label10.Location = new System.Drawing.Point(755, 40);
+ this.label10.Location = new System.Drawing.Point(746, 40);
this.label10.Name = "label10";
- this.label10.Size = new System.Drawing.Size(60, 13);
+ this.label10.Size = new System.Drawing.Size(69, 13);
this.label10.TabIndex = 34;
- this.label10.Text = "Version 4.0";
+ this.label10.Text = "Version 4.0.1";
//
// textBox1
//
@@ -823,14 +831,6 @@
this.Config_Dflt.UseVisualStyleBackColor = true;
this.Config_Dflt.Enter += new System.EventHandler(this.Config_Name_Control);
//
- // TitleDelim
- //
- this.TitleDelim.Location = new System.Drawing.Point(357, 19);
- this.TitleDelim.MaxLength = 1;
- this.TitleDelim.Name = "TitleDelim";
- this.TitleDelim.Size = new System.Drawing.Size(20, 20);
- this.TitleDelim.TabIndex = 20;
- //
// MesFilmsSetup
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
Modified: trunk/plugins/MyFilms/MesFilmsSetup.cs
===================================================================
--- trunk/plugins/MyFilms/MesFilmsSetup.cs 2007-03-10 14:46:25 UTC (rev 176)
+++ trunk/plugins/MyFilms/MesFilmsSetup.cs 2007-03-10 23:27:29 UTC (rev 177)
@@ -394,6 +394,11 @@
View_Dflt_Text.Text = MyFilms_xmlreader.GetValueAsString(Config_Name.Text.ToString(), "ViewDfltText", "");
if((Config_Name.Text) == MyFilms_xmlreader.GetValueAsString("MyFilms", "Default_Config", ""))
Config_Dflt.Checked = true;
+ if (!(AntViewItem1.Text == "Country") & !(AntViewItem1.Text == "Category") & !(AntViewItem1.Text == "Year") & !(AntViewItem1.Text == "(none)"))
+ View_Dflt_Item.Items.Add(AntViewItem1.Text);
+ if (!(AntViewItem2.Text == "Country") & !(AntViewItem2.Text == "Category") & !(AntViewItem2.Text == "Year") & !(AntViewItem2.Text == "(none)"))
+ View_Dflt_Item.Items.Add(AntViewItem2.Text);
+ View_Dflt_Item.Items.Remove("");
}
private void Refresh_Items()
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <an...@us...> - 2007-03-10 14:46:27
|
Revision: 176
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=176&view=rev
Author: and-81
Date: 2007-03-10 06:46:25 -0800 (Sat, 10 Mar 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/ComSkipLauncher/ComSkipLauncher.cs
trunk/plugins/ComSkipLauncher/ExternalProgram.Designer.cs
trunk/plugins/ComSkipLauncher/ExternalProgram.cs
trunk/plugins/ComSkipLauncher/ExternalProgram.resx
Modified: trunk/plugins/ComSkipLauncher/ComSkipLauncher.cs
===================================================================
--- trunk/plugins/ComSkipLauncher/ComSkipLauncher.cs 2007-03-10 12:06:32 UTC (rev 175)
+++ trunk/plugins/ComSkipLauncher/ComSkipLauncher.cs 2007-03-10 14:46:25 UTC (rev 176)
@@ -25,6 +25,7 @@
#region Members
+ bool _runAtStart;
string _program;
string _parameters;
@@ -37,13 +38,20 @@
Log.Info("ComSkipLauncher: Start");
LoadSettings();
- Recorder.OnTvRecordingEnded += new MediaPortal.TV.Recording.Recorder.OnTvRecordingHandler(Recorder_OnTvRecordingEnded);
+ if (_runAtStart)
+ Recorder.OnTvRecordingStarted += new Recorder.OnTvRecordingHandler(Recorder_OnTvRecordingStarted);
+ else
+ Recorder.OnTvRecordingEnded += new MediaPortal.TV.Recording.Recorder.OnTvRecordingHandler(Recorder_OnTvRecordingEnded);
}
+
public void Stop()
{
Log.Info("ComSkipLauncher: Stop");
-
- Recorder.OnTvRecordingEnded -= new MediaPortal.TV.Recording.Recorder.OnTvRecordingHandler(Recorder_OnTvRecordingEnded);
+
+ if (_runAtStart)
+ Recorder.OnTvRecordingStarted -= new Recorder.OnTvRecordingHandler(Recorder_OnTvRecordingStarted);
+ else
+ Recorder.OnTvRecordingEnded -= new MediaPortal.TV.Recording.Recorder.OnTvRecordingHandler(Recorder_OnTvRecordingEnded);
}
#endregion
@@ -62,9 +70,10 @@
{
LoadSettings();
- ExternalProgram externalProgram = new ExternalProgram(_program, _parameters);
+ ExternalProgram externalProgram = new ExternalProgram(_program, _parameters, _runAtStart);
if (externalProgram.ShowDialog() == DialogResult.OK)
{
+ _runAtStart = externalProgram.RunAtStart;
_program = externalProgram.Program;
_parameters = externalProgram.Parameters;
@@ -82,6 +91,29 @@
#region Implementation
+ void Recorder_OnTvRecordingStarted(string recordingFilename, TVRecording recording, TVProgram program)
+ {
+ Log.Debug("ComSkipLauncher: Recorder_OnTvRecordingStarted {0}", recordingFilename);
+
+ try
+ {
+ string parameters = ProcessParameters(_parameters, recordingFilename);
+
+ Log.Info(
+ "ComSkipLauncher: Recording started ({0}), launching program ({1} {2}) ...",
+ recordingFilename,
+ _program,
+ parameters
+ );
+
+ LaunchProcess(_program, parameters, Path.GetDirectoryName(recordingFilename), ProcessWindowStyle.Hidden);
+ }
+ catch (Exception ex)
+ {
+ Log.Error("ComSkipLauncher: {0}", ex.Message);
+ }
+ }
+
void Recorder_OnTvRecordingEnded(string recordingFilename, TVRecording recording, TVProgram program)
{
Log.Debug("ComSkipLauncher: Recorder_OnTvRecordingEnded {0}", recordingFilename);
@@ -115,14 +147,7 @@
parameters
);
- Process comskip = new Process();
- comskip.StartInfo = new ProcessStartInfo();
- comskip.StartInfo.Arguments = parameters;
- comskip.StartInfo.FileName = _program;
- comskip.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
- comskip.StartInfo.WorkingDirectory = Path.GetDirectoryName(fileName);
-
- comskip.Start();
+ LaunchProcess(_program, parameters, Path.GetDirectoryName(fileName), ProcessWindowStyle.Hidden);
}
catch (Exception ex)
{
@@ -136,6 +161,7 @@
{
using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(MPConfigFile))
{
+ _runAtStart = xmlreader.GetValueAsBool("ComSkipLauncher", "RunAtStart", false);
_program = xmlreader.GetValueAsString("ComSkipLauncher", "Program", "C:\\ComSkip\\ComSkip.exe");
_parameters = xmlreader.GetValueAsString("ComSkipLauncher", "Parameters", "--playnice --zpcut \"{0}\"");
}
@@ -152,6 +178,7 @@
{
using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings(MPConfigFile))
{
+ xmlwriter.SetValueAsBool("ComSkipLauncher", "RunAtStart", _runAtStart);
xmlwriter.SetValue("ComSkipLauncher", "Program", _program);
xmlwriter.SetValue("ComSkipLauncher", "Parameters", _parameters);
}
@@ -162,6 +189,18 @@
}
}
+ void LaunchProcess(string program, string parameters, string workingFolder, ProcessWindowStyle windowStyle)
+ {
+ Process process = new Process();
+ process.StartInfo = new ProcessStartInfo();
+ process.StartInfo.Arguments = parameters;
+ process.StartInfo.FileName = program;
+ process.StartInfo.WindowStyle = windowStyle;
+ process.StartInfo.WorkingDirectory = workingFolder;
+
+ process.Start();
+ }
+
internal static string ProcessParameters(string input, string fileName)
{
string output = String.Empty;
Modified: trunk/plugins/ComSkipLauncher/ExternalProgram.Designer.cs
===================================================================
--- trunk/plugins/ComSkipLauncher/ExternalProgram.Designer.cs 2007-03-10 12:06:32 UTC (rev 175)
+++ trunk/plugins/ComSkipLauncher/ExternalProgram.Designer.cs 2007-03-10 14:46:25 UTC (rev 176)
@@ -28,6 +28,7 @@
/// </summary>
private void InitializeComponent()
{
+ this.components = new System.ComponentModel.Container();
this.textBoxProgram = new System.Windows.Forms.TextBox();
this.labelProgram = new System.Windows.Forms.Label();
this.buttonProgam = new System.Windows.Forms.Button();
@@ -42,25 +43,33 @@
this.textBoxTestFile = new System.Windows.Forms.TextBox();
this.groupBoxTest = new System.Windows.Forms.GroupBox();
this.buttonFindTestFile = new System.Windows.Forms.Button();
+ this.radioButtonLaunchAtStart = new System.Windows.Forms.RadioButton();
+ this.radioButtonLaunchAtEnd = new System.Windows.Forms.RadioButton();
+ this.groupBoxWhen = new System.Windows.Forms.GroupBox();
+ this.groupBoxHow = new System.Windows.Forms.GroupBox();
+ this.toolTips = new System.Windows.Forms.ToolTip(this.components);
this.groupBoxTest.SuspendLayout();
+ this.groupBoxWhen.SuspendLayout();
+ this.groupBoxHow.SuspendLayout();
this.SuspendLayout();
//
// textBoxProgram
//
this.textBoxProgram.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.textBoxProgram.Location = new System.Drawing.Point(8, 24);
+ this.textBoxProgram.Location = new System.Drawing.Point(8, 40);
this.textBoxProgram.Name = "textBoxProgram";
- this.textBoxProgram.Size = new System.Drawing.Size(288, 20);
+ this.textBoxProgram.Size = new System.Drawing.Size(272, 20);
this.textBoxProgram.TabIndex = 1;
+ this.toolTips.SetToolTip(this.textBoxProgram, "The full location of the program to launch");
//
// labelProgram
//
this.labelProgram.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.labelProgram.Location = new System.Drawing.Point(8, 8);
+ this.labelProgram.Location = new System.Drawing.Point(8, 24);
this.labelProgram.Name = "labelProgram";
- this.labelProgram.Size = new System.Drawing.Size(288, 16);
+ this.labelProgram.Size = new System.Drawing.Size(272, 16);
this.labelProgram.TabIndex = 0;
this.labelProgram.Text = "Program:";
this.labelProgram.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@@ -68,21 +77,22 @@
// buttonProgam
//
this.buttonProgam.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonProgam.Location = new System.Drawing.Point(304, 24);
+ this.buttonProgam.Location = new System.Drawing.Point(288, 40);
this.buttonProgam.Name = "buttonProgam";
this.buttonProgam.Size = new System.Drawing.Size(24, 20);
this.buttonProgam.TabIndex = 2;
this.buttonProgam.Text = "...";
+ this.toolTips.SetToolTip(this.buttonProgam, "Locate the program you wish to launch");
this.buttonProgam.UseVisualStyleBackColor = true;
this.buttonProgam.Click += new System.EventHandler(this.buttonProgam_Click);
//
// buttonOK
//
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonOK.Location = new System.Drawing.Point(208, 168);
+ this.buttonOK.Location = new System.Drawing.Point(208, 264);
this.buttonOK.Name = "buttonOK";
this.buttonOK.Size = new System.Drawing.Size(56, 24);
- this.buttonOK.TabIndex = 7;
+ this.buttonOK.TabIndex = 3;
this.buttonOK.Text = "OK";
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
@@ -91,10 +101,10 @@
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
- this.buttonCancel.Location = new System.Drawing.Point(272, 168);
+ this.buttonCancel.Location = new System.Drawing.Point(272, 264);
this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(56, 24);
- this.buttonCancel.TabIndex = 8;
+ this.buttonCancel.TabIndex = 4;
this.buttonCancel.Text = "Cancel";
this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
@@ -103,9 +113,9 @@
//
this.labelParameters.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.labelParameters.Location = new System.Drawing.Point(8, 48);
+ this.labelParameters.Location = new System.Drawing.Point(8, 64);
this.labelParameters.Name = "labelParameters";
- this.labelParameters.Size = new System.Drawing.Size(288, 16);
+ this.labelParameters.Size = new System.Drawing.Size(272, 16);
this.labelParameters.TabIndex = 3;
this.labelParameters.Text = "Parameters:";
this.labelParameters.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@@ -114,10 +124,11 @@
//
this.textBoxParameters.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.textBoxParameters.Location = new System.Drawing.Point(8, 64);
+ this.textBoxParameters.Location = new System.Drawing.Point(8, 80);
this.textBoxParameters.Name = "textBoxParameters";
- this.textBoxParameters.Size = new System.Drawing.Size(288, 20);
+ this.textBoxParameters.Size = new System.Drawing.Size(272, 20);
this.textBoxParameters.TabIndex = 4;
+ this.toolTips.SetToolTip(this.textBoxParameters, "Provide command line parameters for the program");
//
// openFileDialog
//
@@ -126,22 +137,24 @@
// buttonParamQuestion
//
this.buttonParamQuestion.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonParamQuestion.Location = new System.Drawing.Point(304, 64);
+ this.buttonParamQuestion.Location = new System.Drawing.Point(288, 80);
this.buttonParamQuestion.Name = "buttonParamQuestion";
this.buttonParamQuestion.Size = new System.Drawing.Size(24, 20);
this.buttonParamQuestion.TabIndex = 5;
this.buttonParamQuestion.Text = "?";
+ this.toolTips.SetToolTip(this.buttonParamQuestion, "Click here for a list of additional command line parameters");
this.buttonParamQuestion.UseVisualStyleBackColor = true;
this.buttonParamQuestion.Click += new System.EventHandler(this.buttonParamQuestion_Click);
//
// buttonTest
//
this.buttonTest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonTest.Location = new System.Drawing.Point(256, 32);
+ this.buttonTest.Location = new System.Drawing.Point(256, 40);
this.buttonTest.Name = "buttonTest";
this.buttonTest.Size = new System.Drawing.Size(56, 24);
- this.buttonTest.TabIndex = 6;
+ this.buttonTest.TabIndex = 3;
this.buttonTest.Text = "Test";
+ this.toolTips.SetToolTip(this.buttonTest, "Click here to test the above settings");
this.buttonTest.UseVisualStyleBackColor = true;
this.buttonTest.Click += new System.EventHandler(this.buttonTest_Click);
//
@@ -149,21 +162,22 @@
//
this.labelFile.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.labelFile.Location = new System.Drawing.Point(8, 16);
+ this.labelFile.Location = new System.Drawing.Point(8, 24);
this.labelFile.Name = "labelFile";
this.labelFile.Size = new System.Drawing.Size(208, 16);
- this.labelFile.TabIndex = 9;
- this.labelFile.Text = "File:";
+ this.labelFile.TabIndex = 0;
+ this.labelFile.Text = "File to test with:";
this.labelFile.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// textBoxTestFile
//
this.textBoxTestFile.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.textBoxTestFile.Location = new System.Drawing.Point(8, 32);
+ this.textBoxTestFile.Location = new System.Drawing.Point(8, 40);
this.textBoxTestFile.Name = "textBoxTestFile";
this.textBoxTestFile.Size = new System.Drawing.Size(208, 20);
- this.textBoxTestFile.TabIndex = 10;
+ this.textBoxTestFile.TabIndex = 1;
+ this.toolTips.SetToolTip(this.textBoxTestFile, "File to test launch with");
//
// groupBoxTest
//
@@ -173,50 +187,104 @@
this.groupBoxTest.Controls.Add(this.textBoxTestFile);
this.groupBoxTest.Controls.Add(this.buttonTest);
this.groupBoxTest.Controls.Add(this.labelFile);
- this.groupBoxTest.Location = new System.Drawing.Point(8, 96);
+ this.groupBoxTest.Location = new System.Drawing.Point(8, 184);
this.groupBoxTest.Name = "groupBoxTest";
- this.groupBoxTest.Size = new System.Drawing.Size(320, 64);
- this.groupBoxTest.TabIndex = 11;
+ this.groupBoxTest.Size = new System.Drawing.Size(320, 72);
+ this.groupBoxTest.TabIndex = 2;
this.groupBoxTest.TabStop = false;
- this.groupBoxTest.Text = "Test";
+ this.groupBoxTest.Text = "Test run";
//
// buttonFindTestFile
//
this.buttonFindTestFile.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonFindTestFile.Location = new System.Drawing.Point(224, 32);
+ this.buttonFindTestFile.Location = new System.Drawing.Point(224, 40);
this.buttonFindTestFile.Name = "buttonFindTestFile";
this.buttonFindTestFile.Size = new System.Drawing.Size(24, 20);
- this.buttonFindTestFile.TabIndex = 11;
+ this.buttonFindTestFile.TabIndex = 2;
this.buttonFindTestFile.Text = "...";
+ this.toolTips.SetToolTip(this.buttonFindTestFile, "Click here to locate a file to test with");
this.buttonFindTestFile.UseVisualStyleBackColor = true;
this.buttonFindTestFile.Click += new System.EventHandler(this.buttonFindTestFile_Click);
//
+ // radioButtonLaunchAtStart
+ //
+ this.radioButtonLaunchAtStart.Anchor = System.Windows.Forms.AnchorStyles.Top;
+ this.radioButtonLaunchAtStart.Location = new System.Drawing.Point(8, 16);
+ this.radioButtonLaunchAtStart.Name = "radioButtonLaunchAtStart";
+ this.radioButtonLaunchAtStart.Size = new System.Drawing.Size(144, 24);
+ this.radioButtonLaunchAtStart.TabIndex = 0;
+ this.radioButtonLaunchAtStart.Text = "When recording starts";
+ this.toolTips.SetToolTip(this.radioButtonLaunchAtStart, "Launch ComSkip as soon as the recording starts (this requires the LiveTV setting " +
+ "in comskip.ini)");
+ this.radioButtonLaunchAtStart.UseVisualStyleBackColor = true;
+ //
+ // radioButtonLaunchAtEnd
+ //
+ this.radioButtonLaunchAtEnd.Anchor = System.Windows.Forms.AnchorStyles.Top;
+ this.radioButtonLaunchAtEnd.Checked = true;
+ this.radioButtonLaunchAtEnd.Location = new System.Drawing.Point(168, 16);
+ this.radioButtonLaunchAtEnd.Name = "radioButtonLaunchAtEnd";
+ this.radioButtonLaunchAtEnd.Size = new System.Drawing.Size(144, 24);
+ this.radioButtonLaunchAtEnd.TabIndex = 1;
+ this.radioButtonLaunchAtEnd.TabStop = true;
+ this.radioButtonLaunchAtEnd.Text = "When recording ends";
+ this.toolTips.SetToolTip(this.radioButtonLaunchAtEnd, "Launch ComSkip to process the recording after it has finished");
+ this.radioButtonLaunchAtEnd.UseVisualStyleBackColor = true;
+ //
+ // groupBoxWhen
+ //
+ this.groupBoxWhen.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.groupBoxWhen.Controls.Add(this.radioButtonLaunchAtStart);
+ this.groupBoxWhen.Controls.Add(this.radioButtonLaunchAtEnd);
+ this.groupBoxWhen.Location = new System.Drawing.Point(8, 8);
+ this.groupBoxWhen.Name = "groupBoxWhen";
+ this.groupBoxWhen.Size = new System.Drawing.Size(320, 48);
+ this.groupBoxWhen.TabIndex = 0;
+ this.groupBoxWhen.TabStop = false;
+ this.groupBoxWhen.Text = "When to run";
+ //
+ // groupBoxHow
+ //
+ this.groupBoxHow.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.groupBoxHow.Controls.Add(this.labelProgram);
+ this.groupBoxHow.Controls.Add(this.textBoxProgram);
+ this.groupBoxHow.Controls.Add(this.buttonProgam);
+ this.groupBoxHow.Controls.Add(this.buttonParamQuestion);
+ this.groupBoxHow.Controls.Add(this.textBoxParameters);
+ this.groupBoxHow.Controls.Add(this.labelParameters);
+ this.groupBoxHow.Location = new System.Drawing.Point(8, 64);
+ this.groupBoxHow.Name = "groupBoxHow";
+ this.groupBoxHow.Size = new System.Drawing.Size(320, 112);
+ this.groupBoxHow.TabIndex = 1;
+ this.groupBoxHow.TabStop = false;
+ this.groupBoxHow.Text = "How to run";
+ //
// ExternalProgram
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(336, 200);
+ this.ClientSize = new System.Drawing.Size(336, 296);
+ this.Controls.Add(this.groupBoxHow);
+ this.Controls.Add(this.groupBoxWhen);
this.Controls.Add(this.groupBoxTest);
- this.Controls.Add(this.buttonParamQuestion);
- this.Controls.Add(this.labelParameters);
- this.Controls.Add(this.textBoxParameters);
this.Controls.Add(this.buttonCancel);
this.Controls.Add(this.buttonOK);
- this.Controls.Add(this.buttonProgam);
- this.Controls.Add(this.labelProgram);
- this.Controls.Add(this.textBoxProgram);
this.MaximizeBox = false;
this.MinimizeBox = false;
- this.MinimumSize = new System.Drawing.Size(352, 236);
+ this.MinimumSize = new System.Drawing.Size(352, 332);
this.Name = "ExternalProgram";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
- this.Text = "ComSkip Program Details";
+ this.Text = "ComSkip Launcher";
this.groupBoxTest.ResumeLayout(false);
this.groupBoxTest.PerformLayout();
+ this.groupBoxWhen.ResumeLayout(false);
+ this.groupBoxHow.ResumeLayout(false);
+ this.groupBoxHow.PerformLayout();
this.ResumeLayout(false);
- this.PerformLayout();
}
@@ -236,5 +304,10 @@
private System.Windows.Forms.TextBox textBoxTestFile;
private System.Windows.Forms.GroupBox groupBoxTest;
private System.Windows.Forms.Button buttonFindTestFile;
+ private System.Windows.Forms.RadioButton radioButtonLaunchAtStart;
+ private System.Windows.Forms.RadioButton radioButtonLaunchAtEnd;
+ private System.Windows.Forms.GroupBox groupBoxWhen;
+ private System.Windows.Forms.GroupBox groupBoxHow;
+ private System.Windows.Forms.ToolTip toolTips;
}
}
\ No newline at end of file
Modified: trunk/plugins/ComSkipLauncher/ExternalProgram.cs
===================================================================
--- trunk/plugins/ComSkipLauncher/ExternalProgram.cs 2007-03-10 12:06:32 UTC (rev 175)
+++ trunk/plugins/ComSkipLauncher/ExternalProgram.cs 2007-03-10 14:46:25 UTC (rev 176)
@@ -30,6 +30,11 @@
#region Properties
+ public bool RunAtStart
+ {
+ get { return radioButtonLaunchAtStart.Checked; }
+ set { radioButtonLaunchAtStart.Checked = value; }
+ }
public string Program
{
get { return textBoxProgram.Text; }
@@ -43,10 +48,11 @@
#region Constructors
- public ExternalProgram(string program, string parameters)
+ public ExternalProgram(string program, string parameters, bool runAtStart)
{
InitializeComponent();
+ radioButtonLaunchAtStart.Checked = runAtStart;
textBoxProgram.Text = program;
textBoxParameters.Text = parameters;
}
Modified: trunk/plugins/ComSkipLauncher/ExternalProgram.resx
===================================================================
--- trunk/plugins/ComSkipLauncher/ExternalProgram.resx 2007-03-10 12:06:32 UTC (rev 175)
+++ trunk/plugins/ComSkipLauncher/ExternalProgram.resx 2007-03-10 14:46:25 UTC (rev 176)
@@ -117,7 +117,13 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
+ <metadata name="toolTips.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>150, 17</value>
+ </metadata>
<metadata name="openFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
+ <metadata name="toolTips.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>150, 17</value>
+ </metadata>
</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-03-10 12:06:33
|
Revision: 175
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=175&view=rev
Author: and-81
Date: 2007-03-10 04:06:32 -0800 (Sat, 10 Mar 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/ComSkipLauncher/ExternalProgram.Designer.cs
Modified: trunk/plugins/ComSkipLauncher/ExternalProgram.Designer.cs
===================================================================
--- trunk/plugins/ComSkipLauncher/ExternalProgram.Designer.cs 2007-03-10 12:01:08 UTC (rev 174)
+++ trunk/plugins/ComSkipLauncher/ExternalProgram.Designer.cs 2007-03-10 12:06:32 UTC (rev 175)
@@ -122,7 +122,6 @@
// openFileDialog
//
this.openFileDialog.Filter = "All files|*.*";
- this.openFileDialog.Title = "Select Program Executable";
//
// buttonParamQuestion
//
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <an...@us...> - 2007-03-10 12:01:14
|
Revision: 174
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=174&view=rev
Author: and-81
Date: 2007-03-10 04:01:08 -0800 (Sat, 10 Mar 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/ComSkipLauncher/ExternalProgram.Designer.cs
trunk/plugins/ComSkipLauncher/ExternalProgram.cs
Modified: trunk/plugins/ComSkipLauncher/ExternalProgram.Designer.cs
===================================================================
--- trunk/plugins/ComSkipLauncher/ExternalProgram.Designer.cs 2007-03-10 10:53:59 UTC (rev 173)
+++ trunk/plugins/ComSkipLauncher/ExternalProgram.Designer.cs 2007-03-10 12:01:08 UTC (rev 174)
@@ -41,6 +41,7 @@
this.labelFile = new System.Windows.Forms.Label();
this.textBoxTestFile = new System.Windows.Forms.TextBox();
this.groupBoxTest = new System.Windows.Forms.GroupBox();
+ this.buttonFindTestFile = new System.Windows.Forms.Button();
this.groupBoxTest.SuspendLayout();
this.SuspendLayout();
//
@@ -151,7 +152,7 @@
| System.Windows.Forms.AnchorStyles.Right)));
this.labelFile.Location = new System.Drawing.Point(8, 16);
this.labelFile.Name = "labelFile";
- this.labelFile.Size = new System.Drawing.Size(240, 16);
+ this.labelFile.Size = new System.Drawing.Size(208, 16);
this.labelFile.TabIndex = 9;
this.labelFile.Text = "File:";
this.labelFile.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@@ -162,13 +163,14 @@
| System.Windows.Forms.AnchorStyles.Right)));
this.textBoxTestFile.Location = new System.Drawing.Point(8, 32);
this.textBoxTestFile.Name = "textBoxTestFile";
- this.textBoxTestFile.Size = new System.Drawing.Size(240, 20);
+ this.textBoxTestFile.Size = new System.Drawing.Size(208, 20);
this.textBoxTestFile.TabIndex = 10;
//
// groupBoxTest
//
this.groupBoxTest.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
+ this.groupBoxTest.Controls.Add(this.buttonFindTestFile);
this.groupBoxTest.Controls.Add(this.textBoxTestFile);
this.groupBoxTest.Controls.Add(this.buttonTest);
this.groupBoxTest.Controls.Add(this.labelFile);
@@ -179,6 +181,17 @@
this.groupBoxTest.TabStop = false;
this.groupBoxTest.Text = "Test";
//
+ // buttonFindTestFile
+ //
+ this.buttonFindTestFile.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonFindTestFile.Location = new System.Drawing.Point(224, 32);
+ this.buttonFindTestFile.Name = "buttonFindTestFile";
+ this.buttonFindTestFile.Size = new System.Drawing.Size(24, 20);
+ this.buttonFindTestFile.TabIndex = 11;
+ this.buttonFindTestFile.Text = "...";
+ this.buttonFindTestFile.UseVisualStyleBackColor = true;
+ this.buttonFindTestFile.Click += new System.EventHandler(this.buttonFindTestFile_Click);
+ //
// ExternalProgram
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -223,5 +236,6 @@
private System.Windows.Forms.Label labelFile;
private System.Windows.Forms.TextBox textBoxTestFile;
private System.Windows.Forms.GroupBox groupBoxTest;
+ private System.Windows.Forms.Button buttonFindTestFile;
}
}
\ No newline at end of file
Modified: trunk/plugins/ComSkipLauncher/ExternalProgram.cs
===================================================================
--- trunk/plugins/ComSkipLauncher/ExternalProgram.cs 2007-03-10 10:53:59 UTC (rev 173)
+++ trunk/plugins/ComSkipLauncher/ExternalProgram.cs 2007-03-10 12:01:08 UTC (rev 174)
@@ -55,6 +55,7 @@
private void buttonProgam_Click(object sender, EventArgs e)
{
+ openFileDialog.Title = "Select Program To Execute";
if (openFileDialog.ShowDialog(this) == DialogResult.OK)
textBoxProgram.Text = openFileDialog.FileName;
}
@@ -107,6 +108,13 @@
}
}
+ private void buttonFindTestFile_Click(object sender, EventArgs e)
+ {
+ openFileDialog.Title = "Select Test File";
+ if (openFileDialog.ShowDialog(this) == DialogResult.OK)
+ textBoxTestFile.Text = openFileDialog.FileName;
+ }
+
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <an...@us...> - 2007-03-10 10:54:03
|
Revision: 173
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=173&view=rev
Author: and-81
Date: 2007-03-10 02:53:59 -0800 (Sat, 10 Mar 2007)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/ComSkipLauncher/ExternalProgram.Designer.cs
trunk/plugins/ComSkipLauncher/ExternalProgram.cs
Modified: trunk/plugins/ComSkipLauncher/ExternalProgram.Designer.cs
===================================================================
--- trunk/plugins/ComSkipLauncher/ExternalProgram.Designer.cs 2007-03-10 08:27:43 UTC (rev 172)
+++ trunk/plugins/ComSkipLauncher/ExternalProgram.Designer.cs 2007-03-10 10:53:59 UTC (rev 173)
@@ -38,6 +38,10 @@
this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
this.buttonParamQuestion = new System.Windows.Forms.Button();
this.buttonTest = new System.Windows.Forms.Button();
+ this.labelFile = new System.Windows.Forms.Label();
+ this.textBoxTestFile = new System.Windows.Forms.TextBox();
+ this.groupBoxTest = new System.Windows.Forms.GroupBox();
+ this.groupBoxTest.SuspendLayout();
this.SuspendLayout();
//
// textBoxProgram
@@ -74,7 +78,7 @@
// buttonOK
//
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.buttonOK.Location = new System.Drawing.Point(208, 96);
+ this.buttonOK.Location = new System.Drawing.Point(208, 168);
this.buttonOK.Name = "buttonOK";
this.buttonOK.Size = new System.Drawing.Size(56, 24);
this.buttonOK.TabIndex = 7;
@@ -86,7 +90,7 @@
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
- this.buttonCancel.Location = new System.Drawing.Point(272, 96);
+ this.buttonCancel.Location = new System.Drawing.Point(272, 168);
this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(56, 24);
this.buttonCancel.TabIndex = 8;
@@ -132,8 +136,8 @@
//
// buttonTest
//
- this.buttonTest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.buttonTest.Location = new System.Drawing.Point(8, 96);
+ this.buttonTest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.buttonTest.Location = new System.Drawing.Point(256, 32);
this.buttonTest.Name = "buttonTest";
this.buttonTest.Size = new System.Drawing.Size(56, 24);
this.buttonTest.TabIndex = 6;
@@ -141,12 +145,46 @@
this.buttonTest.UseVisualStyleBackColor = true;
this.buttonTest.Click += new System.EventHandler(this.buttonTest_Click);
//
+ // labelFile
+ //
+ this.labelFile.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.labelFile.Location = new System.Drawing.Point(8, 16);
+ this.labelFile.Name = "labelFile";
+ this.labelFile.Size = new System.Drawing.Size(240, 16);
+ this.labelFile.TabIndex = 9;
+ this.labelFile.Text = "File:";
+ this.labelFile.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // textBoxTestFile
+ //
+ this.textBoxTestFile.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.textBoxTestFile.Location = new System.Drawing.Point(8, 32);
+ this.textBoxTestFile.Name = "textBoxTestFile";
+ this.textBoxTestFile.Size = new System.Drawing.Size(240, 20);
+ this.textBoxTestFile.TabIndex = 10;
+ //
+ // groupBoxTest
+ //
+ this.groupBoxTest.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.groupBoxTest.Controls.Add(this.textBoxTestFile);
+ this.groupBoxTest.Controls.Add(this.buttonTest);
+ this.groupBoxTest.Controls.Add(this.labelFile);
+ this.groupBoxTest.Location = new System.Drawing.Point(8, 96);
+ this.groupBoxTest.Name = "groupBoxTest";
+ this.groupBoxTest.Size = new System.Drawing.Size(320, 64);
+ this.groupBoxTest.TabIndex = 11;
+ this.groupBoxTest.TabStop = false;
+ this.groupBoxTest.Text = "Test";
+ //
// ExternalProgram
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(336, 128);
- this.Controls.Add(this.buttonTest);
+ this.ClientSize = new System.Drawing.Size(336, 200);
+ this.Controls.Add(this.groupBoxTest);
this.Controls.Add(this.buttonParamQuestion);
this.Controls.Add(this.labelParameters);
this.Controls.Add(this.textBoxParameters);
@@ -157,12 +195,14 @@
this.Controls.Add(this.textBoxProgram);
this.MaximizeBox = false;
this.MinimizeBox = false;
- this.MinimumSize = new System.Drawing.Size(352, 164);
+ this.MinimumSize = new System.Drawing.Size(352, 236);
this.Name = "ExternalProgram";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "ComSkip Program Details";
+ this.groupBoxTest.ResumeLayout(false);
+ this.groupBoxTest.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
@@ -180,5 +220,8 @@
private System.Windows.Forms.OpenFileDialog openFileDialog;
private System.Windows.Forms.Button buttonParamQuestion;
private System.Windows.Forms.Button buttonTest;
+ private System.Windows.Forms.Label labelFile;
+ private System.Windows.Forms.TextBox textBoxTestFile;
+ private System.Windows.Forms.GroupBox groupBoxTest;
}
}
\ No newline at end of file
Modified: trunk/plugins/ComSkipLauncher/ExternalProgram.cs
===================================================================
--- trunk/plugins/ComSkipLauncher/ExternalProgram.cs 2007-03-10 08:27:43 UTC (rev 172)
+++ trunk/plugins/ComSkipLauncher/ExternalProgram.cs 2007-03-10 10:53:59 UTC (rev 173)
@@ -92,12 +92,11 @@
try
{
- string parameters = ComSkipLauncher.ProcessParameters(textBoxParameters.Text, "test.file");
+ string parameters = ComSkipLauncher.ProcessParameters(textBoxParameters.Text, textBoxTestFile.Text);
Process process = new Process();
process.StartInfo.Arguments = parameters;
process.StartInfo.FileName = textBoxProgram.Text;
- process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
process.StartInfo.WorkingDirectory = Path.GetDirectoryName(textBoxProgram.Text);
process.Start();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|