Inheritance: System.Windows.Forms.Form
示例#1
0
        public FormAnimation(FormDrag dragForm, Rectangle rect, Action <DragCallback> callback)
        {
            InitializeComponent();

            this.addon    = dragForm.addon;
            this.dragForm = dragForm;

            this.timerFrame.Interval = 1000 / dragForm.settings.GetInt("DragAnimFPS");

            rect.Width  -= rect.Width % 4;
            rect.Height -= rect.Height % 4;

            this.screenRectangle = rect;
            this.doneDragging    = callback;

            this.Left = this.screenRectangle.X;
            this.Top  = this.screenRectangle.Y + this.screenRectangle.Height + 14;

            if (this.Top + this.Height > Screen.PrimaryScreen.WorkingArea.Height)
            {
                this.Top      = this.screenRectangle.Y - this.Height - 14;
                spawnLocation = 1;
            }

            Point offset = screenOffset();

            this.Left += offset.X;
            this.Top  += offset.Y;

            this.animBox       = new FormAnimationBox(rect);
            this.animBox.Left += offset.X;
            this.animBox.Top  += offset.Y;
            this.animBox.Show();

            this.trackScale.Value = dragForm.settings.GetInt("DragAnimScale");

            if (dragForm.settings.GetBool("DragAnimAuto"))
            {
                buttonRecord_Click(null, null);
            }

            initialized = true;
        }
示例#2
0
        public FormAnimation(FormDrag dragForm, Rectangle rect, Action<DragCallback> callback)
        {
            InitializeComponent();

            this.addon = dragForm.addon;
            this.dragForm = dragForm;

            this.timerFrame.Interval = 1000 / dragForm.settings.GetInt("DragAnimFPS");

            rect.Width -= rect.Width % 4;
            rect.Height -= rect.Height % 4;

            this.screenRectangle = rect;
            this.doneDragging = callback;

            this.Left = this.screenRectangle.X;
            this.Top = this.screenRectangle.Y + this.screenRectangle.Height + 14;

            if(this.Top + this.Height > Screen.PrimaryScreen.WorkingArea.Height) {
                this.Top = this.screenRectangle.Y - this.Height - 14;
                spawnLocation = 1;
            }

            Point offset = screenOffset();
            this.Left += offset.X;
            this.Top += offset.Y;

            this.animBox = new FormAnimationBox(rect);
            this.animBox.Left += offset.X;
            this.animBox.Top += offset.Y;
            this.animBox.Show();

            this.trackScale.Value = dragForm.settings.GetInt("DragAnimScale");

            if(dragForm.settings.GetBool("DragAnimAuto")) {
                buttonRecord_Click(null, null);
            }

            initialized = true;
        }