private void timer1_Tick(object sender, EventArgs e)
        {
            UIA UIAO = (UIA)panel1.Tag;

            panel1.Location = new Point(XF.CEIO(UIAO.CycleOffset, UIAO.States[UIAO.State].Position0, UIAO.States[UIAO.State].Position1, UIAO.States[UIAO.State].Correction, UIAO.CycleTime), panel1.Location.Y);
            UIAO.Increment();
        }
示例#2
0
 public T2TP(T2Control_TextureSelector _owner, Texture texture = null)
 {
     this.Height        = 60;
     this.Width         = 180;
     this.BackColor     = Color.FromArgb(25, 25, 25);
     this.MouseUp      += T2TP_MouseUp;
     this.MouseEnter   += T2TP_MouseEnter;
     this.MouseLeave   += T2TP_MouseLeave;
     owner              = _owner;
     _texture           = texture;
     Animatior.Interval = 1;
     Animatior.Tick    += Animatior_Tick;
     uia = new UIA {
         CycleOffset = 0,
         CycleTime   = 10,
         State       = 0,
         States      = new List <UIAS>()
         {
             new UIAS(0, this.Width)
         },
         Timer_Handle = Animatior
     };
     APanel = new Panel {
         Size      = new Size(0, 60),
         Location  = new Point(0, 00),
         BackColor = Color.FromArgb(50, 50, 50)
     };
     tp = new PictureBox {
         Anchor   = AnchorStyles.Right,
         Location = new Point(140, 10),
         Size     = new Size(40, 40),
         SizeMode = PictureBoxSizeMode.StretchImage,
         Image    = _texture?.image
     };
     tn = new T2Control_TransparentLabel {
         Text     = _texture?.name,
         Size     = new Size(100, 13),
         Location = new Point(5, 20)//(this.Height / 2) - this.Size.Height),
     };
     tp.MouseEnter += Tp_MouseEnter;
     tp.MouseLeave += Tp_MouseLeave;
     tp.MouseMove  += Tp_MouseMove;
     this.Controls.Add(tp);
     tn.MouseUp += T2TP_MouseUp;
     this.Controls.Add(tn);
     APanel.MouseLeave += new EventHandler(T2TP_MouseLeave);
     APanel.MouseEnter += new EventHandler(T2TP_MouseEnter);
     APanel.MouseUp    += T2TP_MouseUp;
     this.Controls.Add(APanel);
 }