Exemple #1
0
 private void richTextBox1_DoubleClick(object sender, EventArgs e)
 {
     if ((richTextBox1.SelectedText.Contains("[") || richTextBox1.SelectedText.Contains("]") || richTextBox1.SelectedText == ("") || richTextBox1.SelectedText.Contains(" ") || richTextBox1.SelectedText == ("") || richTextBox1.SelectedText == ("") || richTextBox1.SelectedText == ("") || richTextBox1.SelectedText.Contains(" ") || richTextBox1.SelectedText.Contains("\n") || richTextBox1.SelectedText == ("") || richTextBox1.SelectedText.Contains(" ") || richTextBox1.SelectedText.Contains("\n") || richTextBox1.SelectedText == ("") || richTextBox1.SelectedText == ("") || richTextBox1.SelectedText == ("---Extra Commands---")) == true)
     {
     }
     else
     {
         int    corsur    = this.richTextBox1.SelectionStart;
         int    lineindex = this.richTextBox1.GetLineFromCharIndex(corsur);
         string linetext  = this.richTextBox1.Lines[lineindex];
         int    le        = richTextBox1.GetFirstCharIndexFromLine(lineindex);
         com1.Text = linetext.Replace("[", "").Replace("]", "").Replace(" ", "").Replace("\n", "");
         Nizzc_Collection.commandchange change = new commandchange();;
         change.ShowDialog();
         int ar  = lineindex;
         int lin = linetext.Length;
         richTextBox1.Select(corsur, lin);
         int count = linetext.Length;
         richTextBox1.Select(le, count);
         richTextBox1.SelectedText = "[" + com1.Text + "]";
     }
 }
Exemple #2
0
 private void richTextBox3_TextChanged(object sender, EventArgs e)
 {
     Nizzc_Collection.commandchange open = new commandchange();
 }