示例#1
0
        /// <summary>
        /// Generates the new list.
        ///
        /// A MEMORY only list -- we can get (and should) get rid of the note listCONTROL  itself soon TODO
        /// </summary>
        private void GenerateNewList(advisorQueryMakerBase QueryMaker)
        {
            lastFoundItems = QueryMaker.BuildQuery();
            if (lastFoundItems != null)
            {
                // we shuffle now so that the list can still be navigated later (i.e., tehre's still a concept for previous and next)
                lastFoundItems.Shuffle();
            }
//			string notelist = "";
//			if (lastFoundItems != null) {
//				foreach (MasterOfLayouts.NameAndGuid name in lastFoundItems)
//				{
//					notelist = notelist + "\n" + name.Caption;
//				}
//			}
            //richText.Text = richText.Text +"\n" + "List of notes found: " + notelist;
            ShuffleCount = 0;
        }
示例#2
0
        /// <summary>
        /// Generates the appropriate list.
        /// based on the current mode
        /// </summary>
        private void GenerateAppropriateList()
        {
            string details = "";

            advisorQueryMakerBase QueryMaker = null;

            int mode = CurrentModeDropDown.SelectedIndex;

            switch (mode)
            {
            case 0:
                if (LayoutDetails.Instance.CurrentLayout != null && LayoutDetails.Instance.CurrentLayout.CurrentTextNote != null)
                {
                    details = LayoutDetails.Instance.CurrentLayout.CurrentTextNote.Caption;
                    details = details.ToLower();
                }
                QueryMaker = new advisorQueryMakerBase(details);

                break;                  // current note

            case 1:
                if (LayoutDetails.Instance.CurrentLayout != null)
                {
                    details = LayoutDetails.Instance.CurrentLayout.Caption;
                    details = details.ToLower();
                }
                QueryMaker = new advisorQueryMakerBase(details);

                break;                 // current layout

            case 2:
                string filterstring = "All";
                if (CurrentFilterDropDown.SelectedItem != null)
                {
                    filterstring = CurrentFilterDropDown.SelectedItem.ToString();
                }
                //NewMessage.Show ("Using Filter = " + filterstring);
                QueryMaker = new advisorQueryJustFilter(filterstring);

                break;                 // the filter

            case 3:
                if (LayoutDetails.Instance.CurrentLayout != null)
                {
                    details = LayoutDetails.Instance.CurrentLayout.Keywords;
                    //NewMessage.Show (details);
                }
                QueryMaker = new advisorKeywords(details, false);
                break;

            case 4:
                if (LayoutDetails.Instance.CurrentLayout != null)
                {
                    details = LayoutDetails.Instance.CurrentLayout.Keywords;
                    //NewMessage.Show (details);
                }
                QueryMaker = new advisorKeywords(details, true);
                break;

            case 5: QueryMaker = null;
                lastFoundItems = null;
                // this option is for when we neeed the lookup panel to function BUT don't care about brainstormings
                break;
            }



            if (QueryMaker != null)
            {
                GenerateNewList(QueryMaker);
            }
            SkipABeat = 0;
        }