Пример #1
0
        private static TaskPopup InitTaskPopup(TaskCollection taskCollection)
        {
            var taskPopup = new TaskPopup {
                DataContext = taskCollection.Select((t) => new TaskViewModel(t))
            };

            taskPopup.Hidden += (sender, e) => taskCollection.RemoveFinishedTasks();

            return taskPopup;
        }
Пример #2
0
        public void Initialize(IPluginContext pluginContext)
        {
            this.logo = new NoCapLogo();

            this.taskbarIcon = InitTaskbarIcon(BuildContextMenu(pluginContext));
            this.commandRunner = InitCommandRunner(pluginContext.CommandRunner);
            this.taskCollection = InitTaskCollection(pluginContext.CommandRunner);
            this.taskPopup = InitTaskPopup(this.taskCollection);

            this.taskbarIcon.ShowCustomBalloon(this.taskPopup, PopupAnimation.None, null);

            Application.Current.ShutdownMode = ShutdownMode.OnExplicitShutdown;

            InitCommandBindings();

            UpdateIcon(1);
        }