Exemple #1
0
        public StatusBarItem(Plugin plugin, PreferencesWindowFactory preferencesWindowFactory) : base()
        {
            Title = "...";

            Plugin = plugin;
            _preferencesWindowFactory = preferencesWindowFactory;
            _subscription             = plugin.Subscribe(OnUpdate);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
        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));
        }