public void SetSource(Plate plate) { // 姓名 lblName.Text = string.Format("{0} {1}", plate.last_name, plate.first_name); lblChsBrithday.Text = ""; // 盘的类型,天盘,地盘,人盘 lblType.Text = DouSource.PlateType[plate.Type]; // 天干 lblSky.Text = DouSource.SKY[plate.YearSky]; // 地支 lblEarth.Text = DouSource.EARTH[plate.YearEarth]; // 五行 lblFiveX.Text = DouSource.FiveX[plate.Five_X]; //出生月 int month = plate.month + 1; lblMonth.Text = string.Format("{0}", month); //出生日 int day = plate.day + 1; lblDay.Text = string.Format("{0}", day); //时辰 lblHour.Text = DouSource.EARTH[plate.hour]; //阴阳 lblYinyang.Text = DouSource.YinYang[plate.YinYang]; //性别 lblSex.Text = DouSource.SEX[plate.Sex]; //身主 lblBodyStar.Text = StarList.GetStarById(plate.body_star).Name; // 命主 lblLifeStar.Text = StarList.GetStarById(plate.life_star).Name; }
private void btnGo_Click(object sender, EventArgs e) { //DouManager dm = new DouManager(); //dm.CreatePlate(1983,5,13,5,1,1,"Ming","Deng"); //MessageBox.Show(DouUtility.DeasilCountZone(0, 3).ToString()); StarList.Load(); p = new Plate(); // p.LiuYear = Convert.ToInt32(this.cbLiuYear.SelectedItem); ChineseCalendar cc = new ChineseCalendar(); p.LiuYearSky = cc.GetYearSky(Convert.ToInt32(this.cbLiuYear.SelectedItem)); p.YearSky = cbYesrSky.SelectedIndex; p.YearEarth = cbYearEarth.SelectedIndex; p.month = cbMonth.SelectedIndex; p.day = cbDay.SelectedIndex; p.hour = cbHour.SelectedIndex; p.Sex = cbSex.SelectedIndex; p.Type = 0; p.first_name = ""; p.CreatePlate(); //p.CreatePlate(cbYesrSky.SelectedIndex, cbYearEarth.SelectedIndex, cbMonth.SelectedIndex, cbDay.SelectedIndex, cbHour.SelectedIndex, cbSex.SelectedIndex, 0, tbName.Text, ""); this.bodyDou.LoadInfo(p); this.bodyDou.DisplayBodyPlate(); this.ucDouYear.LoadInfo(p); this.ucDouYear.DisplayBodyPlate(); tabControl1.SelectedTab = tabPage1; }