none
How do i? #2

    질문

  • using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.IO;
    using ProtoGame.Globals;
    namespace ProtoGame
    {
        class Program
        {
            //
            /*Gets Users Program Files change game path for your games folder*/
            static private string user_Root = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), "SOAGameMaker");
       
            /*chagne 20 to cahnge max*/
            private static string[] Physics = {
            user_Root +"PhysicsBase\\Physics0Main.phy {0}", //CANNOT! be changed
            user_Root +"PhysicsBase\\Physics1.phy {0}", //Can be changed            
            user_Root +"PhysicsBase\\Physics2.phy {0}", //Can be changed
            user_Root +"PhysicsBase\\Physics3.phy {0}", //Can be changed
            user_Root +"PhysicsBase\\Physics4.phy {0}", //Can be changed
            user_Root +"PhysicsBase\\Physics5.phy {0}", //Can be changed
            user_Root +"PhysicsBase\\Physics6.phy {0}", //Can be changed
            user_Root +"PhysicsBase\\Physics7.phy {0}", //Can be changed
            user_Root +"PhysicsBase\\Physics8.phy {0}", //Can be changed
            user_Root +"PhysicsBase\\Physics9.phy {0}", //Can be changed
            user_Root +"PhysicsBase\\Physics10.phy {0}", //Can be changed
            user_Root +"PhysicsBase\\Physics11.phy {0}", //Can be changed
            user_Root +"PhysicsBase\\Physics12.phy {0}", //Can be changed
            user_Root +"PhysicsBase\\Physics13.phy {0}", //Can be changed
            user_Root +"PhysicsBase\\Physics14.phy {0}", //Can be changed
            user_Root +"PhysicsBase\\Physics15.phy {0}", //Can be changed
            user_Root +"PhysicsBase\\Physics16.phy {0}", //Can be changed
            user_Root +"PhysicsBase\\Physics17.phy {0}", //Can be changed
            user_Root +"PhysicsBase\\Physics18.phy {0}", //Can be changed
            user_Root +"PhysicsBase\\Physics19.phy {0}", //Can be changed
            user_Root +"PhysicsBase\\Physics20.phy {0}", //Can be changed
            user_Root +"CollisionBase\\Collision0Main.col {0}", //CANNOT! be changed
            user_Root +"CollisionBase\\Collision1.col {0}", //Can be changed
            user_Root +"CollisionBase\\Collision2.col {0}", //Can be changed
            user_Root +"CollisionBase\\Collision3.col {0}", //Can be changed
            user_Root +"CollisionBase\\Collision4.col {0}", //Can be changed
            user_Root +"CollisionBase\\Collision5.col {0}", //Can be changed
            user_Root +"CollisionBase\\Collision6.col {0}", //Can be changed
            user_Root +"CollisionBase\\Collision7.col {0}", //Can be changed
            user_Root +"CollisionBase\\Collision8.col {0}", //Can be changed
            user_Root +"CollisionBase\\Collision9.col {0}", //Can be changed
            user_Root +"CollisionBase\\Collision10.col {0}", //Can be changed
            user_Root +"CollisionBase\\Collision11.col {0}", //Can be changed
            user_Root +"CollisionBase\\Collision12.col {0}", //Can be changed
            user_Root +"CollisionBase\\Collision13.col {0}", //Can be changed
            user_Root +"CollisionBase\\Collision14.col {0}", //Can be changed
            user_Root +"CollisionBase\\Collision15.col {0}", //Can be changed
            user_Root +"CollisionBase\\Collision16.col {0}", //Can be changed
            user_Root +"CollisionBase\\Collision17.col {0}", //Can be changed
            user_Root +"CollisionBase\\Collision18.col {0}", //Can be changed
            user_Root +"CollisionBase\\Collision19.col {0}", //Can be changed
            user_Root +"CollisionBase\\Collision20.col {0}", //Can be changed
            
            user_Root +"ParticleBase\\particle0Main.par {0}", //CANNOT! be changed
            user_Root +"ParticleBase\\Particle1.par {0}", //Can be changed
            user_Root +"ParticleBase\\Particle2.par {0}", //Can be changed
            user_Root +"ParticleBase\\Particle3.par {0}", //Can be changed
            user_Root +"ParticleBase\\Particle4.par {0}", //Can be changed
            user_Root +"ParticleBase\\Particle5.par {0}", //Can be changed
            user_Root +"ParticleBase\\Particle6.par {0}", //Can be changed
            user_Root +"ParticleBase\\Particle7.par {0}", //Can be changed
            user_Root +"ParticleBase\\Particle8.par {0}", //Can be changed
            user_Root +"ParticleBase\\Particle9.par {0}", //Can be changed
            user_Root +"ParticleBase\\Particle10.par {0}", //Can be changed
            user_Root +"ParticleBase\\Particle11.par {0}", //Can be changed
            user_Root +"ParticleBase\\Particle12.par {0}", //Can be changed
            user_Root +"ParticleBase\\Particle13.par {0}", //Can be changed
            user_Root +"ParticleBase\\Particle14.par {0}", //Can be changed
            user_Root +"ParticleBase\\Particle15.par {0}", //Can be changed
            user_Root +"ParticleBase\\Particle16.par {0}", //Can be changed
            user_Root +"ParticleBase\\Particle17.par {0}", //Can be changed
            user_Root +"ParticleBase\\Particle18.par {0}", //Can be changed
            user_Root +"ParticleBase\\Particle19.par {0}", //Can be changed
            user_Root +"ParticleBase\\Particle20.par {0}", //Can be changed
            /*These will be the default file of the software <For handeling anything graphical wise>, However. The names can be changed to prevent
             confusion, these are just the names given by the creator. To prevent confusion*/
            user_Root +"GraphicsBase\\Graphics0Main.graphix {0}", //CANNOT! be changed
            user_Root +"GraphicsBase\\Graphics1.graphix {0}", //Can be changed
            user_Root +"GraphicsBase\\Graphics2.graphix {0}", //Can be changed
            user_Root +"GraphicsBase\\Graphics3.graphix {0}", //Can be changed
            user_Root +"GraphicsBase\\Graphics4.graphix {0}", //Can be changed
            user_Root +"GraphicsBase\\Graphics5.graphix {0}", //Can be changed
            user_Root +"GraphicsBase\\Graphics6.graphix {0}", //Can be changed
            user_Root +"GraphicsBase\\Graphics7.graphix {0}", //Can be changed
            user_Root +"GraphicsBase\\Graphics8.graphix {0}", //Can be changed
            user_Root +"GraphicsBase\\Graphics9.graphix {0}", //Can be changed
            user_Root +"GraphicsBase\\Graphics10.graphix {0}", //Can be changed
            user_Root +"GraphicsBase\\Graphics11.graphix {0}", //Can be changed
            user_Root +"GraphicsBase\\Graphics12.graphix {0}", //Can be changed
            user_Root +"GraphicsBase\\Graphics13.graphix {0}", //Can be changed
            user_Root +"GraphicsBase\\Graphics14.graphix {0}", //Can be changed
            user_Root +"GraphicsBase\\Graphics15.graphix {0}", //Can be changed
            user_Root +"GraphicsBase\\Graphics16.graphix {0}", //Can be changed
            user_Root +"GraphicsBase\\Graphics17.graphix {0}", //Can be changed
            user_Root +"GraphicsBase\\Graphics18.graphix {0}", //Can be changed
            user_Root +"GraphicsBase\\Graphics19.graphix {0}", //Can be changed
            user_Root +"GraphicsBase\\Graphics20.graphix {0}", //Can be changed
            
            /*GameEngine\\GameEngine.exe, initializes the In-Development game play, and will allow the user to play the indevelopment game through out
             all phases of development, from code perspective to the 3D Graphical view*/
            user_Root +"GameEngine\\GameEngine.exe {0}",
            
            /*CoreEnine\\CoreEngine.exe, initializes all default files built in to the software. These primary veriables CANNOT be changed
             However, creating new variables will not crash the software and accept the new variabes*/
            user_Root +"CoreEngine\\CoreEngine.exe {0}",
            
            /*The physics engine initializes the default physics built in to the game, like said statement
             These can have secondary variables and intergers; along with any other variable the user creates.*/
            user_Root +"PhysicsEngine\\PhysicsEngine.exe {0}",
            /*The collision engine has already been explained in figure 1-1*/
            user_Root +"CollisionEngine\\CollisionEngine.exe {0}", //<Optional, but strongly concidered>
           
            //Figure 1-1//
            /*The collision engine is designed to calculate the distance between two objects of equal or unequal size.
             The engine calculates by autmatically calculating the distance of the two said objects with in the time of impact.
             A third party componant with in the game must be activated in order for the collision engine to take effect, regardless.
             To put it simply:
             A FREAKIN RADAR OR OTHER SCANNING DIVICE MUST BE ACTIVATED BEFORE YOU CAN MINIPULATE THE ENGINE VIA THE THIRD-PARTY COMPONANT
             HOWEVER! THIS THIRD PARTY COMPONANT WILL ONLY REMAIN ACTIVATED FOR A SHORT PERIOUD OF TIME BEFORE DEACTIVATING THE COMPONANT MUST RECHARD FOR 15 SECONDS
             WITH THE OUTCOME OF PLAYER INTERACTION!! (For example: Player vs player, General Multiplayer interaction, General world interaction. Everything in the game can damage you. Regardless of object size*/
            /*3DEngine\\3DEngine.exe, is designed to initialize the 3D aspect of the software, from designing models to animating models, 
             the 3DEngine is designed to handle all graphical aspects of designing the video game*/
            user_Root +"3DEngine\\3Dengine.exe {0}",
            /*The graphics engine, is designed to handle all the image basge aspects of the software
             this allows the software to applie the images to what ever the images are assigned to.
             Such as giving a texture to a 3D objects, or to the world it self. It even generates the
             default graphics assigned to the models and opens the default graphics designed, though later on
             in development. The grapics can be changed to other prebuilt graphics options or the user can
             create their own.*/
            user_Root +"GraphicsEngine\\GraphicsEngine.exe {0}",
            
            /*The particle engine is designed to inset particles in to the game, this can be minipulated by using the build int "Mock-Dos" prompt.
             which will change the number of particles with in the developing game.*/
            user_Root +"ParticleEngine\\ParticleEngine.exe {0}",
            /*This will keep track of all the DLL's through out the program, it does this in the background and will know 
             if any changes have been made to the DLL's for either the game(s) in development or will know if any changes
             have been done to the DLLEngine and software it self*/
            
            /*If any changes have been detected through out the DLLEngine, the program will stop working on till either the software
             removed completely from the system and reinstalled; or if the DLL's have been reset back to their default state*/
            user_Root +"DLLEngine\\DLLEngine.exe {0}",
                                              };
            static string[] collision = new string[20];
            static string[] lighting = new string[20];
            static string[] Particle = new string[20];
            
                     //
                    /*Tada*/
            public static void Main(string[] args)
            {
                /*Make folder if doesnt exist*/
                if (!Directory.Exists(user_Root))
                {
                    Directory.CreateDirectory(user_Root);
                    Directory.CreateDirectory(path: user_Root + @"\Assets\");
                    Directory.CreateDirectory(path: user_Root + @"\Scripts\");
                    Directory.CreateDirectory(path: user_Root + @"\Models\");
                    Directory.CreateDirectory(path: user_Root + @"\Animation\");
                    Directory.CreateDirectory(path: user_Root + @"\Textures\");
                    Directory.CreateDirectory(path: user_Root + @"\Core_Engine\");
                    Directory.CreateDirectory(path: user_Root + @"\Game_Engine\");
                    Directory.CreateDirectory(path: user_Root + @"\Core_Engine\");
                    Directory.CreateDirectory(path: user_Root + @"\Physics_Engine\");
                    Directory.CreateDirectory(path: user_Root + @"\Collision_Engine\");
                    Directory.CreateDirectory(path: user_Root + @"\3DEngine\");
                    Directory.CreateDirectory(path: user_Root + @"\ScriptWriter\");
                    Directory.CreateDirectory(path: user_Root + @"\CodeWriter\");
                    Directory.CreateDirectory(path: user_Root + @"\DLLwriter\");
                    Directory.CreateDirectory(path: user_Root + @"\LibraryWriter\");
                    Directory.CreateDirectory(path: user_Root + @"\MusicMaker\");
                    Directory.CreateDirectory(path: user_Root + @"\MusicRecorder\");
                    Directory.CreateDirectory(path: user_Root + @"\SoundMaker\");
                    Directory.CreateDirectory(path: user_Root + @"\GraphicsBase\");
                    Directory.CreateDirectory(path: user_Root + @"\LightBase\");
                    Directory.CreateDirectory(path: user_Root + @"\ParticleBase\");
                    Directory.CreateDirectory(path: user_Root + @"\CollisionBase\");
                    Directory.CreateDirectory(path: user_Root + @"\PhysicsBase\");
                    Directory.CreateDirectory(path: user_Root + @"\Lib\");
                    Directory.CreateDirectory(path: user_Root + @"\dll\");
                    Directory.CreateDirectory(path: user_Root + @"\bin\");
                    
                    //Directory.CreateDirectory(path: user_Root + @"\Game_Engine1\"); //<Use this at a later date//
                    //Focus on the first game engine
                    /*WARNING: WORK ON THE FIRST GAME ENGINE!!*/
                    /*Dont get to far ahead of your self. You have plenty of time to work on a second game engine
                     however, you need to focus on the first one in development. Which is: 
                     * 
                     * <Directory.CreateDirectory(path: user_Root + @"\Game_Engine\");>*/
                    ///Directory.CreateDirectory(path: user_Root + @"\Game_Engine\");///
                    }
                    foreach (var folder in Assets.Type)
                {
                        if (!Directory.Exists(user_Root + @"\Assets\" + folder))
                        Directory.CreateDirectory(path: user_Root + @"\Assets\" + folder);
                    
                            if (!Directory.Exists(user_Root + @"\Scripts\" + folder))
                            Directory.CreateDirectory(path: user_Root + @"\Scripts\" + folder);
                    
                                if (!Directory.Exists(user_Root + @"\Models\"))
                                Directory.CreateDirectory(path: user_Root + @"\Models\" + folder);
                                    if (!Directory.Exists(user_Root + @"\Animation\" + folder))
                                    Directory.CreateDirectory(path: user_Root + @"\Animation\" + folder);
                                        if (!Directory.Exists(user_Root + @"\Textures\" + folder ))
                                        Directory.CreateDirectory(path: user_Root + @"\Textures\" + folder);
                                            if (!Directory.Exists(user_Root + @"\Game Engine\" + @"\Game Engine\" + folder))
                                            Directory.CreateDirectory(path: user_Root + @"\Game_Engine\" + folder);
                                                if (!Directory.Exists(user_Root + @"\Core Engine\" + @"\Core Engine\" + folder))
                                                Directory.CreateDirectory(path: user_Root + @"\Core_Engine\" + folder);
                                                    if (!Directory.Exists(user_Root + @"\Physics Engine\" + @"\Physics Engine\" + folder))
                                                     Directory.CreateDirectory(path: user_Root + @"\Physics_Engine\" + folder);
                                                        if (!Directory.Exists(user_Root + @"\Collision Engine\" + @"\Collision Engine\" + folder))
                                                        Directory.CreateDirectory(path: user_Root + @"\Collision_Engine\" + folder);
                        
                             if (!Directory.Exists(user_Root + @"\3DEngine\" + @"\3DEngine\" + folder))
                             Directory.CreateDirectory(path: user_Root + @"\3D_Engine\" + folder);
                                if (!Directory.Exists(user_Root + @"\ScriptWriter\" + @"\ScriptWriter\" + folder))
                                     Directory.CreateDirectory(path: user_Root + @"\Script_Writer\" + folder);
                                     if (!Directory.Exists(user_Root + @"\CodeWriter\" + @"\CodeWriter\" + folder))
                                          Directory.CreateDirectory(path: user_Root + @"\Code_Writer\" + folder);
                                            if (!Directory.Exists(user_Root + @"\DLLWriter\" + @"\DLLWriter\" + folder))
                                                 Directory.CreateDirectory(path: user_Root + @"\DLLWriter\" + folder);
                                                    if (!Directory.Exists(user_Root + @"\LibraryWriter\" + @"\LibraryWriter\" + folder))
                                                         Directory.CreateDirectory(path: user_Root + @"\Library_Writer\" + folder);
                                                            if (!Directory.Exists(user_Root + @"\MusicMaker\" + @"\MusicMaker\" + folder))
                                                                 Directory.CreateDirectory(path: user_Root + @"\Music_Maker\" + folder);
                                
                                if (!Directory.Exists(user_Root + @"\MusicRecorder\" + @"\MusicRecorder\" + folder))
                                Directory.CreateDirectory(path: user_Root + @"\Music_Recorder\" + folder);
                                    if (!Directory.Exists(user_Root + @"\SoundRecorder\" + @"\SoundRecorder\" + folder))
                                         Directory.CreateDirectory(path: user_Root + @"\Sound_Recorder\" + folder);
                                            if (!Directory.Exists(user_Root + @"\SoundMaker\" + @"\SoundMaker\" + folder))
                                                 Directory.CreateDirectory(path: user_Root + @"\Sound_Maker\" + folder);
                                                    if (!Directory.Exists(user_Root + @"\GraphicsBase\" + @"\GraphicsBase\" + folder))
                                                         Directory.CreateDirectory(path: user_Root + @"\GraphicsBase\" + folder);
                                                            if (!Directory.Exists(user_Root + @"\LightBase\" + @"\LightBase\" + folder))
                                                                 Directory.CreateDirectory(path: user_Root + @"\LightBase\" + folder);
                                                                    if (!Directory.Exists(user_Root + @"\ParticleBase\" + @"\ParticleBase\" + folder))
                                                                         Directory.CreateDirectory(path: user_Root + @"\ParticleBase\" + folder);
                    
                        if (!Directory.Exists(user_Root + @"\CollisionBase\" + @"\CollisionBase\" + folder))
                        Directory.CreateDirectory(path: user_Root + @"\CollisionBase\" + folder);
                            if (!Directory.Exists(user_Root + @"\PhysicsBase\" + @"\PhysicsBase\" + folder))
                                 Directory.CreateDirectory(path: user_Root + @"\PhysicsBase\" + folder);
                                    if (!Directory.Exists(user_Root + @"\lib\" + @"\lib\" + folder))
                                         Directory.CreateDirectory(path: user_Root + @"\lib\" + folder);
                                            if (!Directory.Exists(user_Root + @"\dll\" + @"\dll\" + folder))
                                                 Directory.CreateDirectory(path: user_Root + @"\dll\" + folder);
                                                    if (!Directory.Exists(user_Root + @"\bin\" + @"\bin\" + folder))
                                                         Directory.CreateDirectory(path: user_Root + @"\bin\" + folder);
                }
                         /*This is the primary intializer that will start the install process of the software on to the
                        windows XP, operating system. This will only be compatible with windows XP only*/
                
                   //This will initialize the instillation process. It will start to begin to going through the first variables//
                  //in the decending order, then install the directories containing the files with in the directorie, in the decending order//
                string EditorEngineDirectorieAndFileInstaller = "Initializing Primary Directorie {0}";
                System.Console.WriteLine("Prototype 0.0.1: {0}", EditorEngineDirectorieAndFileInstaller);
                    //
                   /*When execution starts, the installer will go through the variables and then file directorie
                     containing the file, with the file data.*/
                  
                  
                   
                   //This will install the primary directories, in the decending order. This will make sure there
                   //Is no confusion during the programming phaze, and to prevent possible crashes
                   //Also: During the instillation of the directories, it will then proceed to the instillation of the files, along with their extentions
                string PhysicsEditor = "c:\\Program Files\\SOAGameMaker\\PhysicsBase\\PhysicsEditor.exe {0}\n";
                string Physics1 = "c:\\Program Files\\SOAGameMaker\\PhysicsBase\\Physics1.phy {0}";
                string Physics2 = "c:\\Program Files\\SOAGameMaker\\PhysicsBase\\Physics2.phy {0}";
                string Physics3 = "c:\\Program Files\\SOAGameMaker\\PhysicsBase\\Physics3.phy {0}";
                string Physics4 = "c:\\Program Files\\SOAGameMaker\\PhysicsBase\\Physics4.phy {0}";
                string Physics5 = "c:\\Program Files\\SOAGameMaker\\PhysicsBase\\Physics5.phy {0}";
                string Physics6 = "c:\\Program Files\\SOAGameMaker\\PhysicsBase\\Physics6.phy {0}";
                string Physics7 = "c:\\Program Files\\SOAGameMaker\\PhysicsBase\\Physics7.phy {0}";
                string Physics8 = "c:\\Program Files\\SOAGameMaker\\PhysicsBase\\Physics8.phy {0}";
                string Physics9 = "c:\\Program Files\\SOAGameMaker\\PhysicsBase\\Physics9.phy {0}";
                string Physics10 = "c:\\Program Files\\SOAGameMaker\\PhysicsBase\\Physics10.phy {0}";
                string Physics11 = "c:\\Program Files\\SOAGameMaker\\PhysicsBase\\Physics11.phy {0}";
                string Physics12 = "c:\\Program Files\\SOAGameMaker\\PhysicsBase\\Physics12.phy {0}";
                string Physics13 = "c:\\Program Files\\SOAGameMaker\\PhysicsBase\\Physics13.phy {0}";
                string Physics14 = "c:\\Program Files\\SOAGameMaker\\PhysicsBase\\Physics14.phy {0}";
                string Physics15 = "c:\\Program Files\\SOAGameMaker\\PhysicsBase\\Physics15.phy {0}";
                string Physics16 = "c:\\Program Files\\SOAGameMaker\\PhysicsBase\\Physics16.phy {0}";
                string Physics17 = "c:\\Program Files\\SOAGameMaker\\PhysicsBase\\Physics17.phy {0}";
                string Physics18 = "c:\\Program Files\\SOAGameMaker\\PhysicsBase\\Physics18.phy {0}";
                string Physics19 = "c:\\Program Files\\SOAGameMaker\\PhysicsBase\\Physics19.phy {0}";
                string Physics20 = "c:\\Program Files\\SOAGameMaker\\PhysicsBase\\Physics20.phy {0}\n";
                int Physics0 = 20;
                 //
                //during instillation, the installer will then switch to the next directorie, programmed in to//
                //the installer, and again will install the directories and files in the same repeat process//
                string CollisionEditor = "c:\\Program Files\\SOAGameMaker\\CollisionBase\\CollisionEditor.exe {0}\n";
                string collision1 = "c:\\Program Files\\SOAGameMaker\\CollisionBase\\Collision1.col {0}";
                string collision2 = "c:\\Program Files\\SOAGameMaker\\CollisionBase\\Collision2.col {0}";
                string collision3 = "c:\\Program Files\\SOAGameMaker\\CollisionBase\\Collision3.col {0}";
                string collision4 = "c:\\Program Files\\SOAGameMaker\\CollisionBase\\Collision4.col {0}";
                string collision5 = "c:\\Program Files\\SOAGameMaker\\CollisionBase\\Collision5.col {0}";
                string collision6 = "c:\\Program Files\\SOAGameMaker\\CollisionBase\\Collision6.col {0}";
                string collision7 = "c:\\Program Files\\SOAGameMaker\\CollisionBase\\Collision7.col {0}";
                string collision8 = "c:\\Program Files\\SOAGameMaker\\CollisionBase\\Collision8.col {0}";
                string collision9 = "c:\\Program Files\\SOAGameMaker\\CollisionBase\\Collision9.col {0}";
                string collision10 = "c:\\Program Files\\SOAGameMaker\\CollisionBase\\Collision10.col {0}";
                string collision11 = "c:\\Program Files\\SOAGameMaker\\CollisionBase\\Collision11.col {0}";
                string collision12 = "c:\\Program Files\\SOAGameMaker\\CollisionBase\\Collision12.col {0}";
                string collision13 = "c:\\Program Files\\SOAGameMaker\\CollisionBase\\Collision13.col {0}";
                string collision14 = "c:\\Program Files\\SOAGameMaker\\CollisionBase\\Collision14.col {0}";
                string collision15 = "c:\\Program Files\\SOAGameMaker\\CollisionBase\\Collision15.col {0}";
                string collision16 = "c:\\Program Files\\SOAGameMaker\\CollisionBase\\Collision16.col {0}";
                string collision17 = "c:\\Program Files\\SOAGameMaker\\CollisionBase\\Collision17.col {0}";
                string collision18 = "c:\\Program Files\\SOAGameMaker\\CollisionBase\\Collision18.col {0}";
                string collision19 = "c:\\Program Files\\SOAGameMaker\\CollisionBase\\Collision19.col {0}";
                string collision20 = "c:\\Program Files\\SOAGameMaker\\CollisionBase\\Collision20.col {0}\n";
                int collision0 = 20;
                 //
                string ParticleEditor = "c:\\Program Files\\SOAGameMaker\\ParticleBase\\ParticleEditor.exe \n{0}";
                string particle1 = "c:\\Program Files\\SOAGameMaker\\ParticleBase\\Particle1.par {0}";
                string particle2 = "c:\\Program Files\\SOAGameMaker\\ParticleBase\\Particle2.par {0}";
                string particle3 = "c:\\Program Files\\SOAGameMaker\\ParticleBase\\Particle3.par {0}";
                string particle4 = "c:\\Program Files\\SOAGameMaker\\ParticleBase\\Particle4.par {0}";
                string particle5 = "c:\\Program Files\\SOAGameMaker\\ParticleBase\\Particle5.par {0}";
                string particle6 = "c:\\Program Files\\SOAGameMaker\\ParticleBase\\Particle6.par {0}";
                string particle7 = "c:\\Program Files\\SOAGameMaker\\ParticleBase\\Particle7.par {0}";
                string particle8 = "c:\\Program Files\\SOAGameMaker\\ParticleBase\\Particle8.par {0}";
                string particle9 = "c:\\Program Files\\SOAGameMaker\\ParticleBase\\Particle9.par {0}";
                string particle10 = "c:\\Program Files\\SOAGameMaker\\ParticleBase\\Particle10.par {0}";
                string particle11 = "c:\\Program Files\\SOAGameMaker\\ParticleBase\\Particle11.par {0}";
                string particle12 = "c:\\Program Files\\SOAGameMaker\\ParticleBase\\Particle12.par {0}";
                string particle13 = "c:\\Program Files\\SOAGameMaker\\ParticleBase\\Particle13.par {0}";
                string particle14 = "c:\\Program Files\\SOAGameMaker\\ParticleBase\\Particle14.par {0}";
                string particle15 = "c:\\Program Files\\SOAGameMaker\\ParticleBase\\Particle15.par {0}";
                string particle16 = "c:\\Program Files\\SOAGameMaker\\ParticleBase\\Particle16.par {0}";
                string particle17 = "c:\\Program Files\\SOAGameMaker\\ParticleBase\\Particle17.par {0}";
                string particle18 = "c:\\Program Files\\SOAGameMaker\\ParticleBase\\Particle18.par {0}";
                string Particle19 = "c:\\Program Files\\SOAGameMaker\\ParticleBase\\Particle19.par {0}";
                string Particle20 = "c:\\Program Files\\SOAGameMaker\\ParticleBase\\Particle20.par {0}\n";
                int particle0 = 20;
                //
                string GraphicsEditor = "c:\\Program Files\\SOAGameMaker\\GraphicsBase\\GraphicsEditor.exe {0}\n";
                string graphics1 = "c:\\Program Files\\SOAGameMaker\\GraphicsBase\\Graphics1.graphix {0}";
                string graphics2 = "c:\\Program Files\\SOAGameMaker\\GraphicsBase\\Graphics2.graphix {0}";
                string graphics3 = "c:\\Program Files\\SOAGameMaker\\GraphicsBase\\Graphics3.graphix {0}";
                string graphics4 = "c:\\Program Files\\SOAGameMaker\\GraphicsBase\\Graphics4.graphix {0}";
                string graphics5 = "c:\\Program Files\\SOAGameMaker\\GraphicsBase\\Graphics5.graphix {0}";
                string graphics6 = "c:\\Program Files\\SOAGameMaker\\GraphicsBase\\Graphics6.graphix {0}";
                string graphics7 = "c:\\Program Files\\SOAGameMaker\\GraphicsBase\\Graphics7.graphix {0}";
                string graphics8 = "c:\\Program Files\\SOAGameMaker\\GraphicsBase\\Graphics8.graphix {0}";
                string graphics9 = "c:\\Program Files\\SOAGameMaker\\GraphicsBase\\Graphics9.graphix {0}";
                string graphics10 = "c:\\Program Files\\SOAGameMaker\\GraphicsBase\\Graphics10.graphix {0}";
                string graphics11 = "c:\\Program Files\\SOAGameMaker\\GraphicsBase\\Graphics11.graphix {0}";
                string graphics12 = "c:\\Program Files\\SOAGameMaker\\GraphicsBase\\Graphics12.graphix {0}";
                string graphics13 = "c:\\Program Files\\SOAGameMaker\\GraphicsBase\\Graphics13.graphix {0}";
                string graphics14 = "c:\\Program Files\\SOAGameMaker\\GraphicsBase\\Graphics14.graphix {0}";
                string graphics15 = "c:\\Program Files\\SOAGameMaker\\GraphicsBase\\Graphics15.graphix {0}";
                string graphics16 = "c:\\Program Files\\SOAGameMaker\\GraphicsBase\\Graphics16.graphix {0}";
                string graphics17 = "c:\\Program Files\\SOAGameMaker\\GraphicsBase\\Graphics17.graphix {0}";
                string graphics18 = "c:\\Program Files\\SOAGameMaker\\GraphicsBase\\Graphics18.graphix {0}";
                string graphics19 = "c:\\Program Files\\SOAGameMaker\\GraphicsBase\\Graphics19.graphix {0}";
                string graphics20 = "c:\\Program Files\\SOAGameMaker\\GraphicsBase\\Graphics20.graphix {0}\n";
                int graphics0 = 20;
                //
                string LightEditor = "c:\\Program Files\\SOAGameMaker\\LightBase\\LightEditor.exe {0}\n";
                string lighting1 = "c:\\Program Files\\SOAGameMaker\\LightBase\\Lighting1.light {0}";
                string lighting2 = "c:\\Program Files\\SOAGameMaker\\LightBase\\Lighting2.light {0}";
                string lighting3 = "c:\\Program Files\\SOAGameMaker\\LightBase\\Lighting3.light {0}";
                string lighting4 = "c:\\Program Files\\SOAGameMaker\\LightBase\\Lighting4.light {0}";
                string lighting5 = "c:\\Program Files\\SOAGameMaker\\LightBase\\Lighting5.light {0}";
                string lighting6 = "c:\\Program Files\\SOAGameMaker\\LightBase\\Lighting6.light {0}";
                string lighting7 = "c:\\Program Files\\SOAGameMaker\\LightBase\\Lighting7.light {0}";
                string lighting8 = "c:\\Program Files\\SOAGameMaker\\LightBase\\Lighting8.light {0}";
                string lighting9 = "c:\\Program Files\\SOAGameMaker\\LightBase\\Lighting9.light {0}";
                string lighting10 = "c:\\Program Files\\SOAGameMaker\\LightBase\\Lighting10.light {0}";
                string lighting11 = "c:\\Program Files\\SOAGameMaker\\LightBase\\Lighting11.light {0}";
                string lighting12 = "c:\\Program Files\\SOAGameMaker\\LightBase\\Lighting12.light {0}";
                string lighting13 = "c:\\Program Files\\SOAGameMaker\\LightBase\\Lighting13.light {0}";
                string lighting14 = "c:\\Program Files\\SOAGameMaker\\LightBase\\Lighting14.light {0}";
                string lighting15 = "c:\\Program Files\\SOAGameMaker\\LightBase\\Lighting15.light {0}";
                string lighting16 = "c:\\Program Files\\SOAGameMaker\\LightBase\\Lighting16.light {0}";
                string lighting17 = "c:\\Program Files\\SOAGameMaker\\LightBase\\Lighting17.light {0}";
                string lighting18 = "c:\\Program Files\\SOAGameMaker\\LightBase\\Lighting18.light {0}";
                string lighting19 = "c:\\Program Files\\SOAGameMaker\\LightBase\\Lighting19.light {0}";
                string lighting20 = "c:\\Program Files\\SOAGameMaker\\LightBase\\Lighting20.light {0}\n";
                int lighting0 = 20;
                    
                    /*This is the Console.WriteLine aspect of the installer, I'm still not sure how this works.
                     But i will figure it out with the help of my friend, russ. Excelent programmer on the field*/
                    
                     //The console.Writeline, will start the instillation process by going wn the squence assigned by//
                     //the variables in the strings, however. These strings could change in to something else during development//
                     //Also, the variables here will be associated to the file extentions to the files to run the software//
                    System.Console.WriteLine("Physics: {0}", Physics0);
                    System.Console.WriteLine("Physics Editor:\n{0}", PhysicsEditor);
                    System.Console.WriteLine("Physics Directorie1:\n{0}", Physics1);
                    System.Console.WriteLine("Physics Directorie2:\n{0}", Physics2);
                    System.Console.WriteLine("Physics Directorie3:\n{0}", Physics3);
                    System.Console.WriteLine("Physics Directorie4:\n{0}", Physics4);
                    System.Console.WriteLine("Physics Directorie5:\n{0}", Physics5);
                    System.Console.WriteLine("Physics Directorie6:\n{0}", Physics6);
                    System.Console.WriteLine("Physics Directorie7:\n{0}", Physics7);
                    System.Console.WriteLine("Physics Directorie8:\n{0}", Physics8);
                    System.Console.WriteLine("Physics Directorie9:\n{0}", Physics9);
                    System.Console.WriteLine("Physics Directorie10:\n{0}", Physics10);
                    System.Console.WriteLine("Physics Directorie11:\n{0}", Physics11);
                    System.Console.WriteLine("Physics Directorie12:\n{0}", Physics12);
                    System.Console.WriteLine("Physics Directorie13:\n{0}", Physics13);
                    System.Console.WriteLine("Physics Directorie14:\n{0}", Physics14);
                    System.Console.WriteLine("Physics Directorie15:\n{0}", Physics15);
                    System.Console.WriteLine("Physics Directorie16:\n{0}", Physics16);
                    System.Console.WriteLine("Physics Directorie17:\n{0}", Physics17);
                    System.Console.WriteLine("Physics Directorie18:\n{0}", Physics18);
                    System.Console.WriteLine("Physics Directorie19:\n{0}", Physics19);
                    System.Console.WriteLine("Physics Directorie20:\n{0}", Physics20);
                  
                  //After the instillation of the directories and files. It will move on to the next set of directories//
                  //and files. As stated before, it will install in the decending order; dierectorie file directorie file directorie file and so forth//
                  //on till a new object is called for it to assign all these directories and files to//
                System.Console.WriteLine("Collision: {0}", collision0);
                    System.Console.WriteLine("Collision Writer:\n{0}", CollisionEditor);                
                    System.Console.WriteLine("Collision Directorie1:\n{0}", collision1);
                    System.Console.WriteLine("Collision Directorie2:\n{0}", collision2);
                    System.Console.WriteLine("Collision Directorie3:\n{0}", collision3);
                    System.Console.WriteLine("Collision Directorie4:\n{0}", collision4);
                    System.Console.WriteLine("Collision Directorie5:\n{0}", collision5);
                    System.Console.WriteLine("Collision Directorie6:\n{0}", collision6);
                    System.Console.WriteLine("Collision Directorie7:\n{0}", collision7);
                    System.Console.WriteLine("Collision Directorie8:\n{0}", collision8);
                    System.Console.WriteLine("Collision Directorie9:\n{0}", collision9);
                    System.Console.WriteLine("Collision Directorie10:\n{0}", collision10);
                    System.Console.WriteLine("Collision Directorie11:\n{0}", collision11);
                    System.Console.WriteLine("Collision Directorie12:\n{0}", collision12);
                    System.Console.WriteLine("Collision Directorie13:\n{0}", collision13);
                    System.Console.WriteLine("Collision Directorie14:\n{0}", collision14);
                    System.Console.WriteLine("Collision Directorie15:\n{0}", collision15);
                    System.Console.WriteLine("Collision Directorie16:\n{0}", collision16);
                    System.Console.WriteLine("Collision Directorie17:\n{0}", collision17);
                    System.Console.WriteLine("Collision Directorie18:\n{0}", collision18);
                    System.Console.WriteLine("Collision Directorie19:\n{0}", collision19);
                    System.Console.WriteLine("Collision Directorie20:\n{0}", collision20);
                //
                System.Console.WriteLine("Particles: {0}", particle0);
                System.Console.WriteLine("Particle Editor: \n{0}", ParticleEditor);
                    System.Console.WriteLine("Particle Directorie1:\n {0}", particle1);
                    System.Console.WriteLine("Particle Directorie2:\n {0}", particle2);
                    System.Console.WriteLine("Particle Directorie3:\n {0}", particle3);
                    System.Console.WriteLine("Particle Directorie4:\n {0}", particle4);
                    System.Console.WriteLine("Particle Directorie5:\n {0}", particle5);
                    System.Console.WriteLine("Particle Directorie6:\n {0}", particle6);
                    System.Console.WriteLine("Particle Directorie7:\n {0}", particle7);
                    System.Console.WriteLine("Particle Directorie8:\n {0}", particle8);
                    System.Console.WriteLine("Particle Directorie9:\n {0}", particle9);
                    System.Console.WriteLine("Particle Directorie10:\n {0}", particle10);
                    System.Console.WriteLine("Particle Directorie11:\n {0}", particle11);
                    System.Console.WriteLine("Particle Directorie12:\n {0}", particle12);
                    System.Console.WriteLine("Particle Directorie13:\n {0}", particle13);
                    System.Console.WriteLine("Particle Directorie14:\n {0}", particle14);
                    System.Console.WriteLine("Particle Directorie15:\n {0}", particle15);
                    System.Console.WriteLine("Particle Directorie16:\n {0}", particle16);
                    System.Console.WriteLine("Particle Directorie17:\n {0}", particle17);
                    System.Console.WriteLine("Particle Directorie18:\n {0}", particle18);
                    System.Console.WriteLine("Particle Directorie19:\n {0}", Particle19);
                    System.Console.WriteLine("Particle Directorie20:\n {0}", Particle20);
               
                //
                System.Console.WriteLine("Graphics: {0}", graphics0);
                System.Console.WriteLine("Graphics Editor: \n{0}", GraphicsEditor);
                    System.Console.WriteLine("Graphics Directorie1:\n {0}", graphics1);
                    System.Console.WriteLine("Graphics Directorie2:\n {0}", graphics2);
                    System.Console.WriteLine("Graphics Directorie3:\n {0}", graphics3);
                    System.Console.WriteLine("Graphics Directorie4:\n {0}", graphics4);
                    System.Console.WriteLine("Graphics Directorie5:\n {0}", graphics5);
                    System.Console.WriteLine("Graphics Directorie6:\n {0}", graphics6);
                    System.Console.WriteLine("Graphics Directorie7:\n {0}", graphics7);
                    System.Console.WriteLine("Graphics Directorie8:\n {0}", graphics8);
                    System.Console.WriteLine("Graphics Directorie9:\n {0}", graphics9);
                    System.Console.WriteLine("Graphics Directorie10:\n {0}", graphics10);
                    System.Console.WriteLine("Graphics Directorie11:\n {0}", graphics11);
                    System.Console.WriteLine("Graphics Directorie12:\n {0}", graphics12);
                    System.Console.WriteLine("Graphics Directorie13:\n {0}", graphics13);
                    System.Console.WriteLine("Graphics Directorie14:\n {0}", graphics14);
                    System.Console.WriteLine("Graphics Directorie15:\n {0}", graphics15);
                    System.Console.WriteLine("Graphics Directorie16:\n {0}", graphics16);
                    System.Console.WriteLine("Graphics Directorie17:\n {0}", graphics17);
                    System.Console.WriteLine("Graphics Directorie18:\n {0}", graphics18);
                    System.Console.WriteLine("Graphics Directorie19:\n {0}", graphics19);
                    System.Console.WriteLine("Graphics Directorie20:\n {0}", graphics20);
                
                //
                System.Console.WriteLine("Lighting: {0}", lighting0);
                System.Console.WriteLine("Lighting Editor: \n{0}", LightEditor);
                    System.Console.WriteLine("Light Directorie1:\n {0}", lighting1);
                    System.Console.WriteLine("Light Directorie2:\n {0}", lighting2);
                    System.Console.WriteLine("Light Directorie3:\n {0}", lighting3);
                    System.Console.WriteLine("Light Directorie4:\n {0}", lighting4);
                    System.Console.WriteLine("Light Directorie5:\n {0}", lighting5);
                    System.Console.WriteLine("Light Directorie6:\n {0}", lighting6);
                    System.Console.WriteLine("Light Directorie7:\n {0}", lighting7);
                    System.Console.WriteLine("Light Directorie8:\n {0}", lighting8);
                    System.Console.WriteLine("Light Directorie9:\n {0}", lighting9);
                    System.Console.WriteLine("Light Directorie10:\n {0}", lighting10);
                    System.Console.WriteLine("Light Directorie11:\n {0}", lighting11);
                    System.Console.WriteLine("Light Directorie12:\n {0}", lighting12);
                    System.Console.WriteLine("Light Directorie13:\n {0}", lighting13);
                    System.Console.WriteLine("Light Directorie14:\n {0}", lighting14);
                    System.Console.WriteLine("Light Directorie15:\n {0}", lighting15);
                    System.Console.WriteLine("Light Directorie16:\n {0}", lighting16);
                    System.Console.WriteLine("Light Directorie17:\n {0}", lighting17);
                    System.Console.WriteLine("Light Directorie18:\n {0}", lighting18);
                    System.Console.WriteLine("Light Directorie19:\n {0}", lighting19);
                    System.Console.WriteLine("Light Directorie20:\n {0}", lighting20);
            }
        }
    }

    Ok, some of you might know how to do this right off the back of your head, but since working in C# is new to me; heck every language is new to me right now. But how would i go about this.

    I have added the SOAGameMaker directory to the program files section of windows, and added the subfolders. But the problem i am having is that in every subfolder is ALL THE SAME FILES that SHOULD be inside the "Assets" folder, now those files are there. But the problem i am having is that THE SAME FILES end up in every other subfile i create. And i don't want that, i want to know how fix this issue. I can go in and manually delete all the folders in the subfolders. But when i run the console application again, it puts all the files BACK in to those subfolders so i have to go back in and delete them EVERYTIME i run the console application.. The code below shows the static.cs <Which the name of the .cs file has been changed to Assets; but this file that contains the other code needed for this.

    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using System.Text;
    namespace ProtoGame.Globals
    {
        public static class Assets
        {
            /*Working Directory for testing*/
            public static DirectoryInfo Diretory = new DirectoryInfo(Directory.GetCurrentDirectory());
            /*folder names*/
            public static string[] Type = { "Buttons", "Faces", "Fonts", "GUI", "Maps", "Music", "Sounds", "Sprites", "Tiles", };
            /*Massive List<FileInfo>*/
            public static List<FileInfo> Files;
            /*If you wanna make a updater using List<T>*/
            public class Update
            {
                public string Name { get; set; }
                public string Hash { get; set; }
                private int _type;
                public int type
                {
                    get { return _type; }
                    set { _type = value; }
                }
            }
        }
    }
    So what im basically asking is, how do i delete the folders inside the subfolders so that each subfolder has nothing  it, and can then have stuff written in to it that DOESNT repeat the same file thing over and over again for each subfolder.
    2012년 5월 1일 화요일 오전 5:55

답변

  • Hello

    i think u wants to know how to delete the folders and sub folders.

    please  note first u need to add reference to "using System.IO;" 

    than try this

    To delete a sub folder

     if(Directory.Exists(@"D:\a\folderb"))

                Directory.Delete(@"D:\a\folderb");

    to delete a folder with sub folder

      Directory.Delete(@"D:\a",true);

    to delete a file                          

      if (File.Exists(@"C:\A\A.pdf"))
                                    File.Delete(@"C:\A\A.pdf");


    -- Thanks, Amit kala Please remember to click “Mark as Answer” on the post that helps you, & to click “Unmark as Answer” if a marked post does not actually answer your question.

    2012년 5월 1일 화요일 오전 9:06