Ejemplo n.º 1
0
        public FenceWindow(FenceInfo fenceInfo)
        {
            InitializeComponent();
            DropShadow.ApplyShadows(this);
            BlurUtil.EnableBlur(Handle);
            WindowUtil.HideFromAltTab(Handle);
            //DesktopUtil.GlueToDesktop(Handle);
            //DesktopUtil.PreventMinimize(Handle);
            this.titleHeight = fenceInfo.TitleHeight;
            this.MouseWheel += FenceWindow_MouseWheel;
            thumbnailProvider.IconThumbnailLoaded += ThumbnailProvider_IconThumbnailLoaded;
            if (titleHeight < 16 || titleHeight > 100)
            {
                titleHeight = 35;
            }

            ReloadFonts();

            AllowDrop = true;


            this.fenceInfo = fenceInfo;
            Text           = fenceInfo.Name;
            Location       = new Point(fenceInfo.PosX, fenceInfo.PosY);

            Width  = fenceInfo.Width;
            Height = fenceInfo.Height;

            prevHeight = Height;
            lockedToolStripMenuItem.Checked = fenceInfo.Locked;
            minifyToolStripMenuItem.Checked = fenceInfo.CanMinify;
            Minify();
        }
Ejemplo n.º 2
0
        public FenceWindow(FenceInfo fenceInfo)
        {
            InitializeComponent();
            DropShadow.ApplyShadows(this);
            BlurUtil.EnableBlur(Handle);
            WindowUtil.HideFromAltTab(Handle);
            DesktopUtil.GlueToDesktop(Handle);

            var family = new FontFamily("Segoe UI");

            titleFont = new Font(family, 17);
            iconFont  = new Font(family, 9);

            AllowDrop = true;


            this.fenceInfo = fenceInfo;
            Text           = fenceInfo.Name;
            Location       = new Point(fenceInfo.PosX, fenceInfo.PosY);

            Width  = fenceInfo.Width;
            Height = fenceInfo.Height;

            prevHeight = Height;
            lockedToolStripMenuItem.Checked = fenceInfo.Locked;
            minifyToolStripMenuItem.Checked = fenceInfo.CanMinify;
            Minify();
        }