Exemple #1
0
        public ActionResult Index()
        {
            string s = MenuMgr.CreateBtn();

            LogFactory.GetLog(typeof(HomeController)).Info("接收");
            if (HttpContext.Request.HttpMethod == "GET")
            {
                var v = Verify.CreateVerifyModel(HttpContext.ApplicationInstance.Context);
                if (v.Signature == null)
                {
                    return(Content("null"));
                }
                //  v.Token = WXTokenHelper.GetTokenBYXml();
                v.Token = ConfigManager.GetConfigFirst().Token;
                if (Verify.IsFromWeiXin(v))
                {
                    return(Content(v.Echostr));
                }
                return(Content("false"));
            }
            else if (HttpContext.Request.HttpMethod == "POST")
            {
                WXPost p = new WXPost();
                p.ProcessRequest(this.HttpContext.ApplicationInstance.Context);
            }
            return(Content(""));
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            List <MainMenu> mlist = MenuMgr.getInstance().menuList;

            foreach (var item in mlist)
            {
                genMenu(item);
            }
        }
Exemple #3
0
    public static MenuMgr getInstance()
    {
        if (s_obj == null)
        {
            s_obj = new MenuMgr();
            s_obj.init();
        }

        return(s_obj);
    }
Exemple #4
0
 // Delegate method to sceneLoaded - sets new scene name
 private void GetCurrentSceneName(Scene scene, LoadSceneMode mode)
 {
     curScene = scene.name;
     // Setup references to game objects
     if (curScene == "MainMenu")
     {
         menuMgr = GameObject.FindGameObjectWithTag("MenuMgr").GetComponent <MenuMgr>();
     }
     else if (curScene == "flatRiver")
     {
         playerInput = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerInput>();
     }
 }
        private void genShortCutMenu()
        {
            try
            {
                // 生成快捷菜单
                List <MainMenu> menuList = MenuMgr.getInstance().menuList;
                foreach (var m in menuList)
                {
                    TableCell td = new TableCell();
                    Label     L  = new Label();
                    L.Text     = m.m_name;
                    L.CssClass = "cShortCutTitle";
                    td.Controls.Add(L);

                    td.Controls.Add(m.m_dst);
                    shortCutMenu.Cells.Add(td);
                }
            }
            catch (System.Exception ex)
            {
                LOGW.Info(ex.ToString());
            }
        }