Exemplo n.º 1
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();
        }
Exemplo n.º 2
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();
        }
Exemplo n.º 3
0
        private void buttonSetDesktopImage_Click(object sender, EventArgs e)
        {
            string desktopImage = textBoxDesktopImage.Text;

            if (string.IsNullOrEmpty(desktopImage))
            {
                MessageBox.Show("请先选择要设置的图片");
                return;
            }

            DesktopUtil.SetDesktopImg(desktopImage);
        }