你说的是代码的颜色风格吗?这个可以在Tools->Options->Environment->Fonts and Colors 下面设置
你是说文本编辑器? using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Threading; using System.Xml; using System.Media; namespace some_test { public partial class frmDelagate : Form { public frmDelagate() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { DataTable dt = new DataTable(); dt.ReadXml("XMLFile1.xml"); XmlDocument xd = new XmlDocument(); xd.Load("XMLFile1.xml"); // XmlNode xe = xd.ChildNodes; foreach (XmlNode xn in xd.FirstChild.ChildNodes) { foreach (XmlNode xxn in xn.ChildNodes) { Clipboard.SetText(xxn.InnerText); Thread.Sleep(2000); SendKeys.SendWait("^V"); SendKeys.SendWait("~"); } }蓝色代表关键字,红色是字符串,青色是类,绿色是译注
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Threading;
using System.Xml;
using System.Media;
namespace some_test
{
public partial class frmDelagate : Form
{
public frmDelagate()
{
InitializeComponent();
} private void button1_Click(object sender, EventArgs e)
{
DataTable dt = new DataTable();
dt.ReadXml("XMLFile1.xml");
XmlDocument xd = new XmlDocument();
xd.Load("XMLFile1.xml");
// XmlNode xe = xd.ChildNodes; foreach (XmlNode xn in xd.FirstChild.ChildNodes)
{
foreach (XmlNode xxn in xn.ChildNodes)
{
Clipboard.SetText(xxn.InnerText);
Thread.Sleep(2000);
SendKeys.SendWait("^V");
SendKeys.SendWait("~");
}
}蓝色代表关键字,红色是字符串,青色是类,绿色是译注