Beispiel #1
0
        void MyShowFileEventHandler(object sender, ShowFileEventArgs args)
        {
            string serverItem        = args.ServerItem;
            VersionControlServer vcs = args.VersionControlServer;

            Microsoft.TeamFoundation.VersionControl.Client.Item item = vcs.GetItem(serverItem, VersionSpec.Latest, 0, true);
            string tname = System.IO.Path.GetTempFileName();

            item.DownloadFile(tname);

            Document d = MonoDevelop.Ide.Gui.IdeApp.Workbench.OpenDocument(tname, true);

            d.FileName = serverItem;
            File.Delete(tname);
        }
Beispiel #2
0
    public void UpdatePath(string path)
    {
        if (String.IsNullOrEmpty(path))
        {
            return;
        }
        Microsoft.TeamFoundation.VersionControl.Client.Item item = driver.VersionControlServer.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);
    }
Beispiel #3
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);
        }
Beispiel #4
0
 public Item(tfs.Item item)
 {
     _item = item;
 }