Beispiel #1
0
        //Delete a device
        public void deleteDevice(object sender, RoutedEventArgs e)
        {
            Device device = (Device)this.deviceList.SelectedItem;

            if (device != null && device.NAME != "+")
            {
                this.file.deleteAddress(device, this);
                dataRefresh();
            }
            else
            {
                appMessageBox appMessage = new appMessageBox();
                appMessage.Show();

                appMessage.showMsg("Please select a device");
            }
        }
Beispiel #2
0
        //Send the magic packet
        private void WakeUp(object sender, RoutedEventArgs e)
        {
            Device device = (Device)this.deviceList.SelectedItem;

            if (device != null && device.NAME != "+")
            {
                networkControl      nc = new networkControl();
                notificationService ns = new notificationService();

                nc.wakeUp(device.ADDRESS);
                ns.sendNotification(device.NAME);
            }
            else
            {
                appMessageBox appMessage = new appMessageBox();
                appMessage.Show();

                appMessage.showMsg("Please select a device");
            }
        }