Adding Using statements
This commit is contained in:
parent
027132c1f4
commit
39b983647b
@ -90,7 +90,8 @@ namespace DataLoader
|
|||||||
{
|
{
|
||||||
// walk through the rofst 'database' searching for
|
// walk through the rofst 'database' searching for
|
||||||
// all nodes that are integrated graphics, i.e. type 8.
|
// all nodes that are integrated graphics, i.e. type 8.
|
||||||
if (rofstinfo.ROFSTLookup.myHdr.myDbs[i].children != null) MigrateRoFstGraphics(roDbpath, rofstinfo.ROFSTLookup.myHdr.myDbs[i].children, rodb);
|
if (rofstinfo.ROFSTLookup.myHdr.myDbs[i].children != null)
|
||||||
|
MigrateRoFstGraphics(roDbpath, rofstinfo.ROFSTLookup.myHdr.myDbs[i].children, rodb);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -145,24 +146,34 @@ namespace DataLoader
|
|||||||
frmMain.Status = "Processing Image " + fname;
|
frmMain.Status = "Processing Image " + fname;
|
||||||
// if the roimage record exists, don't create a new one...
|
// if the roimage record exists, don't create a new one...
|
||||||
ROImage roImg = null;
|
ROImage roImg = null;
|
||||||
|
//Console.WriteLine("ROImage Key {0} List {1} ID {2}", ROImage.CacheCountPrimaryKey, ROImage.CacheCountList, ROImage.CacheCountByRODbID);
|
||||||
|
//Console.WriteLine("ROImageInfo Key {0} List {1}", ROImageInfo.CacheCountPrimaryKey, ROImageInfo.CacheCountList);
|
||||||
|
//Console.WriteLine("ROFst Key {0} List {1} ID {2}", ROFst.CacheCountPrimaryKey, ROFst.CacheCountList, ROFst.CacheCountByRODbID_DTS);
|
||||||
|
//Console.WriteLine("ROFstInfo Key {0} List {1}", ROFstInfo.CacheCountPrimaryKey, ROFstInfo.CacheCountList);
|
||||||
using (roImg = ROImage.GetByRODbID_FileName_DTS(rodb.RODbID, imgname, fi.LastWriteTimeUtc))
|
using (roImg = ROImage.GetByRODbID_FileName_DTS(rodb.RODbID, imgname, fi.LastWriteTimeUtc))
|
||||||
{
|
{
|
||||||
if (roImg == null)
|
if (roImg == null)
|
||||||
{
|
{
|
||||||
FileStream fsIn = new FileStream(imgfile, FileMode.Open, FileAccess.Read, FileShare.Read);
|
using (FileStream fsIn = new FileStream(imgfile, FileMode.Open, FileAccess.Read, FileShare.Read))
|
||||||
// Create an instance of StreamReader that can read characters from the FileStream.
|
{
|
||||||
BinaryReader r = new BinaryReader(fsIn);
|
// Create an instance of StreamReader that can read characters from the FileStream.
|
||||||
byte[] ab = r.ReadBytes((int)fsIn.Length);
|
BinaryReader r = new BinaryReader(fsIn);
|
||||||
r.Close();
|
byte[] ab = r.ReadBytes((int)fsIn.Length);
|
||||||
fsIn.Close();
|
r.Close();
|
||||||
roImg = ROImage.MakeROImage(rodb, imgname, ab, null, fi.LastWriteTimeUtc, "Migration");
|
fsIn.Close();
|
||||||
|
roImg = ROImage.MakeROImage(rodb, imgname, ab, null, fi.LastWriteTimeUtc, "Migration");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// see if it's already linked to the current rofst..
|
// see if it's already linked to the current rofst..
|
||||||
Figure figure = Figure.GetByROFstID_ImageID(rofstinfo.ROFstID, roImg.ImageID);
|
//Figure figure = Figure.GetByROFstID_ImageID(rofstinfo.ROFstID, roImg.ImageID);
|
||||||
if (figure != null) return;
|
using (Figure figure = Figure.GetByROFstID_ImageID(rofstinfo.ROFstID, roImg.ImageID))
|
||||||
//using (ROFst rofst = rofstinfo.Get())
|
{
|
||||||
ROFst rofst = rofstinfo.Get(); // Use the cached ROFST rather than creating and disposing
|
if (figure != null) return;
|
||||||
figure = Figure.MakeFigure(rofst, roImg, null);
|
//using (ROFst rofst = rofstinfo.Get())
|
||||||
|
ROFst rofst = rofstinfo.Get(); // Use the cached ROFST rather than creating and disposing
|
||||||
|
//figure = Figure.MakeFigure(rofst, roImg, null);
|
||||||
|
using (Figure tfig = Figure.MakeFigure(rofst, roImg, null)) ;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user