示例#1
0
        private void Check_IfModifyRequired(C_PathsDouble pathO)
        {
            HeTrace.WriteLine($"\tHPath: {pathO.HardPath}", 10);
            HeTrace.WriteLine($"\tNewHPath: {pathO.NewHardPath}", 10);
            HeTrace.WriteLine($"\tRPath: {pathO.RelatPath}", 10);
            HeTrace.WriteLine($"\tNewRPath: {pathO.NewRelatPath}", 10);

            // Si les paths sont égaux pas besoin de modifier
            pathO.ToModify = !pathO.Test_Validity();
            HeTrace.WriteLine($"\tTestIMN: {pathO.ToModify}", 10);

            // On montre que les données n'ont pas besoin d'être modifiées
            if (!pathO.ToModify)
            {
                pathO.NewHardPath  = SPRLang.No_Modif;
                pathO.NewRelatPath = SPRLang.No_Modif;
            }
        }
示例#2
0
        /// <summary>
        /// On va parcourir les PathsCollec et assigner les paths de la simulation aux paths de la plateforme
        /// </summary>
        /// <remarks>
        /// Il n'y a pas de sauvegarde ici, afin de pouvoir continuer en mode debug
        /// </remarks>
        private void Dematriochka()
        {
            HeTrace.WriteLine("[PlatformPaths] [Dematriochka]");
            // Trace.Indent();

            // Modification of App
            //C_PathsCollec game = ExtPlatformPaths[0];
            C_PathsDouble game = PlatformPaths.ApplicationPath;

            // Traitement manuel car ce dossier n'est pas contenu dans les ipfolder
            HeTrace.WriteLine("\t[Dematriochka] Management of 'Game' property", 5);
            game.RelatPath = game.NewRelatPath;
            game.HardPath  = game.NewHardPath;
            game.Raz_NewPaths();

            // Traitement des autres

            foreach (IPlatformFolder ipFolder in _PlatformFolders)
            // foreach (IPlatformFolder ipFolder in PlatformPaths)
            {
                HeTrace.WriteLine($"\t[PlatformPaths] [Dematriochka] Management of '{ipFolder.MediaType}' property", 5);

                //C_PathsCollec pFolder = ExtPlatformPaths.FirstOrDefault(x => x.Type == ipFolder.MediaType);
                C_PathsDouble pFolder = PlatformPaths.GetPaths().FirstOrDefault(x => x.Type == ipFolder.MediaType);

                //
                if (pFolder != null)
                {
                    // Assignation au platform Path de Launchbox
                    ipFolder.FolderPath = pFolder.NewRelatPath;

                    // Permutation new => old
                    pFolder.HardPath  = pFolder.NewHardPath;
                    pFolder.RelatPath = pFolder.NewRelatPath;

                    // Raz new
                    pFolder.Raz_NewPaths();
                }
            }
            Trace.Unindent();
        }