Ejemplo n.º 1
0
        private void ReportError(uint err, string source)
        {
            string errStr = "";

            if (err > 0)
            {
                PCO_USBGetErrorTextClass.PCO_GetErrorText(err, ref errStr);
                //Debug.Write(source + " error : " + errStr + "\n");
                //MessageBox.Show(source + " error : " + errStr);
                Console.WriteLine(source + " error : " + errStr);
            }
            else
            {
                //Debug.Write(source + " : OK \n");
                Console.WriteLine(source + " : OK ");
                //MessageBox.Show(source + " : OK ");
            }
        }
Ejemplo n.º 2
0
        private void ReportError(uint err, string source)
        {
            string errStr = "";

            if (err > 0)
            {
                descr.RunError = 1;
                PCO_USBGetErrorTextClass.PCO_GetErrorText(err, ref errStr);
                //Debug.Write(source + " error : " + errStr + "\n");
                //MessageBox.Show(source + " error : " + errStr);
                Console.WriteLine(source + " error : " + errStr);
                System.IO.Directory.CreateDirectory(@"C:\PCOLogs\");
                System.IO.File.WriteAllText(@"C:\PCOLogs\" + DateTime.Now.ToString("yyyyMMddHHmmssffff") + "error.txt", source + " error : " + errStr);
            }
            else if (FormMain.Form1.ShowLog)
            {
                //Debug.Write(source + " : OK \n");
                Console.WriteLine(source + " : OK ");
                //MessageBox.Show(source + " : OK ");
            }
        }