protected bool collect(out QDBDog.Config config) { //先用从当文件中读取配置? config = loadConfig(); Dictionary <string, string> data = new Dictionary <string, string>(); collect(theTableLayoutPanel.Controls, data); collectSub(data); config = data.ToArray().CopyNameValuePairs <Config>(config); //强制节点名为纯字母,取最后一个符合要求的 if (reg.IsMatch(config.ServerPath)) { var m = reg.Matches(config.ServerPath); config.ServerPath = m[m.Count - 1].Value.Replace("\\", "/").ToUpper(); } else { MessageBox.Show("备份上传节点代码无效,只能使用字母和数字,如sz\\m2"); } return(true); }
protected virtual void render(QDBDog.Config config) { var data = config.ToDict(); render(theTableLayoutPanel.Controls, data); }