Ejemplo n.º 1
0
        public ProjectExplorerControl()
        {
            InitializeComponent();

            _treeView.ApplyExplorerTheme();

            _resourceManager = new ResourceManager();

            _imageList = new ImageListManager();
            _treeView.ImageList = _imageList.ImageList;

            _defaultFile = LoadResource(_imageList.GetIndexForFileName(
                Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString())
            ));
            _defaultContainer = LoadResource(_imageList.GetIndexForDirectory(Path.GetTempPath()));

            Disposed += ProjectExplorerControl_Disposed;
        }
Ejemplo n.º 2
0
 void ProjectExplorerControl_Disposed(object sender, EventArgs e)
 {
     if (_listener != null)
     {
         _listener.Dispose();
         _listener = null;
     }
     if (_imageList != null)
     {
         _imageList.Dispose();
         _imageList = null;
     }
     if (_resourceManager != null)
     {
         _resourceManager.Dispose();
         _resourceManager = null;
     }
 }