public void RunLwsCore(CoreParameter inParameter) { KillCoreProcess(); Output.Clear(); skipped = false; coreProcess = new Process(); coreProcess.StartInfo.FileName = @"lws-core.exe"; coreProcess.StartInfo.Arguments = $"--SearchType {inParameter.EnchantmentID} -t {inParameter.EnchantmentPowerThreshold} -b {inParameter.BeginID} -e {inParameter.EndID}"; coreProcess.StartInfo.Arguments += $" -l {inParameter.Level} -w {inParameter.WeaponType}"; coreProcess.StartInfo.Arguments += $""; coreProcess.StartInfo.CreateNoWindow = true; coreProcess.StartInfo.UseShellExecute = false; coreProcess.StartInfo.RedirectStandardOutput = true; coreProcess.StartInfo.StandardOutputEncoding = Encoding.UTF8; coreProcess.EnableRaisingEvents = true; coreProcess.Exited += (s, eargs) => { }; coreProcess.OutputDataReceived += new DataReceivedEventHandler(process_DataReceived); coreProcess.Start(); coreProcess.BeginOutputReadLine(); }
private void Execute() { var param = new CoreParameter(); param.EnchantmentID = GetEnchantNameList()[SelectedNameIndex.Value].ID; param.EnchantmentPowerThreshold = Convert.ToInt32(Threshold.Value); param.BeginID = Convert.ToInt32(StartID.Value); param.EndID = Convert.ToInt32(EndID.Value); model?.RunLwsCore(param); }