Skip to content

Commit

Permalink
added support for multiple applications
Browse files Browse the repository at this point in the history
  • Loading branch information
piksel committed Apr 23, 2012
1 parent 634091b commit 79e3f88
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
20 changes: 13 additions & 7 deletions Program.cs
Expand Up @@ -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);
Expand All @@ -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,
Expand Down
5 changes: 4 additions & 1 deletion forever.csproj
Expand Up @@ -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>
Expand All @@ -32,6 +32,9 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
Expand Down
2 changes: 1 addition & 1 deletion forever.csproj.user
@@ -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>
Binary file modified forever.suo
Binary file not shown.

0 comments on commit 79e3f88

Please sign in to comment.