private void btnLaunch_Click(object sender, RoutedEventArgs e) { Button btn = sender as Button; AdobeProductBean bean = btn.DataContext as AdobeProductBean; if (bean != null) { if (!File.Exists(bean.LaunchPath)) { HelpWindow helpWindow = new HelpWindow("提示", "软件未安装,或者未安装在默认目录,请按照以下提示使用\n\n1、去Adobe官网下载CreativeCloud并且安装\n" + "2、通过CreativeCloud下载你想要的应用比如Photoshop(需要登陆CreativeCloud)\n" + "3、在本软件内找到你下载的版本,点击优化即可使用\n" + "4、注意不要更改adobe系列软件的安装目录\n" + "5、点击确定按钮去官网下载CreativeCloud", new HelperHandler("help")); helpWindow.Show(); } else { Process.Start(bean.LaunchPath); } } }
private void btnPatch_Click(object sender, RoutedEventArgs e) { Button btn = sender as Button; AdobeProductBean bean = btn.DataContext as AdobeProductBean; if (bean != null) { if (!File.Exists(bean.LaunchPath)) { HelpWindow helpWindow = new HelpWindow("提示", "软件未安装,或者未安装在默认目录,请按照以下提示使用\n\n" + "1、去Adobe官网下载CreativeCloud并且安装\n" + "2、通过CreativeCloud下载你想要的应用比如Photoshop(需要登陆CreativeCloud)\n" + "3、在本软件内找到你下载的版本,点击优化即可使用\n" + "4、注意不要更改adobe系列软件的安装目录\n" + "5、点击确定按钮去官网下载CreativeCloud", new HelperHandler("help")); helpWindow.Show(); } else { try { bool succ = AdobePatchUtil.patchProduct(bean.Product, bean.Version); if (succ) { alert(bean.Name + "优化成功,已经可以正常使用"); } else { alert(bean.Name + "优化失败,可能已经优化过,请启动尝试。如果未优化成功请联系开发者反馈"); } } catch (Exception e1) { alert(bean.Name + "发生未知错误,请联系开发者反馈:" + e1.ToString()); } } } }