Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added support for multiple applications

  • Loading branch information...
commit 79e3f88c684f55a44a05bf53dbc233fec10f8c6b 1 parent 634091b
@piksel authored
View
20 Program.cs
@@ -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
5 forever.csproj
@@ -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
2  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>
View
BIN  forever.suo
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.