没有任何数据可供显示
| 开源项目社区 | 当前位置 : |
|
| www.trustie.net/open_source_projects | 主页 > 开源项目社区 > farnet |
|
farnet
|
| 1 | 0 | 557 |
| 贡献者 | 讨论 | 代码提交 |
FarNet: .NET API and infrastructure for .NET modules in Far Manager. FarNet exposes the Far Manager API in comfortable object oriented way. PowerShell scripting is provided by the PowerShellFar module.
PowerShellFar: Implements Windows PowerShell host in Far Manager, user interface for invoking commands and scripts, and exposes underlying FarNet object model. The package includes scripts for many popular Far Manager tasks and PowerShell.hrc for Colorer providing rich PowerShell syntax highlighting.
"Hello" in C# (FarNet module adding "Hello" to Far Manager plugin menus)
using System;
using FarNet;
[System.Runtime.InteropServices.Guid("8f7ba3b1-7fe9-4912-9f30-b2f43ef47310")]
[ModuleTool(Name = "Hello", Options = ModuleToolOptions.AllMenus)]
public class Hello : ModuleTool
{
public override void Invoke(object sender, ModuleToolEventArgs e)
{
Far.Net.Message("Hello world");
}
}"Hello" in PowerShell (PowerShellFar)
'Hello world'"Hello" in PowerShell in a message box
$Far.Message('Hello world')"Hello" in PowerShell in the editor
$editor = $Far.CreateEditor()
$editor.FileName = 'Test.txt'
$editor.Open()
$editor.Add('Hello world')
$editor.Redraw()"Hello" in PowerShell in a panel item
$panel = $Far.CreatePanel()
$file = New-FarFile 'Hello world'
$panel.Files.Add($file)
$panel.Open()
标签:
