Ejemplo n.º 1
0
        private bool InitializeTimeStampMap()
        {
            // Get our target root
            string platformTimeStampsFile = string.Concat(mSourcePath, "\\MOG\\platform.", mMog.GetActivePlatform().mPlatformName, ".", Path.GetFileNameWithoutExtension(mTargetConsole), ".timestamps.info");

            // Is this a force
            if (mForce)
            {
                if (DosUtils.FileExist(platformTimeStampsFile))
                {
                    DosUtils.FileDelete(platformTimeStampsFile);
                }

                if (mConsoleCopy)
                {
                    // Delete the target directory on the xbox
                    if (!XboxUtils.DirectoryDelete(mSyncRoot, true))
                    {
                        // Error
                        //MOG_REPORT.ShowMessageBox("Xbox Delete Error", string.Concat(mSyncRoot, " could not be deleted!"), MessageBoxButtons.OK);
                        throw new Exception(mSyncRoot + " could not be deleted!");
                    }
                }
                else
                {
                    if (!DosUtils.DirectoryDelete(mSyncRoot))
                    {
                        //Error
                        //MOG_REPORT.ShowMessageBox("Delete Error", string.Concat(mSyncRoot, " could not be deleted!"), MessageBoxButtons.OK);
                        throw new Exception(mSyncRoot + " could not be deleted!");
                    }
                }
            }
            // Open the timestamp ini
            mTargetTimestamps = new MOG_Ini(platformTimeStampsFile);

            return(true);
        }