コード例 #1
0
    public void PutForm_Initialize(Point _location, Bitmap _m_PageA, Bitmap _m_PageB, double transparency, int _AnimationSpeed, int _rotorType)
    {
        rotorType = _rotorType;

        m_PageA = _m_PageA;
        m_PageB = _m_PageB;
        m_X1    = 0;
        m_X2    = m_PageA.Width;
        m_Y1    = 0;
        m_Y2    = m_PageA.Height;

        c_X = 1;
        c_Y = 1;

        _transparency  = transparency;
        AnimationSpeed = _AnimationSpeed;

        Put_form = new PerPixelAlphaForm();
        Put_form.ShowInTaskbar = false;
        Put_form.ShowIcon      = false;
        Put_form.SetBitmap(m_PageA, (byte)_transparency);
        Put_form.Location = _location;
        Put_form.Show();

        Timer1          = new System.Windows.Forms.Timer();
        Timer1.Interval = 5;
        Timer1.Tick    += Timer1_Tick;
        Timer1.Enabled  = true;
    }
コード例 #2
0
    private void ck_All()
    {
        bool ck = false;

        while (true)
        {
            for (int i = 0; i < 90; i++)
            {
                ck = begin[i];
                if (!ck)
                {
                    break;
                }
            }
            if (ck)
            {
                Put_form.CrossThreadCalls(() => {
                    Put_form.Location = Point.Round(set[0]);
                    Put_form.SetBitmap(display[0], (byte)_transparency);
                    Put_form.Show();
                    _BeginPeriod((uint)_speed);
                    if (_rotationtype == 0)
                    {
                        for (int i = 0; i < 90; i++)
                        {
                            Put_form.Location = Point.Round(set[i]);
                            Put_form.SetBitmap(display[i], (byte)_transparency);
                            Thread.Sleep(_speed);
                        }
                    }
                    else
                    if (_rotationtype == 1)
                    {
                        for (int i = 89; i >= 0; i--)
                        {
                            Put_form.Location = Point.Round(set[i]);
                            Put_form.SetBitmap(display[i], (byte)_transparency);
                            Thread.Sleep(_speed);
                        }
                    }
                    _EndPeriod((uint)_speed);
                });
                _formList[0].listForm.CrossThreadCalls(() => {
                    _formList[0].listForm.SetOpacity(_transparency / 255);
                });
                break;
            }
        }
    }
コード例 #3
0
    private void chg_Half(int half)
    {
        PerPixelAlphaForm Put_form = new PerPixelAlphaForm();

        Put_form.ShowInTaskbar = false;
        Put_form.ShowIcon      = false;
        Put_form.Location      = Point.Round(set[0]);
        Put_form.SetBitmap(display[89 * half], (byte)_transparency);
        Put_form.Show();

        _formList[half].listForm.CrossThreadCalls(() =>
        {
            _formList[half].listForm.SetOpacity(0);
        });

        _BeginPeriod((uint)_speed);
        if (half == 0)
        {
            for (int i = 0; i < 90; i++)
            {
                Put_form.Location = Point.Round(set[i]);
                Put_form.SetBitmap(display[i], (byte)_transparency);
                Thread.Sleep(_speed);
            }
        }
        else
        if (half == 1)
        {
            for (int i = 89; i >= 0; i--)
            {
                Put_form.Location = Point.Round(set[i]);
                Put_form.SetBitmap(display[i], (byte)_transparency);
                Thread.Sleep(_speed);
            }
        }
        _EndPeriod((uint)_speed);

        int t = 0;

        if (half == 0)
        {
            t = 1;
        }
        _formList[t].listForm.CrossThreadCalls(() =>
        {
            _formList[t].listForm.SetOpacity(_transparency);
        });
    }