using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace VEPROMS
{
	public partial class FindReplace : DevComponents.DotNetBar.Office2007Form
	{
		bool _selectedReplStr = false;
		bool _selectedFindStr = false;

		public FindReplace()
		{
			InitializeComponent();
		}

		private void cbDontReplace_CheckedChanged(object sender, EventArgs e)
		{
			cmboReplaceText.Enabled = !cbDontReplace.Checked;
			btnReplace.Enabled = !cbDontReplace.Checked;
			btnRplFndNxt.Enabled = !cbDontReplace.Checked;
		}

		private void cmboReplaceText_SelectedIndexChanged(object sender, EventArgs e)
		{
			_selectedReplStr = true;
		}

		private void btnReplace_Click(object sender, EventArgs e)
		{
			if (!_selectedReplStr)
				cmboReplaceText.Items.Add(cmboReplaceText.Text);
			else
				_selectedReplStr = false;
		}

		private void cmboFindText_SelectedIndexChanged(object sender, EventArgs e)
		{
			_selectedFindStr = true;
		}

		private void btnFind_Click(object sender, EventArgs e)
		{
			if (!_selectedFindStr)
				cmboFindText.Items.Add(cmboFindText.Text);
			else
				_selectedFindStr = false;
		}

		private void btnFndRplDone_Click(object sender, EventArgs e)
		{
			this.Close();
		}


	}
}