Exemplo n.º 1
0
        private void RaiseSearchEvent() {
            if (this.Text == "")
                return;
            if(!m_listPreviousItem.Items.Contains(this.Text))
                m_listPreviousItem.Items.Add(this.Text);


            SearchEventArgs args = new SearchEventArgs(SearchEvent);
            args.Keyword = this.Text;
            if(m_listSection != null){
                args.Sections = (List<string>)m_listSection.SelectedItems.Cast<string>().ToList();
            }
            RaiseEvent(args);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 启动搜索
        /// </summary>
        private void PureRaiseSearchEvent()
        {
            if (this.Text == "")
            {
                return;
            }

            SearchEventArgs args = new SearchEventArgs(SearchEvent);

            args.Keyword = this.Text;
            if (m_listSection != null)
            {
                args.Sections = (List <string>)m_listSection.SelectedItems.Cast <string>().ToList();
            }
            RaiseEvent(args);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Raises the search event.
        /// </summary>
        private void RaiseSearchEvent()
        {
            if (this.Text == "")
            {
                return;
            }
            if (!listPreviousItem.Items.Contains(this.Text))
            {
                listPreviousItem.Items.Add(this.Text);
            }


            SearchEventArgs args = new SearchEventArgs(SearchEvent);

            args.Keyword = this.Text;
            if (listSection != null)
            {
                args.Sections = (List <string>)listSection.SelectedItems.Cast <string>().ToList();
                SelectedItems = args.Sections;
            }
            RaiseEvent(args);
            ExecuteSearchCommand();
        }
        private void RaiseSearchEvent()
        {
            if (this.Text == "")
            {
                return;
            }
            if (!m_listPreviousItem.Items.Contains(this.Text))
            {
                m_listPreviousItem.Items.Add(this.Text);
            }


            SearchEventArgs args = new SearchEventArgs(SearchEvent);

            args.Keyword = this.Text;

            List <string> searchShow = new List <string>();

            if (m_listSection != null)
            {
                foreach (StackPanel panel in m_listSection.SelectedItems.Cast <StackPanel>().ToList())
                {
                    foreach (var child in panel.Children)
                    {
                        if (child is Label)
                        {
                            searchShow.Add(((Label)child).Content.ToString());
                        }
                    }
                }
                //((StackPanel)m_listSection.SelectedItems[0]).Children.Cast<Label>().ToList()
                //((StackPanel)m_listSection.SelectedItems[0]).Children

                args.Sections = searchShow;
            }
            RaiseEvent(args);
        }
        private void RaiseSearchEvent()
        {
            if (string.IsNullOrEmpty(this.Text))
                return;
            if (!m_listPreviousItem.Items.Contains(this.Text))
                m_listPreviousItem.Items.Add(this.Text);

            SearchEventArgs args = new SearchEventArgs(SearchEvent);
            args.Keyword = this.Text;
            if (m_listSection != null)
            {
                args.Sections = (List<string>)m_listSection.SelectedItems.Cast<string>().ToList();
            }
            RaiseEvent(args);
        }