资源简介
Showy.zip
代码片段和文件信息
/*--------------------------------------------*
* @author: 望生帝
* @email:1842534199@qq.com
* @date: 2019/1/18
* @Remarks: 富文本的文本高亮
*----------------------------------------------*/
using DevExpress.Utils.Extensions;
using DevExpress.XtraRichEdit.API.Native;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
namespace Showy
{
public partial class Form1 : DevExpress.XtraEditors.XtraForm
{
public Form1()
{
InitializeComponent();
//richEditControl1.Text = ““;
}
private void Form1_Load(object sender EventArgs e)
{
string a = “string“;
richEditControl1.Text = “11111111113333333333331111111122222222223333333333333222string“;
List list = new List { “嗨“ “欧阳“ };
Showy(richEditControl1 a);
Showy(richEditControl1 list);
memoEdit1.Text = “momoomoomomomomomomomomo“;
MEShowy(memoEdit1 “11“);
memoEdit1.Text += “89797“;
richTextBox1.Text = “hi我是欧阳,s今天很嗨11122343321323146t362“;
int start = 0;
int end = richTextBox1.Text.Length;
RTShowy(start end “今天“);
richTextBox1.AppendText(“啦啦啦“);
start = end;
end = richTextBox1.Text.Length;
RTShowy(start end “啦啦“);
RTShowy(“欧阳“);
RTShowy1(“你猜这次能不能成功“);
}
private void RTShowy1(string str)
{
int start = richTextBox1.Text.Length;
int end = start + str.Length;
richTextBox1.AppendText(str);//appendText 可以是格式不丢,但是只能给末尾添加 不能插入
int index = richTextBox1.Find(str start end RichTextBoxFinds.None);
richTextBox1.SelectionColor = Color.Red;
index = richTextBox1.Find(str start end RichTextBoxFinds.None);
}
private void RTShowy(int start int end string str)
{
int index = richTextBox1.Find(str start end RichTextBoxFinds.None);
richTextBox1.SelectionColor = Color.Red;
index = richTextBox1.Find(str start end RichTextBoxFinds.None);
}
private void RTShowy(string item)
{
int start = 0;
int end = this.richTextBox1.Text.Length;
int index = richTextBox1.Find(item start end RichTextBoxFinds.None);
while (index != -1)
{
richTextBox1.SelectionFont = new Font(richTextBox1.SelectionFont Fontstyle.Underline | Fontstyle.Bold);
richTextBox1.SelectionColor = Color.Red;
start = index + item.Length;
index = richTextBox1.Find(item start end RichTextBoxFinds.None);
}
}
private void MEShowy(DevExpress.XtraEditors.MemoEdit edit string str)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-01-20 01:26 Showy\
目录 0 2019-01-20 01:26 Showy\.vs\
目录 0 2019-01-20 01:26 Showy\.vs\Showy\
目录 0 2019-01-18 17:55 Showy\.vs\Showy\v14\
文件 54272 2019-01-18 17:52 Showy\.vs\Showy\v14\.suo
目录 0 2019-01-20 01:26 Showy\.vs\Showy\v15\
文件 67584 2019-01-21 11:42 Showy\.vs\Showy\v15\.suo
目录 0 2019-01-20 01:26 Showy\.vs\Showy\v15\Server\
目录 0 2019-01-20 01:26 Showy\.vs\Showy\v15\Server\sqlite3\
文件 0 2019-01-20 00:34 Showy\.vs\Showy\v15\Server\sqlite3\db.lock
文件 3600384 2019-01-21 10:59 Showy\.vs\Showy\v15\Server\sqlite3\storage.ide
文件 32768 2019-01-21 10:30 Showy\.vs\Showy\v15\Server\sqlite3\storage.ide-shm
文件 4124152 2019-01-21 11:42 Showy\.vs\Showy\v15\Server\sqlite3\storage.ide-wal
目录 0 2019-01-21 11:42 Showy\Showy\
文件 982 2019-01-18 11:27 Showy\Showy.sln
目录 0 2019-01-20 01:26 Showy\Showy\bin\
目录 0 2019-01-20 01:26 Showy\Showy\bin\Debug\
目录 0 2019-01-20 01:26 Showy\Showy\bin\Debug\de\
文件 20278000 2018-12-06 21:27 Showy\Showy\bin\Debug\DevExpress.BonusSkins.v18.1.dll
文件 6622960 2018-12-06 21:26 Showy\Showy\bin\Debug\DevExpress.Data.v18.1.dll
文件 1448204 2018-12-06 21:27 Showy\Showy\bin\Debug\DevExpress.Data.v18.1.xm
文件 4804848 2018-12-06 21:26 Showy\Showy\bin\Debug\DevExpress.Images.v18.1.dll
文件 2308336 2018-12-06 21:27 Showy\Showy\bin\Debug\DevExpress.Office.v18.1.Core.dll
文件 110033 2018-12-06 21:27 Showy\Showy\bin\Debug\DevExpress.Office.v18.1.Core.xm
文件 2972400 2018-12-06 21:27 Showy\Showy\bin\Debug\DevExpress.Pdf.v18.1.Core.dll
文件 367785 2018-12-06 21:27 Showy\Showy\bin\Debug\DevExpress.Pdf.v18.1.Core.xm
文件 4286704 2018-12-06 21:27 Showy\Showy\bin\Debug\DevExpress.Printing.v18.1.Core.dll
文件 1734268 2018-12-06 21:27 Showy\Showy\bin\Debug\DevExpress.Printing.v18.1.Core.xm
文件 6642416 2018-12-06 21:28 Showy\Showy\bin\Debug\DevExpress.RichEdit.v18.1.Core.dll
文件 2202543 2018-12-06 21:28 Showy\Showy\bin\Debug\DevExpress.RichEdit.v18.1.Core.xm
文件 90352 2018-12-06 21:27 Showy\Showy\bin\Debug\DevExpress.Sparkline.v18.1.Core.dll
............此处省略111个文件信息
相关资源
- 联雅ueeshop外贸商城.rar
- jdk11(更新版).CHM
- ANSYS工程结构数值分析--王新敏.pdf
- AI面相.rar
- 配资软件交易策略系统买点策略网站
- 1.轻松抓取QQ消息.rar
- 啦啦外卖跑腿14.1.0开源版带小程序前
- 数据结构附对应习题邓俊辉.pdf
- 酷家乐.zip
- 尚硅谷SpringCloud视频教程全集.7z
- 14935834_机动车行驶证PSD模板.zip
- NotifiListener.rar
- 快捷马秒余额教程.zip
- D1_20170926111430_1701_1.h264
- 网上商城SSH项目.zip
- Trafficware_Synchro_Studio_7.1_Build_773.zip
- C4droid4.1.0汉化版by傻傻_痴痴(1).zi
- GBT22239-2019信息安全技术网络安全等级
- Operating.System.Concepts.10th.Edition.2018.4.
- zw_MMC模块多电平变换器.zip
- U9老域名挖掘软件.rar
- eclipse4.6.1.rar
- 2015082818
- 郝海龙2019考研数学复习大全(无水印
- VA_X_Setup2231.zip
- QT5开发及.zip
- CSS世界_张鑫旭.rar
- AdobeAudition1.5.zip
- -高清-带目录版.pdf
- VisualAssistX_10.9.2086_Cracked.By.PiaoYun_P.Y
评论
共有 条评论