コード例 #1
0
        public override string ToString()
        {
            StringBuilder builder = new StringBuilder();

            builder.AppendLine("Exclusions:");
            foreach (CheckBoxModel exclusion in mExclusions)
            {
                builder.AppendLine(String.Format("\t{0}: {1}", exclusion.Text, exclusion.Checked.ToString()));
            }
            builder.AppendLine("Pattern: " + Pattern);
            builder.AppendLine("Scope: " + Scope);
            builder.AppendLine("Search Dir: " + SearchDirectory);
            builder.AppendLine("Ignore Case: " + IgnoreCase.ToString());
            builder.AppendLine("UseRegex: " + UseRegex.ToString());
            builder.AppendLine("Search Subdirectories: " + SearchSubdirectories.ToString());
            builder.AppendLine("Whole Word: " + WholeWord.ToString());
            builder.AppendLine("Sort By File: " + SortByFile.ToString());
            builder.AppendLine("File Name Search: " + FileNameSearch.ToString());
            return(builder.ToString());
        }
コード例 #2
0
ファイル: Measurements.cs プロジェクト: xj0229/gsf
        /// <summary>
        /// Saves advanced find settings to isolated storage.
        /// </summary>
        public void SaveSettings()
        {
            string searchCategories = string.Empty;

            if (SearchCategories.Any(category => category.Selected))
            {
                searchCategories = SearchCategories
                                   .Where(category => category.Selected)
                                   .Select(category => category.Name)
                                   .Aggregate((str1, str2) => str1 + "," + str2);
            }

            IsolatedStorageManager.WriteToIsolatedStorage("MeasurementSearchText", SearchText);
            IsolatedStorageManager.WriteToIsolatedStorage("MeasurementSearchIgnoreCase", IgnoreCase.ToString());
            IsolatedStorageManager.WriteToIsolatedStorage("MeasurementSearchUseWildcards", UseWildcards.ToString());
            IsolatedStorageManager.WriteToIsolatedStorage("MeasurementSearchUseRegex", UseRegex.ToString());
            IsolatedStorageManager.WriteToIsolatedStorage("MeasurementSearchCategories", searchCategories);
        }