Example #1
0
 public Branch(int Value)
 {
     this.Element = (emBranch)Value;
 }
Example #2
0
 public Branch(char Value)
 {
     this.Element = EnvironmentHelper.GetEmBranch(Value);
 }
Example #3
0
 public Branch(emBranch Element)
 {
     this.Element = Element;
 }
Example #4
0
 static Amount[] GetAmount(emBranch emBranch)
 {
     emStems[] stemses = dicCangGan[emBranch];
     Amount[] amounts = new Amount[stemses.Length];
     switch(stemses.Length)
     {
         case 1:
             amounts[0] = GetAmount(stemses[0]);
             break;
         case 2:
              amounts[0] = GetAmount(stemses[0]);
              amounts[0].Value*=0.6f;
              amounts[1] = GetAmount(stemses[1]);
              amounts[1].Value*=0.4f;
             break;
         case 3:
              amounts[0] = GetAmount(stemses[0]);
              amounts[0].Value*=0.6f;
              amounts[1] = GetAmount(stemses[1]);
              amounts[1].Value*=0.25f;
             amounts[2] = GetAmount(stemses[2]);
              amounts[2].Value*=0.15f;
             break;
     }
     //Amount[] amounts =Array.ConvertAll(stemses, e=>GetAmount(e));
     //Amount[] amounts = Array.ConvertAll(stemses, delegate(emStems e)
     //                                                 { return GetAmount(e); });
     return amounts;
 }
Example #5
0
 public static emStems[] GetHideStemsbyBranch(emBranch branch)
 {
     string hidStem = MapHideStems[(int) branch];
     emStems[] emStemss =new emStems[hidStem.Length];
     for(int i=0;i<hidStem.Length;i++)
         emStemss[i] = GetEmStems(hidStem[i]);
     //return Array.ConvertAll(MapHideStems[(int)branch].ToCharArray()
     //                 , delegate(char c) {
     //    return GetEmStems(c);
     //});
     return emStemss;
 }
Example #6
0
 public static Char GetChar(emBranch emBranch)
 {
     return Branchs[(int)emBranch];
 }