コード例 #1
0
        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;
                }
            }
        }
コード例 #2
0
ファイル: PushMessageForm.cs プロジェクト: antonychrist/sdk
        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text.Length == 0)
            {
                MessageBox.Show("Pleas enter a message");
                textBox1.Focus();
                return;
            }

            button1.Enabled = false;

            //send push message command

            CodeproofServiceClient cpservice = new CodeproofServiceClient();

            CommandRecord cmd = new CommandRecord();

            cmd.Command = "sendmessage";//do not change this

            cmd.CommandName = "SDK send message test";
            cmd.Param1      = textBox1.Text;
            cmd.Notes       = "SDK sample test command";

            CommandRecord cmdupdated = cpservice.ExecuteCommand(authObj, selectedDevice, cmd);

            MessageBox.Show(cmdupdated.Status);

            button1.Enabled = true;
            this.Close();
        }
コード例 #3
0
        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;
            }
        }