Beispiel #1
0
        public void ApplySearchFilter()
        {
            var             searchText = _searchText.StringValue.Trim();
            List <Encoding> encodings;

            if (!string.IsNullOrWhiteSpace(searchText))
            {
                encodings = _allEncodings.Where(p => p.CodePage.ToString().Contains(searchText) ||
                                                p.EncodingName.ToLowerInvariant().Contains(searchText.ToLower()) ||
                                                p.WebName.ToLowerInvariant().Contains(searchText.ToLower())).ToList();
            }
            else
            {
                encodings = _allEncodings;
            }
            var ds = new EncodingTableDataSource(encodings);

            _encodingTable.DataSource = ds;
            _encodingTable.Delegate   = new EncodingTableDelegate(ds, WindowController as OpenWithManualChosenEncodingController);
            _encodingTable.SelectRow((nint)0, true);
        }
 public void ApplySearchFilter()
 {
     var searchText = _searchText.StringValue.Trim();
     List<Encoding> encodings;
     if (!string.IsNullOrWhiteSpace(searchText))
     {
         encodings = _allEncodings.Where(p=>p.CodePage.ToString().Contains(searchText) ||
                                            p.EncodingName.ToLowerInvariant().Contains(searchText.ToLower()) ||
                                            p.WebName.ToLowerInvariant().Contains(searchText.ToLower())).ToList();
     }
     else
     {
         encodings = _allEncodings;
     }
     var ds = new EncodingTableDataSource (encodings);
     _encodingTable.DataSource = ds;
     _encodingTable.Delegate = new EncodingTableDelegate (ds, WindowController as OpenWithManualChosenEncodingController); 
     _encodingTable.SelectRow((nint)0, true);
 }
 public EncodingTableDelegate(EncodingTableDataSource datasource, OpenWithManualChosenEncodingController controller)
 {
     this.DataSource = datasource;
     _controller     = controller;
 }
 public EncodingTableDelegate (EncodingTableDataSource datasource, OpenWithManualChosenEncodingController controller)
 {
     this.DataSource = datasource;
     _controller = controller;
 }