Пример #1
0
        private void btn_save_Click(object sender, EventArgs e)
        {
            setXML xml = new setXML();

            xml.setXMLPathLocal("update.xml");
            xml.editxml("appVersion", this.txt_appversion.Text);
            xml.editxml("appDate", this.txt_appdate.Value.ToString("yyyy-MM-dd"));
            xml.editxml("appPath", this.txt_apppath.Text);
            xml.editxml("appName", this.txt_appname.Text);
            xml.editxml("updatePath", this.txt_updateURL.Text);
            MessageBox.Show("保存成功!");
        }
Пример #2
0
        private void btn_createFolder_Click(object sender, EventArgs e)
        {
            if (this.txt_newVersion.Text == "")
            {
                MessageBox.Show("必须要填写版本号!");
                return;
            }
            setXML xml = new setXML();

            xml.setXMLPath("updateInfo.xml");
            xml.editxml("newDate", this.txt_newDate.Value.ToString("yyyy-MM-dd"));
            xml.editxml("newVersion", this.txt_newVersion.Text);

            string folderPath = AppDomain.CurrentDomain.BaseDirectory + "updateStorage\\" + this.txt_newDate.Value.ToString("yyyy-MM-dd") + "\\v" + this.txt_newVersion.Text;

            if (!Directory.Exists(folderPath))
            {
                Directory.CreateDirectory(folderPath);
            }
            MessageBox.Show("创建成功!");
        }