private void OutputRtfError( RichTextBoxEx rtbOut, string text, string error) { Rtf myRtf = new Rtf(_Fonts, _GridPanel.SuperGrid.FilterExprColors.Colors); myRtf.BeginGroup(true); myRtf.Font = 0; myRtf.FontSize = _FontSize; myRtf.ForeColor = (int)ExprColorPart.Default; myRtf.WriteText(text); myRtf.WriteText(" "); myRtf.ForeColor = (int)ExprColorPart.Error; myRtf.WriteLine(); myRtf.WriteLine(); myRtf.WriteText("(" + error + ")"); myRtf.EndGroup(); myRtf.Close(); rtbOut.Rtf = myRtf.RtfText; }
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(); } }