.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
satyapriyanayak
SP
Sambanthamoorthy
Swati Kadam
rosgeppe

Home >> Code Snippets >> LINQ >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Bible psalms 1st chapter reading in English.

Posted By:laptop charles       Posted Date: December 23, 2010    Points: 10    Category: LINQ    URL: http://www.dotnetspark.com  

I have used one rich textbox and three combo box one select the Psalms and other one is chapter selection and last one is verses select and read the psalms wordings in English.
 

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

namespace bible
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        int ch = 0;

        private void Form1_Load(object sender, EventArgs e)
        {
            comboBox1.Items.Add("Psalms");

        }

        private void com2_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (com2.SelectedIndex.ToString() == "0")
            {
                ch = 6;
                loop1(ch);  
            }
        }

        private void button1_Click(object sender, EventArgs e)
        {
             
        }
        void loop(int ch)
        {
            for (int i = 1; i <= ch; i++)
            {
                com2.Items.Add(i);
            }
        }
        void loop1(int ch)
        {
            for (int i = 1; i <= ch; i++)
            {
                com3.Items.Add(i);
            }
        }
        private void com1_SelectedIndexChanged(object sender, EventArgs e)
        {
            
                if (com1.SelectedItem.ToString() == "Psalms")
                {
                    ch = 150;
                    loop(ch);

                }
           
           
        }

        private void com3_SelectedIndexChanged(object sender, EventArgs e)
        {
             switch (com3.SelectedItem.ToString())
            {
                case "1":
                    r.Text = " Blessed  is the man that walketh not in the counsel of the ungodly, nor standeth in the way of sinners, nor sitteth in the seat of the scornful. ";
                    break;
                case "2":
                    r.Text = "But his delight  is in the law of the LORD; and in his law doth he meditate day and night. ";
                    break;
                case "3":
                    r.Text = "And he shall be like a tree planted by the rivers of water, that bringeth forth his fruit in his season; his leaf also shall not wither; and whatsoever he doeth shall prosper. ";
                    break;
                case "4":
                    r.Text = "The ungodly  are not so: but  are like the chaff which the wind driveth away. ";
                    break;
                case "5":
                    r.Text = "Therefore the ungodly shall not stand in the judgment, nor sinners in the congregation of the righteous. ";

                    break;
                case "6":
                    r.Text = "For the LORD knoweth the way of the righteous: but the way of the ungodly shall perish. ";
                    break;
            }
        }

    }
}

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend