Esempio n. 1
0
 protected override async Task OnInitializedAsyncSafe()
 {
     _dataStoreSubscriptions.Add(TaggingSystem.TaskDataStore.CurrentTaskChanged.Subscribe(_ => this.UpdateState()));
     _dataStoreSubscriptions.Add(TaggingSystem.TaskDataStore.CurrentTaskExpandedChanged.Subscribe(_ => this.UpdateState()));
     _dataStoreSubscriptions.Add(TaggingSystem.TagsStore.SelectedTagsUpdated.Subscribe(tags => this.OnSelectedTagsUpdated(tags)));
     _dataStoreSubscriptions.Add(TaggingSystem.TrackingDataStore.TrackingSequenceCreatedForTag.Subscribe(_ => this.TagsTab.Activate()));
     _dataStoreSubscriptions.Add(KeyboardListener.CreateSubscription()
                                 .AddShortcut(Key.T, () => Vm.ActivateTagonomyExecutionCommand.Execute(null))
                                 .AddShortcut(Key.N, () => Vm.ConfirmCurrentTaskTagsCommand.Execute(null))
                                 .AddShortcut(Key.P, () => Vm.GoPreviousTaskCommand.Execute(null))
                                 .AddShortcut(Key.Delete, () => {
         if (Vm.TagData.SelectedTags.Any())
         {
             Vm.RemoveTagCommand.Execute(Vm.TagData.SelectedTags.First());
         }
     }));
 }