Exemplo n.º 1
0
        public bool DeleteExplorerObject(ExplorerObjectEventArgs e)
        {
            ConfigConnections configStream = new ConfigConnections("directories");

            configStream.Remove(this.Name);

            if (ExplorerObjectDeleted != null)
            {
                ExplorerObjectDeleted(this);
            }

            return(true);
        }
Exemplo n.º 2
0
 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);
     }
 }