コード例 #1
0
        public async void DisplayWordDetail(SearchResultItem clickedItem)
        {
            if (NetworkCheck() == false)
            {
                return;
            }

            //뜻풀이 감추기
            IsDefinitionViewerVisible = Visibility.Collapsed;

            IsDetailGridVisible         = Visibility.Visible;
            IsTitleBarBackButtonVisible = Visibility.Visible;
            RaisePropertyChanged("IsDefinitionViewerVisible", "IsDetailGridVisible", "IsTitleBarBackButtonVisible");

            DefinitionParser definitionParser = new DefinitionParser((Visibility visibility) => {
                IsDetailProgressBarVisible = visibility;
                RaisePropertyChanged("IsDetailProgressBarVisible");
            }, HandleHyperlinkClick);
            WordDetailItem definitionItem = await definitionParser.GetWordDetail(clickedItem.target_code.ToString(), clickedItem.word, clickedItem.sup_no);

            if (definitionItem != null)
            {
                Definitions = definitionItem;
            }
            IsDefinitionViewerVisible = Visibility.Visible;

            RaisePropertyChanged("Definitions", "IsDefinitionViewerVisible");
        }
コード例 #2
0
        public async void DisplayWordDetail(SearchResultItem clickedItem)
        {
            if (NetworkCheck() == false)
            {
                return;
            }

            if (clickedItem.target_code == -200)
            {
                //시작 누를 시 동작
                Definitions         = WordDetailStaticPage.GetHomepage(HandleHyperlinkClick, HandleRecentWordClick);
                IsDetailGridVisible = Visibility.Visible;
                if (!IsWidthBigEnough)
                {
                    IsTitleBarBackButtonEnabled = true;
                }
                RaisePropertyChanged("Definitions", "IsDetailGridVisible", "IsTitleBarBackButtonEnabled");
                return;
            }

            //일반 단어 클릭시 동작

            //되돌리기 위한 기록
            History.RecordDefinition(Query, lastSearchedQuery, Definitions, SearchResultSelectedIndex, false, IsMoreButtonVisible);
            //뜻풀이 감추기
            IsDefinitionViewerVisible = Visibility.Collapsed;

            IsDetailGridVisible = Visibility.Visible;
            if (!IsWidthBigEnough)
            {
                IsTitleBarBackButtonEnabled = true;
            }
            RaisePropertyChanged("IsDefinitionViewerVisible", "IsDetailGridVisible", "IsTitleBarBackButtonEnabled");

            DefinitionParser definitionParser = new DefinitionParser((Visibility visibility) => {
                IsDetailProgressBarVisible = visibility;
                RaisePropertyChanged("IsDetailProgressBarVisible");
            }, HandleHyperlinkClick);
            WordDetailItem definitionItem = await definitionParser.GetWordDetail(clickedItem.target_code.ToString(), clickedItem.word, clickedItem.sup_no);

            if (definitionItem != null)
            {
                Definitions = definitionItem;
            }
            IsDefinitionViewerVisible = Visibility.Visible;

            RaisePropertyChanged("Definitions", "IsDefinitionViewerVisible", "CanGoBack", "CanGoForward");
        }