示例#1
0
 public Context(State state)
 {
     this.state = state;
 }
示例#2
0
 public void SetState(State s)
 {
     current = s;
 }
示例#3
0
 public Work()
 {
     current = new ForenoonState();
 }
示例#4
0
文件: Program.cs 项目: weiliji/.net
 public GoldState(State state)
 {
     this.Balance = state.Balance;
     this.Account = state.Account;
     Interest = 0.05;
     LowerLimit = 1000.00;
     UpperLimit = 1000000.00;
 }
示例#5
0
文件: Program.cs 项目: weiliji/.net
 public SilverState(State state)
     : this(state.Balance, state.Account)
 {
 }
示例#6
0
文件: Program.cs 项目: weiliji/.net
 public RedState(State state)
 {
     // Initialize
     this.Balance = state.Balance;
     this.Account = state.Account;
     Interest = 0.00;
     LowerLimit = -100.00;
     UpperLimit = 0.00;
 }