コード例 #1
0
        private void fetchHoroscopeNameAndImage()
        {
            string   dateOfBirth = FBAgent.LoggedInUser.Birthday;
            DateTime userDOB     = DateTime.ParseExact(dateOfBirth, "MM/dd/yyyy", System.Globalization.CultureInfo.InvariantCulture);

            m_ZodiacName = HoroscopeAgent.GetZodiacName(userDOB);
            pictureBoxHoroscope.Image = HoroscopeAgent.GetZodiacImage(m_ZodiacName);
            labelHoroscopeTitle.Text  = string.Format("You Are {0}!", m_ZodiacName.ToString());
        }
コード例 #2
0
        private void initializeHoroscopeLabel()
        {
            Label horscopeText = new Label();

            horscopeText.Font   = new Font("Levenim MT", 10);
            horscopeText.Height = 300;
            horscopeText.Width  = this.Width - 50;
            horscopeText.Text   = HoroscopeAgent.GetHoroscope(m_ZodiacName);
            horscopeText.Top    = pictureBoxHoroscope.Bottom + 10;
            horscopeText.Left   = (this.Width) / 2 - (horscopeText.Width / 2);
            this.Controls.Add(horscopeText);
        }