Ejemplo n.º 1
0
 private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (MessageBox.Show("选择为:" + this.comboBox1.Text, "确认选择正确?", MessageBoxButtons.YesNo) == DialogResult.Yes)
     {
         string destPath = FilesOperate.GetPathInLnkFile(@"C:\Users\Administrator\Desktop\" + this.comboBox1.Text + ".lnk");
         BeginWork();
         FilesOperate.MoveFolder(@"\\192.168.1.3\his90程序\" + this.comboBox1.Text, destPath, this.progressBar1);
         OverWork("修复完成!");
     }
 }
Ejemplo n.º 2
0
        private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
        {
            string selectedText = this.comboBox3.Text;

            string[] exeMap = { "zygl", "zyys", "ysgl", "mzgl", "bagl", "hqgl", "kfgl", "yfgl", "kfgl", "yfgl", "zwkf" };

            if (MessageBox.Show("选择为:" + selectedText, "确认选择正确?", MessageBoxButtons.YesNo) == DialogResult.Yes)
            {
                string destPath = @"D:\His程序\" + selectedText;
                BeginWork();
                FilesOperate.MoveFolder(@"\\192.168.1.3\his90程序\" + selectedText, destPath, this.progressBar1);
                FilesOperate.CreateDesktopShortcut(selectedText, destPath + "\\" + exeMap[this.comboBox3.SelectedIndex] + ".exe");
                OverWork("安装完成!");
            }
        }