public Dock(DockConfiguration config) { this.config = config; config.PropertyChanged += ConfigOnPropertyChanged; itemGroups = new ItemGroupList(); Initialize(); }
public void GetDocks(Action <IEnumerable <Dock>, Exception> callback) { if (!Directory.Exists(Paths.Docks)) { Directory.CreateDirectory(Paths.Docks); } var dockConfigurations = Directory.EnumerateDirectories(Paths.Docks) .Where(d => File.Exists(Path.Combine(d, "dock.json"))) .Select(d => DockConfiguration.FromFile(Path.Combine(d, "dock.json"))) .DefaultIfEmpty(DockConfiguration.Default); var docks = dockConfigurations.Select(config => new Dock(config)).ToList(); callback(docks, null); }
public void GetDocks(Action <IEnumerable <Dock>, Exception> callback) { var configuration = new DockConfiguration { ItemGroups = new List <string> { "Applications", null, "RecycleBin" } }; var dock = new Dock(configuration); callback(new List <Dock> { dock }, null); }