Esempio n. 1
0
        //DANIEL ESTA AQUI!!1
        //Esteban es el mejor
        //Pacheco lo logro

        public override void LoadContent()
        {
            base.LoadContent();
            content   = new ContentManager(ScreenManager.Instance.Content.ServiceProvider, "Content");
            font      = font = content.Load <SpriteFont>("Arial");
            path      = content.Load <MyPaths>("Paths");
            path.Path = "rabbit";

            swich = content.Load <Texture2D>("wolf");

            // paths = content.Load<MyPathArray("Paths");
            // Console.WriteLine(path.Path);
            image = content.Load <Texture2D>(path.Path);

            Console.WriteLine(path.Path);
        }
Esempio n. 2
0
        public void Export(string exportPath)
        {
            string tempPath   = MyPaths.GetMyAppDataPath();
            var    packageDir = new DirectoryInfo(Path.Combine(tempPath, "UpdatePackageCreation"));

            // Ensure package directory exists and is empty
            if (packageDir.Exists)
            {
                packageDir.Delete(true);
            }
            packageDir.Create();

            // Copy local data to temp data directory
            var dataDir      = packageDir.CreateSubdirectory(PackageFileNameDefinations.ZIP_APP_DATA_FILES_DIRECTORY);
            var localDataDir = new DirectoryInfo(UpdatePackageTemplate.FilesToCopyPath);

            localDataDir.CopyTo(dataDir.FullName, SearchOption.AllDirectories);

            // Copy all UpdateInstaller AddOns
            var  addOnsDir  = packageDir.CreateSubdirectory(PackageFileNameDefinations.ZIP_UPDATE_INSTALLER_ADDONS_DIRECTORY);
            uint curAddOnID = 0;

            foreach (string fAddOn in UpdatePackageTemplate.UpdateInstallerAddOns)
            {
                File.Copy(fAddOn, Path.Combine(addOnsDir.FullName, $"installer_addon_{curAddOnID}.dll"));
                curAddOnID += 1;
            }

            // Ensure destination file doesn't exist
            if (File.Exists(exportPath))
            {
                File.Delete(exportPath);
            }

            // Export to ZIP
            ZipFile.CreateFromDirectory(packageDir.FullName, exportPath);

            // Delete temp directory
            packageDir.Delete(true);
        }
Esempio n. 3
0
        static void Main()
        {
            MyPaths testData = new MyPaths();

            //  MyTest testData = new MyTest();

            //  testData.Path = "deer";
            XmlWriterSettings settings = new XmlWriterSettings();

            settings.Indent = true;

            MyPathArray testData2 = new MyPathArray();



            using (XmlWriter writer = XmlWriter.Create("test.xml", settings))
            {
                IntermediateSerializer.Serialize(writer, testData, null);
            }


            using (var game = new Game1())
                game.Run();
        }