public void OnDirectoryChanged(object source, EventArgs e) { if (!(source is MyDirectory)) { return; } MyDirectory directory = (MyDirectory)source; LoadFiles(directory.GetPath(), false); PathBox.Text = directory.GetPath(); }
private void OnDeleteDirectory(object source, EventArgs e) { MyDirectory directory = (MyDirectory)source; DeleteAsk deleteAsk = new DeleteAsk(directory.GetName()); deleteAsk.ShowDialog(); if (deleteAsk.DialogResult == true) { if (Directory.Exists(directory.GetPath())) { Directory.Delete(directory.GetPath(), true); } } //MessageBox.Show("Usunieto: " + directory.GetName()); LoadFiles(PathBox.Text, false); }