Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 public ChangesetDiffView(VersionControlServer vcs, int cid)
 {
     textView = MyTextViewFactory.CreateNewTextView();
     Add(textView);
     ShowChangeset(vcs, cid);
 }