示例#1
0
        public static void RunNnStructure(RPath path, string content, CancellationToken ct, NnType type)
        {
            try {
                File.WriteAllText(
                    path.SubPath(inputFileName),
                    content);

                string exePath = "";
                string dBPath  = "";
                switch (type)
                {
                case NnType.Nn3:
                    exePath = nn3Path;
                    dBPath  = nn3DBPath;
                    break;

                case NnType.NnPP:
                    exePath = nnPPPath;
                    dBPath  = nnPPDBPath;
                    break;
                }
                if (exePath == "")
                {
                    throw new Exception();
                }

                Util.StartAndWaitProcess(
                    nnMainPath + exePath,
                    " -s --license \"" + nnMainPath + "License\\license.txt\"" +
                    " --database \"" + nnMainPath + dBPath +
                    " --outputdirectory \"" + path + "\"" +
                    " --noautooutdir -log \"" + path.SubPath(inputFileName),
                    ct
                    );
            } catch {
                Util.ErrorHappend("Exception encountered in RunNnStructure (NnAgent)!");
            }
        }