213123
This commit is contained in:
11
Form1.cs
11
Form1.cs
@ -21,7 +21,7 @@ using System.Net.Http;
|
||||
using System.Xml.Linq;
|
||||
namespace WindowsFormsApp
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
public partial class InteractiveClassroomLocalDataScan : Form
|
||||
{
|
||||
|
||||
static DigitalPenAP digitalPenAP;
|
||||
@ -35,7 +35,7 @@ namespace WindowsFormsApp
|
||||
|
||||
//所有已连接笔的绘制窗口
|
||||
Dictionary<string, PenDraw> AllPenDrawsDic = new Dictionary<string, PenDraw>();
|
||||
public Form1()
|
||||
public InteractiveClassroomLocalDataScan()
|
||||
{
|
||||
InitializeComponent();
|
||||
// 加载 XML 文件
|
||||
@ -46,6 +46,7 @@ namespace WindowsFormsApp
|
||||
SaveDataOperater.DeletePenStatus();
|
||||
//SaveDataOperater.DropAllPenTable();
|
||||
WriteData();
|
||||
this.Text = "互动课堂数据采集";
|
||||
}
|
||||
|
||||
public static async void WriteData()
|
||||
@ -727,7 +728,7 @@ namespace WindowsFormsApp
|
||||
using (HttpClient client = new HttpClient())
|
||||
{
|
||||
var content = new StringContent(jsonContent, Encoding.UTF8, "application/json");
|
||||
HttpResponseMessage response = await client.PostAsync(WindowsFormsApp.Form1.apiUrl + "/sdk/v1/dotmatrix/pen/report", content);
|
||||
HttpResponseMessage response = await client.PostAsync(WindowsFormsApp.InteractiveClassroomLocalDataScan.apiUrl + "/sdk/v1/dotmatrix/pen/report", content);
|
||||
response.EnsureSuccessStatusCode();
|
||||
ServerResult sr = JsonConvert.DeserializeObject<ServerResult>(await response.Content.ReadAsStringAsync());
|
||||
}
|
||||
@ -755,7 +756,7 @@ namespace WindowsFormsApp
|
||||
using (HttpClient client = new HttpClient())
|
||||
{
|
||||
var content = new StringContent("", Encoding.UTF8, "application/json");
|
||||
HttpResponseMessage response = await client.GetAsync(WindowsFormsApp.Form1.apiUrl + "/sdk/v1/class/student/pens?classId=" + ClassID);
|
||||
HttpResponseMessage response = await client.GetAsync(WindowsFormsApp.InteractiveClassroomLocalDataScan.apiUrl + "/sdk/v1/class/student/pens?classId=" + ClassID);
|
||||
response.EnsureSuccessStatusCode();
|
||||
ServerResult sr = JsonConvert.DeserializeObject<ServerResult>(await response.Content.ReadAsStringAsync());
|
||||
if (sr.success)
|
||||
@ -771,7 +772,7 @@ namespace WindowsFormsApp
|
||||
using (HttpClient client = new HttpClient())
|
||||
{
|
||||
var content = new StringContent("", Encoding.UTF8, "application/json");
|
||||
HttpResponseMessage response = await client.GetAsync(WindowsFormsApp.Form1.apiUrl + "/sdk/v1/dotmatrix/page/sync");
|
||||
HttpResponseMessage response = await client.GetAsync(WindowsFormsApp.InteractiveClassroomLocalDataScan.apiUrl + "/sdk/v1/dotmatrix/page/sync");
|
||||
response.EnsureSuccessStatusCode();
|
||||
|
||||
ServerResult sr = JsonConvert.DeserializeObject<ServerResult>(await response.Content.ReadAsStringAsync());
|
||||
|
||||
Reference in New Issue
Block a user