Make your own free website on Tripod.com

.NET-plugins for Far file manager v.2

Russian version
Similar programm
Script for FAR


Supporting  of plagins  for the Far file manager created with use of Microsoft .Net Framework.

ARCHITECTURE

The dispatcher of .NET-plugins (COM-object "Far.Plugins.NET") is started by plugin SHPCE.
After start the dispatcher loads from assemblies and text files in a folder bin\Plugins the classes being successors of base class Far.Net.FarNetPlugin.
Plagins in which the appropriate field is established, are located in the plugins menu (F11), the others are deduced in the menu after a choice item ".NET Plugins".
Plagins can register prefixes of a command line processable by them.
Plagins it is possible to add and load' without restarting of Far.

INSTALLATION:

  • Components function on computers with Windows 98/2000/XP/2003
  • It is necessary to establish last version Microsoft .NET Framework (not below 1.1)
  • It is necessary to establish last version of plagin SHPCE (not below b1).
  • Take from archive and start installer Far.Net.2.Setup.msi
  • In a file plugins.cfg in folder Far\Plugins\SHPCE\cfg add a line "Far.Plugins.NET".
  • Restart Far.

Plagins in delivery

  1. Hello.dll  - speaks "Hello" in different kinds.
    Also can serve as preparation for new plagins.
    • HelloSrc.vb - the same, without compilation.
    • HelloFromJsSrc.js - the same, in language jscript.net

    It is written in language VB.NET.
     

  2. CsHello.dll
    Speaks "Hello" in the menu of plug-ins on F11 (a line "Hello from C#, user").
    It is written in language C#.
     
  3. js7.dll  - executes programs on jscript.net
    On a prefix js7: the program which is taking place in a command line or in a file is carried out.
    For example:
    js7:Far.Msg("Hello!") or
    js7:js.hello (js.hello - the file with the text of the program)
     
  4. guid.dll  - inserts into the buffer value of GUID
    On a prefix guid:[empty] or at a choice of the appropriate item of the plugins menu inserts in the buffer value guid.
     
  5. md5.dll - operations with md5-digests
    On a prefix md5n:<filename> actions with "md5-checksum" are carried out:
    • If the name of a file in a command has extension ".md5dig", the file with a name without this extension is searched, it is considered for it the digest and is compared to contents of file-parameter.
    • For other extensions plugin calculates "md5-checksum" and writes result in file <filename>.md5dig and in Clipboard.
    • If it is not points to any file (or plugin is called from menu on F11) then "md5-checksum" calculates for all selected files.
  6.  SplitFile.dll - split file in pieces
    On a prefix sm:<filename> <size of piece> file parts on a pieces.
    • Size may be pointed in bytes (120000), kilobytes(120k) or megabytes(12m).
    • Default size may be changed in config file.
    • It is possible to use "." instead of current file name (CurrentFileSymbol in config).

Programming of plagins

The Folder src\plugins contains initial texts delivered plagins and preparation in file Template.txt.
Being guided by comments in files of initial texts, the documentation to plagin SHPCE etc., describe a class derivative from Far.Net.FarNetPlugin, realizing algorithms necessary for you.
Compile yours plagin with use of a command make.cmd YourPlugin.vb
Result of compilation place in a folder bin\plugins, reload plagins through item of the menu
.NET Plugins == Reload ==.

The remark.
In the same folder place the assembly (library) used by yours plagin.
The remark 2.
At presence in a folder bin\plugins a file debug.flg the message on quantity loaded .net-plugins is deduced.
The remark 3.
Simple plagins on VB.NET/JS.NET it is possible to place in a folder bin\plugins as initial texts, without compilation.

 % Loading archive with the program: site-1.