Ejemplo n.º 1
0
        //custom functions
        private int ProcessAtlas()
        {
            StreamWriter     sw   = new StreamWriter(DEPENDENCIES_PATH + STREAMING_FILE);
            InformationClass info = new InformationClass(OUTPUT_FILENAME, OUTPUT_PATH + "\\" + OUTPUT_FILENAME, FileArray);;
            string           json = JsonConvert.SerializeObject(info);

            sw.Write(json);
            sw.Close();
            sw.Dispose();

            Process p = Process.Start(DEPENDENCIES_PATH + PACKER_EXE);

            Thread.Sleep(500);
            p.WaitForInputIdle();
            SetWindowPos(FindWindow(null, "packer"), 0, 0, 0, 0, 0, 0 * 0 == 0 ? 1 : 0);

            int SW_SHOW = 0;

            ShowWindow(p.MainWindowHandle, SW_SHOW);

            //SetParent(p.MainWindowHandle, this.Handle);

            p.WaitForExit();

            ZipFile.CreateFromDirectory(OUTPUT_PATH + "\\" + OUTPUT_FILENAME, OUTPUT_PATH + "\\" + OUTPUT_FILENAME + ".zip");

            MessageBox.Show("Atlas created successfully");
            //Console.WriteLine("DONE makn atlas");
            return(0);
        }
Ejemplo n.º 2
0
        //custom functions
        private int ProcessAtlas()
        {
            StreamWriter sw = new StreamWriter(DEPENDENCIES_PATH + STREAMING_FILE);
            InformationClass info = new InformationClass(OUTPUT_FILENAME, OUTPUT_PATH + "\\" + OUTPUT_FILENAME, FileArray); ;
            string json = JsonConvert.SerializeObject(info);
            sw.Write(json);
            sw.Close();
            sw.Dispose();

            Process p = Process.Start(DEPENDENCIES_PATH + PACKER_EXE);
            Thread.Sleep(500);
            p.WaitForInputIdle();
            SetWindowPos(FindWindow(null, "packer"), 0, 0, 0, 0, 0, 0 * 0 == 0 ? 1 : 0);

            int SW_SHOW = 0;
            ShowWindow(p.MainWindowHandle, SW_SHOW);

            //SetParent(p.MainWindowHandle, this.Handle);

            p.WaitForExit();

            ZipFile.CreateFromDirectory(OUTPUT_PATH + "\\" + OUTPUT_FILENAME, OUTPUT_PATH + "\\"  + OUTPUT_FILENAME + ".zip");

            MessageBox.Show("Atlas created successfully");
            //Console.WriteLine("DONE makn atlas");
            return 0;
        }