} // end MoveFiles private void CompareFileMenuItem_Click(object sender, EventArgs e) { if (treeViewAdv1.SelectedNode == null) { return; } // end if BaseItem item = treeViewAdv1.SelectedNode.Tag as BaseItem; if (item == null) { return; } // end if string leftPicture = leftRoot + item.ItemPath; string rightPicture = rightRoot + item.ItemPath; if (Utility.IsNullOrImage(leftPicture) && Utility.IsNullOrImage(rightPicture)) { WatchWindow win = new WatchWindow(); AddOwnedForm(win); win.Show(); win.ShowPricture(leftPicture, rightPicture); } else { MessageBox.Show("只能对比图片"); }// end if }
} // end MoveFiles private void CompareFileMenuItem_Click(object sender, EventArgs e) { if (treeViewAdv1.SelectedNode == null) { return; } // end if BaseItem item = treeViewAdv1.SelectedNode.Tag as BaseItem; if (item == null) { return; } // end if string leftPicture = leftRoot + item.ItemPath; string rightPicture = rightRoot + item.ItemPath; if (Utility.IsNullOrImage(leftPicture) && Utility.IsNullOrImage(rightPicture)) { WatchWindow win = new WatchWindow(); AddOwnedForm(win); win.Show(); win.ShowPricture(leftPicture, rightPicture); } else { if (!File.Exists(DataManager.Instance.BeyondComparePath)) { MessageBox.Show("图片以外的比较请设置Beyond Compare安装路径"); return; } // end if Process process = new Process(); process.StartInfo.FileName = DataManager.Instance.BeyondComparePath; process.StartInfo.Arguments = leftPicture + " " + rightPicture; process.StartInfo.UseShellExecute = false; process.StartInfo.CreateNoWindow = false; process.Start(); process.WaitForExit(); process.Close(); }// end if }