예제 #1
0
파일: Main.cs 프로젝트: col42dev/mono-tools
	public void OnFindPreviousButtonClick (object sender, EventArgs args)
	{
		if (findentry.Text.Length < 1) {
			return;
		}

		try {
			TextIter start;
			TextIter end;
			bool found = findbck.BackwardSearch (findentry.Text, tsf, out start, out end, textview1.Buffer.StartIter);
			if (!found) {
				WarnWrapBuffer (false);
				findbck = textview1.Buffer.EndIter;
				findbck.BackwardSearch (findentry.Text, tsf, out start, out end, textview1.Buffer.StartIter);
			}
			UpdateSelection (found, start, end);
		}
		catch (Exception e) {
			// safety net
			Console.Error.WriteLine (e);
		}
	}