initial oogynize check in _ this actually used to work!
This commit is contained in:
47
WorkspaceMgr/Launchers/Launcher_Web.cs
Normal file
47
WorkspaceMgr/Launchers/Launcher_Web.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Foo.WorkspaceMgr.Launchers
|
||||
{
|
||||
class Launcher_Web : ILaunch
|
||||
{
|
||||
#region ILaunch Members
|
||||
|
||||
/// <summary>
|
||||
/// Checks to see if the url is valid
|
||||
/// ~~( We could even check if the webpage is available here!!!) ~to do later?
|
||||
/// </summary>
|
||||
/// <param name="strArtifactLocation">url to launch</param>
|
||||
/// <returns></returns>
|
||||
public FuncDepBoolType IQueryLaunch(string strArtifactLocation)
|
||||
{
|
||||
if (!String.IsNullOrEmpty(strArtifactLocation) && (strArtifactLocation.Length > 3))
|
||||
{
|
||||
if (Uri.IsWellFormedUriString(strArtifactLocation, UriKind.Absolute))
|
||||
return FuncDepBoolType.Success;
|
||||
else
|
||||
return FuncDepBoolType.Failed;
|
||||
}
|
||||
return FuncDepBoolType.ParametersInvalid;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generic Launcher should be able to handle any url type
|
||||
/// </summary>
|
||||
/// <param name="strArtifactLocation">url to launch</param>
|
||||
public FuncDepBoolType ILaunch(string strArtifactLocation)
|
||||
{
|
||||
if (!String.IsNullOrEmpty(strArtifactLocation) && (strArtifactLocation.Length > 3))
|
||||
{
|
||||
Process.Start(strArtifactLocation);
|
||||
return FuncDepBoolType.Success;
|
||||
}
|
||||
return FuncDepBoolType.ParametersInvalid;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user