Exemplo n.º 1
0
 public SymbologiesDataSource(IDataSourceListener dataSourceListener)
 {
     this.DataSourceListener = dataSourceListener;
     this.Sections           = new[]
     {
         new Section(new[]
         {
             ActionRow.Create(
                 "Enable All",
                 tuple =>
             {
                 SettingsManager.Instance.EnableAllSymbologyies();
                 this.DataSourceListener.OnDataChange();
             }
                 ),
             ActionRow.Create(
                 "Disable All",
                 tuple =>
             {
                 SettingsManager.Instance.DisableAllSymbologies();
                 this.DataSourceListener.OnDataChange();
             }
                 )
         }),
         new Section(SymbologyExtensions.AllValues.Select(symbology =>
         {
             return(SymbologyRow.Create(
                        () => SettingsManager.Instance.GetSymbologySettings(symbology),
                        _ => SettingsManager.Instance.SymbologySettingsChanged(),
                        this.DataSourceListener
                        ));
         }).ToArray())
     };
 }