The VB.net class of the bone fortune-telling

Source: Internet
Author: User
Tags empty integer
Public Class Classchg

Private vweight as Integer = 0

Private Vresultword as String



' Vdate format: 1978-8-10

' Vtime value is:

' Zi: Zi (23:00~1:00)

' Ugly: Ugly (1:00~3:00)

' My colleague: (3:00~5:00)

' Mao: Mao (5:00~7:00)

' Chen: Chen (7:00~9:00)

' I: (9:00~11:00)

' Midday: Afternoon (11:00~13:00)

' Not: Not (13:00~15:00)

' Shen: Shen (15:00~17:00)

' Unitary: Unitary (17:00~19:00)

' Xu: Xu (19:00~21:00)

' Hai: Hai (21:00~23:00)

Public Sub New (ByVal vdate As String, ByVal Vtime as String)

Dim SS () as String = Split (Vdate, "-")

Vweight + + me.getyearvalue (ss (0))

Vweight + + me.getmonthvalue (SS (1))

Vweight + + me.getdayvalue (SS (2))

Vweight + + me.gettimevalue (vtime)



Vresultword = Me.getresultword (vweight)

End Sub



Public ReadOnly Property Weight () as Integer

Get

Weight = Vweight

End Get

End Property



Public ReadOnly Property Resultword () as String

Get

Resultword = Vresultword

End Get

End Property



Function Getyearvalue (ByVal Year as Integer) As Integer

Select Case Year

Case 1900:return 7

Case 1901:return 7

Case 1902:return 9

Case 1903:return 12

Case 1904:return 8

Case 1905:return 7

Case 1906:return 13

Case 1907:return 5

Case 1908:return 14

Case 1909:return 5



Case 1910:return 9

Case 1911:return 17

Case 1912:return 5

Case 1913:return 7

Case 1914:return 12

Case 1915:return 8

Case 1916:return 5

Case 1917:return 6

Case 1918:return 19

Case 1919:return 6



Case 1920:return 8

Case 1921:return 16

Case 1922:return 10

Case 1923:return 7

Case 1924:return 12

Case 1925:return 9

Case 1926:return 6

Case 1927:return 7

Case 1928:return 12

Case 1929:return 5



Case 1930:return 9

Case 1931:return 8

Case 1932:return 7

Case 1933:return 8

Case 1934:return 15

Case 1935:return 9

Case 1936:return 16

Case 1937:return 8

Case 1938:return 8

Case 1939:return 9



Case 1940:return 12

Case 1941:return 6

Case 1942:return 8

Case 1943:return 5

Case 1944:return 5

Case 1945:return 15

Case 1946:return 6

Case 1947:return 16

Case 1948:return 15

Case 1949:return 8



Case 1950:return 9

Case 1951:return 12

Case 1952:return 10

Case 1953:return 7

Case 1954:return 15

Case 1955:return 6

Case 1956:return 5

Case 1957:return 14

Case 1958:return 14

Case 1959:return 9



Case 1960:return 7

Case 1961:return 7

Case 1962:return 9

Case 1963:return 12

Case 1964:return 8

Case 1965:return 7

Case 1966:return 13

Case 1967:return 5

Case 1968:return 14

Case 1969:return 5



Case 1970:return 9

Case 1971:return 17

Case 1972:return 5

Case 1973:return 7

Case 1974:return 12

Case 1975:return 8

Case 1976:return 5

Case 1977:return 6

Case 1978:return 19

Case 1979:return 6



Case 1980:return 8

Case 1981:return 16

Case 1982:return 10

Case 1983:return 7

Case 1984:return 12

Case 1985:return 9

Case 1986:return 6

Case 1987:return 7

Case 1988:return 12

Case 1989:return 5



Case 1990:return 9

Case 1991:return 8

Case 1992:return 7

Case 1993:return 8

Case 1994:return 15

Case 1995:return 9

Case 1996:return 16

Case 1997:return 8

Case 1998:return 8

Case 1999:return 9



Case 2000:return 12

Case 2001:return 6

Case 2002:return 8

Case 2003:return 5

Case 2004:return 5

Case 2005:return 15

Case 2006:return 6

Case 2007:return 16

Case 2008:return 15

Case 2009:return 8



Case 2010:return 9

Case 2011:return 12

Case Else:throw New NotSupportedException ("This function only provides time conversion from 1900 to 2011!") ")

End Select

End Function

Function Getmonthvalue (ByVal Month As Integer) As Integer

Select Case Month

Case 1:return 6

Case 2:return 7

Case 3:return 18

Case 4:return 5

Case 5:return 9

Case 6:return 16

Case 7:return 9

Case 8:return 15

Case 9:return 18

Case 10:return 8

Case 11:return 9

Case 12:return 5

End Select

End Function

Function Getdayvalue (ByVal Day As Integer) As Integer

Select Case Day

Case 1:return 5

Case 2:return 10

Case 3:return 8

Case 4:return 15

Case 5:return 16

Case 6:return 15

Case 7:return 8

Case 8:return 16

Case 9:return 8



Case 10:return 16

Case 11:return 9

Case 12:return 17

Case 13:return 8

Case 14:return 17

Case 15:return 10

Case 16:return 8

Case 17:return 9

Case 18:return 18

Case 19:return 5



Case 20:return 15

Case 21:return 10

Case 22:return 9

Case 23:return 8

Case 24:return 9

Case 25:return 15

Case 26:return 17

Case 27:return 7

Case 28:return 8

Case 29:return 16

Case 30:return 6

End Select

End Function

Function Gettimevalue (ByVal time as String) as Integer

Select Case Time

Case "Zi": return 16

Case "Ugly": return 6

Case "Yin": return 7

Case "Mao": return 10

Case "Chen": Return 9

Case "I": return 16

Case "Afternoon": return 10

Case "not": return 8

Case "Shen": Return 8

Case "Unitary": Return 9

Case "Xu": return 6

Case "Hai": Return 6

End Select

End Function

Function Getresultword (ByVal Value as Integer) as String

Select Case Value

Case 22

Return "body cold bone chilly, this life is pushed to begging people, age Baba no live, all the year round arch life." "

Case 23

Return "This life pushes bone from light, seek to make everything difficult, wife and son brother should be difficult, elsewhere for scattered people." "

Case 24

Return "This life is pushed to the blessing of Lu, the difficult camp, six flesh and blood have no rely on, flow to a foreign land for old man." "

Case 25

Return "This life push to ancestral micro, the camp is like a curiosity, six flesh and blood such as ice charcoal, one of the difficult to control the labor." "

Case 26

Return "Life Hiro bitter in seeking, alone business endlessly, away from the ancestors should early, evening to clothes Lu Shu worry." "

Case 27

Return "Life for less consultation, difficult to rely on ancestors to make claims, single horse gun empty to do, early in the old age is always no long." "

Case 28

Return "Life is like a floating tent, ancestral industry dream, if the room and change the surname, also when the migration two or three pass." "

Case 29

Return "in the early years of transport has not Heng, there are fame in the later, must be over four to be able to, moved to change the surname beginning for good." "

Case 30

Return "Lao Age bitter in Beg, East go West Ben Hezhihu, bitter make lifelong diligence and thrifty, old come slightly can be free from sadness." "

Case 31

Return "busy hard to ask, what day clouds open to see the sun, rare Zuki home can stand, middle-aged and food can gradually week." "

Case 32

Return "In the early years, jian things difficult to seek, gradually have a source of money such as water, to get middle-aged and clothing flourishing, then fame and wealth together." "

Case 33

Return "Early do everything difficult, hundreds in vain wasted heart, discovers freely flowing water, and later transported to the gold. "

Case 34

Return "This Life blessing fruit how, the monk door in the clothes Lu many, leave the ancestral monastic party is wonderful, finally worship Buddha read Amitabha." "

Case 35

Return "Life is not comprehensive, ancestral basic sleep, business career should be conservative, when to food and clothing to win the past." "

Case 36

Return "Do not have to toil for life, alone to start a family blessing is not light, early has the lucky star often lives, Ren June line to make it." "

Case 37

Return "This life-like thing is not, brother less force from solitary into, although ancestral must have little, come Ming when go unknown." "

Case 38

Return "a flesh of the most lofty, early entrance door name, to see the year will be 36, blue shirt off to change red robe." "

Case 39

Return "This life is not through life, labor work all empty, painstaking efforts to become a family, to have at that time in the dream." "

Case 40

Return "Life Hiro is long, pieces of the heart from the idea, the front of the wind and frost, and then certainly Heng Ankang. "

Case 41

Return "This Life push relationship serve different, for people capable Fan, middle-aged and carefree blessing, no more than the year before the luck." "

Case 42

Return "wide bosom and wide bosom, what with double eyebrow wrinkle not open, so that middle-aged fate, then fame together." "

Case 43

Return "For the heart of the most intelligent, Xuan near the noble, Hiro a number of days, do not need to toil is LFH. "

Case 44

Return "relationship serve by day grimaced, note that the future of fortune, Caibo difficult to Ruyi, miserable Xin ran make not worry. "

Case 45

Return "fame and fortune push to unexpectedly how, the future hard after rush, hit difficult to raise men and women, flesh support is not much." "

Case 46

Return "East and west are all through, the surname emigrated more feel long, Hiro no loss days, middle-aged miserable general with." "

Case 47

Return "This life pushed for the late, wife Rong from contend, the original surging blessing, can have financial resources such as water. "

Case 48

Return "in the early years of the road never Heng, if the waste again in addition, brother specified all have no rely on, a career in old age." "

Case 49

Return "This life is a blessing not light, since become independent display, never rich people Chin Jing, so that the slave maid for a lifetime." "

Case 50

Return "for the benefit of the name of the day, middle-aged Fu Lu also many suffer, Lai is a financial star, not higher than before." "

Case 51

Return "One of the splendor of everything, do not have to toil from prosperity, the brothers nephew all Ruyi, the family business into a Fortune LU macro." "

Case 52

Return "One of the splendor of everything can be, do not have to think of Nature Ning, the clan readily heart all good, the family business lfh claiming heart." "

Case 53

Return "This lattice push for the gas is true, Hing home developed in which, the life of the arrangement, but is a rich man." "

Case 54

Return "This life is pushed to thick and clear, full of reading poetry, abundant and stable, it is the world blessed people." "

Case 55

Return "cursory always for fame and fortune, juvenile for the matter, once Fu Lu, rich and noble specified. "

Case 56

Return "This GE grilled to ritual righteousness pass, a blessing Lu with infinite, sweet and sour all when, roll the financial stability and abundant." "

Case 57

Return "abundance everything, a glorious parents, name Yangwei vibration people Chin Jing, the life and carefree like meet spring." "

Case 58

Return "Life is natural, fame and fortune-kai, Yanta for the honored guest, purple Robe gold away gold order." "

Case 59

Return "Fine push this lattice good and clear, must only Gao Liyi pass, the first among them should be divided, always cursory." "

Case 60

Return "Once quick title, Zou Rongzong, Hiro certainly Yuaryu foot, pastoral caibo more abundance." "

Case 61

Return "not to be in the middle of the list of candidates, the world is a wealth, smart talent classics ripe, famous Gao Ke is proud." "

Case 62

Return "This life is born blessing not poor, reading must show the father, purple dress gold Belt for Qing phase, rich and noble can be the same." "

Case 63

Return "Life of the Lord for the Chief of the long, get rich really very, famous title Urn biography, set in High science world." "

Case 64

Return "This lattice authority cannot be, purple robe gold belt sits Gaotang, splendor who can and, Jiyuking full storage storehouse." "

Case 65

Return "Fine push This life blessing is not light, the national security state, the best people, wen embroidery carved Liang levy wealth, Wei sound shining quartet smell." "

Case 66

Return "This lattice human a blessing, heap Jinguili Spring, never rich from heaven, is wat down gentry monarch." "

Case 67

Return "This life is born from the macro, pastoral family business, the highest long, all the clothing LU surplus abundant, a glory know-it-all." "

Case 68

Return "Wealth from the days of hard work, million gold to do not need to seek, 10 years not before, ancestral foundation water boat." "

Case 69

Return "June is the world Hiro star, the whole life of the people chin, even if the blessing of heaven, enjoy the splendor of life." "

Case 70

Return "This life is a blessing, not to worry about bitterness heart, a life Day set clothes and Lu, wealth and glory of the Lord." "

Case 71

Return "This life is born big different, Princes Qing phase in which, the life has its own carefree blessing, prosperity and glory need long." "

Case Else

Throw New NotSupportedException ("No bone weight!") ")

End Select

End Function

End Class




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.