コード例 #1
0
        //Test
        //public ViewCooperativeGameForm()
        //{
        //    InitializeComponent();
        //    Database.G = new CooperativeGame();
        //    Database.G.Generate(3);
        //    Database.G.GenerateCoalitions();
        //    Database.G.SolveCooperativeGame();
        //    G = Database.G.FindGame(Database.G.CoalitionsInText[0][0]);
        //    CGStudentProgress.SectionsCount = 2;

        //    FirstInterfaceSetup_CooperativeGameModelFormation();
        //    //SecondInterfaceSetup_Domination();
        //}

        private void FirstInterfaceSetup_CooperativeGameModelFormation()
        {
            StrategiesPanel.Show();
            B.Hide();

            UI.TWDNGrid Gs = new UI.TWDNGrid(S, 1, Database.G.N);
            Gs.InitializeHeaders("", "Количество стратегий", "Игрок", false, true);
            Gs.InitializeGrid(Database.G.S);

            UI.Grid Ga = new UI.Grid(A, Math.Min(10, G.SingleGames[0].A.Count), Math.Min(10, 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;

            UI.ControlsAligner form = new UI.ControlsAligner(this);
            form.AddElement(NavigationPanel, true, "Stretch");
            form.AddElement(Task1Panel);
            form.AddElement(StrategiesPanel);
            form.AddElement(MatrixesPanel);
            form.AddElement(SkipBTN, true, "Left");
            form.AddElement(FinishBTN, false, "Right");

            UI.ControlsAligner spanel = new UI.ControlsAligner(StrategiesPanel);
            spanel.AddElement(S);
            spanel.Align(true);

            UI.ControlsAligner mpanel = new UI.ControlsAligner(MatrixesPanel);
            mpanel.AddElement(A);
            mpanel.Align(true);

            form.Align();
            CreateNavigationPanel();
            this.Text = "Заполните вектора стратегий";
        }
コード例 #2
0
        private void SecondInterfaceSetup_Domination()
        {
            Task1Panel.Hide();
            Task2Panel.Show();
            NavigationPanel.Hide();
            StrategiesPanel.Hide();
            B.Show();
            CreateArrays(0, 1);

            UI.ControlsAligner gpanel = new UI.ControlsAligner(MatrixesPanel);
            gpanel.AddElement(A);
            gpanel.AddElement(B, false);
            gpanel.Align();

            UI.ControlsAligner form = new UI.ControlsAligner(this);
            form.AddElement(Task2Panel);
            form.AddElement(MatrixesPanel);
            form.AddElement(SkipBTN, true, "Left");
            form.AddElement(FinishBTN, false, "Right");
            form.Align();

            this.Location = new Point((Screen.PrimaryScreen.Bounds.Width - this.Width) / 2, 50);
            this.Text     = "Сократите матрицы используя отношение доминирования";
        }