Esempio n. 1
0
        /// <summary>
        /// Build game process and return it
        /// </summary>
        public Process GetProcess()
        {
            var native = new MNative(LaunchOption);

            native.CleanNatives();
            native.CreateNatives();

            string  arg = makeArg();
            Process mc  = new Process();

            mc.StartInfo.FileName         = LaunchOption.JavaPath;
            mc.StartInfo.Arguments        = arg;
            mc.StartInfo.WorkingDirectory = Minecraft.path;

            return(mc);
        }
Esempio n. 2
0
        /// <summary>
        /// 설정한 프로퍼티로 인수를 만들어 Process 객체를 만들고 반환합니다.
        /// </summary>
        /// <param name="isdebug">true 로 설정하면 디버그 모드가 됩니다.</param>
        /// <returns>만들어진 Process 객체</returns>
        public Process GetProcess(bool isdebug = false)
        {
            var native = new MNative(LaunchOption);

            native.CleanNatives();
            native.CreateNatives();

            string  arg = makeArg();
            Process mc  = new Process();

            mc.StartInfo.FileName         = LaunchOption.JavaPath;
            mc.StartInfo.Arguments        = arg;
            mc.StartInfo.WorkingDirectory = Minecraft.path;

            if (isdebug)
            {
                File.WriteAllText("mc_arg.txt", mc.StartInfo.Arguments);
            }

            return(mc);
        }