Ejemplo n.º 1
0
        public AboutWindow()
        {
            InitializeComponent();

            DataContext = new AboutViewModel();
        }
Ejemplo n.º 2
0
        public string GetHelpString()
        {
            string assemblyVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString();
            string buildDate       = AboutViewModel.GetLinkerTime(Assembly.GetExecutingAssembly()).ToString(CultureInfo.CurrentUICulture);

            return(string.Join(Environment.NewLine, new string[] {
                "dnGrep:  Search through text files, Word and Excel documents, PDFs, and archives using text, regular expression, XPath, and phonetic queries.",
                string.Empty,
                $"Version {assemblyVersion} built on {buildDate}",
                string.Empty,
                "Usage:",
                string.Empty,
                "dnGrep [arguments]",
                "Using any combination of arguments from the list below.",
                "Example:",
                "dnGrep /f \"C:\\Program Files\\dnGrep\" /pm *.txt;*.xml /s t\\w*t /st Regex",
                string.Empty,
                "dnGrep [folderPath] [searchFor]",
                "One or two arguments without flags: the first argument is the folder to search, the second the regular expression to search for.",
                "Example:",
                "dnGrep \"C:\\Program Files\\dnGrep\" t\\w*t",
                string.Empty,
                "Any arguments not specified will default to the last saved user settings.",
                string.Empty,
                "Arguments:",
                string.Empty,
                "/f [folderPath]",
                "-f [folderPath]",
                "-folder [folderPath]",
                "    Sets the folder path to search.  May be a comma or semi-colon separated list of folder paths.",
                string.Empty,
                "/pm [pattern]",
                "-pm [pattern]",
                "-pathToMatch [pattern]",
                "    Sets the file name pattern to match files in the search path. May be a comma or semi-colon separated list of patterns.",
                string.Empty,
                "/pi [pattern]",
                "-pi [pattern]",
                "-pathToIgnore [pattern]",
                "    Sets the file or directory name pattern to exclude files or folders in the search path. May be a comma or semi-colon separated list of patterns.",
                string.Empty,
                "/pt [type]",
                "-pt [type]",
                "-patternType [type]",
                "    Sets the type of match and ignore pattern - must be one of: Asterisk, Regex, or Everything (if the Everything search tool is installed).",
                string.Empty,
                "/s [searchFor]",
                "-s [searchFor]",
                "-searchFor [searchFor]",
                "    Sets the pattern or text to search for within the set of files.  When this argument is set, the search will be run automatically.",
                string.Empty,
                "/st [type]",
                "-st [type]",
                "-searchType [type]",
                "    Sets the type of search - must be one of: PlainText, Regex, XPath, or Soundex.",
                string.Empty,
                "/cs [True/False]",
                "-cs [True/False]",
                "-caseSensitive [True/False]",
                "    Sets case sensitive search flag - True or False.",
                string.Empty,
                "/ww [True/False]",
                "-ww [True/False]",
                "-wholeWord [True/False]",
                "    Sets the whole word search flag - True or False.",
                string.Empty,
                "/ml [True/False]",
                "-ml [True/False]",
                "-multiline [True/False]",
                "    Sets the multiline search flag - True or False.",
                string.Empty,
                "/dn [True/False]",
                "-dn [True/False]",
                "-dotAsNewline [True/False]",
                "    Sets the dot as newline search flag - True or False.",
                string.Empty,
                "/bo [True/False]",
                "-bo [True/False]",
                "-booleanOperators [True/False]",
                "    Sets the Boolean operators search flag - True or False.",
            }));
        }