Giter VIP home page Giter VIP logo

ghostshell's Introduction

GhostShell

Divides the extension scope to an infrastructure and implementation part - to a client that is registered as a shell extension and invokes features remotely, and to a server that provides an implementation. The client has no implementation, therefore it may be registered once and stay intact. The server is invoked over WCF and may be changed on the fly without need to re-register the extension.

GhostShell uses SharpShell to register shell extensions.

Example of use

Example of use

var clientPath = @"A PATH TO CLIENT DLL (GhostShell.Client.dll)";
using (var clientRegistration = new Registration(clientPath))
{
      var registration = Association.Create
          .AssociatedToFile("*.*")
          .WithItem(new Controls.Separator(),
          new Controls.MenuItem("Application", SystemIcons.Application.ToBitmap(),
             new Controls.MenuItem("Asterisk", SystemIcons.Asterisk.ToBitmap(), () => MessageBox.Show("*")),
             new Controls.MenuItem("Warning", SystemIcons.Warning.ToBitmap(), () => MessageBox.Show("!")),
             new Controls.MenuItem("Hand", SystemIcons.Hand.ToBitmap())), new Controls.Separator());

      var broker = new Broker();
      broker.RegisterExpression(registration);

      var url = @"net.tcp://localhost:61234/GhostShellBroker";
      using (var host = new ServiceHost(broker, new Uri(url)))
      {
          host.AddServiceEndpoint(typeof(IBroker), new NetTcpBinding(), url);
          host.Open();
          Console.ReadLine();
      }
}

It is necessary to execute the registration in administrator mode.

ghostshell's People

Contributors

mirekvales avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.