Ejemplo n.º 1
0
 private void buttonOk_Click(object sender, EventArgs e)
 {
     using (var form = new WakeProgressForm(this._addresses, (int)nudPause.Value)) {
         if (form.ShowDialog(this) == DialogResult.OK)
         {
             Settings.Runtime.WolWaitBetweenComputersIntervalSeconds = (int)nudPause.Value;
             this.DialogResult = DialogResult.OK;
         }
     }
 }
Ejemplo n.º 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);
                }
            }
        }