aboutsummaryrefslogtreecommitdiff
path: root/PortEngine/WindowManager/WindowManager.cs
blob: 367f3df7b612abd6d66e732b979e586737663e7c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;

namespace Amethyst
{
    class WindowManager
    {
        public void createWindow(UserControl program, String name, String rpcData, String rpcImage, Image icon)
        {
            @base window = new @base()
            {
                Height = program.Height + 30,
                Width = program.Width
            };
            program.Parent = window.pnlContent;
            program.BringToFront();
            program.Dock = DockStyle.Fill;
            window.lblProg.Text = name;
            if  (PortEngine.Properties.Settings.Default.graphicsFriendly == false)  window.Opacity = 0;
            window.TopMost = true;
            window.rpcData = rpcData;
            window.rpcImage = rpcImage;
            window.Show();
        }
    }
}