public static async Task SendAddBuddyActionAsync(CancellationTokenSource cts, int userId, string username) { string url = $"http://www.hi-pda.com/forum/my.php?item=buddylist&newbuddyid={userId}&buddysubmit=yes&inajax=1"; await _httpClient.GetAsync(url, cts); string xml = "<toast>" + "<visual>" + "<binding template='ToastGeneric'>" + $"<text>恭喜您,已添加 {username} 为好友</text>" + $"<text>已操作成功</text>" + "</binding>" + "</visual>" + "</toast>"; CommonService.SendToast(xml); }
public static async Task SendAddToFavoritesActionAsync(CancellationTokenSource cts, int threadId, string threadTitle) { string url = $"http://www.hi-pda.com/forum/my.php?item=favorites&tid={threadId}&inajax=1"; await _httpClient.GetAsync(url, cts); string xml = "<toast>" + "<visual>" + "<binding template='ToastGeneric'>" + $"<text>恭喜您,主题《{threadTitle}》</text>" + "<text>已收藏成功</text>" + "</binding>" + "</visual>" + "</toast>"; CommonService.SendToast(xml); }