打印。先来先得
string File_path = vip + @"\" + mC_cardNumber.Text + "_" + DateTime.Now.ToString("yyyy年MM月dd日hh时mm分") + ".txt ";
FileStream fs = new FileStream(File_path, FileMode.OpenOrCreate);
StreamWriter sw = new StreamWriter(fs);
sw.WriteLine(" ");
sw.WriteLine(" ");
sw.WriteLine(" 欢 迎 来 到 本 店 ");
sw.WriteLine("------------------------------------");
sw.WriteLine(" 卡 号:" + mC_cardNumber.Text);
sw.WriteLine(" 会员姓名:" + mI_memberName.Text);
sw.WriteLine(" 卡 名 称:" + mC_cardName.Text);
sw.WriteLine(" 卡中余额:" + residualMoney.Text);
sw.WriteLine(" 充值金额:" + rC_rechargeMoney.Text);
sw.WriteLine(" 收 银 员:" + s_staffName.Text);
sw.WriteLine(" 充值时间:" + DateTime.Now.ToString("yyyy年MM月dd日hh时mm分"));
sw.Close();
sw.Dispose();
fs.Close();
这是我把它写在文件里,
class POSPrinter{}这是我的连接打印机的类,已经写好了,我想把上面的代码连接打印机怎么做啊
------解决方案--------------------
POSPrinter p = new POSPrinter();
然后调用 p.xxxxxx 去打印