コード例 #1
0
        private void OnSearchTextChanged()
        {
            using (MainWindow.Instance.PreventScintillaFocus())
            {
                App.Logger.TraceExt("NotesViewHierarchical",
                                    "OnSearchTextChanged",
                                    Tuple.Create("SearchText", SearchText));

                _filterData.Clear();
                if (AllNotes != null)
                {
                    ResyncDisplayItems(AllNotes);
                }
                SelectedFolder?.TriggerAllSubNotesChanged();

                if (SelectedFolderPath != null && !SelectedFolder.IsSpecialNode_AllNotes && !SelectedFolder.AllSubNotes.Any() && DisplayItems.AllNotesViewWrapper != null)
                {
                    App.Logger.TraceExt("NotesViewHierarchical",
                                        "OnSearchTextChanged (2)",
                                        Tuple.Create("SelectedFolderPath", SelectedFolderPath?.Formatted));

                    SelectedFolder = DisplayItems.AllNotesViewWrapper;
                }
            }
        }
コード例 #2
0
        private void OnRepoChanged(DependencyPropertyChangedEventArgs args)
        {
            App.Logger.Trace("NotesViewHierarchical", "OnRepoChanged()");

            DisplayItems.ClearPermanents();

            if (AllNotes != null)
            {
                ResyncDisplayItems(AllNotes);
            }

            SelectedFolder?.TriggerAllSubNotesChanged();
        }
コード例 #3
0
        private void OnSettingsChanged(DependencyPropertyChangedEventArgs args)
        {
            App.Logger.Trace("NotesViewHierachical", "OnSettingsChanged()");

            DisplayItems.ClearPermanents();

            if (AllNotes != null)
            {
                ResyncDisplayItems(AllNotes);
            }

            if (args.NewValue != null && args.OldValue == null)
            {
                NotesViewFolderHeight = new GridLength(((AppSettings)args.NewValue).NotesViewFolderHeight);
            }

            SelectedFolder?.TriggerAllSubNotesChanged();
        }