using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Foo.Platform.Win32;
namespace Foo.WorkspaceMgr.Hiders
{
internal class ShowNHide_Generic : IShowNHide
{
#region IShowNHide Members
///
/// Default behavior is to just return success ** Should Check if Window is hidden?/shown???
///
/// location of the path + file to launch
///
public FuncDepBoolType IQueryShow(string strArtifactLocation)
{
if (!String.IsNullOrEmpty(strArtifactLocation))
return FuncDepBoolType.Success;
return FuncDepBoolType.ParametersInvalid;
}
///
/// Calls ShowWindow to Show the Window
///
/// location of the path + file to launch
///
public FuncDepBoolType IShow(string strArtifactLocation)
{
if (!String.IsNullOrEmpty(strArtifactLocation))
{
IntPtr hWnd = IntPtr.Zero; // ToDo : Implement RAT
Win32Functions.ShowWindow(hWnd, (int)WindowAction.SW_SHOW);
return FuncDepBoolType.Success;
}
return FuncDepBoolType.ParametersInvalid;
}
///
/// Default behavior is to just return success ** Should Check if Window is hidden?/shown???
///
/// location of the path + file to launch
///
public FuncDepBoolType IQueryHide(string strArtifactLocation)
{
if (!String.IsNullOrEmpty(strArtifactLocation))
return FuncDepBoolType.Success;
return FuncDepBoolType.ParametersInvalid;
}
///
/// Calls ShowWindow to Hide the Window
///
/// location of the path + file to launch
///
public FuncDepBoolType IHide(string strArtifactLocation)
{
if (!String.IsNullOrEmpty(strArtifactLocation))
{
IntPtr hWnd = IntPtr.Zero; // ToDo : Implement RAT
Win32Functions.ShowWindow(hWnd, (int)WindowAction.SW_HIDE);
return FuncDepBoolType.Success;
}
return FuncDepBoolType.ParametersInvalid;
}
#endregion
}
}