private void UI_FirstSetup() { #region Grids //Create grid that shows strategies number UI.TWDNGrid Gs = new UI.TWDNGrid(S, 1, Database.G.N); Gs.InitializeHeaders("", "Количество стратегий", "Игрок", false, true); Gs.InitializeGrid(Database.G.S); S.ReadOnly = true; //Create grid for strategies combination UI.Grid Ga = new UI.Grid(A, Math.Min(GridSizeforTaskOne.Height, G.SingleGames[0].A.Count), Math.Min(GridSizeforTaskOne.Width, G.SingleGames[0].A[0].Count)); A.Tag = Ga; Ga.InitializeHeaders("Стратегии", 100, 50); Ga.InitializeGrid(); A.EditMode = DataGridViewEditMode.EditProgrammatically; A.ReadOnly = true; A.StandardTab = true; #endregion outerblocks.Add(AddHeader(true)); outerblocks.Add(AddMainContent()); outerblocks.Add(AddNavigationBar()); AlignForm(); A.ColumnHeaderMouseClick += new DataGridViewCellMouseEventHandler(ColumnHeadersMouseClick); A.RowHeaderMouseClick += new DataGridViewCellMouseEventHandler(RowHeaderMouseClick); B.ColumnHeaderMouseClick += new DataGridViewCellMouseEventHandler(ColumnHeadersMouseClick); B.RowHeaderMouseClick += new DataGridViewCellMouseEventHandler(RowHeaderMouseClick); }
/// <summary> /// UI Setup /// </summary> /// <param name="N">Bimatrix game participants number</param> void UI_FirstSetup(int N) { //Alignment Database.G.N = N; progressBar1.Maximum = 120; label1.Text = "Генерирование биматричных игр (1/" + (Database.G.N * (Database.G.N - 1) / 2).ToString() + ")"; //Grid settings UI.TWDNGrid G = new UI.TWDNGrid(D, Database.G.N, Database.G.N); G.InitializeHeaders("Выигрыши", "Игрок", "Игрок"); G.InitializeGrid(); D.ReadOnly = true; D.ForeColor = Color.Black; D.Enabled = false; outerblocks.Add(AddHeader()); outerblocks.Add(AddMainContent()); ControlsAligner GP = new ControlsAligner(GenerationPanel); GP.AddElement(label1); GP.AddElement(progressBar1); blocks.Add(GP); outerblocks.Add(GP); AlignForm(); //Alignment statusStrip1.Hide(); BW = new BackgroundWorker(); BW.WorkerReportsProgress = true; BW.DoWork += new DoWorkEventHandler(FindCombination); BW.ProgressChanged += new ProgressChangedEventHandler(StepComplete); BW.RunWorkerCompleted += new RunWorkerCompletedEventHandler(UI_SecondSetup); BW.RunWorkerAsync(); }