コード例 #1
0
        public Rule CloneRule()
        {
            SerializedRule r = new SerializedRule();

            r.Serialize(this);
            return(r.Deserialize());
        }
コード例 #2
0
        private void bSaveRules_Click(object sender, EventArgs e)
        {
            List <SerializedRule> ruleList = new List <SerializedRule>();

            foreach (Rule rule in _rules)
            {
                SerializedRule sr = new SerializedRule();
                sr.Serialize(rule);
                ruleList.Add(sr);
            }
            ProductionSet ps = new ProductionSet(ruleList, _symbols);

            SaveXML(ps);
        }