Exemple #1
0
 private void textBtn_Click(object sender, EventArgs e)
 {
     readingDoc.SelectionBackColor = Color.LightSkyBlue;
     if (!String.IsNullOrEmpty(richTextBox3.Text))
     {
         richTextBox3.AppendText(Environment.NewLine);
     }
     richTextBox3.AppendText(readingDoc.SelectedText);
     highlight1 = new Highlight(-1, (int)reading.readingId, false, readingDoc.SelectionStart, readingDoc.SelectedText.Length);
     reading.highlights.Add(highlight1);
     reading.modified = true;
 }
Exemple #2
0
        private void quoteBtn_Click(object sender, EventArgs e)
        {
            String authorPage = getInline(readingDoc.SelectionStart);

            readingDoc.SelectionBackColor = Color.Yellow;
            int numLines = readingDoc.Lines.Count();

            if (!String.IsNullOrEmpty(richTextBox2.Text))
            {
                richTextBox2.AppendText(Environment.NewLine);
            }
            richTextBox2.AppendText("\"" + readingDoc.SelectedText + "\" " + authorPage);
            highlight1 = new Highlight(-1, (int)reading.readingId, true, readingDoc.SelectionStart, readingDoc.SelectedText.Length);
            reading.highlights.Add(highlight1);
            reading.modified = true;
        }