Esempio n. 1
0
        public UIForm(IUiAction[] actions, PictureBoxImageHolder pictureBox, ImageSettings settings)
        {
            ClientSize = new Size(settings.Width, settings.Height);
            var mainMenu = new MenuStrip();

            mainMenu.Items.AddRange(actions.ToMenuItems());
            Controls.Add(mainMenu);

            pictureBox.RecreateImage(settings);
            pictureBox.Dock = DockStyle.Fill;
            Controls.Add(pictureBox);
        }
Esempio n. 2
0
        public MainForm(IUiAction[] actions, AppSettings settings, PictureBoxImageHolder imageHolder)
        {
            var imageSettings = settings.ImageSettings;

            ClientSize = new Size(imageSettings.Width, imageSettings.Height);

            var mainMenu = new MenuStrip();

            mainMenu.Items.AddRange(actions.ToMenuItems());
            Controls.Add(mainMenu);


            imageHolder.RecreateImage(imageSettings);
            imageHolder.Dock = DockStyle.Fill;
            Controls.Add(imageHolder);
        }