Esempio n. 1
0
        public void RepairCopyMachineDatas(String fileName)
        {
            String sourcePath, destPath;

            destPath   = DefaultPath.DefaultPathEx.DataBasePath + fileName;
            sourcePath = DefaultPath.DefaultPathEx.BackUpDataPath + fileName;
            FileOperManager.DeleteFile(destPath);
            FileOperManager.CopyFile(sourcePath, destPath, true);
        }
Esempio n. 2
0
        public void CreateBootLoadImage()
        {
            MachineInfoDAO machineInfoDAO = new MachineInfoDAO();

            machineInfoDAO.SetDataBaseValue(MachineInfoEnum.CreateImageEnable, false);
            String sourceImagePath = DefaultPath.DefaultPathEx.ImagePath + "BootLoader.jpg";
            String destImagePath   = @"\ResidentFlash\BootLoader.jpg";

            FileOperManager.DeleteFile(destImagePath);
            FileOperManager.CopyFile(sourceImagePath, destImagePath, true);
            MachineInfoModel machineInfoModel = new MachineInfoModel();

            machineInfoModel.BoardCodeVersion  = machineInfoDAO.GetDataBaseValue(MachineInfoEnum.BoardCodeVersion);
            machineInfoModel.BoardID           = machineInfoDAO.GetDataBaseValue(MachineInfoEnum.BoardID);
            machineInfoModel.BoardLoadTime     = machineInfoDAO.GetDataBaseValue(MachineInfoEnum.BoardLoadTime);
            machineInfoModel.BoardModifyTime   = machineInfoDAO.GetDataBaseValue(MachineInfoEnum.BoardModifyTime);
            machineInfoModel.MachineID         = machineInfoDAO.GetDataBaseValue(MachineInfoEnum.MachineID);
            machineInfoModel.ScreenCodeVersion = machineInfoDAO.GetDataBaseValue(MachineInfoEnum.ScreenCodeVersion);
            machineInfoModel.ScreenLoadTime    = machineInfoDAO.GetDataBaseValue(MachineInfoEnum.ScreenLoadTime);
            machineInfoModel.ScreenModifyTime  = machineInfoDAO.GetDataBaseValue(MachineInfoEnum.ScreenModifyTime);
            CreateMachineImage createMachineImage = new CreateMachineImage();

            createMachineImage.CreateMachineInfoImage(destImagePath, machineInfoModel);
        }