本文整理汇总了C#中MonoDevelop.SourceEditor.SourceEditorWidget.CheckSearchPatternCasing方法的典型用法代码示例。如果您正苦于以下问题:C# SourceEditorWidget.CheckSearchPatternCasing方法的具体用法?C# SourceEditorWidget.CheckSearchPatternCasing怎么用?C# SourceEditorWidget.CheckSearchPatternCasing使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MonoDevelop.SourceEditor.SourceEditorWidget
的用法示例。
在下文中一共展示了SourceEditorWidget.CheckSearchPatternCasing方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SearchAndReplaceWidget
public SearchAndReplaceWidget (SourceEditorWidget widget, Widget container)
{
this.container = container;
widget.TextEditorContainer.SizeAllocated += HandleViewTextEditorhandleSizeAllocated;
widget.TextEditor.TextViewMargin.SearchRegionsUpdated += HandleWidgetTextEditorTextViewMarginSearchRegionsUpdated;
widget.TextEditor.Caret.PositionChanged += HandleWidgetTextEditorCaretPositionChanged;
this.SizeAllocated += HandleViewTextEditorhandleSizeAllocated;
this.Name = "SearchAndReplaceWidget";
this.Events = Gdk.EventMask.AllEventsMask;
widget.DisableAutomaticSearchPatternCaseMatch = false;
Build();
this.buttonReplace.TooltipText = GettextCatalog.GetString ("Replace");
this.buttonSearchForward.TooltipText = GettextCatalog.GetString ("Find next");
this.buttonSearchBackward.TooltipText = GettextCatalog.GetString ("Find previous");
this.buttonSearchMode.TooltipText = GettextCatalog.GetString ("Toggle between search and replace mode");
this.searchEntry.Ready = true;
this.searchEntry.Visible = true;
this.searchEntry.WidthRequest = widget.Vbox.Allocation.Width / 3;
this.searchEntry.ForceFilterButtonVisible = true;
replaceWidgets = new Widget [] {
// labelReplace,
entryReplace,
buttonReplace,
buttonReplaceAll
};
this.FocusChain = new Widget [] {
this.searchEntry,
this.buttonSearchForward,
this.buttonSearchBackward,
entryReplace,
buttonReplace,
buttonReplaceAll
};
this.widget = widget;
FilterHistory (seachHistoryProperty);
FilterHistory (replaceHistoryProperty);
//HACK: GTK rendering issue on Mac, images don't repaint unless we put them in visible eventboxes
if (Platform.IsMac) {
foreach (var eb in new [] { eventbox2, eventbox3, eventbox4, eventbox5, eventbox6 }) {
eb.VisibleWindow = true;
eb.ModifyBg (StateType.Normal, new Gdk.Color (230, 230, 230));
}
}
if (String.IsNullOrEmpty (widget.TextEditor.SearchPattern)) {
widget.TextEditor.SearchPattern = searchPattern;
} else if (widget.TextEditor.SearchPattern != searchPattern) {
searchPattern = widget.TextEditor.SearchPattern;
//FireSearchPatternChanged ();
}
UpdateSearchPattern ();
//searchEntry.Model = searchHistory;
searchEntry.Entry.KeyReleaseEvent += delegate {
widget.CheckSearchPatternCasing (SearchPattern);
/* widget.SetSearchPattern (SearchPattern);
searchPattern = SearchPattern;
UpdateSearchEntry ();*/
};
searchEntry.Entry.Changed += delegate {
widget.SetSearchPattern (SearchPattern);
string oldPattern = searchPattern;
searchPattern = SearchPattern;
if (oldPattern != searchPattern)
UpdateSearchEntry ();
var history = GetHistory (seachHistoryProperty);
if (history.Count > 0 && history[0] == oldPattern) {
ChangeHistory (seachHistoryProperty, searchPattern);
} else {
UpdateSearchHistory (searchPattern);
}
};
entryReplace.Text = replacePattern;
// entryReplace.Model = replaceHistory;
// RestoreReplaceHistory ();
foreach (Gtk.Widget child in Children) {
child.KeyPressEvent += delegate (object sender, Gtk.KeyPressEventArgs args) {
if (args.Event.Key == Gdk.Key.Escape)
widget.RemoveSearchWidget ();
};
}
closeButton.Clicked += delegate {
widget.RemoveSearchWidget ();
};
buttonSearchMode.Clicked += delegate {
IsReplaceMode = !IsReplaceMode;
};
// comboboxSearchAs.AppendText (GettextCatalog.GetString ("Text"));
// comboboxSearchAs.AppendText (GettextCatalog.GetString ("Regular Expressions"));
// comboboxSearchAs.Active = 0;
// ReplacePatternChanged += UpdateReplacePattern;
//.........这里部分代码省略.........