3 using System
.Collections
;
4 using System
.Collections
.Generic
;
9 using Microsoft
.TeamFoundation
.Client
;
10 using Microsoft
.TeamFoundation
.VersionControl
.Common
;
11 using Microsoft
.TeamFoundation
.VersionControl
.Client
;
13 public class FileView
: Gtk
.ScrolledWindow
, IExploreViewChild
15 private Gtk
.TextBuffer viewBuffer
;
16 private Driver driver
;
18 public FileView(Driver driver
)
21 TfTextView view
= new TfTextView();
23 viewBuffer
= view
.Buffer
;
27 public void UpdatePath(string path
)
29 if (String
.IsNullOrEmpty(path
)) return;
30 Microsoft
.TeamFoundation
.VersionControl
.Client
.Item item
= driver
.VersionControlServer
.GetItem(path
, VersionSpec
.Latest
, 0, true);
32 string tname
= System
.IO
.Path
.GetTempFileName();
33 item
.DownloadFile(tname
);
35 using (StreamReader sr
= new StreamReader(tname
))
37 viewBuffer
.Text
= sr
.ReadToEnd();