public FileView(MyFile discElement) { InitializeComponent(); this.discElement = discElement; NameBox.Text = discElement.GetName(); DateBox.Text = discElement.GetCreationTime().ToShortDateString(); }
private void OnDeleteClick(object source, EventArgs e) { MyFile myFile = (MyFile)source; DeleteAsk deleteAsk = new DeleteAsk(myFile.GetName()); deleteAsk.ShowDialog(); if (deleteAsk.DialogResult == true) { //File.Delete(myFile.GetPath()); } //MessageBox.Show("Usunięto: " + myFile.GetPath()); LoadFiles(PathBox.Text, false); }