예제 #1
0
 public static string GetEraAmountReport(Destiny destiny)
 {
     float [] score = new float[5];
     List<Stems> allstems = new List<Stems>();
     allstems.Add(destiny.Year.Stems);
     allstems.Add(destiny.Month.Stems);
     allstems.Add(destiny.Day.Stems);
     allstems.Add(destiny.Hour.Stems);
     allstems.AddRange(destiny.Year.Branch.HideStems);
     allstems.AddRange(destiny.Month.Branch.HideStems);
     allstems.AddRange(destiny.Day.Branch.HideStems);
     allstems.AddRange(destiny.Hour.Branch.HideStems);
     //allstems.ForEach(ste=>score[(int)ste.EraType]+=ste.Value);
     foreach (Stems item in allstems)
     {
         score[(int) item.EraType] += item.Value;
     }
     StringBuilder sb = new StringBuilder();
     string[] names = Enum.GetNames(typeof (emEra));
     for (int i = 0; i < score.Length; i++)
     {
         sb.Append(names[i]).Append(":").Append(score[i]);
         sb.AppendLine();
     }
     return sb.ToString();
 }
예제 #2
0
 public DestinyRelationView(Destiny destiny)
 {
     base.Year = destiny.Year;
     Month = destiny.Month;
     Day = destiny.Day;
     Hour = destiny.Hour;
     Init();
 }
예제 #3
0
 public static void FillStemsAmount(Destiny destiny)
 {
     destiny.Year.Stems.Value=10;
     destiny.Month.Stems.Value = 10;
     destiny.Day.Stems.Value = 10;
     destiny.Hour.Stems.Value = 10;
     FillStemsAmount(destiny.Year.Branch.HideStems);
     FillStemsAmount(destiny.Month.Branch.HideStems);
     FillStemsAmount(destiny.Day.Branch.HideStems);
     FillStemsAmount(destiny.Hour.Branch.HideStems);
 }
예제 #4
0
        public void DrawWuxing2(Destiny des)
        {
            textBlock1.Text = des.Year.Stems.ToString();
            textBlock2.Text = des.Year.Branch.ToString();
            textBlock3.Text = des.Month.Stems.ToString();
            textBlock4.Text = des.Month.Branch.ToString();
            textBlock5.Text = des.Day.Stems.ToString();
            textBlock6.Text = des.Day.Branch.ToString();
            textBlock7.Text = des.Hour.Stems.ToString();
            textBlock8.Text = des.Hour.Branch.ToString();

            ellipse1.Fill = GetBrush(des.Year.Stems.EraType);
            ellipse2.Fill = GetBrush(des.Year.Branch.HideStems[0].EraType);
            ellipse3.Fill = GetBrush(des.Month.Stems.EraType);
            ellipse4.Fill = GetBrush(des.Month.Branch.HideStems[0].EraType);
            ellipse5.Fill = GetBrush(des.Day.Stems.EraType);
            ellipse6.Fill = GetBrush(des.Day.Branch.HideStems[0].EraType);
            ellipse7.Fill = GetBrush(des.Hour.Stems.EraType);
            ellipse8.Fill = GetBrush(des.Hour.Branch.HideStems[0].EraType);
        }