示例#1
0
 private void EditAppConfigBinding_OnClick(object sender, RoutedEventArgs e)
 {
     if (sender is MenuItem m && m.DataContext is BindingRedirection b)
     {
         var dlg = new XmlEditor {
             FileName = ViewModel.AppConfigPath, InitialLineNumber = b.LineNumber, SelectMatchingText = b.AssemblyName
         };
         if (dlg.ShowDialog() == true)
         {
             //Messenger.Default.Send(new ProjectModified { Project = ViewModel });
         }
     }
 }
示例#2
0
 private void EditPackagesConfigReference_OnClick(object sender, RoutedEventArgs e)
 {
     if (sender is MenuItem m && m.DataContext is PackageReference p)
     {
         var dlg = new XmlEditor {
             FileName = ViewModel.PackagesConfigPath, InitialLineNumber = p.PackagesConfigLineNumber ?? 1, SelectMatchingText = p.Package.Name
         };
         if (dlg.ShowDialog() == true)
         {
             //Messenger.Default.Send(new ProjectModified { Project = ViewModel });
         }
     }
 }