public void UpdateDirectoriesElements(string path)
        {
            lock (Elements)
            {
                int xx = 0;
                int yy = 0;
                Elements.RemoveAll(z => z is OsEmulatorDirectory || z is OsEmulatorFile);
                try
                {
                    var dir = new DirectoryInfo(path);

                    if (dir.Parent != null)
                    {
                        OsEmulatorDirectory back = new OsEmulatorDirectory();
                        back.Info         = dir.Parent;
                        back.OverrideName = true;
                        back.Name         = "..";
                        Elements.Add(back);
                        yy += 30;
                    }

                    foreach (var directoryInfo in dir.GetDirectories())
                    {
                        OsEmulatorDirectory s = new OsEmulatorDirectory();
                        s.Info     = directoryInfo;
                        s.Position = new PointF(xx, yy);
                        yy        += 30;

                        Elements.Add(s);
                    }

                    foreach (var directoryInfo in dir.GetFiles())
                    {
                        OsEmulatorFile s = new OsEmulatorFile();
                        s.Info     = directoryInfo;
                        s.Position = new PointF(xx, yy);
                        yy        += 30;
                        Elements.Add(s);
                    }
                }
                catch (Exception ex)
                {
                }
            }
        }
        public override void MouseEvent(MouseEventType ev, MouseButtons mb, int x, int y)
        {
            foreach (var osEmulatorGuiElement in Elements)
            {
                osEmulatorGuiElement.IsFocused = false;
                osEmulatorGuiElement.MouseEvent(ev, mb, x, y);
            }
            if (mb == MouseButtons.Left && ev == MouseEventType.Up)
            {
                bool was = false;
                OsEmulatorDirectory selected = null;
                foreach (var directory in Elements.OfType <OsEmulatorDirectory>())
                {
                    if (directory.IsSelected)
                    {
                        selected = directory;
                    }
                    directory.IsSelected = false;
                }

                DirectoryInfo toOpen = null;
                foreach (var directory in Elements.OfType <OsEmulatorDirectory>())
                {
                    Rectangle r = new Rectangle((int)directory.Position.X, (int)directory.Position.Y, 30, 30);
                    if (r.IntersectsWith(new Rectangle(Cursor.X, Cursor.Y, 1, 1)))
                    {
                        if (selected == directory)
                        {
                            toOpen = directory.Info;
                            was    = true;
                        }
                        directory.IsSelected = true;
                    }
                }

                if (was)
                {
                    UpdateDirectoriesElements(toOpen.FullName);
                }
            }
        }