資源簡介
用vs2008 c#實(shí)現(xiàn)各種票據(jù)打印,靈活的模板實(shí)現(xiàn)套打連打自定義票據(jù)尺寸以及票據(jù)的保存導(dǎo)出功能開發(fā)用時(shí)1個(gè)月同我朋友一起制作的呵呵。

代碼片段和文件信息
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);
????????}
????????//鼠標(biāo)滾動(dòng)
????????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);//注冊(cè)事件
????????}
????????//控件單擊事件
????????public?virtual?void?Controls_Click(object?sender?EventArgs?e)
????????{
????????????cl?=?(Control)sender;
????????????numWidth.Value?=?cl.Width;
????????????numHeight.Value?=?cl.Height;
????????????Console.WriteLine(cl.Name);
????????}
????????//位置調(diào)整
????????protected?void?btn_Click(object?sender?EventArgs?e)
????????{
????????????txt?=?((Button)sender).Text;
????????????if?(cl?!=?null)
????????????{
????????????????setLocation();
????????????}
????????}
????????//鼠標(biāo)按下
????????protected?void?btn_MouseDown(object?sender?MouseEventArgs?e)
????????{
????????????txt?=?((Button)sender).Text;
????????????if?(cl?!=?null)
????????????{
????????????????MoveTimer.Enabled?=?true;
????????????}
????????}
????????//鼠標(biāo)放開
????????protected?void?btn_MouseUp(object?sender?MouseEventArgs?e)
????????{
????????????MoveTimer.Enabled?=?false;
????????}
????????//快速位置移動(dòng)
????????protected?void?MoveTimer_Tick(object?sender?EventArgs?e)
????????{
????????????setLocation();
????????}
????????//位置調(diào)整
????????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
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件???????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個(gè)文件信息
評(píng)論
共有 條評(píng)論