Пример #1
0
        //Button "Details" event
        private void btnDetails_Click(object sender, RoutedEventArgs e)
        {
            //Show Details mode, editing is not allowed
            EditItem.EditMode = false;

            //The Item to edit inserted to Details/Edit Dialog variable
            EditItem.CurrentItem = (AbstractItem)dataLib.SelectedItem;

            //Show the Details Dialog
            var tmpW = new EditItem();

            tmpW.ShowDialog();
        }
Пример #2
0
        //Button "Edit" event
        private void btnEdit_Click(object sender, RoutedEventArgs e)
        {
            //We're in editing mode
            EditItem.EditMode = true;

            //The Item to edit inserted to Edit/Details Dialog variable
            EditItem.CurrentItem = (AbstractItem)dataLib.SelectedItem;

            //Show the Edit Dialog
            var editW = new EditItem();

            editW.ShowDialog();

            //After closing the Editor - refresh the Data Grid
            RefreshDataGrid();

            //Unticking the search because there's possible changes
            //will be made to the library Item
            UntickSearchOptions();
        }