コード例 #1
0
        public AssignCharacterViewModel(Project project, BlocksToDisplay mode, BookBlockIndices startingIndices)
            : base(project, mode, startingIndices)
        {
            m_combinedCharacterVerseData = new CombinedCharacterVerseData(project);

            CurrentBlockMatchupChanged += OnCurrentBlockMatchupChanged;
        }
コード例 #2
0
        public BlockNavigatorViewModel(Project project, BlocksToDisplay mode, BookBlockIndices startingIndices, ProjectSettingsViewModel settingsViewModel = null)
        {
            m_project = project;
            m_project.QuoteParseCompleted += HandleProjectQuoteParseCompleted;

            m_navigator = new BlockNavigator(m_project.IncludedBooks);

            m_includedBooks = project.IncludedBooks.Select(b => b.BookId);
            Versification   = project.Versification;

            if (settingsViewModel != null)
            {
                m_font = new FontProxy(settingsViewModel.WsModel.CurrentDefaultFontName,
                                       (int)settingsViewModel.WsModel.CurrentDefaultFontSize, settingsViewModel.WsModel.CurrentRightToLeftScript);
            }
            else
            {
                m_font = new FontProxy(project.FontFamily, project.FontSizeInPoints, project.RightToLeftScript);
            }
            CacheReferenceTextFonts(project.ReferenceText);

            FontSizeUiAdjustment = project.FontSizeUiAdjustment;

            Mode = mode;

            if (startingIndices != null && !startingIndices.IsUndefined)
            {
                SetBlock(startingIndices);
                m_currentBlockIndex = m_relevantBlocks.IndexOf(startingIndices);
                if (m_currentBlockIndex < 0)
                {
                    m_temporarilyIncludedBlock = startingIndices;
                }
            }
        }
コード例 #3
0
        public AssignCharacterViewModel(Project project, BlocksToDisplay mode, BookBlockIndices startingIndices)
            : base(project, mode, startingIndices)
        {
            m_projectCharacterVerseData  = project.ProjectCharacterVerseData;
            m_combinedCharacterVerseData = new CombinedCharacterVerseData(project);

            CurrentBlockMatchupChanged += (sender, args) => { m_pendingCharacterVerseAdditions.Clear(); };
        }
コード例 #4
0
        public BlockNavigatorViewModel(Project project, BlocksToDisplay mode, BookBlockIndices startingIndices, ProjectSettingsViewModel settingsViewModel = null)
        {
            m_project = project;
            m_project.QuoteParseCompleted += (s, e) =>
            {
                m_navigator = new BlockNavigator(m_project.IncludedBooks);
                ResetFilter(null);
            };

            m_navigator = new BlockNavigator(m_project.IncludedBooks);

            m_includedBooks = project.IncludedBooks.Select(b => b.BookId);
            Versification   = project.Versification;

            if (settingsViewModel != null)
            {
                m_fontFamily           = settingsViewModel.WsModel.CurrentDefaultFontName;
                m_baseFontSizeInPoints = (int)settingsViewModel.WsModel.CurrentDefaultFontSize;
                m_rightToLeftScript    = settingsViewModel.WsModel.CurrentRightToLeftScript;
            }
            else
            {
                m_fontFamily           = project.FontFamily;
                m_baseFontSizeInPoints = project.FontSizeInPoints;
                m_rightToLeftScript    = project.RightToLeftScript;
            }
            FontSizeUiAdjustment = project.FontSizeUiAdjustment;

            Mode = mode;

            if (startingIndices != null && !startingIndices.IsUndefined)
            {
                SetBlock(startingIndices);
                m_currentBlockIndex = m_relevantBlocks.IndexOf(startingIndices);
                if (m_currentBlockIndex < 0)
                {
                    m_temporarilyIncludedBlock = startingIndices;
                }
            }
        }
コード例 #5
0
 public BlockNavigatorViewModel(Project project, BlocksToDisplay mode = BlocksToDisplay.AllScripture, ProjectSettingsViewModel settingsViewModel = null)
     : this(project, mode, null, settingsViewModel)
 {
 }
コード例 #6
0
 public AssignCharacterViewModel(Project project, BlocksToDisplay mode, BookBlockIndices startingIndices)
     : base(project, mode, startingIndices)
 {
     m_projectCharacterVerseData  = project.ProjectCharacterVerseData;
     m_combinedCharacterVerseData = new CombinedCharacterVerseData(project);
 }