protected void PasteVerseToIndex(int nInsertionIndex) { // the only function of the button here is to add a slot to type a con note StoryEditor theSE; if (!CheckForProperEditToken(out theSE)) { return; } if (_myClipboard != null) { VerseData theNewVerse = new VerseData(_myClipboard); theNewVerse.AllowConNoteButtonsOverride(); // make another copy, so that the guid is changed theSE.DoPasteVerse(nInsertionIndex, theNewVerse); } /* * IDataObject myRetrievedObject = Clipboard.GetDataObject(); * * // Converts the IDataObject type to VerseData type. * if (myRetrievedObject != null) * { * if (myRetrievedObject.GetDataPresent(typeof(VerseData))) * { * VerseData verseData = (VerseData)myRetrievedObject.GetData(typeof(VerseData)); * * if (verseData != null) * theSE.DoPasteVerse(nInsertionIndex, verseData); * } * } */ }
protected void PasteVerseToIndex(int nInsertionIndex) { // the only function of the button here is to add a slot to type a con note StoryEditor theSE; if (!CheckForProperEditToken(out theSE)) { return; } if (_myClipboard != null) { VerseData theNewVerse = new VerseData(_myClipboard); theNewVerse.AllowConNoteButtonsOverride(); // make another copy, so that the guid is changed theSE.DoPasteVerse(nInsertionIndex, theNewVerse); } }
private void MoveSelectedTextToANewLineToolStripMenuItem(StoryEditor theSE) { System.Diagnostics.Debug.Assert(tableLayoutPanel.Controls.ContainsKey(CstrFieldNameStoryLine)); StoryLineControl slc = tableLayoutPanel.Controls[CstrFieldNameStoryLine] as StoryLineControl; string strVernacular, strNationalBT, strEnglishBT; slc.GetTextBoxValues(out strVernacular, out strNationalBT, out strEnglishBT); // all this verse to have it's buttons shown (so the editor can delete now // obsolete comments) _verseData.AllowConNoteButtonsOverride(); copyVerseToClipboardToolStripMenuItem_Click(null, null); _myClipboard.VernacularText.SetValue(strVernacular); _myClipboard.NationalBTText.SetValue(strNationalBT); _myClipboard.InternationalBTText.SetValue(strEnglishBT); PasteVerseToIndex(VerseNumber); // theSE.AddNewVerse(VerseNumber, strVernacular, strNationalBT, strEnglishBT); }