zoukankan      html  css  js  c++  java
  • WPF SDK研究 Printing (2) EnumerateSubsetOfPrintQueues

    EnumerateSubsetOfPrintQueues
        shows how to use the EnumeratedPrintQueueTypes enumeration to get a subset of available print queues
        这个Sample倒也简单,只有一个Main函数,讲的是EnumeratedPrintQueueTypes枚举,通过其两个值Local和Shared将本地和共享的打印机全都找出来。

            static void Main(string[] args)
            
    {
                
    // Specify that the list will contain only the print queues that are installed as local and are shared
                EnumeratedPrintQueueTypes[] enumerationFlags = {EnumeratedPrintQueueTypes.Local,
                                                                EnumeratedPrintQueueTypes.Shared}
    ;

                LocalPrintServer printServer 
    = new LocalPrintServer();

                
    //Use the enumerationFlags to filter out unwanted print queues
                PrintQueueCollection printQueuesOnLocalServer = printServer.GetPrintQueues(enumerationFlags);

                Console.WriteLine(
    "These are your shared, local print queues:\n\n");

                
    foreach (PrintQueue printer in printQueuesOnLocalServer)
                
    {
                    Console.WriteLine(
    "\tThe shared printer " + printer.Name + " is located at " + printer.Location + "\n");
                }

                Console.WriteLine(
    "Press enter to continue.");
                Console.ReadLine();
            }

  • 相关阅读:
    linux c socket
    solr初印象 转载自《闵晓荣(jarorwar)的博客》
    rainymood.com雨声
    一份不错的学习c networking programming的教程
    Drivel — 离线 Blog 客户端
    鲁豫老了
    geek site
    学车
    这个网站的气场有点强,我感受到了
    .NET中现有的 ORM 工具
  • 原文地址:https://www.cnblogs.com/Jax/p/1096711.html
Copyright © 2011-2022 走看看