예제 #1
0
 private void bibleListComboBox_SelectedIndexChanged(object sender, EventArgs e)
 {
     b = bibles[bibleListComboBox.Text];
     b.displayText(richTextBox1, booksOfBibleListBox.SelectedIndex, chapterNumbersListBox.SelectedIndex + 1);
 }
예제 #2
0
 private void startup()
 {
     //TODO: read in from file previous settings, bible options and things
     System.IO.StreamReader file = new System.IO.StreamReader(@"C:\Users\alexanpe\Documents\MadHouseStudiosDev\Bible Reader\BibleReader\settings.txt");
     string line = "";
     while ((line = file.ReadLine()) != null)
     {
         string[] temp = line.Split('=');
         if (temp[0] == "bibles")
         {
             string[] bibleList = temp[1].Split(';');
             foreach(string s in bibleList)
             {
                 string[] currentBible = s.Split(',');
                 bibleFiles.Add(currentBible[0], currentBible[1]);
                 bibles.Add(currentBible[0], readBible(currentBible[0], currentBible[1]));
             }
         }
         else if (temp[0] == "bible") b = bibles[temp[1]];
         else if (temp[0] == "place")
         {
             string[] verse = temp[1].Split(',');
             booksOfBibleListBox.SelectedIndex = Convert.ToInt32(verse[0]);
             chapterNumbersListBox.SelectedIndex = Convert.ToInt32(verse[1]);
         }
     }
     booksOfBibleListBox.SelectedIndex = 0;
     b.displayText(richTextBox1, booksOfBibleListBox.SelectedIndex, chapterNumbersListBox.SelectedIndex + 1);
 }