Ejemplo n.º 1
0
 private void OnPackageEditClick(object sender, RoutedEventArgs e)
 {
     if ((sender as MenuItem).DataContext is Package)
     {
         Package package       = (sender as MenuItem).DataContext as Package;
         var     packageDialog = new Dialogs.PackageDialog(
             package, project.GetModelController());
         packageDialog.ShowDialog();
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Handles displaying of PackageDialog after double click on a package.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void OnPackageDoubleClick(object sender, MouseButtonEventArgs e)
 {
     if ((sender as TreeViewItem).DataContext is Package && e.OriginalSource is TextBlock && FindParent(e.OriginalSource as TextBlock).DataContext == (sender as TreeViewItem).DataContext)
     {
         Package package       = (sender as TreeViewItem).DataContext as Package;
         var     packageDialog = new Dialogs.PackageDialog(
             package, project.GetModelController());
         packageDialog.ShowDialog();
     }
     e.Handled = true;
 }