Exemple #1
0
 private void mnuWakeAll_Click(object sender, EventArgs e)
 {
     if (list.Items.Count > 0)
     {
         var addresses = new List <MagiWolDocument.Address>();
         foreach (ListViewItem iItem in list.Items)
         {
             var iAddress = (MagiWolDocument.Address)iItem;
             addresses.Add(iAddress);
         }
         using (var form = new WakeForm(addresses.AsReadOnly())) {
             form.ShowDialog(this);
         }
     }
 }
Exemple #2
0
        private void mnuWake_Click(object sender, EventArgs e)
        {
            var addresses = new List <MagiWolDocument.Address>();

            foreach (ListViewItem iItem in list.SelectedItems)
            {
                var iAddress = (MagiWolDocument.Address)iItem;
                addresses.Add(iAddress);
            }
            if (addresses.Count == 1)
            {
                using (var form = new WakeProgressForm(addresses.AsReadOnly(), 0)) {
                    form.ShowDialog(this);
                }
            }
            else if (addresses.Count > 1)
            {
                using (var form = new WakeForm(addresses.AsReadOnly())) {
                    form.ShowDialog(this);
                }
            }
        }