Пример #1
0
        public SidebarForm(ProbeNppPlugin plugin)
        {
            _plugin = plugin;

            InitializeComponent();

            if (_plugin.Settings.FileListView.FileColumnWidth > 0) colFileTitle.Width = _plugin.Settings.FileListView.FileColumnWidth;
            if (_plugin.Settings.FileListView.DirColumnWidth > 0) colFileDir.Width = _plugin.Settings.FileListView.DirColumnWidth;

            if (_plugin.Settings.FunctionListView.FunctionColumnWidth > 0) colFunctionName.Width = _plugin.Settings.FunctionListView.FunctionColumnWidth;

            _functionListWait = new BackgroundDeferrer();
            _functionListWait.Execute += new EventHandler(FunctionListWait_Execute);

            lstFunctions.DrawItem += new DrawListViewItemEventHandler(lstFunctions_DrawItem);
            lstFunctions.DrawSubItem += new DrawListViewSubItemEventHandler(lstFunctions_DrawSubItem);
            lstFunctions.DrawColumnHeader += new DrawListViewColumnHeaderEventHandler(lstFunctions_DrawColumnHeader);

            _loaded = true;
        }
Пример #2
0
 private void Plugin_Shutdown(object sender, EventArgs e)
 {
     try
     {
         _settings.Save();
         if (_functionFileScanner != null) _functionFileScanner.OnShutdown();
         if (_compilePanel != null) _compilePanel.OnShutdown();
         if (_sidebar != null) _sidebar.OnShutdown();
         if (_findInProbeFilesPanel != null) { _findInProbeFilesPanel.Dispose(); _findInProbeFilesPanel = null; }
         if (_fileScannerDefer != null) { _fileScannerDefer.Dispose(); _fileScannerDefer = null; }
         if (_fileBackground != null) { _fileBackground.Dispose(); _fileBackground = null; }
     }
     catch (Exception ex)
     {
         Errors.Show(_nppWindow, ex, "Error while shutting down ProbeNpp plugin.");
     }
 }
Пример #3
0
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }

            if (disposing)
            {
                if (_argsBrush != null) { _argsBrush.Dispose(); _argsBrush = null; }
                if (_argsBrushHighlight != null) { _argsBrushHighlight.Dispose(); _argsBrushHighlight = null; }
                if (_functionListWait != null) { _functionListWait.Dispose(); _functionListWait = null; }
            }

            base.Dispose(disposing);
        }