protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
 {
     try
     {
         var ds = new VisualizerDataSource(objectProvider);
         var win = new VisualizerWindow();
         win.SetDataSource(ds);
         win.ShowDialog();
     }
     catch (System.Exception ex)
     {
         System.Windows.MessageBox.Show(ex.Message, "Bener Data Visualizer");
     }
 }
Esempio n. 2
0
 public void SetDataSource(VisualizerDataSource ds)
 {
     vItems = ds.DataTable.DefaultView;
     DataGrid.ItemsSource = vItems;
     DataGrid.AutoGenerateColumns = true;
     DataGrid.CanUserAddRows = false;
     DataGrid.CanUserDeleteRows = false;
     DataGrid.IsReadOnly = true;
     DataGrid.SelectionUnit = DataGridSelectionUnit.Cell;
     // filter columns
     filters = new List<string>();
     foreach (DataColumn col in ds.DataTable.Columns)
     {
         filters.Add(col.ColumnName + " like '{0}'");
     }
 }