public Branch(int Value) { this.Element = (emBranch)Value; }
public Branch(char Value) { this.Element = EnvironmentHelper.GetEmBranch(Value); }
public Branch(emBranch Element) { this.Element = Element; }
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; }
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; }
public static Char GetChar(emBranch emBranch) { return Branchs[(int)emBranch]; }