private void ShowOptions(DatasourceDriver driver, GdalDriverMetadata metadata, StronglyTypedGrid <DriverOption> grid, TabPageAdv tabPage) { string options = driver.get_Metadata(metadata); bool hasOptions = !string.IsNullOrWhiteSpace(options); if (hasOptions) { var list = DriverMetadata.ParseOptionList(options).OrderBy(o => o.Name).ToList(); hasOptions = list.Any(); grid.DataSource = list; var cmn = grid.Adapter.GetColumn(item => item.UserDescription); if (cmn != null) { cmn.Width = 0; // to make it shrink } grid.AdjustColumnWidths(); if (cmn != null && cmn.Width > DescriptionColumnWidth) { cmn.Width = DescriptionColumnWidth; } grid.AdjustRowHeights(); } tabPage.TabVisible = hasOptions; }
public DriverMetadata(string name, string value, GdalDriverMetadata type) { _value = value; Name = name; Type = type; }
public string get_Metadata(GdalDriverMetadata metadata) { return(_driver.Metadata[(tkGdalDriverMetadata)metadata]); }
public string get_DriverMetadata(GdalDriverMetadata metadata) { return(_datasource.DriverMetadata[(tkGdalDriverMetadata)metadata]); }