资源简介

功能 搜索网络打印机 添加网络打印机 搜索本地打印机 设置默认打印机 打印设置 打印预览 打印 目前只有文本打印

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Printer
{
    public class CommHelper
    {
        private static CommHelper _instance = new CommHelper();

        public static CommHelper Instance
        {
            get
            {
                return _instance;
            }
        }

        #region  纸张大小的设置

        /// 
        /// 纸张大小的设置
        /// 

        /// 纸张名称
        /// 纸张宽度
        /// 纸张高度
        public void Page_Size(string pageN ref int PrintPageWidth ref int PrintPageHeight)
        {
            switch (pageN)
            {
                case “A5“: PrintPageWidth = 583; PrintPageHeight = 827; break;
                case “A6“: PrintPageWidth = 413; PrintPageHeight = 583; break;
                case “B5(ISO)“: PrintPageWidth = 693; PrintPageHeight = 984; break;
                case “B5(JIS)“: PrintPageWidth = 717; PrintPageHeight = 1012; break;
                case “Double Post Card“: PrintPageWidth = 583; PrintPageHeight = 787; break;
                case “Envelope #10“: PrintPageWidth = 412; PrintPageHeight = 950; break;
                case “Envelope B5“: PrintPageWidth = 693; PrintPageHeight = 984; break;
                case “Envelope C5“: PrintPageWidth = 638; PrintPageHeight = 902; break;
                case “Envelope DL“: PrintPageWidth = 433; PrintPageHeight = 866; break;
                case “Envelope Monarch“: PrintPageWidth = 387; PrintPageHeight = 750; break;
                case “ExeCutive“: PrintPageWidth = 725; PrintPageHeight = 1015; break;
                case “Legal“: PrintPageWidth = 850; PrintPageHeight = 1400; break;
                case “Letter“: PrintPageWidth = 850; PrintPageHeight = 1100; break;
                case “Post Card“: PrintPageWidth = 394; PrintPageHeight = 583; break;
                case “16K“: PrintPageWidth = 775; PrintPageHeight = 1075; break;
                case “8.5x13“: PrintPageWidth = 850; PrintPageHeight = 1300; break;
            }
        }
        #endregion

    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      26112  2011-09-08 14:38  Printer\bin\Debug\Printer.exe

     文件      62976  2011-09-08 14:38  Printer\bin\Debug\Printer.pdb

     文件      11600  2011-09-08 14:36  Printer\bin\Debug\Printer.vshost.exe

     文件        490  2010-03-17 22:39  Printer\bin\Debug\Printer.vshost.exe.manifest

     文件       2267  2011-09-06 14:13  Printer\CommHelper.cs

     文件      12640  2011-09-08 14:38  Printer\Form1.cs

     文件       8745  2011-09-07 16:37  Printer\Form1.Designer.cs

     文件       6222  2011-09-07 16:37  Printer\Form1.resx

     文件       3963  2011-09-05 14:29  Printer\MyEnumPrinters.cs

     文件       4440  2011-09-05 14:16  Printer\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache

     文件       6307  2011-09-08 14:41  Printer\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件        556  2011-09-08 09:11  Printer\obj\x86\Debug\GenerateResource.read.1.tlog

     文件       1886  2011-09-08 09:11  Printer\obj\x86\Debug\GenerateResource.write.1.tlog

     文件       1288  2011-09-08 14:36  Printer\obj\x86\Debug\Printer.csproj.FileListAbsolute.txt

     文件      26112  2011-09-08 14:38  Printer\obj\x86\Debug\Printer.exe

     文件        180  2011-09-08 09:11  Printer\obj\x86\Debug\Printer.Form1.resources

     文件      62976  2011-09-08 14:38  Printer\obj\x86\Debug\Printer.pdb

     文件        180  2011-09-08 09:11  Printer\obj\x86\Debug\Printer.Properties.Resources.resources

     文件        180  2011-09-08 09:11  Printer\obj\x86\Debug\Printer.Setting.resources

     文件       8626  2011-09-05 14:20  Printer\obj\x86\Debug\ResolveAssemblyReference.cache

     文件       4214  2011-09-07 13:26  Printer\Printer.csproj

     文件       4596  2011-09-07 15:37  Printer\PrinterHelper.cs

     文件       1280  2011-09-06 16:18  Printer\PrintSetting.cs

     文件        488  2011-09-05 10:40  Printer\Program.cs

     文件       1366  2011-09-05 10:40  Printer\Properties\AssemblyInfo.cs

     文件       2864  2011-09-05 10:40  Printer\Properties\Resources.Designer.cs

     文件       5612  2011-09-05 10:40  Printer\Properties\Resources.resx

     文件       1092  2011-09-05 10:40  Printer\Properties\Settings.Designer.cs

     文件        249  2011-09-05 10:40  Printer\Properties\Settings.settings

     文件       3218  2011-09-06 14:36  Printer\Setting.cs

............此处省略14个文件信息

评论

共有 条评论