private void SearchWindow_Closed(object sender, EventArgs e)
 {
     _searchWindow = null;
 }
        public void SearchCommand()
        {
            if (MainTextBox.Text.Length > 0)
            {
                if (null != _replaceWindow)
                {
                    _replaceWindow.Close();
                }

                if (null == _searchWindow)
                {
                    _searchWindow = new SearchWindow();
                    _searchWindow.Owner = this;
                    _searchWindow.Closed += SearchWindow_Closed;
                    _searchWindow.Show();
                }
                else
                {
                    _searchWindow.Activate();
                }
                this.MainMenuSubPopup.IsOpen = false;
            }
        }