implemented total amount of API #19
This commit is contained in:
parent
8a22d68fb2
commit
65ef154df8
@ -7,5 +7,6 @@ namespace Mk0.Software.Bildduplikate
|
||||
public string response_code { get; set; }
|
||||
public string response_desc { get; set; }
|
||||
public List<APIResponsePayload> payload { get; set; }
|
||||
public string totalDuplicates { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -545,7 +545,17 @@ namespace Mk0.Software.Bildduplikate
|
||||
Duplicate d = new Duplicate(ReplacePath(pl.file1), ReplacePath(pl.file2), pl.id);
|
||||
Duplicates.Add(d);
|
||||
}
|
||||
total = Duplicates.Count;
|
||||
|
||||
WebClient webClient2 = new WebClient();
|
||||
webClient2.Headers[HttpRequestHeader.ContentType] = "application/json";
|
||||
string json2 = webClient.UploadString(Properties.Settings.Default.ApiUrl + "?totalDuplicates", "");
|
||||
var resObj2 = new JavaScriptSerializer().Deserialize<APIResponse>(json2);
|
||||
if (resObj2.response_code != "200") { MessageBox.Show("Fehler", resObj2.response_desc, MessageBoxButtons.OK, MessageBoxIcon.Error); }
|
||||
else
|
||||
{
|
||||
total = int.Parse(resObj2.totalDuplicates);
|
||||
}
|
||||
|
||||
LoadDuplicates(line, true);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user