Exemplo n.º 1
0
        private void MenuItem_CreateCollection_Click(object sender, RoutedEventArgs e)
        {
            CollectionInformationEditorWindow collectionInformationEditor = new CollectionInformationEditorWindow();

            collectionInformationEditor.ShowDialog();
            CollectionInformation collectionInformation = collectionInformationEditor.GetCollectionInformation();

            if (collectionInformation.ChangedName)
            {
                CollectionStore.Add(collectionInformation);
                comboBox_CollectionNames.Items.Refresh();
            }
        }
Exemplo n.º 2
0
 private void MenuItem_EditCollectionDetails_Click(object sender, RoutedEventArgs e)
 {
     if (comboBox_CollectionNames.SelectedItem != null)
     {
         string     currentCollectionName = (string)comboBox_CollectionNames.SelectedItem;
         Collection collection            = CollectionStore.Get(currentCollectionName);
         CollectionInformationEditorWindow collectionInformationEditor = new CollectionInformationEditorWindow(currentCollectionName, collection.Description);
         collectionInformationEditor.ShowDialog();
         CollectionInformation collectionInformation = collectionInformationEditor.GetCollectionInformation();
         CollectionStore.Edit(currentCollectionName, collectionInformation);
         if (collectionInformation.ChangedName)
         {
             comboBox_CollectionNames.Items.Refresh();
             comboBox_CollectionNames.SelectedItem = collectionInformation.Name;
         }
     }
 }