-
程序守护(进程守护)-源代码C#
程序守护(进程守护)-源代码C#
/*
* 由SharpDevelop创建。
* 用户: zhang
* 日期: 2017/3/18
* 时间: 21:50
* 要改变这种模板请点击 工具|选项|代码编写|编辑标准头文件
*/
using System;
using System.Diagnostics;
using System.Drawing;
using System.Threading;
using System.Windows.Forms;
namespace CPinfoSafe
{
public sealed class NotificationIcon
{
private NotifyIcon notifyIcon;
private ContextMenu notificationMenu;
DialogResult dr;
#region Initialize icon and menu
public NotificationIcon()
{
notifyIcon = new NotifyIcon();
notificationMenu = new ContextMenu(InitializeMenu());
notifyIcon.DoubleClick += IconDoubleClick;
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NotificationIcon));
notifyIcon.Icon = (Icon)resources.Get
- 2022-11-01 19:35:03下载
- 积分:1
-
C# 抓鬼游戏,类似打地鼠游戏
C# 抓鬼游戏,其实类似于打地鼠游戏,看到地上那些洞洞,让我想起了打地鼠,呵呵。不过玩法上也很相似,只是地鼠变成了“魔鬼”,开启游戏后,按键盘上的空格键可开始游戏。
bool isStart = false;
Random rd;//随机数对象
int[,] points;//地鼠出现坐标
int score;//积分
int level;//游戏等级
bool ok = true;//用于解决鼠标快速连击所产生的积分增加
ok = false;//使ok为false,再次点击时由于不满足上面的if条件便不执行后面的操作
//this.Cursor = new Cursor("SizeDown.cur");
score += 100;//积分增加
this.pictureBox1.Visible = false;//使地鼠消失
lblScore.Text = score.ToString();
//若当前积分是2000的倍数则升级且加快计时器速度
- 2022-12-21 06:25:03下载
- 积分:1
-
C# 轨迹动画 使动画对象沿着贝塞尔曲线平滑移动
C# 轨迹动画 使动画对象沿着贝塞尔曲线平滑移动,很明显的你会看到,小球是沿着给定的路径运动的,一会向上,一会向下运动,很明显的转变动画,在本例中,这个轨迹是贝塞尔曲线.
- 2022-09-18 20:15:03下载
- 积分:1
-
C# 利用数据对象修改数据
C# 利用数据对象修改数据,就是简单的修改数据库中的数据,利用数据对象来修改。运行效果如视图所示。本示例代码 中定义了向个C#操作数据库的方法,比如:从数据库中获取指定数据记录、在窗体中显示指定数据记录等。
- 2023-05-31 11:00:03下载
- 积分:1
-
C# 从RichTextBox 控件中提取文本内容
C# 从RichTextBox 控件中提取文本内容,并设置RichTextBox 控件中的字体大小-附完整源代码,
private void button1_Click(object sender, RoutedEventArgs e)
{//从RichTextBox 控件中提取文本内容
TextRange MyText = new TextRange(this.richTextBox1.Document.ContentStart, this.richTextBox1.Document.ContentEnd);
MessageBox.Show(MyText.Text, "RichTextBox控件中的文本内容",MessageBoxButton.OK);
}
private void button2_Click(object sender, RoutedEventArgs e)
{//设置RichTextBox 控件中的字体大小
TextRange MyText = new TextRange(this.richTextBox1.Document.ContentStart, this.richTextBox1.Document.ContentEnd);
MyText.ApplyPropertyValue(TextElement.FontSizeProperty, 36.00);
MyText.ApplyPropertyValue(TextElement.FontWeightProperty, FontWeights.Bold);
- 2022-09-21 17:55:02下载
- 积分:1
-
C# 含云台控制的视频监控系统源代码
C# 小型的视频监控系统完整源码,含有云台控制系统,主要功能如下:
1.支持云台控制,以监控各个角落。
2.可对监控画面进行快照和录像操作。
3.可以回放观看已经录制的视频的文件。
4.晚上的系统注册功能。
5.对云台的聚焦、对焦、光圈及雨刷的控制操作。操作者可通过“方向控制”区域下的各个按钮,对云台进行上、下、左、右控制。
系统管理员用户名为:Tsoft,密码为:111。
本系统中的“视频回放”模块时,需要在Windows XP或者更高版本Windows上运行,Windows7当然可以。
- 2022-01-26 04:29:13下载
- 积分:1
-
C# 利用AND运算符进行查询
C# 利用AND运算符进行查询,查询外语成绩和高数成绩都大于80的学生信息。相关的SQL语句写法和自定义如下:
string P_Str_ConnectionStr = string.Format(//创建数据库连接字符串
@"server=WIN-GI7E47AND9RLS;database=db_TomeTwo;uid=sa;pwd=");
string P_Str_SqlStr = string.Format(//创建SQL查询字符串
"SELECT * FROM tb_Grade WHERE 外语>80 AND 高数>80");
SqlDataAdapter P_SqlDataAdapter = new SqlDataAdapter(//创建数据适配器
P_Str_SqlStr, P_Str_ConnectionStr);
DataTable P_dt = new DataTable();//创建数据表
P_SqlDataAdapter.Fill(P_dt);//填充数据表
return P_dt;//返回数据表
- 2023-08-29 10:55:04下载
- 积分:1
-
串口调试助手源代码
串口调试源代码,这是我用得最多的串口调试工具,源代码用Visual c++6.0编写,代码有很好的学习参考价值,值得推荐~
- 2023-05-08 10:40:03下载
- 积分:1
-
C# WPF实现图片浮雕、凹凸的图像效果
Visual C# WPF实现图片浮雕、凹凸的图像效果,看上去很有雕刻的效果,这个功能对于熟悉PS的朋友,可能不陌生,用C#的WPF技术,可以轻松实现类似效果,只是说法不一样,在本例中,叫做“凹凸位图特效”,本代码在功能实现上,分为全部实现和局部实现,代码参考如下:
private void button1_Click(object sender, RoutedEventArgs e)
{//凹凸位图特效全部作用于图像
this.image1.BitmapEffectInput = null;
var MyEffect = new System.Windows.Media.Effects.EmbossBitmapEffect();
MyEffect.Relief = 0.8;
MyEffect.LightAngle =320;
this.image1.BitmapEffect = MyEffect;
}
private void button2_Click(object sender, RoutedEventArgs e)
{//凹凸位图特效部分作用于图像
var MyEffect = new System.Windows.Media.Effects.EmbossBitmapEffect();
MyEffect.Relief = 0.8;
MyEffect.LightAngle = 320;
this.image1.BitmapEffect = MyEffect;
var MyInput = new System.Windows.Media.Effects.BitmapEffectInput();
MyInput.AreaToApplyEffect = new Rect(.25, .25, .50, .50);
MyInput.AreaToApplyEffectUnits = System.Windows.Media.BrushMappingMode.RelativeToBoundingBox;
this.image1.BitmapEffectInput= MyInput;
}
完整
- 2022-02-20 09:13:59下载
- 积分:1
-
STM32F4的三相SPWM逆变器源码
STM32F4的三相SPWM逆变器源码
//该源码是基于STM32F4的三相SPWM逆变器的C程序
#include "stm32f4_discovery.h"
#include "timer.h"
#include "FONT.h"
#include "LCD12864.h"
#include "outputdata.h"
#include
#include "arm_math.h"
- 2022-03-30 05:56:10下载
- 积分:1