Exemplo n.º 1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            GDI = new GdiSystem(this);
            GDI.Graphics.SmoothingMode     = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
            GDI.Graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAliasGridFit;
            GDI.Graphics.Clear(backgroundColor);
            GDI.UpdateWindow();
            this.Height = panelToolbar.Bottom;

            tblTaskContainer.MouseWheel += TblTaskContainer_MouseWheel;
            this.ActiveControl           = tblTaskContainer;

            loadConf();
            refreshCountingState();

            try
            {
                this.Location = settings.windowPosition;
            }
            catch {
                settings.Reset();
                settings.Save();
            }

            this.Location = settings.windowPosition;
            if (!settings.isExpanded)
            {
                btnFold.PerformClick();
            }
            bgPaint         = new SolidBrush(Color.FromArgb(settings.backgroundOptacy, Color.Black));
            backgroundColor = Color.FromArgb(settings.backgroundOptacy, Color.Black);
        }
Exemplo n.º 2
0
 private void Form1_Load(object sender, EventArgs e)
 {
     gdi = new GdiSystem(this);
     init();
     draw();
     gdi.UpdateWindow();
 }
Exemplo n.º 3
0
        private void renderTimer_Tick(object sender, EventArgs e)
        {
            for (int repeat = 0; repeat < 5; repeat++)
            {
                GDI.Graphics.Clear(backgroundColor);
                Graphics g = GDI.Graphics;
                DrawItem(g);
                g.CompositingMode = System.Drawing.Drawing2D.CompositingMode.SourceCopy;
                g.FillRectangle(bgPaint, 0, 0, Width, tblTaskContainer.Top);
                g.CompositingMode = System.Drawing.Drawing2D.CompositingMode.SourceOver;
                g.FillRectangle(bgPaint, 0, dragger.Bottom + 1, Width, tabPageBar.Height);
                g.DrawString(lblTitle.Text, lblTitle.Font, fgPaint, new RectangleF(lblTitle.Location, lblTitle.Size), alignLeft);
                DrawUtils.drawRotateImg(g, foldImg, foldRotationAngel, btnFold.Left + btnFold.Height / 2, btnFold.Top + btnFold.Height / 2, btnFold.Width, btnFold.Height);
                DrawUtils.drawRotateImg(g, refreshImg, refreshRotationAngel, btnRefresh.Left + btnRefresh.Height / 2, btnRefresh.Top + btnRefresh.Height / 2, btnRefresh.Width, btnRefresh.Height);
                DrawUtils.drawRotateImg(g, addImg, addRotateAngel, btnAdd.Left + btnAdd.Height / 2, btnAdd.Top + btnAdd.Height / 2, btnAdd.Width, btnAdd.Height);
                DrawUtils.drawRotateImg(g, reorderImage, 0, btnReorder.Left + btnReorder.Height / 2, btnReorder.Top + btnReorder.Height / 2, btnReorder.Width, btnReorder.Height);

                g.DrawString(lblFirst.Text, lblFirst.Font, fgPaint, new RectangleF(new Point(lblFirst.Left + tabPageBar.Left + 6, lblFirst.Top + tabPageBar.Top), lblFirst.Size), alignLeft);

                if (btnCompleteFirst.Visible)
                {
                    g.DrawImage(btnCompleteFirst.Enabled ? chk_no_small : chk_yes_small, new RectangleF(new Point(btnCompleteFirst.Left + tabPageBar.Left, btnCompleteFirst.Top + tabPageBar.Top), btnCompleteFirst.Size));
                }

                lock (animations)
                {
                    animations.ForEach(an => an.processAnimaFrame());
                    animations.RemoveAll(an => an.finished);
                }

                if (postExpand)
                {
                    postExpand = false;
                    if (!expand)
                    {
                        btnFold.PerformClick();
                    }
                }

                GDI.UpdateWindow();
            }
        }
Exemplo n.º 4
0
 private void FrmNewsDialog_Load(object sender, EventArgs e)
 {
     gdi = new GdiSystem(this);
     draw();
     gdi.UpdateWindow();
 }
Exemplo n.º 5
0
 private void renderTimer_Tick(object sender, EventArgs e)
 {
     draw();
     gdi.UpdateWindow();
 }