Пример #1
0
        /// <summary>
        /// 选择文件对比
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button1_Click(object sender, EventArgs e)
        {
            var clientApp = MemexUpateHelper.GetFiles(textBox2.Text);
            var serverApp = MemexUpateHelper.GetServerFiles(textBox1.Text);

            if (serverApp != null && clientApp != null)
            {
                var listDifferent = MemexUpateHelper.GetDifferentFiles(serverApp.MDir, clientApp.MDir);
                if (listDifferent != null && listDifferent.ToList().Any())
                {
                    StartDownFiles(listDifferent);
                }
                MessageBox.Show("完成!");
            }
            else
            {
                MessageBox.Show("服务器端不存在要更新的文件!");
            }
        }
Пример #2
0
        /// <summary>
        /// 选择文件对比
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button1_Click(object sender, EventArgs e)
        {
            var clientApp = MemexUpateHelper.GetFiles(textBox2.Text);
            var serverApp = MemexUpateHelper.GetServerFiles(textBox1.Text);

            if (serverApp != null && clientApp != null)
            {
                var listDifferent = MemexUpateHelper.GetDifferentFiles(serverApp.MDir, clientApp.MDir);
                if (listDifferent != null && listDifferent.ToList().Any())
                {
                    MemexUpateHelper.WriteLog(string.Format("开始下载项目:{0}的文件", textBox1.Text), true);
                    StartDownFiles(listDifferent);
                    MemexUpateHelper.WriteLog(string.Format("下载项目:{0}的文件结束", textBox1.Text), true);
                }
                MessageBox.Show("完成!");
            }
            else
            {
                MessageBox.Show("服务器端不存在要更新的文件!");
            }
        }