Ejemplo n.º 1
0
 public static ProcessingProjectSource FromDirectory(string path)
 {
     if (String.IsNullOrEmpty (path))
         throw new ArgumentNullException ("path");
     if (path [path.Length - 1] == Path.DirectorySeparatorChar)
         path = path.Substring (0, path.Length - 1);
     path = Path.GetFullPath (path);
     var uri = new Uri (path);
     var ns = DetermineNamespace (uri);
     var p = new ProcessingProjectSource () {NamespaceName = ns};
     foreach (var s in Directory.GetFiles (path, "*.pde"))
         p.Sources.Add (new Uri (Path.GetFullPath (s)));
     string datapath = Path.Combine (path, "data");
     if (Directory.Exists (datapath))
         foreach (var s in Directory.GetFiles (datapath))
             p.DataFiles.Add (new Uri (Path.GetFullPath (s)));
     foreach (var s in Directory.GetFiles (path, "*.java"))
         Console.WriteLine ("WARNING: we do not support Java sources");
     return p;
 }
Ejemplo n.º 2
0
 public static ProcessingProjectSource FromUri(Uri source)
 {
     var ns = DetermineNamespace (source);
     var p = new ProcessingProjectSource () {NamespaceName = ns};
     p.Sources.Add (source);
     return p;
 }
Ejemplo n.º 3
0
 protected ProcessingXapImporter(ProcessingProjectSource source)
 {
     Source = source;
 }
Ejemplo n.º 4
0
 public ProcessingXapImporterClr(ProcessingProjectSource source, bool useCurrent)
     : base(source)
 {
     string path = useCurrent ?
         Directory.GetCurrentDirectory () :
         Path.Combine (Path.GetTempPath (), "tsukimi-" + Guid.NewGuid ());
     if (!Directory.Exists (path)) {
         dir = Directory.CreateDirectory (path);
         created = true;
     }
     else
         dir = new DirectoryInfo (path);
 }
Ejemplo n.º 5
0
 public ProcessingXapImporterCoreClr(ProcessingProjectSource source)
     : base(source)
 {
     isf = IsolatedStorageFile.GetUserStoreForApplication ();
 }