|
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] |