3 using System
.Collections
;
4 using System
.Collections
.Generic
;
8 using Microsoft
.TeamFoundation
.Client
;
9 using Microsoft
.TeamFoundation
.VersionControl
.Common
;
10 using Microsoft
.TeamFoundation
.VersionControl
.Client
;
12 public class FileView
: Gtk
.ScrolledWindow
, IExploreViewChild
14 private Gtk
.TextBuffer viewBuffer
;
15 private Driver driver
;
17 public FileView(Driver driver
)
20 Gtk
.TextView view
= new Gtk
.TextView();
21 viewBuffer
= view
.Buffer
;
25 public void UpdatePath(string path
)
27 if (String
.IsNullOrEmpty(path
)) return;
28 Microsoft
.TeamFoundation
.VersionControl
.Client
.Item item
= driver
.VersionControlServer
.GetItem(path
, VersionSpec
.Latest
, 0, true);
30 string tname
= System
.IO
.Path
.GetTempFileName();
31 item
.DownloadFile(tname
);
33 using (StreamReader sr
= new StreamReader(tname
))
35 viewBuffer
.Text
= sr
.ReadToEnd();