private void OnDeleteResource(object sender, EventArgs e) { DialogResult result = MessageBox.Show("Are you sure you want to delete resource?", "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (result == DialogResult.Yes) { try { ResourceTracer._Trace(_resource); _tracer.Trace("Resource " + _resource.Id + " to be deleted"); new ResourceProxy(_resource).DeleteAsync(); } catch (Exception exception) { _tracer.TraceException(exception); MessageBox.Show("Can't delete resource: " + exception.Message); return; } Close(); } }
private void OnTrace(object sender, EventArgs e) { ResourceTracer._Trace(_resource, _showLinks.Checked); }