コード例 #1
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Updates the book filter to show only the specified books and create an undo action
        /// for the change.
        /// </summary>
        /// <param name="newFilterList">The new list of books to show in the filter.</param>
        /// <returns>A new undo action that can be used to undo/redo this change to the
        /// filter</returns>
        /// ------------------------------------------------------------------------------------
        public IUndoAction UpdateFilterAndCreateUndoAction(params IScrBook[] newFilterList)
        {
            if (newFilterList.Length == 0 && m_scr.ScriptureBooksOS.Count > 0)
            {
                newFilterList = m_scr.ScriptureBooksOS.ToArray();
            }
            UpdateBookFilterAction undoAction = new UpdateBookFilterAction(this, newFilterList);

            FilteredBooks = newFilterList;
            return(undoAction);
        }
コード例 #2
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Updates the book filter to show only the specified books and create an undo action
		/// for the change.
		/// </summary>
		/// <param name="newFilterList">The new list of books to show in the filter.</param>
		/// <returns>A new undo action that can be used to undo/redo this change to the
		/// filter</returns>
		/// ------------------------------------------------------------------------------------
		public IUndoAction UpdateFilterAndCreateUndoAction(params IScrBook[] newFilterList)
		{
			if (newFilterList.Length == 0 && m_scr.ScriptureBooksOS.Count > 0)
				newFilterList = m_scr.ScriptureBooksOS.ToArray();
			UpdateBookFilterAction undoAction = new UpdateBookFilterAction(this, newFilterList);
			FilteredBooks = newFilterList;
			return undoAction;
		}