Exemplo n.º 1
0
		private static void LinkTreeEntry (TreeEntry Start)
			{
			Start.LinkTreeEntry ();
			foreach (TreeEntry Child in Start.Childs)
				{
				LinkTreeEntry (Child);
				}
			}
Exemplo n.º 2
0
		private static void CreateJoomlaPhotoGalleries(String JoomlaGalleries, TreeEntry Start)
			{
			foreach (TreeEntry Child in Start.Childs)
				{
				if ((Child.Name != "Fotos")
					&& (Child.Name != "Presse"))
					continue;
				CreateJoomlaPhotoGallery (JoomlaGalleries, Child);
				}
			}
Exemplo n.º 3
0
		private static void CreateJoomlaPhotoGallery (String JoomlaGalleries, TreeEntry Start)
			{
			if (!Directory.Exists (JoomlaGalleries))
				Directory.CreateDirectory (JoomlaGalleries);
			List<String> Pictures = WMB.Basics.GetFilesFromDirectory (Start.DataPath, new string [] {"*.jpg", "*.pdf"}, 1);
			if ((Pictures != null)
				&& (Start.Childs.Count == 0))
				foreach (String PictureFileName in Pictures)
					{
					String NewTargetFileName = Path.Combine (JoomlaGalleries, Path.GetFileName (PictureFileName));
					if (File.Exists (NewTargetFileName))
						{
						WMB.Basics.SecureFileDelete (NewTargetFileName);
						}
					File.Copy(PictureFileName, NewTargetFileName);
					}
			foreach (TreeEntry Child in Start.Childs)
				{
				CreateJoomlaPhotoGallery(JoomlaGalleries + "\\" + WMB.Basics.ConvertToCorrectFileNameElement (Child.Name), Child);
				}
			}
Exemplo n.º 4
0
		private static void PrintMenuTree (StreamWriter Writer, TreeEntry Start)
			{
			Writer.WriteLine(Start.GetDescription ());
			foreach (TreeEntry Child in Start.Childs)
				{
				PrintMenuTree (Writer, Child);
				}
			}