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>(); }
internal NppEvents(NppSettings s, NppCommands c) { nps = s; npc = c; }
internal FormatCommands(NppSettings s, NppCommands c) { nps = s; npc = c; }