private void dataWipeToolStripMenuItem_Click(object sender, EventArgs e) { if (MessageBox.Show("Are you sure, you want to delete all the data in the device?", "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { CodeproofServiceClient cpservice = new CodeproofServiceClient(); foreach (ListViewItem item in listView1.SelectedItems) { Authenticate authObj = (Authenticate)((object[])item.Tag)[0]; CPID selectedDevice = (CPID)((object[])item.Tag)[1]; CommandRecord cmd = new CommandRecord(); cmd.Command = "datawipe";//do not change this cmd.CommandName = "SDK data wipe cmd test"; cmd.Notes = "SDK sample test command"; CommandRecord cmdupdated = cpservice.ExecuteCommand(authObj, selectedDevice, cmd); MessageBox.Show(cmdupdated.Status); break; } } }
private void sendMessageToolStripMenuItem_Click(object sender, EventArgs e) { ToolStripItem clickedMenuItem = sender as ToolStripItem; foreach (ListViewItem item in listView1.SelectedItems) { Authenticate authObj = (Authenticate)((object[])item.Tag)[0]; CPID selectedDevice = (CPID)((object[])item.Tag)[1]; PushMessageForm pushMesgForm = new PushMessageForm(); pushMesgForm.authObj = authObj; pushMesgForm.selectedDevice = selectedDevice; pushMesgForm.ShowDialog(); break; } }
private void lockToolStripMenuItem_Click(object sender, EventArgs e) { CodeproofServiceClient cpservice = new CodeproofServiceClient(); foreach (ListViewItem item in listView1.SelectedItems) { Authenticate authObj = (Authenticate)((object[])item.Tag)[0]; CPID selectedDevice = (CPID)((object[])item.Tag)[1]; CommandRecord cmd = new CommandRecord(); cmd.Command = "screenlock";//do not change this cmd.CommandName = "SDK screen lock cmd test"; cmd.Notes = "SDK sample test command"; CommandRecord cmdupdated = cpservice.ExecuteCommand(authObj, selectedDevice, cmd); MessageBox.Show(cmdupdated.Status); break; } }