public StatusBarItem(Plugin plugin, PreferencesWindowFactory preferencesWindowFactory) : base() { Title = "..."; Plugin = plugin; _preferencesWindowFactory = preferencesWindowFactory; _subscription = plugin.Subscribe(OnUpdate); }
public AppDelegate() { var path = NSUserDefaults.StandardUserDefaults.StringForKey("pluginDirectory"); var _fileProvider = new LocalFileProvider(path); _app = new App(_fileProvider); _preferencesWindowFactory = new PreferencesWindowFactory(); _statusBar = new StatusBar(_app, _preferencesWindowFactory); }
public StatusBar(App app, PreferencesWindowFactory preferencesWindowFactory) { _app = app; _preferencesWindowFactory = preferencesWindowFactory; var comparer = new PluginComparer(); _subscription = _app .Select(plugins => plugins.Where(p => p.IsActive)) .DistinctUntilChanged() .Select(plugins => plugins.ToImmutableList()) .Subscribe(plugins => OnUpdateMenu(plugins)); }