Beispiel #1
0
        public Desktop(int i = 0)
        {
            SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint, true);

            InitializeComponent();

            Location = Screen.AllScreens[i].Bounds.Location;
            Size     = Screen.AllScreens[i].Bounds.Size;

            Taskbar = new Apps.Taskbar(this, i);
            Taskbar.Show();

            Sidebar = new Apps.Sidebar(this);
            Sidebar.Show();
        }
Beispiel #2
0
        public StartMenu(Taskbar _taskbar)
        {
            taskbar = _taskbar;

            InitializeComponent();

            SelectedTab = Home;
            Home.Invalidate();

            using (GraphicsPath gp = new GraphicsPath())
            {
                gp.AddLine(new Point(0, 0), new Point(Width, 0));
                gp.AddLine(new Point(Width, 0), new Point(Width, Height - 10));
                gp.AddLine(new Point(Width, Height - 10), new Point(10, Height - 10));
                gp.AddLine(new Point(10, Height - 10), new Point(0, Height));
                gp.AddLine(new Point(0, Height), new Point(0, 0));
                Region = new Region(gp);
            }
        }