コード例 #1
0
        } /* ProcessSipperFiles*/

        void  ProcessSipperFile(String sfn)
        {
            PicesSipperFile sipperFile = dbConn.SipperFileRecLoad(sfn);

            if (sipperFile == null)
            {
                RunLogAddMsg("\n\n  ***ERROR***      Sipper File[" + sfn + "]  not defined in database.\n\n");
                return;
            }

            if (instrumentDataFileManager == null)
            {
                instrumentDataFileManager = new PicesInstrumentDataFileManager();
            }
            PicesInstrumentDataList data = instrumentDataFileManager.ReExtractInstrumentDataForSipperFile(sfn, sipperFile, runLog);

            if (cancelRequested)
            {
                return;
            }

            if (data == null)
            {
                RunLogAddMsg("\n\n ***ERROR***  Sipper File[" + sfn + "] returned no Instrument Data.\n\n");
                return;
            }

            RunLogAddMsg("Saving Instrument Data;  SipperFileName[" + sfn + "].\n");
            dbConn.InstrumentDataSaveListForOneSipperFile(sfn, data);

            if (cancelRequested)
            {
                return;
            }

            uint lastScanLine = 0;
            {
                RunLogAddMsg("Updating Images Table;  SipperFileName[" + sfn + "].\n");
                int c1 = 0;

                foreach (PicesInstrumentData id in data)
                {
                    if (cancelRequested)
                    {
                        break;
                    }

                    if (id.ScanLine > 0)
                    {
                        dbConn.ImageUpdateInstrumentDataFields(id, sfn, lastScanLine, id.ScanLine);
                    }
                    lastScanLine = id.ScanLine;

                    c1++;
                    if ((c1 % 25) == 0)
                    {
                        RunLogAddMsg("Updating Images Table;  SipperFileName[" + sfn + "]   ScanLine[" + lastScanLine.ToString("###,###,##0") + "]\n");
                    }
                }
            }
        } /* ProcessSipperFile*/