private void FourthInterfaceSetup_PayoffDistributionAndSufficiency() { Random R = new Random((int)DateTime.Now.Ticks); //CGStudentProgress.DistributionType = R.Next(0, 2); //0 = contribution in a coalition price; 1 = incooperative payoff CGStudentProgress.DistributionType = 1; if (CGStudentProgress.DistributionType == 0) { PayoffDivisionLabel.Text += " с учетом индивидуальных вкладов\nигроков в выигрыш коалиции."; } else { PayoffDivisionLabel.Text += " с учетом индивидуальных выигрышей\nигроков в некооперативной игре."; } PayoffDivisionLabel.TextAlign = ContentAlignment.MiddleCenter; CoalitionAPayoffLabel.Text += G.SingleGames[0].FirstPlayer + " = " + G.SingleGames[0].Ha.ToString("0.00"); CoalitionBPayoffLabel.Text += G.SingleGames[0].SecondPlayer + " = " + G.SingleGames[0].Hb.ToString("0.00");; GameFunctionLabel.Text += (G.SingleGames[0].Ha + G.SingleGames[0].Hb).ToString("0.00"); for (int i = 0; i < G.SingleGames[0].x.Count; i++) { x.Text += G.SingleGames[0].x[i].ToString("0.00") + " "; } x.Text += ")"; for (int i = 0; i < G.SingleGames[0].y.Count; i++) { y.Text += G.SingleGames[0].y[i].ToString("0.00") + " "; } y.Text += ")"; UI.ControlsAligner quizpanel = new UI.ControlsAligner(PayoffDivisionPanel); quizpanel.AddElement(GameFunctionLabel); quizpanel.AddElement(CoalitionAPayoffLabel); quizpanel.AddElement(CoalitionBPayoffLabel, false); quizpanel.AddElement(x); quizpanel.AddElement(y); quizpanel.AddElement(SufficiencyLabel); quizpanel.AddElement(YesRB_CG); quizpanel.AddElement(NoRB_CG, false); quizpanel.AddElement(FirstLine); quizpanel.AddElement(PayoffDivisionLabel); for (int i = 0; i < Database.G.N; i++) { Label l = new Label(); l.Text = "µ(" + (i + 1) + ") = "; l.Font = new System.Drawing.Font("Bookman Old Style", 14); l.ForeColor = Color.White; l.Size = TextRenderer.MeasureText(l.Text, l.Font); TextBox tb = new TextBox(); tb.Font = new System.Drawing.Font("Bookman Old Style", 16); tb.TextAlign = HorizontalAlignment.Center; tb.Width = 100; tb.Text = ""; if (i == 0) { quizpanel.AddElement(l, true); } else { quizpanel.AddElement(l, false); } quizpanel.AddElement(tb, false, "HorBind"); PayoffDivisionPanel.Controls.Add(l); PayoffDivisionPanel.Controls.Add(tb); PayoffDistributionTB.Add(tb); } quizpanel.AddElement(SecondLine); quizpanel.AddElement(DistributionRationalityLabel); quizpanel.AddElement(RationalityPanel, true, "Stretch"); quizpanel.Align(); RationalityPanel.Top -= 10; Graphical2x2SolutionPanel.Hide(); PayoffDivisionPanel.Show(); MatrixesPanel.Hide(); UI.ControlsAligner form = new UI.ControlsAligner(this); form.AddElement(PayoffDivisionPanel); form.AddElement(SkipBTN, true, "Left"); form.AddElement(FinishBTN, false, "Right"); form.Align(); UI.ControlsAligner rpanel = new UI.ControlsAligner(RationalityPanel); rpanel.AddElement(YesRB_RD); rpanel.AddElement(NoRB_RD, false); rpanel.Align(true); }