public ResolveKeyTermRenderingImportConflictDlg(IWin32Window owner, IChkRef occurrence, string existingRendering, string importedRendering, IVwStylesheet ss) : this() { FdoCache cache = occurrence.Cache; IScripture scr = cache.LangProject.TranslatedScriptureOA; ScrReference scrRef = (new ScrReference(occurrence.Ref, scr.Versification)); m_owner = owner; m_lblAnalysis.Text = occurrence.OwnerOfClass<IChkTerm>().Name.AnalysisDefaultWritingSystem.Text; m_lblOriginal.Text = occurrence.KeyWord.Text; m_lblScrReference.Text = scrRef.ToString(); m_btnExisting.Text = String.Format(m_btnExisting.Text, existingRendering); m_btnImported.Text = String.Format(m_btnImported.Text, importedRendering); // We do this outside the designer-controlled code because it does funny things // to FwMultiParaTextBox, owing to the need for a writing system factory, and some // properties it should not persist but I can't persuade it not to. // IStText text = new NonEditableMultiTss(TeEditingHelper.GetVerseText(cache.LangProject.TranslatedScriptureOA, scrRef).ToString(true, " ")); //m_verseTextLabel = new FwMultiParaTextBox(text, ss); m_verseTextLabel = new FwLabel(); m_verseTextLabel.WritingSystemFactory = cache.WritingSystemFactory; // set ASAP. m_verseTextLabel.WritingSystemCode = cache.DefaultVernWs; m_verseTextLabel.StyleSheet = ss; // before setting text, otherwise it gets confused about height needed. m_verseTextLabel.Location = new Point(0, 0); m_verseTextLabel.Name = "m_textBox"; m_verseTextLabel.Dock = DockStyle.Fill; m_verseTextLabel.TabIndex = 0; m_verseTextLabel.TextAlign = ContentAlignment.TopLeft; //m_verseTextLabel.BorderStyle = BorderStyle.None; //m_textBox.SuppressEnter = true; m_pnlActualVerseText.Controls.Add(m_verseTextLabel); // ENHANCE: Figure out how to get each part (paragraph) of the verse onm its own line. Using newlines or hard line breaks doesn't work. ITsIncStrBldr bldr = TsIncStrBldrClass.Create(); foreach (TeEditingHelper.VerseTextSubstring verseTextSubstring in TeEditingHelper.GetVerseText(cache.LangProject.TranslatedScriptureOA, scrRef)) { bldr.AppendTsString(verseTextSubstring.Tss); bldr.Append(StringUtils.kChHardLB.ToString()); } m_verseTextLabel.Tss = bldr.GetString(); //m_verseTextLabel.Tss = TeEditingHelper.GetVerseText(cache.LangProject.TranslatedScriptureOA, scrRef).ToString(true, StringUtils.kChHardLB.ToString()); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Initializes a new instance of the <see cref="BulkEditBar"/> class. /// </summary> /// ------------------------------------------------------------------------------------ public BulkEditBar() { // This call is required by the Windows.Forms Form Designer. InitializeComponent(); this.m_ApplyButton.Text = m_originalApplyText; // replace the bulkEditIconButton with just its icon, until the button actually does something. m_bulkEditIcon = new Label(); m_bulkEditIcon.ForeColor = this.m_bulkEditIconButton.ForeColor; m_bulkEditIcon.Name = "bulkEditIconLabel"; m_bulkEditIcon.ImageList = this.m_bulkEditIconButton.ImageList; m_bulkEditIcon.ImageIndex = this.m_bulkEditIconButton.ImageIndex; m_bulkEditIcon.Size = this.m_bulkEditIconButton.Size; m_bulkEditIcon.Location = this.m_bulkEditIconButton.Location; m_bulkEditIconButton.Visible = false; m_operationsTabControl.SelectedTab.Controls.Remove(m_bulkEditIconButton); m_operationsTabControl.SelectedTab.Controls.Add(m_bulkEditIcon); m_bulkEditIconButton = null; m_findReplaceSummaryLabel = new FwLabel(); this.m_findReplaceTab.Controls.Add(this.m_findReplaceSummaryLabel); m_findReplaceSummaryLabel.Location = new Point(275, 72); m_findReplaceSummaryLabel.Size = new Size(215, 56); m_findReplaceSummaryLabel.TabIndex = 17; m_findReplaceSummaryLabel.Name = "m_findReplaceSummaryLabel"; m_findReplaceSummaryLabel.TextAlign = ContentAlignment.TopLeft; m_findReplaceSummaryLabel.BackColor = SystemColors.Control; }