资源简介
环境为vs2005,可用于随机分组 抽签 摇奖,很有效,代码容易理解,可帮助学习。
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace DrawGroupAssistant
{
public partial class Form1 : Form
{
private Input oInput;
private InputGroup oInputGroup;
private string InfoRecei;
private string GroupNameRecei;
private int GroupQualRecei;
private Dictionary iDicPar;
public Form1()
{
InitializeComponent();
}
private void btnAddPar_Click(object sender EventArgs e)
{
oInput = new Input();
oInput.SendMessage += new Input.delShowMessage(this.AcceptMessage);
oInput.Owner = this;
oInput.Show();
this.Enabled = false;
}
private void btnDelPar_Click(object sender EventArgs e)
{
int rowindex;
try
{
rowindex = this.dgvParticipant.SelectedCells[0].RowIndex;
this.dgvParticipant.Rows.RemoveAt(rowindex);
UpdateParID();
}
catch
{
MessageBox.Show(“未选定要删除的人员“);
}
}
private void btnAddGroup_Click(object sender EventArgs e)
{
oInputGroup = new InputGroup();
oInputGroup.SendMessage +=new InputGroup.delShowMessage(this.AcceptGroupMessage);
oInputGroup.Owner = this;
oInputGroup.Show();
this.Enabled = false;
}
private void btnDelGroup_Click(object sender EventArgs e)
{
int rowindex;
try
{
rowindex = this.dgvGroup.SelectedCells[0].RowIndex;
this.dgvGroup.Rows.RemoveAt(rowindex);
}
catch
{
MessageBox.Show(“未选定要删除的组别“);
}
}
private void AcceptMessage(string strMessage)
{
InfoRecei = strMessage;
this.dgvParticipant.Rows.Add(1);
this.dgvParticipant.Rows[this.dgvParticipant.Rows.Count - 1].Cells[1].Value = InfoRecei;
UpdateParID();
}
private void AcceptGroupMessage(string strMessage int intQual)
{
GroupNameRecei = strMessage;
GroupQualRecei = intQual;
this.dgvGroup.Rows.Add(1);
this.dgvGroup.Rows[this.dgvGroup.Rows.Count - 1].Cells[0].Value = strMessage;
this.dgvGroup.Rows[this.dgvGroup.Rows.Count - 1].Cells[1].Value = intQual.ToString();
}
private void UpdateParID()
{
foreach (DataGridViewRow row in this.dgvParticipant.Rows)
{
row.Cells[0].Value = (row.Index + 1).ToString();
}
}
private void btnDraw_Click(objec
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 5612 2009-03-03 17:01 DrawGroupAssistant\DrawGroupAssistant\Properties\Resources.resx
文件 249 2009-03-03 17:01 DrawGroupAssistant\DrawGroupAssistant\Properties\Settings.settings
文件 1190 2009-03-03 17:01 DrawGroupAssistant\DrawGroupAssistant\Properties\AssemblyInfo.cs
文件 2890 2009-03-03 17:01 DrawGroupAssistant\DrawGroupAssistant\Properties\Resources.Designer.cs
文件 1101 2009-03-03 17:01 DrawGroupAssistant\DrawGroupAssistant\Properties\Settings.Designer.cs
文件 5296 2009-03-03 22:29 DrawGroupAssistant\DrawGroupAssistant\Form1.cs
文件 1257 2009-03-04 10:36 DrawGroupAssistant\DrawGroupAssistant\Input.cs
文件 5814 2009-03-04 10:36 DrawGroupAssistant\DrawGroupAssistant\Input.resx
文件 3946 2009-03-03 20:42 DrawGroupAssistant\DrawGroupAssistant\DrawGroupAssistant.csproj
文件 5632 2005-11-11 22:25 DrawGroupAssistant\DrawGroupAssistant\bin\Debug\DrawGroupAssistant.vshost.exe
文件 36864 2009-03-04 10:36 DrawGroupAssistant\DrawGroupAssistant\bin\Debug\DrawGroupAssistant.exe
文件 44544 2009-03-04 10:36 DrawGroupAssistant\DrawGroupAssistant\bin\Debug\DrawGroupAssistant.pdb
文件 9353 2009-03-04 10:37 DrawGroupAssistant\DrawGroupAssistant\bin\Debug\分组抽签助手.rar
文件 4252 2009-03-03 22:28 DrawGroupAssistant\DrawGroupAssistant\obj\Debug\DrawGroupAssistant.Form1.resources
文件 180 2009-03-04 10:36 DrawGroupAssistant\DrawGroupAssistant\obj\Debug\DrawGroupAssistant.Input.resources
文件 180 2009-03-04 10:36 DrawGroupAssistant\DrawGroupAssistant\obj\Debug\DrawGroupAssistant.InputGroup.resources
文件 180 2009-03-03 20:42 DrawGroupAssistant\DrawGroupAssistant\obj\Debug\DrawGroupAssistant.Properties.Resources.resources
文件 36864 2009-03-04 10:36 DrawGroupAssistant\DrawGroupAssistant\obj\Debug\DrawGroupAssistant.exe
文件 44544 2009-03-04 10:36 DrawGroupAssistant\DrawGroupAssistant\obj\Debug\DrawGroupAssistant.pdb
文件 963 2009-03-04 10:36 DrawGroupAssistant\DrawGroupAssistant\obj\Debug\DrawGroupAssistant.csproj.GenerateResource.Cache
文件 442 2009-07-17 10:35 DrawGroupAssistant\DrawGroupAssistant\obj\DrawGroupAssistant.csproj.FileList.txt
文件 1542 2009-12-07 15:09 DrawGroupAssistant\DrawGroupAssistant\obj\DrawGroupAssistant.csproj.FileListAbsolute.txt
文件 1548 2009-03-04 10:36 DrawGroupAssistant\DrawGroupAssistant\InputGroup.cs
文件 5125 2009-03-04 10:36 DrawGroupAssistant\DrawGroupAssistant\InputGroup.Designer.cs
文件 5814 2009-03-04 10:36 DrawGroupAssistant\DrawGroupAssistant\InputGroup.resx
文件 3694 2009-03-04 10:36 DrawGroupAssistant\DrawGroupAssistant\Input.Designer.cs
文件 13586 2009-03-03 22:21 DrawGroupAssistant\DrawGroupAssistant\Form1.resx
文件 14617 2009-03-03 22:21 DrawGroupAssistant\DrawGroupAssistant\Form1.Designer.cs
文件 477 2009-03-03 17:01 DrawGroupAssistant\DrawGroupAssistant\Program.cs
文件 943 2009-03-03 17:01 DrawGroupAssistant\DrawGroupAssistant.sln
............此处省略13个文件信息
相关资源
- C# winform文件目录复制 带进度条 类似
- C/S模式的TCP点对点聊天程序C#源码
- C#实现对Oracle数据库的增删改查
- C# 网络编程之socket tcp 通讯demo样例
- C#Socket编程.rar
- C# 绘图 矩形 椭圆 直线 曲线 带控制点
- C#_winform_多个窗体之间相互传递数据操
- C#_winform_DataGridView_checkbox复选框_实现
- C#上的echarts的
- C#实时检测USB设备的插拔并响应各个事
- C#围棋程序
- C#数据表格控件的应用数据库插入删除
- asp.net留言簿实验报告
- c#控制Visio画图
- C# 写的哈夫曼编码译码图形界面
- asp.net网站注册登录功能源码基于C#
- wpf 漂亮Treeview
- asp.net实现的网络教学平台源代码+数据
- c#对图像实现高斯滤波带阻滤波源码
- (源代码)C# Socket服务器和Tcp客户端
- C#图像分割
- 基于C#语言的导线测量程序(对话框)
- C#客户管理源代码
- c#串口通讯log存储及实时波形绘制代码
- Halcon生成的计算圆心C#代码
- C#局域网语音聊天点对点
- asp.net中用C#写的在线考试系统
- C# CRC 循环冗余校验算法
- C#网上招聘系统 源码
- CLR via C# 最新 中文完整版 高清
评论
共有 条评论