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 Runtime
{
    /// <summary>
    /// Summary description for Form1.
    /// </summary>
    public class Form1 : System.Windows.Forms.Form
    {
        private AxSftButtonLib25.AxSftButton axSftButton1;
        private AxSftButtonLib25.AxSftButton axSftButton2;
        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.axSftButton1 = new AxSftButtonLib25.AxSftButton();
            this.axSftButton2 = new AxSftButtonLib25.AxSftButton();
            this.sftHelperComponent1 = new Softelvdm.OCXHelper.SftHelperComponent(this.components);
            ((System.ComponentModel.ISupportInitialize)(this.axSftButton1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.axSftButton2)).BeginInit();
            this.SuspendLayout();
            // 
            // axSftButton1
            // 
            this.axSftButton1.Location = new System.Drawing.Point(24, 88);
            this.axSftButton1.Name = "axSftButton1";
            this.axSftButton1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axSftButton1.OcxState")));
            this.axSftButton1.Size = new System.Drawing.Size(144, 80);
            this.axSftButton1.TabIndex = 0;
            // 
            // axSftButton2
            // 
            this.axSftButton2.Location = new System.Drawing.Point(184, 88);
            this.axSftButton2.Name = "axSftButton2";
            this.axSftButton2.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axSftButton2.OcxState")));
            this.axSftButton2.Size = new System.Drawing.Size(96, 80);
            this.axSftButton2.TabIndex = 1;
            // 
            // Form1
            // 
            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
            this.ClientSize = new System.Drawing.Size(292, 266);
            this.Controls.Add(this.axSftButton2);
            this.Controls.Add(this.axSftButton1);
            this.Name = "Form1";
            this.Text = "Form1";
            this.Load += new System.EventHandler(this.Form1_Load);
            ((System.ComponentModel.ISupportInitialize)(this.axSftButton1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.axSftButton2)).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 Form1_Load(object sender, System.EventArgs e)
        {
            //  This sample doesn't do anything "useful". Its only purpose
            // is to provide runtime initialization of a SftButton control,
            // so we have some code samples for the properties.

            // It is a lot easier to set properties at design-time using
            // the property pages. Right-click on the control, then select
            // "Properties" from the popup menu to access the property pages.

            // Appearance
            axSftButton1.AVITransparent = true;
            axSftButton1.BorderAlways = true;
            axSftButton1.BorderStyle = SftButtonBorderStyleConstants.borderSftButtonStandard;
            axSftButton1.ButtonStyle = SftButtonStyleConstants.styleSftButtonDropDown;
            axSftButton1.DropDownPressed = false;
            axSftButton1.DropDownStyle = SftButtonDropDownStyleConstants.dropdownstyleSftButtonStandard;
            axSftButton1.FillOrientation = SftButtonOrientationConstants.orientationSftButtonHorizontal;
            axSftButton1.Orientation = SftButtonOrientationConstants.orientationSftButtonHorizontal;
            axSftButton1.Pressed = false;
            axSftButton1.ShowFocus = true;
            axSftButton1.Text = "Code Sample";
            axSftButton1.TextAlignHorz = SftButtonAlignConstants.alignSftButtonCenter;
            axSftButton1.TextAlignVert = SftButtonAlignVertConstants.alignSftButtonVCenter;
            axSftButton1.UseThemes = SftButtonThemesConstants.themesSftButtonNo;
            // Behavior
            axSftButton1.AllowFocus = true;
            axSftButton1.Bounce = SftButtonBounceStyleConstants.bounceSftButtonYes;
            axSftButton1.ClickInterval = 100;
            axSftButton1.DropDownDownClick = true;
            axSftButton1.DropDownFollows = false;
            axSftButton1.DropDownPressed = false;
            axSftButton1.DropDownToggle = false;
            axSftButton1.Enabled = true;
            axSftButton1.Follows = false;
            axSftButton1.OLEDragMode = SftButtonOLEDragModeConstants.OLEDragSftButtonNone;
            axSftButton1.OLEDropMode = SftButtonOLEDropModeConstants.OLEDropSftButtonNone;
            axSftButton1.RightToLeft = false;
            axSftButton1.Toggle = false;
            // Colors
            axSftButton1.BackColor = SystemColors.Control;
            axSftButton1.BackColorStart = Color.Green;
            axSftButton1.BackColorEnd = Color.Blue;
            axSftButton1.BackColorFocus = SystemColors.Control;
            axSftButton1.BackColorFocusStart = Color.Red;
            axSftButton1.BackColorFocusEnd = Color.Green;
            axSftButton1.BackColorHover = SystemColors.Control;
            axSftButton1.BackColorHoverStart = Color.Yellow;
            axSftButton1.BackColorHoverEnd = Color.Cyan;
            axSftButton1.BackColorPressed = SystemColors.Control;
            axSftButton1.DarkEdgeColor = SystemColors.ControlDark;
            axSftButton1.ForeColor = Color.Black;
            axSftButton1.ForeColorGrayed = Color.Gray;
            axSftButton1.ForeColorDownArrow = Color.Blue;
            axSftButton1.ForeColorPressed = Color.Black;
            axSftButton1.LightEdgeColor = SystemColors.ControlLight;
            axSftButton1.ShadowEdgeColor = SystemColors.ControlDarkDark;
            axSftButton1.WhiteEdgeColor = SystemColors.ControlLightLight;        
        }
    }
}