-
决战NEO服务器端源码
完整得决战NEO服务器端源码,修改一下可以自己直接使用
- 2022-12-01 18:10:07下载
- 积分:1
-
C# 根据路径使用DirectoryInfo创建文件夹
C# 根据路径创建文件夹,具体来说是使用DirectoryInfo对象的Create方法创建文件夹【目录】。如果用户未指定路径,则在程序当前目录下创建文件夹,若指定路径,则在指定的路径层级下创建目录。
在创建开始前,对用户输入的目录名或路径格式进行验证,然后判断该路径下是否存在该目录,最后创建文件夹。下面是相关的代码:
if (textBox1.Text == string.Empty)//判断输入的文件夹名称是否为空
{
MessageBox.Show("文件夹名称不能为空!");
}
else
{
DirectoryInfo dinfo = new DirectoryInfo(textBox1.Text);//实例化DirectoryInfo类对象
if (dinfo.Exists)//使用DirectoryInfo对象的Exists属性判断要创建的文件夹是否存在
{
MessageBox.Show("该文件夹已经存在");
}
else
{
dinfo.Create();//使用DirectoryInfo对象的Create方法创建文件夹
}
}
- 2023-02-21 06:20:03下载
- 积分:1
-
C# WPF实现变形和位移动画效果
C# WPF实现变形和位移动画效果,运行本源码生成的EXE程序,会看到窗口中的方块发生形变动画,位移也会发生移动,生成了多个阶段的动画,方块先向右、再向下运动,这个过程中形状大小同时变化,用Wpf可以很容易的实现这种效果,期待感兴趣的C#爱好者学习研究源代码,运行效果如下图所示。
- 2023-08-12 17:55:03下载
- 积分:1
-
C#演示如何正确关闭程序
C#演示如何正确关闭程序,这是一个Wpf窗体实例,演示WPF窗口如何才是正确的关闭方法。
其实下边这句话最重要:
正确关闭程序的方法:App.Current.Shutdown();
具体的代码写法如下:
//文件名称:Window1.xaml.cs
private void button1_Click(object sender, RoutedEventArgs e)
{//正确关闭程序
App.Current.Shutdown();
}
- 2023-04-28 12:25:02下载
- 积分:1
-
7Zip
This file is part of SevenZipSharp. SevenZipSharp is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. SevenZipSharp is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with SevenZipSharp. If not, see .
- 2022-07-20 00:09:31下载
- 积分:1
-
Zigbee智能家居完整的源代码
Zigbee智能家居完整的源代码,含有终端和协调器工程并带有汉语注释。非常适合Zigbee开发。-Zigbee Smart Home complete source code, containing the terminal and the coordinator works with Chinese comments. Very suitable for the Zigbee development.
- 2022-03-05 18:50:08下载
- 积分:1
-
C# WPF 图片旋转、放大、扭曲、平移、不透明蒙版等
这是一个C#图像处理程序,把一张图片平移、顺时针角度旋转、按一定角度扭曲、使用不透明蒙版等功能,以下是实现具体功能的代码,把这些处理功能封装到按钮事件中:
private void button2_Click(object sender, RoutedEventArgs e)
{//缩放图像
if (this.button2.Content=="放大图像")
{
ScaleTransform MyScaleTransform = new ScaleTransform();
MyScaleTransform.CenterX = this.image1.Width / 2;
MyScaleTransform.CenterY = this.image1.Height / 2;
MyScaleTransform.ScaleX = 1.5;
MyScaleTransform.ScaleY = 1.5;
this.image1.RenderTransform = MyScaleTransform;
this.button2.Content = "缩小图像";
}else{
ScaleTransform MyScaleTransform = new ScaleTransform();
MyScaleTransform.CenterX = this.image1.Width / 2;
MyScaleTransform.CenterY = this.image1.Height / 2;
MyScaleTransform.ScaleX = 0.5;
MyScaleTransform.ScaleY = 0.5;
this.image1.RenderTransform = MyScaleTransform;
this.button2.Content = "放大图像";
}
}
private void button3_Click(object send
- 2023-01-22 02:10:03下载
- 积分:1
-
C#制作闪烁的按钮特效
C#制作闪烁的按钮特效,打开本程序,运行后窗口上的按钮快速闪烁,可起到吸引人注意的效果,实现方法基于WPF的编程概念。运行效果如演示截图所示。注意:不是窗口闪烁,是窗口内的按钮闪烁哦。
- 2022-10-31 16:30:02下载
- 积分:1
-
C#将listBox值添加到Textbox控件中
C#将listBox值添加到Textbox控件中,在Listbox中输入任意内容,单击添加按钮即可将此内容添加到Textbox文本框中显示,同时还将值从ListBox中移除:
添加值:
listBox1.Items.Add(textBox1.Text);
textBox1.Text = "";
将值从listBox移除:
listBox1.Items.Remove(listBox1.SelectedItem);
- 2022-06-15 11:46:02下载
- 积分:1
-
C#使用微信模拟发送post消息请求
C#模拟发送post请求,使用微信模拟消息,Post请求模拟器。
WebClient wc = new WebClient();
wc.Headers.Add("Content-Type", "application/x-www-form-urlencoded");
byte[] postdata = Encoding.UTF8.GetBytes(poststr);
byte[] responseData = wc.UploadData(textBox3.Text, "POST", postdata);//得到返回字符流
textBox2.Text = Encoding.UTF8.GetString(responseData);
- 2022-11-24 04:30:03下载
- 积分:1