Advertisement
Guest User

Untitled

a guest
Dec 7th, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.27 KB | None | 0 0
  1. using inRiver.PIM.Common.Interface;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using System.Windows;
  8. using System.Windows.Controls;
  9. using System.Windows.Data;
  10. using System.Windows.Documents;
  11. using System.Windows.Input;
  12. using System.Windows.Media;
  13. using System.Windows.Media.Imaging;
  14. using System.Windows.Navigation;
  15. using System.Windows.Shapes;
  16. using inRiver.PIM.Common;
  17. using DevExpress.Xpf.Grid;
  18. using inRiver.PIM.Common.Controls;
  19.  
  20. namespace WpfCL_Rozszerzenie_PIM
  21. {
  22.     /// <summary>
  23.     /// Interaction logic for UserControl1.xaml
  24.     /// </summary>
  25.     public partial class UserControl1 : UserControl, IPIMExtension
  26.     {
  27.         public UserControl1()
  28.         {
  29.             InitializeComponent();
  30.         }
  31.  
  32.         public bool CanMinimize
  33.         {
  34.             get { return false; }
  35.         }
  36.  
  37.         public bool CanMove
  38.         {
  39.             get { return false; }
  40.         }
  41.  
  42.         public BitmapImage CaptionImage
  43.         {
  44.             get { return null; }
  45.         }
  46.  
  47.         public ExtenionLocation DefaultTabbedGroup
  48.         {
  49.             get { return ExtenionLocation.Menu; }
  50.         }
  51.  
  52.         public int Order
  53.         {
  54.             get { return 10; }
  55.         }
  56.  
  57.         public void Dispose()
  58.         {
  59.         }
  60.  
  61.         private void MenuItem1_Click(object sender, RoutedEventArgs e)
  62.         {
  63.             MenuItem menuItem = (MenuItem)e.Source;
  64.             ContextMenu menu = (ContextMenu)menuItem.Parent;
  65.             GridControl grid = (GridControl)menu.PlacementTarget;
  66.             int[] selectedRows = ((GridViewBase)grid.View).GetSelectedRowHandles();
  67.  
  68.             //StringBuilder sb = new StringBuilder();
  69.             //sb.Append("Selected Entities:");
  70.             //sb.AppendLine();
  71.             //foreach (var entity in selectedRows)
  72.             //{
  73.             //    string row = grid.GetRow(entity).ToString();
  74.             //    int EntityId = int.Parse(grid.GetCellDisplayText(entity, "inRiver_$$$_EntityId"));
  75.             //    sb.Append(row + " Entity ID: " + EntityId);
  76.             //}
  77.             //string message = sb.ToString();
  78.             //inRiverMessageBoxes.Information(message);
  79.             MessageBox.Show("AAAA");
  80.         }
  81.     }
  82. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement