示例#1
0
 public PrinterManager()
 {
     printPack = null;
     server    = null;
     intStatus = STATUS_STOPPED;
     server    = new MessagingServer("fog_printer_pipe");
     objMutex  = new Object();
     blEnabled = false;
     server.MessageReceived += new MessagingServer.MessageReceivedHandler(serverMessageReceived);
 }
示例#2
0
 private Boolean pullNewServerList()
 {
     try
     {
         lock ( objMutex )
         {
             WebClient web     = new WebClient();
             String    strPath = strURLPath + "?mac=" + strMACList;
             String    strData = web.DownloadString(strPath);
             strData   = strData.Trim();
             printPack = new PrinterManagerPackage(strData);
             return(printPack.parseResponse());
         }
     }
     catch (Exception ex)
     {
         log(MOD_NAME, "Error pulling printer list...");
         log(MOD_NAME, ex.Message);
         log(MOD_NAME, ex.StackTrace);
         return(false);
     }
 }
示例#3
0
 public PrinterManager()
 {
     printPack = null;
     server = null;
     intStatus = STATUS_STOPPED;
     server = new MessagingServer("fog_printer_pipe");
     objMutex = new Object();
     blEnabled = false;
     server.MessageReceived += new MessagingServer.MessageReceivedHandler(serverMessageReceived);
 }
示例#4
0
 private Boolean pullNewServerList()
 {
     try
     {
         lock( objMutex )
         {
             WebClient web = new WebClient();
             String strPath = strURLPath + "?mac=" + strMACList;
             String strData = web.DownloadString(strPath);
             strData = strData.Trim();
             printPack = new PrinterManagerPackage(strData);
             return printPack.parseResponse();
         }
     }
     catch (Exception ex)
     {
         log(MOD_NAME, "Error pulling printer list...");
         log(MOD_NAME, ex.Message);
         log(MOD_NAME, ex.StackTrace);
         return false;
     }
 }