예제 #1
0
        private void btnPowerOff_Click(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;

            var resultDia = DialogResult.None;

            resultDia = MessageBox.Show("Do you wish to Power Off the Device ??", "Power Off Device", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
            if (resultDia == DialogResult.Yes)
            {
                bool deviceOff = objZkeeper.PowerOffDevice(int.Parse(tbxMachineNumber.Text.Trim()));
            }

            this.Cursor = Cursors.Default;
        }
예제 #2
0
        private void PowerOff(ZkemClient objZkeeper, Device device)
        {
            this.Cursor = Cursors.WaitCursor;

            var resultDia = DialogResult.None;

            resultDia = MessageBox.Show("Do you wish to Power Off the Device ??", "Power Off Device", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
            if (resultDia == DialogResult.Yes)
            {
                bool deviceOff = objZkeeper.PowerOffDevice(int.Parse(device.DeviceId));
            }

            this.Cursor = Cursors.Default;
        }
예제 #3
0
        private void btnPowerOff_Click(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;

            var resultDia = DialogResult.None;

            resultDia = MessageBox.Show("¿Se encuentra seguro de apagar esta terminal? Este proceso no puede ser revertido.", "Apagar terminal", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
            if (resultDia == DialogResult.Yes)
            {
                bool deviceOff = objZkeeper.PowerOffDevice(1);
                InsertarEvento("El usuario " + usuario + " ha APAGADO la terminal en " + marcadores[Convert.ToInt32(cmbUbicacion.SelectedIndex)].UBICACION);
            }

            this.Cursor = Cursors.Default;
        }