コード例 #1
0
 private bool ModifyDataBaseInConfig(XmlDocument doc, string path, XmlElement node)
 {
     if (!Directory.Exists(tbLocalPosition.Text))
     {
         MessageBox.Show(string.Format("{0}路径文件夹不存在", tbLocalPosition.Text), "无效文件夹", MessageBoxButtons.OK,
                         MessageBoxIcon.Error);
         return(false);
     }
     database.title             = textBoxTitle.Text;
     database.address           = textBoxAddress.Text;
     database.databaseName      = textBoxDataBaseName.Text;
     database.dbType            = comboBoxSQLType.SelectedItem.ToString();
     database.password          = textBoxPassword.Text;
     database.port              = textBoxPort.Text;
     database.userName          = textBoxUserName.Text;
     database.versionTableName  = textBoxVerTableName.Text;
     database.versionTableField = textBoxVerTableField.Text;
     database.versionValueField = textBoxVerValue.Text;
     database.versionDescField  = textBoxVerDesc.Text;
     database.localPositionPath = tbLocalPosition.Text;
     database.ModifyNodeInConfig(doc, path, node);
     return(true);
 }