[Monodevelop-patches-list] r1335 - in trunk/MonoDevelop/samples: . RecentFiles
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Thu Apr 1 16:30:30 EST 2004
Author: jluke
Date: 2004-04-01 16:30:30 -0500 (Thu, 01 Apr 2004)
New Revision: 1335
Added:
trunk/MonoDevelop/samples/RecentFiles/
trunk/MonoDevelop/samples/RecentFiles/Makefile
trunk/MonoDevelop/samples/RecentFiles/test.cmbx
trunk/MonoDevelop/samples/RecentFiles/test.cs
Log:
add a test for recent files work
Added: trunk/MonoDevelop/samples/RecentFiles/Makefile
===================================================================
--- trunk/MonoDevelop/samples/RecentFiles/Makefile 2004-04-01 21:07:31 UTC (rev 1334)
+++ trunk/MonoDevelop/samples/RecentFiles/Makefile 2004-04-01 21:30:30 UTC (rev 1335)
@@ -0,0 +1,18 @@
+
+CSC = mcs /debug
+EXE = ../../build/bin/RecentFilesTest.exe
+
+DLLS = /r:../../build/bin/MonoDevelop.Gui.Utils.dll
+
+FILES = test.cs \
+../../src/Main/Base/Services/File/FdoRecentFiles.cs \
+../../src/Main/Base/Services/File/RecentItem.cs
+
+all: $(FILES)
+ $(CSC) $(DLLS) $(FILES) /out:$(EXE)
+
+clean:
+ rm -f $(EXE)
+
+run:
+ mono --debug $(EXE)
Added: trunk/MonoDevelop/samples/RecentFiles/test.cmbx
===================================================================
Added: trunk/MonoDevelop/samples/RecentFiles/test.cs
===================================================================
--- trunk/MonoDevelop/samples/RecentFiles/test.cs 2004-04-01 21:07:31 UTC (rev 1334)
+++ trunk/MonoDevelop/samples/RecentFiles/test.cs 2004-04-01 21:30:30 UTC (rev 1335)
@@ -0,0 +1,21 @@
+using System;
+using MonoDevelop.Services;
+
+class T
+{
+ static void Main ()
+ {
+ MonoDevelop.Gui.Utils.Vfs.Init ();
+ FdoRecentFiles frf = new FdoRecentFiles ();
+ frf.AddFile ("test.cs");
+ frf.AddProject ("test.cmbx");
+
+ Console.WriteLine ("Recent Files:");
+ foreach (RecentItem ri in frf.RecentFiles)
+ Console.WriteLine ("{0} {1} {2}", ri.Uri, ri.Group, ri.Timestamp);
+
+ Console.WriteLine ("Recent Projects:");
+ foreach (RecentItem ri in frf.RecentProjects)
+ Console.WriteLine ("{0} {1} {2}", ri.Uri, ri.Group, ri.Timestamp);
+ }
+}
More information about the Monodevelop-patches-list
mailing list