Esempio n. 1
0
        static Main()
        {
            string pluginPath      = typeof(Main).Assembly.Location;
            string pluginName      = Path.GetFileNameWithoutExtension(pluginPath);
            string pluginSubFolder = Path.Combine(Path.GetDirectoryName(pluginPath), pluginName);

            AppDomain.CurrentDomain.AssemblyResolve += (object sender, ResolveEventArgs args) =>
            {
                string assemblyPath = Path.Combine(pluginSubFolder, new AssemblyName(args.Name).Name + ".dll");
                if (File.Exists(assemblyPath))
                {
                    return(Assembly.LoadFrom(assemblyPath));
                }
                else
                {
                    return(null);
                }
            };
            nps       = new NppSettings();
            npc       = new NppCommands(nps);
            npe       = new NppEvents(nps, npc);
            fc        = new FormatCommands(nps, npc);
            FileCache = new Dictionary <IntPtr, BufferInfo>();
        }
Esempio n. 2
0
 internal NppEvents(NppSettings s, NppCommands c)
 {
     nps = s;
     npc = c;
 }
Esempio n. 3
0
 internal FormatCommands(NppSettings s, NppCommands c)
 {
     nps = s;
     npc = c;
 }
Esempio n. 4
0
 internal NppCommands(NppSettings s)
 {
     nps = s;
 }