登录
首页 » C++ Builder » qiqiaobansrc

qiqiaobansrc

于 2012-09-26 发布 文件大小:45KB
0 175
下载积分: 1 下载次数: 9

代码说明:

  C#七巧板-C#创建菱形图案,其间使用了进程,示例适用于 Windows 窗体,它需要 PaintEventArgse,一个 OnPaint 事件对象。代码执行下列操作:   创建两个路径:一个为头朝上的三角形,另一个为头朝下的三角形。将第二个路径添加到第一个路径上。将最终的路径绘制到屏幕。   设置控件样式为双缓冲,可以有效减少图片闪烁的问题(Create a diamond pattern C# tangram-C#, during which use of the process, the example applies to Windows Forms, and it requires PaintEventArgs e, an OnPaint event object. The code performs the following actions: create two paths: a head-on the triangle, another triangle upside down. Add a second path to the first path. Draw the final path to the screen. Set the control style for double buffering, the picture flashes can be effective in reducing the problem)

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • C#实现tdms读操作
    使用C#语言读取Labview采集到的tdms格式数据(Using the C# language to read the TDMS format data collected by Labview)
    2018-02-27 16:39:38下载
    积分:1
  • CSharpmapx
    C#结合mapx简明编程例子。 实现加载地图,创建地图工具等功能。(C# Programming with mapx simple example.)
    2011-05-06 15:47:41下载
    积分:1
  • CSharp
    C#写的ADSL拨号程序示例 C#写的ADSL拨号程序示例(C#写的ADSL拨号程序示例)
    2009-12-06 17:43:42下载
    积分:1
  • MusicDownloader
    下载歌曲 通过网易云 qq音乐等 测试研究使用(for down music Test research use)
    2020-06-19 08:20:02下载
    积分:1
  • c# 扫描IP Http Header
    c# 扫描IP Http Headerusing System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Threading;using System.IO;namespace HScan{ public partial class Form1 : Form { int _currentThreads = 0; int _maxThreads = 100; Thread main = null; Thread mt = null; List threads = new List(); public Form1() { InitializeComponent(); Control.CheckForIllegalCrossThreadCalls = false; } private void btnStart_Click(object sender, EventArgs e) { btnStart.Enabled = false; if (txtStart.Text.Trim() == "") { MessageBox.Show("起始IP不能为空."); return; } if (txtEnd.Text.Trim() == "") { MessageBox.Show("结束IP不能为空."); return; } int ts = Convert.ToInt32(txtThreads.Text); _maxThreads = ts; string startIp = txtStart.Text; string endIp = txtEnd.Text; TParameter tp=new TParameter(); tp.StartIp=startIp; tp.EndIp=endIp; tp.ThreadCount=ts; main = new Thread(new ParameterizedThreadStart(StartMe)); main.Start(tp); } protected void ThreadManage() { Thread c=null; while (true) { System.Object lockThis = new System.Object(); lock (lockThis) { for (int i = 0; i < threads.Count; i ) { if (threads[i] != null && !threads[i].IsAlive) { c = threads[i]; break; } } if (c != null) { threads.Remove(c); } } } } protected void StartMe(object ob) { mt = new Thread(new ThreadStart(ThreadManage)); mt.Start(); TParameter p = ob as TParameter; string curIp = p.StartIp; while (true) { for (int i = 0; i < _maxThreads; i ) { if (curIp != "") { if (_currentThreads >= _maxThreads) break; System.Object lockThis = new System.Object(); lock (lockThis) { _currentThreads ; if (_currentThreads > _maxThreads) _currentThreads = _maxThreads; string tip = curIp; Thread t = new Thread(new ParameterizedThreadStart(Run)); t.Start(tip); threads.Add(t); curIp = IPUtility.getLastIp(curIp, p.EndIp, 1); } } else { break; } } } } protected void Run(object ob) { string ip = ob.ToString(); SocketGetHead h = new SocketGetHead(); string ret = h.GetHtml(ip, 80); if (ret.IndexOf("DVRDVS-Webs") > 0) { ListViewItem item = new ListViewItem(); item.SubItems[0].Text = (listView1.Items.Count 1).ToString(); ListViewItem.ListViewSubItem lvSubItem = new ListViewItem.ListViewSubItem(); lvSubItem.Text = ip; item.SubItems.Add(lvSubItem); lvSubItem = new ListViewItem.ListViewSubItem(); lvSubItem.Text = "DVRDVS-Webs"; item.SubItems.Add(lvSubItem); listView1.Items.Add(item); } System.Object lockThis = new System.Object(); lock(lockThis) { lblCurIp.Text = ip; _currentThreads--; if (_currentThreads < 0) _currentThreads = 0; } } private void tsmCopy_Click(object sender, EventArgs e) { if (listView1.SelectedItems.Count > 0) { string ip = listView1.SelectedItems[0].SubItems[1].Text; Clipboard.SetText(ip); } } private void tsmExport_Click(object sender, EventArgs e) { StreamWriter writer = new StreamWriter(AppDomain.CurrentDomain.BaseDirectory "\export.txt",true); foreach (ListViewItem item in listView1.Items) { string ip=item.SubItems[1].Text; writer.WriteLine(ip); writer.Flush(); } writer.Flush(); writer.Close(); MessageBox.Show("导出成功!"); } private void Form1_FormClosing(object sender, FormClosingEventArgs e) { try { if (mt != null) { mt.Interrupt(); mt.Abort(); } foreach (Thread t in threads) { t.Interrupt(); t.Abort(); } if (main != null) { main.Interrupt(); main.Abort(); } } catch { } Thread.Sleep(5000); } private void btnStop_Click(object sender, EventArgs e) { try { if (mt != null) { mt.Interrupt(); mt.Abort(); } foreach (Thread t in threads) { t.Interrupt(); t.Abort(); } if (main != null) { main.Interrupt(); main.Abort(); } } catch { } btnStart.Enabled = true; } }}
    2014-06-23下载
    积分:1
  • SocketThreadBlocking
    Socket多线程阻塞模式代码,包括Server和Client代码(Socket blocking mode multi-threaded code, including Server and Client Code)
    2010-03-16 09:23:56下载
    积分:1
  • CSharp.E-Kitap.Memik_Yanik
    Turkish programming book. C # Beginners book. Author Memik Yanı k.
    2012-08-23 14:59:48下载
    积分:1
  • 定时器 TimelyrainTimer - src
    定时器,界面写的差不多了,还不够完善,可以按每天,每周,每月,每年来增加定时器.(Timer, interface written about, but not perfect, you can press daily, weekly, monthly, annual to increase the timer.)
    2020-06-20 07:20:01下载
    积分:1
  • DarkUI-master
    Winforsm alternative ui using c# and a dark theme
    2018-08-18 18:46:21下载
    积分:1
  • qhull
    主要介绍了如何在vs2010中使用qhull库以及环境变量配置问题(The project mainly focus on how to set the envirenment variable of qhull library in vs2010)
    2021-03-03 16:59:32下载
    积分:1
  • 696516资源总数
  • 106475会员总数
  • 7今日下载