예제 #1
0
 private void buttonAddRaid_Click(object sender, EventArgs e)
 {
     if (ComputerHardDrives.Any())
     {
         newRaidForm = new Create_Raid();
         newRaidForm.SelectableHardDrives = ComputerHardDrives;
         newRaidForm.OnDataAvailable     += AddRaidToList;
         newRaidForm.FormClosed          += UpdateFormEvent;
         newRaidForm.Show();
     }
     else
     {
         MessageBox.Show(
             "An existing Hard Drive is required before any RAIDS can be added.\r\nPlease add a Hard Drive before reattemtping.",
             "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         //errorProvider.SetError(listViewCreateComputerHardDrives, string.Empty);
         ////errorProvider.SetIconPadding(listViewCreateComputerHardDrives, 25);
         //if (listViewCreateComputerHardDrives.Text == null)
         //{
         //    errorProvider.SetError(listViewCreateComputerRaid, "You must associate a Hard Drive with this RAID");
         //}
         ////CancelButton.PerformClick();
         ////e.Cancel = true;
     }
 }
 private void buttonAddRaid_Click(object sender, EventArgs e)
 {
     if (ComputerHardDrives.Any())
     {
         newRaidForm = new Create_Raid();
         newRaidForm.SelectableHardDrives = ComputerHardDrives;
         newRaidForm.OnDataAvailable += AddRaidToList;
         newRaidForm.FormClosed += UpdateFormEvent;
         newRaidForm.Show();
     }
     else
     {
         MessageBox.Show(
             "An existing Hard Drive is required before any RAIDS can be added.\r\nPlease add a Hard Drive before reattemtping.",
             "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         //errorProvider.SetError(listViewCreateComputerHardDrives, string.Empty);
         ////errorProvider.SetIconPadding(listViewCreateComputerHardDrives, 25);
         //if (listViewCreateComputerHardDrives.Text == null)
         //{
         //    errorProvider.SetError(listViewCreateComputerRaid, "You must associate a Hard Drive with this RAID");
         //}
         ////CancelButton.PerformClick();
         ////e.Cancel = true;
     }
 }
 private void buttonAddRaid_Click(object sender, EventArgs e)
 {
     this.newRaidForm = new Create_Raid();
     newRaidForm.SelectableHardDrives = ComputerHardDrives;
     newRaidForm.OnDataAvailable += new EventHandler(AddRaidToList);
     newRaidForm.FormClosed += this.UpdateFormEvent;
     newRaidForm.Show();
 }