资源简介
用vs2008 c#实现各种票据打印,灵活的模板实现套打连打自定义票据尺寸以及票据的保存导出功能开发用时1个月同我朋友一起制作的呵呵。

代码片段和文件信息
using 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.Runtime.Serialization.Formatters.Binary;
using System.IO;
namespace BillSystem
{
///
/// 基类,提供基本功能
///
public partial class baseForm : Form
{
public baseForm()
{
InitializeComponent();
}
public Control cl = null;
protected String txt = ““;
public MainForm mf = null;
protected bool isok = true;
//Load
protected void baseForm_Load(object sender EventArgs e)
{
Model.Click += new EventHandler(Controls_Click);
}
//鼠标滚动
protected void baseForm_Scroll(object sender ScrollEventArgs e)
{
panMenu.Location = new Point(0 0);
}
//向模板添加控件
public virtual void Model_ControlAdded(object sender ControlEventArgs e)
{
var obj = e.Control;
Type type = obj.GetType();
if (type.Name == “TextBox“)
{
TextBox temp = (TextBox)obj;
temp.Multiline = true;
}
obj.Click += new EventHandler(Controls_Click);//注册事件
}
//控件单击事件
public virtual void Controls_Click(object sender EventArgs e)
{
cl = (Control)sender;
numWidth.Value = cl.Width;
numHeight.Value = cl.Height;
Console.WriteLine(cl.Name);
}
//位置调整
protected void btn_Click(object sender EventArgs e)
{
txt = ((Button)sender).Text;
if (cl != null)
{
setLocation();
}
}
//鼠标按下
protected void btn_MouseDown(object sender MouseEventArgs e)
{
txt = ((Button)sender).Text;
if (cl != null)
{
MoveTimer.Enabled = true;
}
}
//鼠标放开
protected void btn_MouseUp(object sender MouseEventArgs e)
{
MoveTimer.Enabled = false;
}
//快速位置移动
protected void MoveTimer_Tick(object sender EventArgs e)
{
setLocation();
}
//位置调整
protected void setLocation()
{
switch (txt)
{
case “上“:
cl.Location = new Point(cl.Location.X cl.Location.Y - 1);
break;
case “下“:
cl.Location = new Point(cl.Location.X cl.Location.Y + 1);
break;
case “左“:
cl.Location = new Point(cl.Location.X - 1 cl.Location.Y);
break;
case “右“:
cl.Location = new Point(cl.Loc
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 7440 2009-09-23 12:12 BillSystem\BillSystem\ba
文件 15857 2009-09-22 03:02 BillSystem\BillSystem\ba
文件 6571 2009-09-22 01:43 BillSystem\BillSystem\ba
文件 7031 2009-09-25 21:23 BillSystem\BillSystem\BillSystem.csproj
文件 84992 2009-09-26 17:53 BillSystem\BillSystem\bin\Debug\BillSystem.exe
文件 103936 2009-09-26 17:53 BillSystem\BillSystem\bin\Debug\BillSystem.pdb
文件 14328 2009-09-26 17:53 BillSystem\BillSystem\bin\Debug\BillSystem.vshost.exe
文件 490 2007-07-21 01:33 BillSystem\BillSystem\bin\Debug\BillSystem.vshost.exe.manifest
文件 1029 2009-09-26 17:53 BillSystem\BillSystem\bin\Debug\Data
文件 1093632 2009-09-26 17:53 BillSystem\BillSystem\bin\Debug\Interop.Excel.dll
文件 217088 2009-09-26 17:53 BillSystem\BillSystem\bin\Debug\Interop.Microsoft.Office.Core.dll
文件 57344 2009-09-26 17:53 BillSystem\BillSystem\bin\Debug\Interop.VBIDE.dll
文件 4233 2009-09-23 11:56 BillSystem\BillSystem\ContriveForm.cs
文件 7736 2009-09-23 11:56 BillSystem\BillSystem\ContriveForm.designer.cs
文件 6571 2009-09-23 11:56 BillSystem\BillSystem\ContriveForm.resx
文件 9368 2009-09-22 15:20 BillSystem\BillSystem\DataDispose.cs
文件 4720 2009-09-22 15:11 BillSystem\BillSystem\DataDisposeForm.cs
文件 11252 2009-09-22 14:26 BillSystem\BillSystem\DataDisposeForm.designer.cs
文件 6005 2009-09-22 14:26 BillSystem\BillSystem\DataDisposeForm.resx
文件 5086 2009-09-23 22:59 BillSystem\BillSystem\GreatChar.cs
文件 6319 2009-09-26 17:48 BillSystem\BillSystem\MainFrom.cs
文件 12506 2009-09-26 17:37 BillSystem\BillSystem\MainFrom.designer.cs
文件 25590 2009-09-26 17:37 BillSystem\BillSystem\MainFrom.resx
文件 9928 2009-09-26 17:50 BillSystem\BillSystem\ModelForm.cs
文件 7991 2009-09-26 17:50 BillSystem\BillSystem\ModelForm.designer.cs
文件 6762 2009-09-26 17:50 BillSystem\BillSystem\ModelForm.resx
文件 2407 2009-09-22 01:13 BillSystem\BillSystem\NewControlForm.cs
文件 13071 2009-09-18 13:35 BillSystem\BillSystem\NewControlForm.designer.cs
文件 25231 2009-09-18 13:35 BillSystem\BillSystem\NewControlForm.resx
文件 180 2009-09-26 17:53 BillSystem\BillSystem\obj\Debug\BillSystem.ba
............此处省略39个文件信息
- 上一篇:C# 语法全解
- 下一篇:一个很不错的C#录音控件源码,帮您提供提示出错的解决方案
相关资源
- 超市进销存管理系统 Sqlserver 数据库文
- asp.net C#购物车源代码
- 智慧城市 智能家居 C# 源代码
- c# winform 自动登录 百度账户 源代码
- C# 使用ListView控件实现图片浏览器(源
- C# TCP通讯组件源代码
- C#版IE浏览器源代码
- C#使用GDI 绘制汽车车速表等量表源代
- 用C#绘制正弦曲线,要用到Form1_Resiz
- 随机抽题系统C#源代码
- 医院业务管理系统(C#源代码)
- 远程监控(C#源代码)
- AssetStudio V0.16.0 源代码 使用VS2019
- 热血江湖20服务端源代码
- C# 取色工具源代码(RGB)
- C# 人员随机分组抽签工具及源代码
- C# Access版资产管理系统源代码
- 酒店电子管理系统winform源代码(附数
- 研究生信息管理系统(附数据库)
- C#图书管理系统(源代码+数据库+系统
- WPF翻页照片特效浏览源代码
- 《C#面向对象程序设计》源代码(CS)
- [源代码] 《领域驱动设计 (C# 2008 实
- asp.net 在线聊天室系统源代码.rar
- C#锁屏软件(真正禁用ctrl+alt+del,含源
- zw_ASP.NET通用权限管理系统源代码含文
- delta机器人运动学算法正向逆向求解
- OA系统+手机版源码t源代码
- C#斗地主源代码
- C#项目开发案例全程实录源代码
评论
共有 条评论