Permalink
Browse files

added support for multiple applications

  • Loading branch information...
1 parent 634091b commit 79e3f88c684f55a44a05bf53dbc233fec10f8c6b @piksel committed Apr 23, 2012
Showing with 18 additions and 9 deletions.
  1. +13 −7 Program.cs
  2. +4 −1 forever.csproj
  3. +1 −1 forever.csproj.user
  4. BIN forever.suo
View
@@ -15,18 +15,24 @@ class Program
static void Main(string[] args)
{
- if (args.Length < 1)
+ if (args.Length == 0 || (args.Length & 1)==1)
{
Usage();
return;
}
- string fileName = args[0];
- string fileArgs = "";
- for(int i=1;i<args.Length;i++)
- fileArgs += " "+args[i];
+ string[] fileName = new string[args.Length / 2];
+ string[] fileArgs = new string[args.Length / 2];
- StartAndWatch(fileName, fileArgs);
+ for(int i=0;i<args.Length/2;i++){
+ //fileArgs[i] = args[i*2+1];
+ //fileName[i] = args[i*2];
+ StartAndWatch(args[i*2], args[i*2+1]);
+ }
+
+ //Console.ReadLine(); return;
+
+ //StartAndWatch(fileName[0], fileArgs[0]);
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
@@ -38,7 +44,7 @@ static void Main(string[] args)
static void Usage()
{
MessageBox.Show(
- "usage:\n\nforever <application>",
+ "usage:\n\nforever <application> \"<arguments>\" ",
"forever usage",
MessageBoxButtons.OK,
MessageBoxIcon.Information,
View
@@ -6,7 +6,7 @@
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{EFD27244-765D-42A2-BC0E-FEF1F5BF0619}</ProjectGuid>
- <OutputType>Exe</OutputType>
+ <OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>forever</RootNamespace>
<AssemblyName>forever</AssemblyName>
@@ -32,6 +32,9 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
+ <PropertyGroup>
+ <StartupObject />
+ </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
View
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
- <StartArguments>cmd</StartArguments>
+ <StartArguments>cmd "" ping "localhost"</StartArguments>
</PropertyGroup>
</Project>
View
Binary file not shown.

0 comments on commit 79e3f88

Please sign in to comment.