My favorites | Sign in
Logo
                
People details
Project owners:
  mbelugin, nightroman
Project committers:
konstantin.dyakov

FarNet. Allows you to write plugins for Far Manager in any .NET language (or even in PowerShell with PowerShellFar plugin). It exposes significant part of Far Manager API and extends it for comfortable use in object oriented way. It is implemented in C# and C++/CLI.

PowerShellFar. Implements Windows PowerShell host in Far Manager and user interface for invoking commands and scripts. PowerShell code can access and control Far Manager functionality with FarNet object model. The package includes ready to use scripts for various popular Far Manager tasks and PowerShell.hrc for Colorer-take5.beta5 providing rich PowerShell syntax highlighting.

Included PowerShell scripts cover large part of implemented FarNet functionality, so that they can be used at least as examples; it is just a technical task to translate them into any .NET language.

"Hello" in C# (FarNet)

using FarNet;
public class CSTool : ToolPlugin
{
	public override void Invoke(object sender, ToolEventArgs e)
	{
		Far.Msg("Hello " + Name + " " + e.From);
	}
}

"Hello" in PowerShell (PowerShellFar)

'Hello world!'

"Hello" in PowerShell in a message box

$Far.Msg('Hello world!')

"Hello" in PowerShell in the editor

$editor = $Far.CreateEditor()
$editor.FileName = 'Test.txt'
$editor.Open()
$editor.Insert("Hello world")
$editor.Redraw()

"Hello" in PowerShell in a panel item

$panel = $Far.CreatePluginPanel()
$file = New-FarFile "Hello world"
$panel.Files.Add($file)
$panel.Open()

(FAR.NET 3.x only!) "Hello" in IronPython (IronPythonFar)

def hello(sender, e):
	far.Msg("Hello IronPython " + e.From.ToString())
far.RegisterTool(None, "Hello IronPython", hello, FarManager.ToolOptions.AllAreas)








Hosted by Google Code