예제 #1
0
        private void OutPutWaterMarkText(RichTextBoxEx rtbOut)
        {
            if (_GridPanel != null &&
                string.IsNullOrEmpty(_WaterMarkText) == false)
            {
                Rtf myRtf = new Rtf(_Fonts,
                    _GridPanel.SuperGrid.FilterExprColors.Colors);

                myRtf.BeginGroup(true);

                myRtf.Font = 0;
                myRtf.FontSize = _FontSize;
                myRtf.CenterAlignText();

                myRtf.ForeColor = (int)ExprColorPart.Dim;

                myRtf.WriteLine();
                myRtf.WriteText(_WaterMarkText);

                myRtf.EndGroup();
                myRtf.Close();

                rtbOut.Rtf = myRtf.RtfText;
            }
            else
            {
                rtbOut.Clear();
            }
        }