using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

using AxSftButtonLib25;
using SftButtonLib25;
using Softelvdm.OLEConvert;

namespace Animations
{
    /// <summary>
    /// Summary description for Form1.
    /// </summary>
    public class Form1 : System.Windows.Forms.Form
    {
        private AxSftButtonLib25.AxSftButton axSftButtonSearch;
        private System.Windows.Forms.Button button1;
        private System.Windows.Forms.Label label1;
        private AxSftButtonLib25.AxSftButton axSftButtonFind;
        private AxSftButtonLib25.AxSftButton axSftButtonDownload;
        private Softelvdm.OCXHelper.SftHelperComponent sftHelperComponent1;
        private System.ComponentModel.IContainer components;

        public Form1()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        protected override void Dispose( bool disposing )
        {
            if( disposing )
            {
                if (components != null) 
                {
                    components.Dispose();
                }
            }
            base.Dispose( disposing );
        }

        #region Windows Form Designer generated code
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
            this.axSftButtonSearch = new AxSftButtonLib25.AxSftButton();
            this.button1 = new System.Windows.Forms.Button();
            this.label1 = new System.Windows.Forms.Label();
            this.axSftButtonFind = new AxSftButtonLib25.AxSftButton();
            this.axSftButtonDownload = new AxSftButtonLib25.AxSftButton();
            this.sftHelperComponent1 = new Softelvdm.OCXHelper.SftHelperComponent(this.components);
            ((System.ComponentModel.ISupportInitialize)(this.axSftButtonSearch)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.axSftButtonFind)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.axSftButtonDownload)).BeginInit();
            this.SuspendLayout();
            // 
            // axSftButtonSearch
            // 
            this.axSftButtonSearch.Location = new System.Drawing.Point(32, 56);
            this.axSftButtonSearch.Name = "axSftButtonSearch";
            this.axSftButtonSearch.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axSftButtonSearch.OcxState")));
            this.axSftButtonSearch.Size = new System.Drawing.Size(136, 64);
            this.axSftButtonSearch.TabIndex = 0;
            // 
            // button1
            // 
            this.button1.DialogResult = System.Windows.Forms.DialogResult.Cancel;
            this.button1.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.button1.Location = new System.Drawing.Point(296, 8);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(64, 24);
            this.button1.TabIndex = 3;
            this.button1.Text = "Close";
            this.button1.Click += new System.EventHandler(this.button1_Click);
            // 
            // label1
            // 
            this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
            this.label1.Location = new System.Drawing.Point(8, 8);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(280, 24);
            this.label1.TabIndex = 2;
            this.label1.Text = "SftButton/OCX And Animations";
            // 
            // axSftButtonFind
            // 
            this.axSftButtonFind.Location = new System.Drawing.Point(224, 72);
            this.axSftButtonFind.Name = "axSftButtonFind";
            this.axSftButtonFind.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axSftButtonFind.OcxState")));
            this.axSftButtonFind.Size = new System.Drawing.Size(96, 88);
            this.axSftButtonFind.TabIndex = 1;
            // 
            // axSftButtonDownload
            // 
            this.axSftButtonDownload.Location = new System.Drawing.Point(88, 152);
            this.axSftButtonDownload.Name = "axSftButtonDownload";
            this.axSftButtonDownload.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axSftButtonDownload.OcxState")));
            this.axSftButtonDownload.Size = new System.Drawing.Size(40, 26);
            this.axSftButtonDownload.TabIndex = 2;
            this.axSftButtonDownload.TabStop = false;
            // 
            // Form1
            // 
            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
            this.CancelButton = this.button1;
            this.ClientSize = new System.Drawing.Size(368, 214);
            this.Controls.Add(this.axSftButtonDownload);
            this.Controls.Add(this.axSftButtonFind);
            this.Controls.Add(this.label1);
            this.Controls.Add(this.button1);
            this.Controls.Add(this.axSftButtonSearch);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.Name = "Form1";
            this.Text = "Softel vdm, Inc. - Animations Sample";
            this.Load += new System.EventHandler(this.Form1_Load);
            ((System.ComponentModel.ISupportInitialize)(this.axSftButtonSearch)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.axSftButtonFind)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.axSftButtonDownload)).EndInit();
            this.ResumeLayout(false);

        }
        #endregion

        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main() 
        {
            Application.Run(new Form1());
        }
        //--locate-marker--

        private void button1_Click(object sender, System.EventArgs e)
        {
            Application.Exit();
        }

        private void Form1_Load(object sender, System.EventArgs e)
        {
            // Define all animations at run-time using the AVIPlay method
            axSftButtonSearch.AVIPlay(1, "..\\Search.avi", 0, -1);
            axSftButtonFind.AVIPlay(1, "..\\FindComp.avi", 0, -1);
            axSftButtonDownload.AVIPlay(1, "..\\Download.avi", 0, -1);
        }

    }
}