Example #1
0
        /// <summary>
        /// 配置程序参数
        /// </summary>
        /// <param name="sender">事件发送者</param>
        /// <param name="e">事件参数</param>
        private void bSet_Click(object sender, EventArgs e)
        {
            ConfigForm cForm = new ConfigForm(compareApplicationPath);

            if (cForm.ShowDialog() == DialogResult.OK)
            {
                UpdateConfigInfo(cForm);
            }
        }
Example #2
0
        private void ViewDiffExternal(string currentFilePath, string destFilePath)
        {
            if (compareApplicationPath != "")
            {
                if (File.Exists(compareApplicationPath))
                {
                    try
                    {
                        System.Diagnostics.Process.Start(compareApplicationPath, string.Format("\"{0}\" \"{1}\"", currentFilePath, destFilePath));
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(string.Format("在运行程序{0}时产生异常:" + ex.Message, compareApplicationPath), "文件比较",
                                        MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                }
            }
            else
            {
                MessageBox.Show("请先配置默认的比对程序!", "文件比较",
                                MessageBoxButtons.OK, MessageBoxIcon.Information);
                ConfigForm cForm = new ConfigForm(compareApplicationPath);

                if (cForm.ShowDialog() == DialogResult.OK)
                {
                    UpdateConfigInfo(cForm);

                    if (File.Exists(compareApplicationPath))
                    {
                        try
                        {
                            System.Diagnostics.Process.Start(compareApplicationPath, string.Format("{0} {1}", currentFilePath, destFilePath));
                        }
                        catch (Exception ex)
                        {
                            MessageBox.Show(string.Format("在运行程序{0}时产生异常:" + ex.Message, compareApplicationPath), "文件比较",
                                            MessageBoxButtons.OK, MessageBoxIcon.Information);
                        }
                    }
                }
            }
        }
Example #3
0
        /// <summary>
        /// 配置程序参数
        /// </summary>
        /// <param name="sender">事件发送者</param>
        /// <param name="e">事件参数</param>
        private void bSet_Click(object sender, EventArgs e)
        {
            ConfigForm cForm = new ConfigForm(compareApplicationPath);

            if (cForm.ShowDialog() == DialogResult.OK)
            {
                UpdateConfigInfo(cForm);
            }
        }
Example #4
0
        private void ViewDiffExternal(string currentFilePath, string destFilePath)
        {
            if (compareApplicationPath != "")
            {
                if (File.Exists(compareApplicationPath))
                {
                    try
                    {
                        System.Diagnostics.Process.Start(compareApplicationPath, string.Format("\"{0}\" \"{1}\"", currentFilePath, destFilePath));
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(string.Format("在运行程序{0}时产生异常:" + ex.Message, compareApplicationPath), "文件比较",
                                        MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }

                }
            }
            else
            {
                MessageBox.Show("请先配置默认的比对程序!", "文件比较",
                                MessageBoxButtons.OK, MessageBoxIcon.Information);
                ConfigForm cForm = new ConfigForm(compareApplicationPath);

                if (cForm.ShowDialog() == DialogResult.OK)
                {
                    UpdateConfigInfo(cForm);

                    if (File.Exists(compareApplicationPath))
                    {
                        try
                        {
                            System.Diagnostics.Process.Start(compareApplicationPath, string.Format("{0} {1}", currentFilePath, destFilePath));
                        }
                        catch (Exception ex)
                        {
                            MessageBox.Show(string.Format("在运行程序{0}时产生异常:" + ex.Message, compareApplicationPath), "文件比较",
                                            MessageBoxButtons.OK, MessageBoxIcon.Information);
                        }
                    }
                }
            }
        }