Example #1
0
        public MyTaskbar(DesktopEnvironment parent, Color color) : base(
                parent,
                color,
                position: new Vector2i(0, parent.Size.Y - 30),
                size: new Vector2i(parent.Size.X, 30))
        {
            int      borderLength = 5;
            Vector2i iconsSize    = new Vector2i(Size.Y, Size.Y);

            var gErc = new ExtensibleRowContainer(this, borderLength);

            var startMenuButton = new SimpleRectControl(gErc, Color.Blue,
                                                        position: new Vector2i(0, 0),
                                                        size: new Vector2i(Size.Y, Size.Y));

            startMenuButton.Click += (s, e) => ToggleStartMenu(s, EventArgs.Empty);

            var erc = new ExtensibleRowContainer(gErc, borderLength);
            //myTaskbar.Controls.Add(new TaskbarExecutable(myTaskbar, @"C:\Program Files (x86)\Minecraft\MinecraftLauncher.exe"));
            var cmdExec = new Executable(erc, @"c:\windows\system32\cmd.exe")
            {
                Size = iconsSize
            };
            var notepadExec = new Executable(erc, @"c:\windows\notepad.exe")
            {
                Size = iconsSize
            };

            Load(startMenuButton);
            Load(gErc);
            Load(erc);
            Load(cmdExec);
            Load(notepadExec);
        }
Example #2
0
        public Window(DesktopEnvironment parent, IntPtr hWnd) : base(parent)
        {
            w32wnd = new Win32Window(hWnd);
            w32wnd.RemoveOverlap();
            Position = w32wnd.GetPosition() - new Vector2i(20, 20);
            Size     = w32wnd.GetSize() + new Vector2i(40, 40); // tmpf

            SetZ(ZOrder.Top);

            oldMouseMoveEvent = new MouseMoveEvent()
            {
                X = Mouse.GetPosition().X, Y = Mouse.GetPosition().Y
            };                                                                                                 // WARNING This could contain bugs if Loaded a long time before env dispatch events
        }
Example #3
0
 public override void Execute()
 {
     DesktopEnvironment.StartExe(ExecutablePath);
 }
Example #4
0
 public ExecuteProgramCommand(DesktopEnvironment desktopEnvironment, string executablePath) : base(desktopEnvironment)
 {
     ExecutablePath = executablePath;
 }
Example #5
0
 protected DesktopEnvironmentCommand(DesktopEnvironment desktopEnvironment)
 {
     DesktopEnvironment = desktopEnvironment;
 }
Example #6
0
 public MyStartMenu(DesktopEnvironment parent) : base(parent: parent, size: new Vector2i(300, 400))
 {
 }