private void buttonGetRecords_Click(object sender, EventArgs e) { Cursor.Current = Cursors.WaitCursor; dataGridView1.DataSource = null; int iError = 0; int iRecord = AccessDataClass.GetRecordOnDevice(1, 6, ref iError, 2, "192.168.1.201", 4370); Application.DoEvents(); labelInfo.Text = @"Device Logs (" + iRecord.ToString() + ")"; Cursor.Current = Cursors.Default; }
private void button3_Click(object sender, EventArgs e) { Cursor.Current = Cursors.WaitCursor; try { int iError = 0; int iRecord = AccessDataClass.GetRecordOnDevice(1, 6, ref iError, 2, sIP, iPort); Application.DoEvents(); MessageBox.Show(@"Device Logs (" + iRecord.ToString() + @")", @"Check Out Logs", MessageBoxButtons.OK, MessageBoxIcon.Information); groupBox2.Enabled = false; } catch (Exception) { MessageBox.Show(@"Please make sure the device is connected.", @"Device", MessageBoxButtons.OK, MessageBoxIcon.Information); //throw; } Cursor.Current = Cursors.Default; }