Ejemplo n.º 1
0
        public MyForm(IUiAction[] actions, ChartHolder chartHolder)
        {
            ClientSize = new Size(800, 600);
            var mainMenu = new MenuStrip();

            mainMenu.Items.AddRange(actions.ToMenuItems());
            Controls.Add(mainMenu);
            chartHolder.SetParent(this);
        }
Ejemplo n.º 2
0
        public MyForm(IUiAction[] actions, ChartHolder chartHolder)
        {
            BackColor = Color.White;
            var mainMenu = new MenuStrip();

            mainMenu.BackColor = Color.MediumPurple;
            mainMenu.Items.AddRange(actions.ToMenuItems());
            Text = "Решение задачи коши";
            Size = new Size(1200, 800);
            Controls.Add(mainMenu);
            var label = new PictureBox {
                BorderStyle = BorderStyle.None, BackColor = Color.White
            };

            Controls.Add(label);
            SizeChanged += (sender, args) => SizeSet(label);
            Load        += (sender, args) => OnSizeChanged(EventArgs.Empty);
            chartHolder.SetParent(label);
        }