private void ReviseFile(object sender, RoutedEventArgs e) { FileAndDirAttributes files = (FileAndDirAttributes)DirsAndFiles.SelectedItem; string path = files.FileDirectory + "\\" + files.FileName; System.Windows.Forms.OpenFileDialog file = new System.Windows.Forms.OpenFileDialog(); if (file.ShowDialog() == System.Windows.Forms.DialogResult.OK) { FileData.AddFileVersion(path, file.FileName); MessageBox.Show("Confirmation.", "Version added successfully."); } }
/********************************** * Menu items *********************************/ private void AddToMyFiles(object sender, RoutedEventArgs e) { string path = ""; System.Windows.Forms.OpenFileDialog file = new System.Windows.Forms.OpenFileDialog(); if (file.ShowDialog() == System.Windows.Forms.DialogResult.OK) { path = file.FileName; FileData.AddMyFile(path); FileData.AddFileVersion(path, path); MessageBox.Show("Confirmation.", "File added successfully."); } }