Printer.cs 582 字节
using System;
using System.Collections.Generic;

namespace Model
{
    /// <summary>
    /// 打印机类
    /// </summary>
    public static class Printer
    {
        /// <summary>
        /// 所有已安装的打印机名称
        /// </summary>
        public static string[] AllName
        {
            get
            {
                List<string> list = new();
                foreach (string ss in System.Drawing.Printing.PrinterSettings.InstalledPrinters)
                    list.Add(ss);
                return list.ToArray();
            }
        }

    }
}