Beispiel #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,
                });
            }
        }
Beispiel #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;
		}
Beispiel #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);
        }
Beispiel #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,
				});
			}
		}