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 /// /// Checks to see if the url is valid /// ~~( We could even check if the webpage is available here!!!) ~to do later? /// /// url to launch /// 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; } /// /// Generic Launcher should be able to handle any url type /// /// url to launch public FuncDepBoolType ILaunch(string strArtifactLocation) { if (!String.IsNullOrEmpty(strArtifactLocation) && (strArtifactLocation.Length > 3)) { Process.Start(strArtifactLocation); return FuncDepBoolType.Success; } return FuncDepBoolType.ParametersInvalid; } #endregion } }