|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using DocExp.Attributes;
using DocExp.Enums;
namespace DocExp.Actions
{
[ActionAttributes(ActionName = "Open", IsDefaultAction = false, ActionsGroupTypes =new GroupTypes[]{ GroupTypes.File , GroupTypes.Drive ,GroupTypes.Folder , GroupTypes.FolderUp})]
public class Open : DocExp.AbstractClasses.Action
{
public override void DoAction(string path, FileType parFileType, frmMain frm)
{
try
{
if (parFileType.Group.GroupType == GroupTypes.File)
{
if (FileExists(path))
{
Process.Start(path);
}
}
else
{
if (DirectoryExists(path))
{
frm.LoadSubFilesAndFolders(path);
}
}
}
catch (Exception)
{
ShowError("An error occured while opening file");
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.