private void Tab2btnFindPeriodLC_Click(object sender, EventArgs e) { Tab2txtResult.Clear(); Application.DoEvents(); Tab2txtResult.AppendText("Starting to compute first 50000 stream output.\r\n"); for (int i = 0; i < 50000; i++) { L1.Clock(); L2.Clock(); L3.Clock(); L4.Clock(); NonlinCombOutput += NonLinearCombiner(L1.StreamOutput, L2.StreamOutput, L3.StreamOutput, L4.StreamOutput).Value.ToString(); } Tab2txtResult.AppendText("Stream has been generated.\r\nStarting to compute period.\r\n"); Application.DoEvents(); int period = LFSRTools.FindStreamPeriodExtended(NonlinCombOutput, 3 + 4 + 5 + 7); Tab2txtResult.AppendText("\r\nPeriod is " + period + ".\r\n"); int LCbound = NonLinearCombinerStar(L1.FeedbackPolynomial.Degree, L2.FeedbackPolynomial.Degree, L3.FeedbackPolynomial.Degree, L4.FeedbackPolynomial.Degree); Tab2txtResult.AppendText("\r\nLC is bounded by " + LCbound + "."); }