private void btnOpen_Dictionary_Click(object sender, EventArgs e)
        {
            if (lstProject_Dictionary.SelectedItems.Count > 0)
            {
                SelectedResourceCategory   = ResourceCategory.Dictionary;
                SelectedProject            = (IReadOnlyProject)lstProject_Dictionary.SelectedItems[0].Tag;
                SelectedOpenWindowBehavior = ConvertOpenWindowBehavior((string)cbOpenOption_Dictionary.SelectedItem);
                SelectedDictionaryEntry    = txtEntry_Dictionary.Text ?? "";
            }
            else
            {
                MessageBox.Show("Please select a dictionary to open.");
                this.DialogResult = DialogResult.None;
                return;
            }


            Close();
        }
        private void btnOpen_BCV_Click(object sender, EventArgs e)
        {
            if (lstProject_BCV.SelectedItems.Count > 0)
            {
                SelectedResourceCategory = ResourceCategory.Standard;
                SelectedProject          = (IReadOnlyProject)lstProject_BCV.SelectedItems[0].Tag;
                if (txtBook_BCV.Text.Trim() == "" ||
                    txtChapter_BCV.Text.Trim() == "" ||
                    txtVerse_BCV.Text.Trim() == "")
                {
                    MessageBox.Show("The Book Num, Chapter Num, and Verse Num need to be filled in.");
                    this.DialogResult = DialogResult.None;
                    return;
                }

                try
                {
                    int book    = Convert.ToInt32(txtBook_BCV.Text);
                    int chapter = Convert.ToInt32(txtChapter_BCV.Text);
                    int verse   = Convert.ToInt32(txtVerse_BCV.Text);
                    SelectedVerseRef = m_project.Versification.CreateReference(book, chapter, verse);
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Error creating a verse reference: " + ex.Message);
                    this.DialogResult = DialogResult.None;
                    return;
                }
                SelectedOpenWindowBehavior = ConvertOpenWindowBehavior((string)cbOpenOption_BCV.SelectedItem);
            }
            else
            {
                MessageBox.Show("Please select a resource to open.");
                this.DialogResult = DialogResult.None;
                return;
            }

            Close();
        }
        private void btnOpen_SLT_Click(object sender, EventArgs e)
        {
            if (cbSelect_SLT.SelectedItem != null)
            {
                SelectedResourceCategory   = ResourceCategory.SLT;
                SelectedSLTResource        = cbSelect_SLT.SelectedItem == _hebGrk ? SLTResource.HEB : SLTResource.LXX;
                SelectedSLTProject         = ConvertSltResource(SelectedSLTResource);
                SelectedOpenWindowBehavior = ConvertOpenWindowBehavior((string)cbOpenOption_SLT.SelectedItem);
                if (txtBook_SLT.Text.Trim() == "" ||
                    txtChapter_SLT.Text.Trim() == "" ||
                    txtVerse_SLT.Text.Trim() == "")
                {
                    MessageBox.Show("The Book Num, Chapter Num, and Verse Num need to be filled in.");
                    this.DialogResult = DialogResult.None;
                    return;
                }

                try
                {
                    int book    = Convert.ToInt32(txtBook_SLT.Text);
                    int chapter = Convert.ToInt32(txtChapter_SLT.Text);
                    int verse   = Convert.ToInt32(txtVerse_SLT.Text);
                    SelectedVerseRef = m_project.Versification.CreateReference(book, chapter, verse);
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Error creating a verse reference: " + ex.Message);
                    this.DialogResult = DialogResult.None;
                    return;
                }

                SelectedWordToSelect = txtWord_SLT.Text.Trim() == "" ? -1 : Convert.ToInt32(txtWord_SLT.Text.Trim());
            }

            Close();
        }