資源簡(jiǎn)介
可以監(jiān)控打印機(jī)打印任務(wù)相關(guān)信息!
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Linq;
using?System.Printing;
using?System.Text;
using?System.Runtime.InteropServices;
using?System.Threading;
using?Atom8.API.PrintSpool;
namespace?Atom8.Monitors
{
????public?class?PrintJobChangeEventArgs?:?EventArgs
????{
????????#region?private?variables
????????private?int?_jobID=0;
????????private?string?_jobName?=?““;
????????private?JOBSTATUS?_jobStatus?=?new?JOBSTATUS();
????????private?PrintSystemJobInfo?_jobInfo?=?null;
????????#endregion
????????public?int?JobID?{?get?{?return?_jobID;}??}
????????public?string?JobName?{?get?{?return?_jobName;?}?}
????????public?JOBSTATUS?JobStatus?{?get?{?return?_jobStatus;?}?}
????????public?PrintSystemJobInfo?JobInfo?{?get?{?return?_jobInfo;?}?}
????????public?PrintJobChangeEventArgs(int?intJobID?string?strJobName?JOBSTATUS?jStatus?PrintSystemJobInfo?objJobInfo?)
????????????:?base()
????????{
????????????_jobID?=?intJobID;
????????????_jobName?=?strJobName;
????????????_jobStatus?=?jStatus;
????????????_jobInfo?=?objJobInfo;????????????
????????}
????}
????public?delegate?void?PrintJobStatusChanged(object?Sender?PrintJobChangeEventArgs?e);
????public?class?PrintQueueMonitor??
????{
????????#region?DLL?Import?Functions
????????[DllImport(“winspool.drv“?EntryPoint?=?“OpenPrinterA“SetLastError?=?true?CharSet?=?CharSet.AnsiExactSpelling?=?trueCallingConvention?=?CallingConvention.StdCall)]
????????public?static?extern?bool?OpenPrinter(String?pPrinterName
????????out?IntPtr?phPrinter
????????Int32?pDefault);
????????[DllImport(“winspool.drv“?EntryPoint?=?“ClosePrinter“
????????????SetLastError?=?true
????????????ExactSpelling?=?true
????????????CallingConvention?=?CallingConvention.StdCall)]
????????public?static?extern?bool?ClosePrinter
????????(Int32?hPrinter);
????????[DllImport(“winspool.drv“
????????EntryPoint?=?“FindFirstPrinterChangeNotification“
????????SetLastError?=?true?CharSet?=?CharSet.Ansi
????????ExactSpelling?=?true
????????CallingConvention?=?CallingConvention.StdCall)]
????????public?static?extern?IntPtr?FindFirstPrinterChangeNotification
????????????????????????????([InAttribute()]?IntPtr?hPrinter
????????????????????????????[InAttribute()]?Int32?fwFlags
????????????????????????????[InAttribute()]?Int32?fwOptions
????????????????????????????[InAttribute()?MarshalAs(UnmanagedType.LPStruct)]?PRINTER_NOTIFY_OPTIONS?pPrinterNotifyOptions);
????????[DllImport(“winspool.drv“?EntryPoint?=?“FindNextPrinterChangeNotification“
????????SetLastError?=?true?CharSet?=?CharSet.Ansi
????????ExactSpelling?=?false
????????CallingConvention?=?CallingConvention.StdCall)]
????????public?static?extern?bool?FindNextPrinterChangeNotification
????????????????????????????([InAttribute()]?IntPtr?hChangeobject
?????????????????????????????[OutAttribute()]?out?Int32?pdwChange
?????????????????????????????[InAttribute()?MarshalAs(UnmanagedType
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
????..A..H.?????47104??2019-04-30?15:57??PrintSpooler(印度)\.vs\PrintSpooler\v14\.suo
?????文件???????9847??2010-01-08?14:50??PrintSpooler(印度)\Backup\PrintQueueMonitor\PrintQueueMonitor.cs
?????文件???????2688??2010-01-08?12:00??PrintSpooler(印度)\Backup\PrintQueueMonitor\PrintQueueMonitor.csproj
?????文件??????24354??2010-01-08?12:00??PrintSpooler(印度)\Backup\PrintQueueMonitor\PrintSpoolAPI.cs
?????文件???????1446??2010-01-08?10:50??PrintSpooler(印度)\Backup\PrintQueueMonitor\Properties\AssemblyInfo.cs
?????文件???????1890??2010-01-08?14:40??PrintSpooler(印度)\Backup\PrintSpooler\MainForm.cs
?????文件???????3944??2010-01-08?14:30??PrintSpooler(印度)\Backup\PrintSpooler\MainForm.Designer.cs
?????文件???????5814??2010-01-08?14:30??PrintSpooler(印度)\Backup\PrintSpooler\MainForm.resx
?????文件???????4112??2010-01-08?11:02??PrintSpooler(印度)\Backup\PrintSpooler\PrintSpooler.csproj
?????文件?????????74??2010-01-08?10:47??PrintSpooler(印度)\Backup\PrintSpooler\PrintSpooler.csproj.user
?????文件????????507??2010-01-08?10:48??PrintSpooler(印度)\Backup\PrintSpooler\Program.cs
?????文件???????1436??2010-01-08?10:47??PrintSpooler(印度)\Backup\PrintSpooler\Properties\AssemblyInfo.cs
?????文件???????2853??2010-01-08?10:47??PrintSpooler(印度)\Backup\PrintSpooler\Properties\Resources.Designer.cs
?????文件???????5612??2010-01-08?10:47??PrintSpooler(印度)\Backup\PrintSpooler\Properties\Resources.resx
?????文件???????1097??2010-01-08?10:47??PrintSpooler(印度)\Backup\PrintSpooler\Properties\Settings.Designer.cs
?????文件????????249??2010-01-08?10:47??PrintSpooler(印度)\Backup\PrintSpooler\Properties\Settings.settings
?????文件???????1435??2010-01-08?10:54??PrintSpooler(印度)\Backup\PrintSpooler.sln
?????文件??????21504??2019-04-08?13:41??PrintSpooler(印度)\PrintQueueMonitor\bin\Debug\PrintQueueMonitor.dll
?????文件??????22016??2019-04-08?13:41??PrintSpooler(印度)\PrintQueueMonitor\bin\Debug\PrintQueueMonitor.pdb
?????文件??????20992??2010-01-08?14:50??PrintSpooler(印度)\PrintQueueMonitor\bin\Release\PrintQueueMonitor.dll
?????文件????????816??2019-04-30?15:13??PrintSpooler(印度)\PrintQueueMonitor\obj\Debug\DesignTimeResolveAssemblyReferences.cache
?????文件???????6783??2019-04-08?15:58??PrintSpooler(印度)\PrintQueueMonitor\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
?????文件???????1081??2019-04-08?16:06??PrintSpooler(印度)\PrintQueueMonitor\obj\Debug\PrintQueueMonitor.csproj.FileListAbsolute.txt
?????文件???????1549??2019-04-08?16:06??PrintSpooler(印度)\PrintQueueMonitor\obj\Debug\PrintQueueMonitor.csprojResolveAssemblyReference.cache
?????文件??????21504??2019-04-08?13:41??PrintSpooler(印度)\PrintQueueMonitor\obj\Debug\PrintQueueMonitor.dll
?????文件??????22016??2019-04-08?13:41??PrintSpooler(印度)\PrintQueueMonitor\obj\Debug\PrintQueueMonitor.pdb
?????文件???????9847??2010-01-08?14:50??PrintSpooler(印度)\PrintQueueMonitor\PrintQueueMonitor.cs
?????文件???????2841??2019-04-08?12:42??PrintSpooler(印度)\PrintQueueMonitor\PrintQueueMonitor.csproj
?????文件??????24354??2010-01-08?12:00??PrintSpooler(印度)\PrintQueueMonitor\PrintSpoolAPI.cs
?????文件???????1446??2010-01-08?10:50??PrintSpooler(印度)\PrintQueueMonitor\Properties\AssemblyInfo.cs
............此處省略65個(gè)文件信息
- 上一篇:桌面六軸機(jī)器人
- 下一篇:多功能串口助手(附源碼)
評(píng)論
共有 條評(píng)論