Exemplo n.º 1
0
        protected void InitPaste()
        {
            bool enabledPase = CurrentRichTextBox != null && CurrentRichTextBox.CanPaste(DataFormats.GetFormat(0));

            iPaste.Enabled   = enabledPase;
            sbiPaste.Enabled = enabledPase;
        }
Exemplo n.º 2
0
 private void iSelectAll_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (CurrentRichTextBox == null)
     {
         return;
     }
     CurrentRichTextBox.SelectAll();
 }
Exemplo n.º 3
0
 private void iCopy_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (CurrentRichTextBox == null)
     {
         return;
     }
     CurrentRichTextBox.Copy();
     InitPaste();
 }
Exemplo n.º 4
0
 private void iUndo_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (CurrentRichTextBox == null)
     {
         return;
     }
     CurrentRichTextBox.Undo();
     CurrentForm.Modified = CurrentRichTextBox.CanUndo;
     SetModifiedCaption();
     InitUndo();
     InitFormat();
 }
Exemplo n.º 5
0
 void Save()
 {
     if (CurrentForm == null)
     {
         return;
     }
     if (CurrentForm.NewDocument)
     {
         SaveAs();
     }
     else
     {
         CurrentRichTextBox.SaveFile(CurrentDocName, RichTextBoxStreamType.RichText);
         CurrentForm.Modified = false;
     }
     SetModifiedCaption();
 }