public FileView(VersionControlServer vcs, string path) { view = MyTextViewFactory.CreateNewTextView(); Add(view); if (String.IsNullOrEmpty(path)) { return; } Microsoft.TeamFoundation.VersionControl.Client.Item item = vcs.GetItem(path, VersionSpec.Latest, 0, true); string tname = System.IO.Path.GetTempFileName(); item.DownloadFile(tname); using (StreamReader sr = new StreamReader(tname)) { view.Update(path, sr.ReadToEnd()); } File.Delete(tname); }
public ChangesetDiffView(VersionControlServer vcs, int cid) { textView = MyTextViewFactory.CreateNewTextView(); Add(textView); ShowChangeset(vcs, cid); }