コード例 #1
0
ファイル: SidebarForm.cs プロジェクト: cmrazek/ProbeNpp
        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
ファイル: ProbeNppPlugin.cs プロジェクト: cmrazek/ProbeNpp
 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
ファイル: SidebarForm.cs プロジェクト: cmrazek/ProbeNpp
        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);
        }