void regExOptions_Change(PropertiesToolsWindowsProperty property) { RegexOptions regexOptions = new System.Text.RegularExpressions.RegexOptions(); // event retuens property with new value but we loop on all propertys to build regexOptions foreach (PropertiesToolsWindowsProperty propertyItem in regExPropertys.Propertys) { if (propertyItem.PropertyName == RegexOptions.IgnoreCase.ToString()) { if (propertyItem.PropertyValueTrueFalse == true) { regexOptions = regexOptions | RegexOptions.IgnoreCase; } } else if (propertyItem.PropertyName == RegexOptions.Multiline.ToString()) { if (propertyItem.PropertyValueTrueFalse == true) { regexOptions = regexOptions | RegexOptions.Multiline; } } else if (propertyItem.PropertyName == RegexOptions.Singleline.ToString()) { if (propertyItem.PropertyValueTrueFalse == true) { regexOptions = regexOptions | RegexOptions.Singleline; } } } regExParser.RegexOptions = regexOptions; // refresh textChange_KeyUp(null, null); }
void regExOptions_Change(PropertiesToolsWindowsProperty property) { RegexOptions regexOptions = new System.Text.RegularExpressions.RegexOptions(); // event retuens property with new value but we loop on all propertys to build regexOptions foreach (PropertiesToolsWindowsProperty propertyItem in regExPropertys.Propertys) { if (propertyItem.PropertyName == RegexOptions.IgnoreCase.ToString()) { if (propertyItem.PropertyValueTrueFalse == true) { regexOptions = regexOptions | RegexOptions.IgnoreCase; } } else if (propertyItem.PropertyName == RegexOptions.Multiline.ToString()) { if (propertyItem.PropertyValueTrueFalse == true) { regexOptions = regexOptions | RegexOptions.Multiline; } } else if (propertyItem.PropertyName == RegexOptions.Singleline.ToString()) { if (propertyItem.PropertyValueTrueFalse == true) { regexOptions = regexOptions | RegexOptions.Singleline; } } } regExParser.RegexOptions = regexOptions; // refresh textChange_KeyUp(null, null); }