static PubWeChatSues() { pubCore = new PubCore("Sues"); PubRecEventClick.OnEventClick += DoClick; PubRecEventSubscribe.OnEventSubscribe += DoSubscribe; PubRecMsgText.OnMsgText += DoMsgText; }
static PubWeChat() { pubCore = new PubCore(); //int expires_in = Int32.Parse(ConfigurationManager.AppSettings["expires_in"]); //System.Timers.Timer t = new System.Timers.Timer(expires_in);//实例化Timer类,设置间隔时间; //t.Elapsed += new System.Timers.ElapsedEventHandler(AutoRefreshAccessToken);//到达时间的时候执行事件; //t.AutoReset = true;//设置是执行一次(false)还是一直执行(true); //t.Enabled = true;//是否执行System.Timers.Timer.Elapsed事件; PubRecEventClick.OnEventClick += DoClick; PubRecEventSubscribe.OnEventSubscribe += DoSubscribe; PubRecMsgText.OnMsgText += DoMsgText; }
static PubWeChatSta() { pubCore = new PubCore("Sta"); PubRecEventClick.OnEventClick += DoClick; PubRecMsgText.OnMsgText += DoMsgText; }