|
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Configuration;
- using System.Data;
- using System.Drawing;
- using System.IO;
- using System.Linq;
- using System.Text;
- using System.Threading;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- using Learun.Util;
-
- namespace Quanjiang.DigitalScholl.DataSync
- {
- public partial class Form2 : Form
- {
- public Form2()
- {
- InitializeComponent();
- }
-
- private void button1_Click(object sender, EventArgs e)
- {
-
- if (this.folderBrowserDialog1.ShowDialog() == DialogResult.OK)
- {
- if (this.folderBrowserDialog1.SelectedPath.Trim() != "")
- {
- this.textBox4.Text = this.folderBrowserDialog1.SelectedPath.Trim();
-
- DirectoryInfo name = new DirectoryInfo(this.folderBrowserDialog1.SelectedPath);
- FileInfo[] af = name.GetFiles();
- var bb = af.ToList();
- MainService service = new MainService();
- service.BeginSync(bb);
- }
- }
- }
-
- private void button2_Click(object sender, EventArgs e)
- {
- //写
- var opencon = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
- opencon.ConnectionStrings.ConnectionStrings["source"].ConnectionString = this.mixtxt.Text.Trim();
- opencon.ConnectionStrings.ConnectionStrings["target"].ConnectionString = admtxt.Text.Trim();
- opencon.Save(ConfigurationSaveMode.Full);
-
- }
- }
- }
|