예제 #1
0
파일: Program.cs 프로젝트: heinzsack/DEV
		private static void LinkTreeEntry (TreeEntry Start)
			{
			Start.LinkTreeEntry ();
			foreach (TreeEntry Child in Start.Childs)
				{
				LinkTreeEntry (Child);
				}
			}
예제 #2
0
파일: Program.cs 프로젝트: heinzsack/DEV
		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);
				}
			}
예제 #3
0
파일: Program.cs 프로젝트: heinzsack/DEV
		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);
				}
			}
예제 #4
0
파일: Program.cs 프로젝트: heinzsack/DEV
		private static void PrintMenuTree (StreamWriter Writer, TreeEntry Start)
			{
			Writer.WriteLine(Start.GetDescription ());
			foreach (TreeEntry Child in Start.Childs)
				{
				PrintMenuTree (Writer, Child);
				}
			}