public bool DeleteExplorerObject(ExplorerObjectEventArgs e) { ConfigConnections configStream = new ConfigConnections("directories"); configStream.Remove(this.Name); if (ExplorerObjectDeleted != null) { ExplorerObjectDeleted(this); } return(true); }
public bool DeleteExplorerObject(ExplorerObjectEventArgs e) { try { DirectoryInfo di = new DirectoryInfo(_path); di.Delete(); if (ExplorerObjectDeleted != null) { ExplorerObjectDeleted(this); } return(true); } catch (Exception ex) { System.Windows.Forms.MessageBox.Show("ERROR: " + ex.Message); return(false); } }