Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the FlashCapture class.
        /// </summary>
        /// <param name="formSize">A <see cref="Size"/> with the new size for this dialog.</param>
        /// <param name="filename">A <see cref="string"/> with the movie file to load (including path).</param>
        public FlashCapture(Size formSize, string filename)
        {
            this.InitializeComponent();
            this.movieFile = filename;
            this.Size      = formSize;
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FlashCapture));
            this.flashObject = new AxFlashControl();
            ((System.ComponentModel.ISupportInitialize) this.flashObject).BeginInit();
            this.flashObject.Dock     = System.Windows.Forms.DockStyle.Fill;
            this.flashObject.Enabled  = true;
            this.flashObject.Location = new System.Drawing.Point(0, 0);
            this.flashObject.Name     = "flashObject";
            this.flashObject.OcxState = (System.Windows.Forms.AxHost.State)resources.GetObject("flashObject.OcxState");
            this.flashObject.Size     = new System.Drawing.Size(300, 200);
            this.flashObject.TabIndex = 0;
            ((System.ComponentModel.ISupportInitialize) this.flashObject).EndInit();
            this.Controls.Add(this.flashObject);

            this.Location = new Point(Screen.PrimaryScreen.WorkingArea.Width, 0);
        }
Exemplo n.º 2
0
    /// <summary>
    /// Initializes a new instance of the FlashCapture class.
    /// </summary>
    /// <param name="formSize">A <see cref="Size"/> with the new size for this dialog.</param>
    /// <param name="filename">A <see cref="string"/> with the movie file to load (including path).</param>
    public FlashCapture(Size formSize, string filename)
    {
      this.InitializeComponent();
      this.movieFile = filename;
      this.Size = formSize;
      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FlashCapture));
      this.flashObject = new AxFlashControl();
      ((System.ComponentModel.ISupportInitialize)this.flashObject).BeginInit();
      this.flashObject.Dock = System.Windows.Forms.DockStyle.Fill;
      this.flashObject.Enabled = true;
      this.flashObject.Location = new System.Drawing.Point(0, 0);
      this.flashObject.Name = "flashObject";
      this.flashObject.OcxState = (System.Windows.Forms.AxHost.State)resources.GetObject("flashObject.OcxState");
      this.flashObject.Size = new System.Drawing.Size(300, 200);
      this.flashObject.TabIndex = 0;
      ((System.ComponentModel.ISupportInitialize)this.flashObject).EndInit();
      this.Controls.Add(this.flashObject);

      this.Location = new Point(Screen.PrimaryScreen.WorkingArea.Width, 0);
    }
Exemplo n.º 3
0
 /// <summary>
 /// This method initializes member of this class.
 /// </summary>
 private void IntializeFields()
 {
   this.flashControl = new AxFlashControl();
   this.currentTransform = new Matrix();
   this.Filepath = string.Empty;
   this.Filename = string.Empty;
   this.disposing = false;
 }
Exemplo n.º 4
0
    /// <summary>
    /// This method loads the movie, adds the flashobject to the controls
    /// controls list and puts a message filter into the Application
    /// message stack to push all messages sent to the flash object 
    /// also to the owning parent.
    /// </summary>
    /// <param name="control">The <see cref="Control"/> this flash object
    /// should be hosted on.</param>
    /// <param name="recreateFlash"><strong>True</strong>,
    /// if this function is called from separate thread to avoid error.</param>
    /// <param name="graphicsTransform">A <see cref="Matrix"/> with the
    /// transform of the canvas to display this activeX object.</param>
    public void InitializeOnControl(Control control, bool recreateFlash, Matrix graphicsTransform)
    {
      if (recreateFlash)
      {
        if (this.flashControl != null)
        {
          this.flashControl.Dispose();
        }

        this.flashControl = new AxFlashControl();
      }

      this.flashControl.Bounds = GetTransformedBounds(graphicsTransform, this.Bounds);

      if (control.InvokeRequired)
      {
        control.Invoke(new AddDelegate(control.Controls.Add), this.flashControl);
      }
      else
      {
        control.Controls.Add(this.flashControl);
      }

      this.flashControl.Visible = true;

      // Put it in the background
      control.Controls.SetChildIndex(this.flashControl, control.Controls.Count - 1);

      this.LoadMovie();

      // Initialize controls surface handle
      this.flashControl.CreateWindowHandle();
    }