示例#1
0
        /// <summary>
        /// xml形式ファイルから生成します。
        /// </summary>
        /// <param name="source_file">xmlファイル名</param>
        public static TMOConstraint Load(string source_file)
        {
            XmlReader     reader     = XmlReader.Create(source_file);
            XmlSerializer serializer = new XmlSerializer(typeof(TMOConstraint));
            TMOConstraint program    = serializer.Deserialize(reader) as TMOConstraint;

            reader.Close();
            return(program);
        }
示例#2
0
        static void Main(string[] args)
        {
            if (args.Length < 1)
            {
                Console.WriteLine("TMOConstraint.exe <tmo directory>");
                return;
            }
            string source_file = args[0];

            TMOConstraint program = new TMOConstraint();

            program.AddItemFromTMODirectory(source_file);
            program.Dump();
        }