Esempio n. 1
0
        public FenceWindow(FenceInfo fenceInfo)
        {
            InitializeComponent();
            DropShadow.ApplyShadows(this);
            BlurUtil.EnableBlur(Handle);
            WindowUtil.HideFromAltTab(Handle);
            DesktopUtil.GlueToDesktop(Handle);
            this.titleHeight = fenceInfo.TitleHeight;
            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();
        }
Esempio 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();
        }