Exemple #1
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            string apikKey = PubSql.ApiKey;
            string secretKey = PubSql.SecretKey;
            string channel_id = PubSql.ChannelId;

            Push_Single_Device_Mod psdm = new Push_Single_Device_Mod(apikKey, channel_id, "{\"title\":\"胶圈体育总局通知:\",\"description\":\"老荣膝盖酸痛退役!\"}",1);
            Push_Single_Device psd = new Push_Single_Device(secretKey, psdm);
            string result = psd.PushMessage();
            Response.Write(result);
        }
        protected void btn_Send_Click(object sender, EventArgs e)
        {
            string apikKey = PubSql.ApiKey;
            string secretKey = PubSql.SecretKey;
            string channel_id = PubSql.ChannelId;

            Notice_Android_Mod dam = new Notice_Android_Mod(txtTitle.Value, txtContent.Value);
            string json = JsonConvert.SerializeObject(dam);
            Push_Single_Device_Mod psdm = new Push_Single_Device_Mod(apikKey, channel_id, json, (int)Baidu_Helper.Message_Type.Notice, 1);

            Push_Single_Device psd = new Push_Single_Device(secretKey, psdm);
            txtResponse.Value = psd.PushMessage();
        }