Exemple #1
0
        public void Drag(Action <DragCallback> doneDragging)
        {
            FormDrag formDrag = new FormDrag(this);

            formDrag.DoneDragging = doneDragging;
            formDrag.ShowDialog();
        }
        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;
        }
Exemple #3
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;
        }
Exemple #4
0
 /// <summary>
 /// Drag to upload
 /// </summary>
 /// <param name="doneDragging">Dragging callback</param>
 public void Drag(Action<DragCallback> doneDragging)
 {
     FormDrag formDrag = new FormDrag(this);
     formDrag.DoneDragging = doneDragging;
     formDrag.ShowDialog();
 }
Exemple #5
0
 /// <summary>
 /// Drag to upload
 /// </summary>
 /// <param name="doneDragging">Dragging callback</param>
 public void Drag(Action<DragCallback> doneDragging, bool bAnimationOnly = false)
 {
     FormDrag formDrag = new FormDrag(this);
       formDrag.DoneDragging = doneDragging;
       formDrag.AnimationOnly = bAnimationOnly;
       formDrag.ShowDialog();
 }