/// <summary> /// Handles displaying of AttributeDialog after double click on an attribute. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void OnAttributeDoubleClick(object sender, MouseButtonEventArgs e) { if ((sender as TreeViewItem).DataContext is Property) { Property property = (sender as TreeViewItem).DataContext as Property; var propertyDialog = new AttributeDialog( property, new ClassController(property.Class as PIMClass, null), project.GetModelController()); propertyDialog.ShowDialog(); } }
private void OnAttributeEditClick(object sender, RoutedEventArgs e) { if ((sender as MenuItem).DataContext is Property) { Property property = (sender as MenuItem).DataContext as Property; var propertyDialog = new AttributeDialog( property, new ClassController(property.Class as PIMClass, null), project.GetModelController()); propertyDialog.ShowDialog(); } }
public void Execute(object parameter) { int id = (int)parameter; if (id == -1) { EntityDialog dialog = new EntityDialog(); dialog.DataContext = VM; dialog.ShowDialog(); } else { VM.SelectedEntityRecord = (EntityRecord)VM.EntityRecords.Where(item => item.Entity.Id == id).FirstOrDefault(); AttributeDialog dialog = new AttributeDialog(); dialog.DataContext = VM; dialog.ShowDialog(); } }
public void ShowAttributeDialog(PSMAttribute attribute) { AttributeDialog attributeDialog = new AttributeDialog(attribute, this, DiagramController.ModelController); attributeDialog.ShowDialog(); }