private void FillNode(TreeListNode node, bool showSubItems)
		{
			var folderLink = node.Tag as FolderLink;
			if (folderLink == null) return;
			if (node.Nodes.Count == 0)
			{
				try
				{
					TreeListNode childNode;
					try
					{
						var folders = new List<string>();
						folders.AddRange(Directory.GetDirectories(folderLink.Path));
						folders.Sort(WinAPIHelper.StrCmpLogicalW);
						foreach (var subFolder in folders)
						{
							if (!GlobalSettings.HiddenObjects.Any(x => subFolder.ToLower().Contains(x.ToLower())))
							{
								var subFolderLink = new FolderLink();
								subFolderLink.RootId = folderLink.RootId;
								subFolderLink.Path = subFolder;
								childNode = treeListAllFiles.AppendNode(new[] { subFolderLink.Name }, node, subFolderLink);
								childNode.StateImageIndex = 0;

								if (showSubItems)
									FillNode(childNode, showSubItems);
								if (showSubItems && childNode.Nodes.Count == 0)
									node.Nodes.Remove(childNode);
							}
						}
					}
					catch
					{
					}
					try
					{
						var files = new List<string>();
						files.AddRange(Directory.GetFiles(folderLink.Path));
						files.Sort(WinAPIHelper.StrCmpLogicalW);
						foreach (var file in Directory.GetFiles(folderLink.Path))
						{
							if (!GlobalSettings.HiddenObjects.Any(x => file.ToLower().Contains(x.ToLower())))
							{
								var fileLink = new FileLink();
								fileLink.RootId = folderLink.RootId;
								fileLink.Path = file;
								childNode =
									treeListAllFiles.AppendNode(
										new[] { String.Format("{0} ({1})", fileLink.Name, File.GetLastWriteTime(file).ToString("MM/dd/yy hh:mm tt")) },
										node, fileLink);
								childNode.StateImageIndex = GetImageindex(file);
							}
							Application.DoEvents();
						}
					}
					catch
					{
					}
				}
				catch
				{
				}
			}
			node.StateImageIndex = 1;
			node.Expanded = true;
		}
		private IEnumerable<FileLink> SearchFileInFolder(FolderLink folderLink, string keyWord)
		{
			var fileList = new List<FileLink>();
			try
			{
				foreach (var subFolderPath in Directory.GetDirectories(folderLink.Path))
					if (!GlobalSettings.HiddenObjects.Any(item => subFolderPath.ToLower().Contains(item.ToLower())))
					{
						var subFolderLink = new FolderLink
						{
							RootId = folderLink.RootId,
							Path = subFolderPath
						};
						fileList.AddRange(SearchFileInFolder(subFolderLink, keyWord));
					}
			}
			catch { }
			try
			{
				foreach (var filePath in Directory.GetFiles(folderLink.Path, String.Format("*{0}*", keyWord)))
				{
					var lastWriteTime = File.GetLastWriteTime(filePath);
					if ((checkEditDateRange.Checked && (lastWriteTime < dateEditStartDate.DateTime || lastWriteTime > dateEditEndDate.DateTime)) ||
						GlobalSettings.HiddenObjects.Any(x => filePath.ToLower().Contains(x.ToLower())))
						continue;
					var fileLink = new FileLink
					{
						RootId = folderLink.RootId,
						Path = filePath
					};
					fileList.Add(fileLink);
				}
			}
			catch { }
			return fileList;
		}
		private void tmiFolderCreate_Click(object sender, EventArgs e)
		{
			var folderNode = treeListAllFiles.Selection[0];
			var folderLink = folderNode.Tag as FolderLink;
			if (folderLink == null) return;
			using (var form = new FormCreateFolder())
			{
				if (form.ShowDialog(MainController.Instance.MainForm) != DialogResult.OK) return;
				var subFolderPath = Path.Combine(folderLink.Path, form.FolderName);
				if (Directory.Exists(subFolderPath)) return;
				Directory.CreateDirectory(subFolderPath);

				var subFolderLink = new FolderLink();
				subFolderLink.RootId = folderLink.RootId;
				subFolderLink.Path = subFolderPath;
				var childNode = treeListAllFiles.AppendNode(new[] { subFolderLink.Name }, folderNode, subFolderLink);
				childNode.StateImageIndex = 0;
			}
		}