internal void OnCharAdded(object sender, CharAddedEventArgs e) { CharAddedEventHandler ev = CharAdded; if (ev != null) { ev(this, e); } }
public ProbeNppPlugin() { try { _instance = this; _nppWindow = NppWindow; _settings = new Settings(this); try { _settings.Load(); } catch (Exception ex) { Errors.Show(_nppWindow, ex, "Exception when attempting to load ProbeNpp settings."); } ProbeEnvironment.Initialize(); ProbeEnvironment.AppChanged += new EventHandler(_env_AppChanged); TempManager.Init(Path.Combine(ConfigDir, "Temp")); LoadLexerConfig(); _autoCompletionManager = new AutoCompletion.AutoCompletionManager(); _smartIndentManager = new AutoCompletion.SmartIndentManager(); Ready += new NppEventHandler(Plugin_Ready); Shutdown += new NppEventHandler(Plugin_Shutdown); FileOpened += new FileEventHandler(Plugin_FileOpened); FileClosed += new FileEventHandler(Plugin_FileClosed); FileActivated += new FileEventHandler(Plugin_FileActivated); FileSaved += new FileEventHandler(ProbeNppPlugin_FileSaved); LanguageChanged += new LanguageTypeEventHandler(Plugin_LanguageChanged); SelectionChanged += new NppEventHandler(Plugin_SelectionChanged); Modification += new ModifiedEventHandler(Plugin_Modification); CharAdded += new CharAddedEventHandler(ProbeNppPlugin_CharAdded); _fileBackground.Execute += new EventHandler(FileBackground_Execute); _functionFileScanner = new AutoCompletion.FunctionFileScanner(); _fileScannerDefer.Execute += new EventHandler(FileScanner_Execute); _fileScannerDefer.Activity += new EventHandler(FileScanner_Activity); } catch (Exception ex) { Errors.Show(_nppWindow, ex, "The ProbeNpp plug-in thrown an error while initializing."); } }