예제 #1
0
        public PrintJobTitle(ManagementBaseObject printJob)
        {
            try
            {
                string prnterName;
                int    prntJobID;
                PrintHelper.ExtractNameAndId(printJob, out prnterName, out prntJobID);

                PrinterName = prnterName;
                JobID       = prntJobID;
                Document    = PrintHelper.ExtractDocumentName(printJob);
                Host        = PrintHelper.ExtractHost(printJob);
                Owner       = PrintHelper.ExtractOwner(printJob);
                if (!string.IsNullOrWhiteSpace(Host))
                {
                    Host = Host.Replace("\\", "").Trim();
                }
            }
            catch (Exception ex)
            {
                LogHelper.Log(ex);
            }
        }