Ejemplo n.º 1
0
        protected new void Copy()
        {
            IntPtr lParams = (IntPtr)TBUtils.SendMessageToMaster(TBUtils.EM_SETEVENTMASK, IntPtr.Zero, IntPtr.Zero, 1);

            TBUtils.SendMessageToMaster(TBUtils.WM_SETREDRAW, IntPtr.Zero, IntPtr.Zero, -1);
            RichTextInformationCollection selectedRTInfoprotected = SelectedRTInfopublic;
            int tmpSelStart  = TmpSelStart;
            int tmpSelLength = TmpSelLength;

            Select(TextLength, 0);
            WriteText();
            Select(tmpSelStart, tmpSelLength);
            Clipboard.SetDataObject(base.SelectedRtf, copy: true);
            SelectedRTInfopublic = selectedRTInfoprotected;
            WriteText();
            TBUtils.SendMessageToMaster(TBUtils.WM_SETREDRAW, (IntPtr)1, IntPtr.Zero, -1);
            TBUtils.SendMessageToMaster(TBUtils.EM_SETEVENTMASK, IntPtr.Zero, lParams, -1);
        }
Ejemplo n.º 2
0
 private void InitializeComponent()
 {
     SetStyle(System.Windows.Forms.ControlStyles.SupportsTransparentBackColor, true);
     components                = new System.ComponentModel.Container();
     STClientDel               = new AlphaUtils.AlphaRichTextBox.SMDel(DefWndProc);
     TBUtils                   = new AlphaUtils.Utilities(STClientDel, this);
     DrawCaret                 = true;
     Updating                  = false;
     DrawingCaret              = false;
     Scrolling                 = false;
     Ctrl                      = false;
     NewLine                   = false;
     APanel                    = new AlphaUtils.AlphaRichTextBox.AlphaPanel(this);
     TmpSelStart               = -1;
     BlinkCaretTimer           = new System.Timers.Timer(500.0);
     BlinkCaretTimer.Elapsed  += new System.Timers.ElapsedEventHandler(BlinkCaretTimer_Elapsed);
     BlinkCaretTimer.AutoReset = true;
     BlinkCaretTimer.Enabled   = false;
     SelectedRTInfopublic      = new AlphaUtils.RichTextInformationCollection();
     base.Controls.Add(APanel);
 }