コード例 #1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            MongoXML mongoxml = new MongoXML();
            if(name!="")
            {
                 name = this.modservername.Text;
                 ip = this.modip.Text;
                 port = this.modport.Text;


                try
                {
                    mongoxml.loaddoc("./config/config.xml");
                    mongoxml.ModifyNode(name, ip, port);
                    //MessageBox.Show("添加成功");
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
        }
コード例 #2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            MongoXML mongoxml = new MongoXML();

            if (name != "")
            {
                name = this.modservername.Text;
                ip   = this.modip.Text;
                port = this.modport.Text;


                try
                {
                    mongoxml.loaddoc("./config/config.xml");
                    mongoxml.ModifyNode(name, ip, port);
                    //MessageBox.Show("添加成功");
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
        }