示例#1
0
        private void query_button_Click(object sender, EventArgs e)
        {
            try
            {
                if (!String.IsNullOrEmpty(norm_input.Text))
                {
                    LawRetrieval xmlRetriever = new LawRetrieval();
                    xmlRetriever.loadXMLDoc(norm_input.Text);
                    output.Text = xmlRetriever.getNorm(norm_input.Text);
                    Dictionary <int, Norm> norms;

                    IEnumerable <XElement> allNormsXML = xmlRetriever.getAllNorms();
                    norms = this.getDictFromXMLLaw(allNormsXML);
                }
            }
            catch (COMException ex)
            {
                System.Diagnostics.Debug.WriteLine(ex.ToString());
            }
        }
示例#2
0
        private void query_button_Click(object sender, EventArgs e)
        {
            try
            {
                if (!String.IsNullOrEmpty(norm_input.Text))
                {
                    LawRetrieval xmlRetriever = new LawRetrieval();
                    xmlRetriever.loadXMLDoc(norm_input.Text);
                    output.Text = xmlRetriever.getNorm(norm_input.Text);
                    Dictionary<int, Norm> norms;

                    IEnumerable<XElement> allNormsXML = xmlRetriever.getAllNorms();
                    norms = this.getDictFromXMLLaw(allNormsXML);
                }
            }
            catch (COMException ex)
            {
                System.Diagnostics.Debug.WriteLine(ex.ToString());
            }
        }