-
lua
lua源码 可编译 安装 使用库 内有说明文档readme.html lua是广泛使用的脚本语言,用途广泛
- 2023-03-10 12:30:04下载
- 积分:1
-
C#抓取(采集)糗事百科网站内容的源码
C#模拟采集获取指定网站内容的源码,获取糗事百科的笑话内容,有点像搜索引擎的爬虫,可以顺着链接获取网站资源,源代码将根据糗事百科笑话页面索引获取笑话页的html源码,根据网页的url获取网页的html源码,可以获取糗事百科网站的获取笑话列表,自动匹配匿名用户,注,本源码只是一个C#获取网页内容的示例,并不能真正用于采集,那需要额外完成更多的代码编写。
- 2022-04-17 12:56:51下载
- 积分:1
-
C# WPF 使用图像控件显示绘制的文本字符串
C# WPF 使用图像控件显示绘制的文本字符串,这里将文字绘制成渐变色样式,十分漂亮,颜色值和字体样式可在实例源码目录的Window1.xaml.cs文件中修改,代码如下:
用图像控件显示绘制的文本字符串
RadialGradientBrush MyRadialGradientBrush = new RadialGradientBrush();
//对颜色的定义
MyRadialGradientBrush.GradientOrigin = new Point(0.5, 0.5);
MyRadialGradientBrush.Center = new Point(0.5, 0.5);
MyRadialGradientBrush.RadiusX = 0.5;
MyRadialGradientBrush.RadiusY = 0.5;
MyRadialGradientBrush.GradientStops.Add(new GradientStop(Colors.Yellow, 0.0));
MyRadialGradientBrush.GradientStops.Add(new GradientStop(Colors.Red, 0.25));
MyRadialGradientBrush.GradientStops.Add(new GradientStop(Colors.Blue, 0.75));
MyRadialGradientBrush.GradientStops.Add(new GradientStop(Colors.LimeGreen, 1.0));
MyRadialGradientBrush.Freeze();
FontStyle MyStyle = FontStyles.Normal;
FontWeight MyWeight = FontWeights.Medium;
MyWeight = FontWeights.Bold;
MyStyle = FontStyles.Italic;
//要显示字体的定义
string MyText = "开源爱好者";
var MyFont = new FontFamily("宋体");、、字体样式的定义,默认为宋体
FormattedText MyFo
- 2023-04-06 04:45:04下载
- 积分:1
-
C# 响应新增系统菜单项命令
C# 制作的响应式菜单,响应新增系统菜单项命令,在标题栏单击鼠标右键,会显示出菜单,单击“新增菜单”会响应该菜单的点击,新增了一项自定义的菜单项及命令,实现过程如下:
protected override void WndProc(ref Message SystemMessage)
{//响应新增系统菜单项命令
switch (SystemMessage.Msg)
{
case WM_SYSCOMMAND:
if (((int)SystemMessage.WParam) == WM_USER + 2)
MessageBox.Show("响应新增系统菜单项命令", "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
else
base.WndProc(ref SystemMessage);
break;
default:
base.WndProc(ref SystemMessage);
break;
}
}
- 2022-07-16 20:46:37下载
- 积分:1
-
C#编写winForm版的数据库创建数据表程序
C#编写winForm版的数据库创建数据表程序,通过查询语句来创建数据表,用户可在窗口内输入需要创建的数据表名称,点击操作按钮,转入程序执行阶段,将使用SQL语句来生成数据表,窗口运行效果如图所示。
- 2022-03-11 17:55:01下载
- 积分:1
-
中国象棋源代码
中国象棋源代码,使用Visual c++编写,对喜欢象棋的朋友,可以研究一下算法,具有很好的参考价值~
- 2022-06-03 11:54:15下载
- 积分:1
-
C# 以WrapWithOverflow方式、Wrap方式、NoWrap方式显示文字
C#以三种方式显示文字,分别以WrapWithOverflow方式、Wrap方式、NoWrap方式将文字显示在窗口中,这三种方式实现的代码请看以下代码:
private void button1_Click(object sender, RoutedEventArgs e)
{//WrapWithOverflow方式
this.MyTextBlock.TextWrapping = System.Windows.TextWrapping.WrapWithOverflow;
}
private void button3_Click(object sender, RoutedEventArgs e)
{//Wrap方式
this.MyTextBlock.TextWrapping = System.Windows.TextWrapping.Wrap;
}
private void button2_Click(object sender, RoutedEventArgs e)
{//NoWrap方式
this.MyTextBlock.TextWrapping = System.Windows.TextWrapping.NoWrap;
}
- 2022-01-25 20:43:04下载
- 积分:1
-
C#合成图片 组合文字及图像的实例
C# 将多个文字图形图像组合成复合图形,一个组合文字及图像的实例。基于WPF技术实现,可作为一个C#学习WPF图像处理的简单范例。C# 将多个文字图形图像组合成复合图形:
DrawingGroup MyGroup = new DrawingGroup();
RadialGradientBrush MyRadialGradientBrush = new RadialGradientBrush();
MyRadialGradientBrush.Freeze();
FontStyle MyStyle = FontStyles.Normal;
FontWeight MyWeight = FontWeights.Medium;
MyWeight = FontWeights.Bold;
MyStyle = FontStyles.Italic;
string MyText = "Visual C++ 2017源码素材网实例精粹罗斌编著";
var MyFont = new FontFamily("宋体");
FormattedText MyFormattedText = new FormattedText(MyText,
System.Globalization.CultureInfo.GetCultureInfo(86),
FlowDirection.RightToLeft,
new Typeface(MyFont, MyStyle, MyWeight, FontStretches.Normal),
FontSize, MyRadialGradientBrush);
Pen MyPen = new Pen(Brushes.Black, 2);
MyPen.Freeze();
……
更多源代码敬请下载本源码。运行截图如下图所示。
- 2022-06-30 08:36:55下载
- 积分:1
-
C# 修复Access数据库的一个范例程序
C# 修复Access数据库的一个范例程序,不过不知道到底能不能修复吧,这个修复过程的编写,可参考以下代码:
//声明临时数据库的名称
string temp = DateTime.Now.Year.ToString();
temp += DateTime.Now.Month.ToString();
temp += DateTime.Now.Day.ToString();
temp += DateTime.Now.Hour.ToString();
temp += DateTime.Now.Minute.ToString();
temp += DateTime.Now.Second.ToString() + ".bak";
temp = strPathMdb.Substring(0, strPathMdb.LastIndexOf("") + 1) + temp;
//定义临时数据库的连接字符串
string temp2 = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + temp;
//定义目标数据库的连接字符串
string strPathMdb2 = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + strPathMdb;
JRO.JetEngineClass jt = new JRO.JetEngineClass();//创建一个JetEngineClass对象
//使用JetEngineClass对象的CompactDatabase方法压缩修复数据库
jt.CompactDatabase(strPathMdb2, temp2);
File.Copy(temp, strPathMdb, true);//拷贝临时数据库到目标数据库(覆盖)
File.Delete(temp);//删除临时数据库
MessageBox.Show("修复完成");
这个程序中使用了三个类库:Interop.ADODB.dll、Interop.ADOX.dll、Interop.JRO.dll。
- 2022-01-26 03:31:51下载
- 积分:1
-
恒拓开源飞控
纯C代码开发的开源飞控,不用操作系统,裸机程序稳定性更高
- 2022-06-12 04:39:04下载
- 积分:1