public DirectoryView(MyDirectory discElement) { InitializeComponent(); this.discElement = discElement; NameBox.Text = discElement.GetName(); DateBox.Text = discElement.GetCreationTime().ToShortDateString(); }
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); }