Пример #1
0
        protected void btn_Send_Click(object sender, EventArgs e)
        {
            string apikKey = PubSql.ApiKey;
            string secretKey = PubSql.SecretKey;

            Notice_Android_Mod dam = new Notice_Android_Mod(txtTitle.Value,txtContent.Value);
            string json = JsonConvert.SerializeObject(dam);
            Push_All_Mod pam = new Push_All_Mod(apikKey, json, (int)Baidu_Helper.Message_Type.Notice,1);
            Push_All pa = new Push_All(secretKey, pam);

            txtResponse.Value= pa.PushMessage();
        }
Пример #2
0
        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();
        }