//Opens bus edit dialog on the clicked bus public void EditBus(object parameter) { if (parameter is CSPBus) { CSPBusEditDialog editDialog = new CSPBusEditDialog(md); CSPBusVM busVM = new CSPBusVM((CSPBus)parameter); editDialog.DataContext = busVM; editDialog.ShowDialog(); Buses.Refresh(); } }
//Opens module edit dialog on the clicked module public void EditModule(object parameter) { Module module = (Module)parameter; ModuleVM moduleVM = new ModuleVM(module); ModuleEditDialog editDialog = new ModuleEditDialog(md); editDialog.DataContext = moduleVM; editDialog.BusListDataContext = Buses; editDialog.ShowDialog(); //Forces binding of button text to update Modules.Refresh(); Buses.Refresh(); }