initial oogynize check in _ this actually used to work!

This commit is contained in:
2016-02-14 21:16:31 -08:00
parent b183af5d55
commit 532ea133bc
337 changed files with 30692 additions and 0 deletions

View File

@@ -0,0 +1,56 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using Foo.Platform.Win32;
using System.Runtime.InteropServices;
using System.Diagnostics;
namespace Foo.WorkspaceMgr.Launchers
{
internal class Launcher_Generic : ILaunch
{
#region ILaunch Members
/// <summary>
/// Checks to see if the file exists in the system i.e. can be reached over
/// the network. if FileExists fails, we shouldn't be able to launch it.
/// </summary>
/// <param name="strArtifactLocation">location of the path + file to launch</param>
/// <returns></returns>
public FuncDepBoolType IQueryLaunch(string strArtifactLocation)
{
if (!String.IsNullOrEmpty(strArtifactLocation) && (strArtifactLocation.Length > 3))
{
if (File.Exists(strArtifactLocation))
return FuncDepBoolType.Success;
else
return FuncDepBoolType.ArtifactLocationUnavailable;
}
else
{
return FuncDepBoolType.ParametersInvalid;
}
}
/// <summary>
/// Generic Launcher should be able to handle any file type. Launched the .Net Way.
/// ~this is the same as if the User clicks on the file.
/// </summary>
/// <param name="strArtifactLocation">location of the path + file to launch</param>
/// <returns></returns>
public FuncDepBoolType ILaunch(string strArtifactLocation)
{
if (!String.IsNullOrEmpty(strArtifactLocation) && (strArtifactLocation.Length > 3))
{
Process.Start(strArtifactLocation);
return FuncDepBoolType.Success;
}
return FuncDepBoolType.ParametersInvalid;
}
#endregion
}
}