//☆ 編集メソッド
private void Copy(object sender, EventArgs e)
{
if (richTextBox1.SelectionLength > 0)
{ richTextBox1.Copy(); }
}
private void Cut(object sender, EventArgs e)
{
if (richTextBox1.SelectionLength > 0)
{ richTextBox1.Cut(); }
}
private void Paste(object sender, EventArgs e)
{
ClipPaste();
}
private void Undo(object sender, EventArgs e)
{
if (richTextBox1.CanUndo)
{ richTextBox1.Undo(); }
}
private void Redo(object sender, EventArgs e)
{
if (richTextBox1.CanRedo)
{ richTextBox1.Redo(); }
}
private void LCopy(object sender, EventArgs e)
{
m_fclass.LineEdit(richTextBox1);
Clipboard.SetDataObject(m_fclass.lstr, true);
}
private void LCut(object sender, EventArgs e)
{
m_fclass.LineEdit(richTextBox1);
Clipboard.SetDataObject(m_fclass.lstr, true);
richTextBox1.Text = richTextBox1.Text.Remove(m_fclass.st, m_fclass.nx - m_fclass.st);
richTextBox1.SelectionStart = m_fclass.st;
}
private void ClipPaste()
{
IDataObject data = Clipboard.GetDataObject();
if (data != null && data.GetDataPresent(DataFormats.Text) == true)
{
richTextBox1.Paste();
}
}
|