private void Reinitiate() { if (InvokeRequired) { Invoke(_reinitiate); return; } if (ISSchedulerLstvw.Items.Count > 0) { ISSchedulerLstvw.StopAllSchedules(); } foreach (ExtensionBase extension in _contractor.Extensions) { _contractor.Dispose(extension); } if (_fakeClient != null) { _fakeClient.Dispose(); } if (_fakeServer != null) { _fakeServer.Dispose(); } Hide(); _packetlogger.Halt(); _packetlogger.Hide(); Task.Factory.StartNew(Initiate); }
private void ISCreateBtn_Click(object sender, EventArgs e) { var packet = new HMessage(ISPacketTxt.Text, (HDestination)ISDestinationTxt.SelectedIndex + 1); ISSchedulerLstvw.AddSchedule(packet, (int)ISBurstTxt.Value, (int)ISIntervalTxt.Value, ISDescriptionTxt.Text); }
private void ISRemoveBtn_Click(object sender, EventArgs e) { ISSchedulerLstvw.RemoveSelectedItem(); UpdateSchedulerUI(ISSchedulerLstvw.SelectedItems.Count > 0); }
private void ISClearBtn_Click(object sender, EventArgs e) { ISSchedulerLstvw.ClearItems(); }
private void ISStartAllBtn_Click(object sender, EventArgs e) { ISSchedulerLstvw.StartAllSchedules(); UpdateSchedulerUI(ISSchedulerLstvw.SelectedItems.Count > 0); }