예제 #1
0
        void SearchNonNetFile(IDsDocument nonNetFile)
        {
            if (nonNetFile == null)
            {
                return;
            }
            var res = options.Filter.GetResult(nonNetFile);

            if (res.FilterType == FilterType.Hide)
            {
                return;
            }

            if (res.IsMatch && IsMatch(nonNetFile.GetShortName(), nonNetFile))
            {
                options.OnMatch(new SearchResult {
                    Context                = options.Context,
                    Object                 = nonNetFile,
                    NameObject             = nonNetFile,
                    ObjectImageReference   = options.DotNetImageService.GetImageReference(nonNetFile.PEImage),
                    LocationObject         = null,
                    LocationImageReference = new ImageReference(),
                    Document               = nonNetFile,
                });
            }
        }
예제 #2
0
		static string GetFilename(IDsDocument document) {
			string filename = null;
			try {
				filename = Path.GetFileName(document.Filename);
			}
			catch (ArgumentException) {
			}
			if (string.IsNullOrEmpty(filename))
				filename = document.GetShortName();
			return filename;
		}
예제 #3
0
        static string GetFilename(IDsDocument document)
        {
            string filename = null;

            try {
                filename = Path.GetFileName(document.Filename);
            }
            catch (ArgumentException) {
            }
            if (string.IsNullOrEmpty(filename))
            {
                filename = document.GetShortName();
            }
            return(filename);
        }
예제 #4
0
		void SearchNonNetFile(IDsDocument nonNetFile) {
			if (nonNetFile == null)
				return;
			var res = options.Filter.GetResult(nonNetFile);
			if (res.FilterType == FilterType.Hide)
				return;

			if (res.IsMatch && IsMatch(nonNetFile.GetShortName(), nonNetFile)) {
				options.OnMatch(new SearchResult {
					Context = options.Context,
					Object = nonNetFile,
					NameObject = nonNetFile,
					ObjectImageReference = options.DotNetImageService.GetImageReference(nonNetFile.PEImage),
					LocationObject = null,
					LocationImageReference = new ImageReference(),
					Document = nonNetFile,
				});
			}
		}