private async void DeleteJob(JobInfo job) { //MessageBox.Show("Delete " + job.Id); await ApiBoundary.DeleteJob(job); btJobsRefresh_Click(null, null); }
private async void OpenLogDialog_Load(object sender, EventArgs e) { var list = await ApiBoundary.GetLogsNames(); if (list == null) { //failed, do not know what to do? this.DialogResult = DialogResult.Abort; Close(); } listBox1.Items.AddRange(list.Cast <object>().ToArray()); }
private async Task Test() { btTest.Enabled = false; btTest.Text = "Testing"; tbServer.Enabled = false; try { var res = await ApiBoundary.Ping(tbServer.Text); textBox1.Text = res; btTest.Text = "OK"; btConnect.Enabled = true; } catch (Exception exception) { textBox1.Text = exception.ToString(); btTest.Text = "Test"; btTest.Enabled = true; tbServer.Enabled = true; } }
private async void timerRefresh_Tick(object sender, EventArgs e) { jobs = await ApiBoundary.GetJobs(); UpdateJobsDataGrid(); }