public W_Common()
        {
#if DEBUG
            MeDebug md = new MeDebug
            {
                ByPass = true,
            };
            HeTrace.AddMessenger("Debug", md);
#endif

            // Tracing
            MeSimpleLog log = new MeSimpleLog(System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Common.Logs, $"{DateTime.Now.ToFileTime()}.log"))
            {
                LogLevel   = 1,
                FuncPrefix = EPrefix.Horodating,
                ByPass     = true,
            };

            log.AddCaller(this);
            HeTrace.AddLogger("C_LBDPG", log);


            InitializeComponent();
            DataContext = this;
        }
        /// <summary>
        /// Sert au traitement de packaging pour un jeu
        /// </summary>
        /// <param name="iD"></param>
        /// <param name="platformName"></param>
        public LaunchBoxCore(string platformName)
        {
            if (string.IsNullOrEmpty(platformName))
            {
                throw new Exception();
            }


            //_PlatformName = platformName;

            #region Initialisation des chemins
            _WFolder = Config.HWorkingFolder;
            // Chemin du dossier temporaire du system
            _SystemPath = Path.Combine(_WFolder, platformName);

            #endregion

            _XMLPlatformFile = Path.Combine(Config.HLaunchBoxPath, Config.PlatformsFolder, $"{platformName}.xml");
            _ZePlatform      = XML_Platforms.GetPlatformPaths(Path.Combine(Config.HLaunchBoxPath, Config.PlatformsFile), platformName);


            #region Messages
            MeDebug mdb = new MeDebug()
            {
                ByPass = true,
            };
            HeTrace.AddMessenger("Debug", mdb);

            // Réorientation via les signaux
            MeEmit mdE = new MeEmit()
            {
                ByPass = true,
            };
            HeTrace.AddMessenger("Signal", mdE);
            mdE.SignalWrite     += (x, y) => SetStatus(x, new StateArg(y, false));
            mdE.SignalWriteLine += (x, y) => SetStatus(x, new StateArg(y, false));

            #endregion

            XML_Games.Signal += (x, y) => SetStatus(x, new StateArg(y, false));
        }
Beispiel #3
0
        public static void Main()
        {
            Global.DebugMode = true;

            Global.SetPluginLocation();

            Global.InitializeConfig();

            // Initialisation du messager
            MeDebug meD = new MeDebug()
            {
                //Prefix = "",
                LogLevel = 10,
                ByPass   = true,
            };
            //meD.AddCaller(prefix: "Debug >>>");

            MeSimpleLog meSL = new MeSimpleLog(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, prop.Default.LogFolder, prop.Default.LogFile))
            {
                LogLevel   = Global.Config.LogLvl,
                ByPass     = true,
                FuncPrefix = Hermes.Cont.EPrefix.Horodating | Hermes.Cont.EPrefix.Prefixing
            };

            meSL.AddCaller(prefix: "DeDebug >>>");

            HeTrace.AddMessenger("Debug", meD);
            HeTrace.AddLogger("Logger", meSL);

            Hermes.HeTrace.WriteLine("Test");

            // On indique manuellement en debug
            Global.LaunchBoxPath = @"G:\Frontend\LaunchBox\Core\";

            string[] tmp = Global.LaunchBoxPath.Split(@"\");

            Global.SetLaunchBoxRoot();


            // Création de fausses plateformes
            MvPlatform plat1 = new MvPlatform()
            {
                Name = "Don't exists/proche reel", Folder = @"G:\Ailleurs\Games\Sega Genesis"
            };
            MvPlatform plat2 = new MvPlatform()
            {
                Name = "Nintendo Entertainment System", Folder = @"i:\Games\NES"
            };
            MvPlatform plat3 = new MvPlatform()
            {
                Name = "Sega Master System", Folder = @""
            };
            MvPlatform plat4 = new MvPlatform()
            {
                Name = "Sega Master System", Folder = @"../../Plateformes/Games/Sega Master System"
            };
            MvPlatform plat5 = new MvPlatform()
            {
                Name = "different letter/proche reel", Folder = @"m:\Ailleurs\Games\Sega Genesis"
            };
            MvPlatform plat6 = new MvPlatform()
            {
                Name = "Racine de Disque", Folder = @"..\..\Games\Sega Genesis"
            };
            MvPlatform plat7 = new MvPlatform()
            {
                Name = "Normal", Folder = @"..\..\Plateformes\Games\Sega Mega Drive"
            };
            MvPlatform plat8 = new MvPlatform()
            {
                Name = "Metzo", Folder = @"..\Plateformes\Games\Sega Genesis"
            };
            MvPlatform plat9 = new MvPlatform()
            {
                Name = "racine", Folder = @"..\..\Games\Sega Mega Drive"
            };


            FakePlatforms = new ObservableCollection <IPlatform>();
            FakePlatforms.Add(plat1);
            FakePlatforms.Add(plat2);
            FakePlatforms.Add(plat3);
            FakePlatforms.Add(plat4);
            FakePlatforms.Add(plat5);
            FakePlatforms.Add(plat6);
            FakePlatforms.Add(plat7);
            FakePlatforms.Add(plat8);
            FakePlatforms.Add(plat9);

            //
            W_PlateformsList wpl = new W_PlateformsList();

            wpl.ShowDialog();
        }