Ejemplo n.º 1
0
 private void dataGridView1_SelectionChanged(object sender, EventArgs e)
 {
     if (SelectionChanged != null)
     {
         WSPCompareFile          file = dataGridView1.SelectedRows.Count > 0?dataGridView1.SelectedRows[0].DataBoundItem as WSPCompareFile: null;
         WSPCompareFileEventArgs args = new WSPCompareFileEventArgs(file);
         SelectionChanged(this, args);
     }
 }
Ejemplo n.º 2
0
 private void dataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
 {
     if (e.ColumnIndex == dataGridView1.Columns[0].Index)
     {
         WSPCompareFile file     = DataSource[e.RowIndex];
         String         filePath = String.IsNullOrEmpty(file.FilePathAfter) ? file.FilePathBefore : file.FilePathAfter;
         Icon           icon     = System.Drawing.Icon.ExtractAssociatedIcon(filePath);
         e.Value = ResizeBitmap(icon.ToBitmap(), 16, 16);
     }
 }