Example #1
0
        /// <summary>
        /// Restore the InterlinMaster bookmark to its previously saved state.
        /// </summary>
        public void Restore(int index)
        {
            // verify we're restoring to the right text. Is there a better way to verify this?
            int restoredRecordIndex = m_propertyTable.GetIntProperty(RecordIndexBookmarkName, -1, PropertyTable.SettingsGroup.LocalSettings);

            if (index != restoredRecordIndex)
            {
                return;
            }
            m_iParagraph  = m_propertyTable.GetIntProperty(BookmarkPropertyName("IndexOfParagraph"), 0, PropertyTable.SettingsGroup.LocalSettings);
            m_BeginOffset = m_propertyTable.GetIntProperty(BookmarkPropertyName("CharBeginOffset"), 0, PropertyTable.SettingsGroup.LocalSettings);
            m_EndOffset   = m_propertyTable.GetIntProperty(BookmarkPropertyName("CharEndOffset"), 0, PropertyTable.SettingsGroup.LocalSettings);
        }