private void MenuItem_RenameAllItemsInCollection_Click(object sender, RoutedEventArgs e) { if (comboBox_CollectionNames.SelectedItem != null) { string currentCollectionName = (string)comboBox_CollectionNames.SelectedItem; RenameFileWindow renameFileWindow = new RenameFileWindow(currentCollectionName); renameFileWindow.ShowDialog(); if (renameFileWindow.IsApply) { ComboBox_CollectionNames_SelectionChanged(null, null); } } }
private void MenuItem_RenameFile_Click(object sender, RoutedEventArgs e) { if (comboBox_CollectionNames.SelectedItem != null && listBox_CollectionItems.SelectedItem != null) { string currentCollectionName = (string)comboBox_CollectionNames.SelectedItem; ListBoxImageItem listBoxImageItem = (ListBoxImageItem)listBox_CollectionItems.SelectedItem; RenameFileWindow renameFileWindow = new RenameFileWindow(currentCollectionName, listBoxImageItem.Path); renameFileWindow.ShowDialog(); if (renameFileWindow.IsApply) { listBoxImageItem.Path = renameFileWindow.NewFileName; } } }