예제 #1
0
        /// <summary>
        /// Find sords.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void bnFindSords_Click(object sender, EventArgs e)
        {
            // Prompt for short description
            String s = InputBox.Show("Find", "Short description:");

            if (s != null && s.Length != 0)
            {
                // Prepare FindInfo object
                FindInfo findInfo = new FindInfo();
                findInfo.findByIndex      = new FindByIndex();
                findInfo.findByIndex.name = s;

                this.Cursor = Cursors.WaitCursor;
                try
                {
                    // Find
                    FWFindSordsCache <FWSord> findCache = conn.Content.FindSords(findInfo);

                    // Before retrieving any results, set the Sord members to be read from the archive
                    findCache.SordZ.bset |= SordC.mbRefPaths | SordC.mbDocVersionMembers;

                    // Show result in list box
                    FormSordList.ShowList(conn, findCache);
                }
                finally
                {
                    this.Cursor = Cursors.Default;
                }
            }
        }
예제 #2
0
        public static void ShowList(FWConnection conn, FWFindSordsCache <FWSord> sordsCache)
        {
            FormSordList frm = new FormSordList();

            frm.sordListView1.Conn       = conn;
            frm.sordListView1.SordsCache = sordsCache;
            if (frm.ShowDialog() == DialogResult.OK)
            {
                IEnumerable <FWSord> sords  = frm.sordListView1.SelectedSords;
                StringBuilder        sbuild = new StringBuilder();
                sbuild.Append("Selected Sords: ");
                foreach (FWSord sord in sords)
                {
                    sbuild.Append(sord.Name).Append(",");
                }
                System.Windows.Forms.MessageBox.Show(sbuild.ToString());
            }
        }