コード例 #1
0
        public bool CanGo(string action, MyStatusFlow status)
        {
            switch (status)
            {
            case MyStatusFlow.Registred:
            {
                this.canUseAction[Constans_Cinema.ACCOUNT_REGISTRATION] = false;
                this.canUseAction[Constans_Cinema.ACCOUNT_LOGOUT]       = false;
                this.CanUseAction[Constans_Cinema.HOME_INDEX]           = false;
                this.CanUseAction[Constans_Cinema.HOME_PAGE2]           = true;
                break;
            }

            case MyStatusFlow.Not_Registred:
            {
                this.canUseAction[Constans_Cinema.ACCOUNT_REGISTRATION] = true;
                this.canUseAction[Constans_Cinema.ACCOUNT_LOGOUT]       = true;
                this.CanUseAction[Constans_Cinema.HOME_INDEX]           = true;
                this.CanUseAction[Constans_Cinema.HOME_PAGE2]           = false;
                break;
            }

            case MyStatusFlow.Smile: { break; }
            }
            return((this.CanUseAction.ContainsKey(action)) ? this.CanUseAction[action] : false);
        }
コード例 #2
0
 public static MyStatusFlow ParseUserAuth(this MyStatusFlow flow, bool authificated)
 {
     return((authificated) ? MyStatusFlow.Registred : MyStatusFlow.Not_Registred);
 }