Beispiel #1
0
        public static IList <string> Run(Txt2BinModelConverterConfig config)
        {
            var converter       = new Txt2BinModelConverter(ref config);
            var outputFileNames = converter.Save();

            return(outputFileNames);
        }
Beispiel #2
0
        private static IEnumerable <string> ConvertFromTxt2Bin()
        {
            var tmcfg = Config.Inst.GetTextModelConfig();

            using (var model = new ManagedTextModel(tmcfg))
            {
                var config = new Txt2BinModelConverterConfig()
                {
                    Model                 = model,
                    OutputFileName        = Config.Inst.OUTPUT_FILENAME,
                    OutputFileSizeInBytes = Config.Inst.OUTPUT_FILE_SIZE_IN_BYTES,
                };
                var outputFileNames = Txt2BinModelConverter.Run(config);

                Console.WriteLine($"{Environment.NewLine} output-files: ");
                Console.WriteLine(" --------------");
                for (var i = 0; i < outputFileNames.Count; i++)
                {
                    Console.WriteLine($" {(i + 1).ToString()}). '{outputFileNames[ i ]}'");
                }
                Console.WriteLine(" --------------\r\n");
                return(outputFileNames);
            }
        }