How to save on your DevExpress subscription

by Damiaan Peeters 22. December 2010 18:11

Normally you would guess that the price goes down when you order for a longer period.  Not with DevExpress components.  It depends on the date until when you want your subscription to be extended. 

I made some calculations.  Apparently there can be a difference of more than $ 0,25 PER DAY for your subscription.

image

So how to save with devexpress subscriptions.  You try to find:

  • a coupon code for your devexpress subscription
  • ask a quote
  • find the best date

I hope it helps you Smile

How to extend the TabControl in Windows Forms

by Damiaan Peeters 19. February 2008 15:35

Short post, much code.

In this post I want to show how the TabControl can be extended.  How you can Hide and show a TabPage.

You can use the control like this:

 

if (currentProduct.Product_Compound)
{
tabProduct.ShowTabPage(tabProductCompound);
}
else
{
tabProduct.HideTabPage(tabProductCompound);
}

 

 

[more]

    /// <summary>
    /// A new tabControl
    /// </summary>
    public class TabControl : System.Windows.Forms.TabControl
    {
        /// <summary>
        /// Hides the tab page.
        /// </summary>
        /// <param name="tp">The TabPage</param>
        public void HideTabPage(TabPage tp)
        {
            if (this.TabPages.Contains(tp))
                this.TabPages.Remove(tp);
        }
        /// <summary>
        /// Shows the tab page.
        /// </summary>
        /// <param name="tp">The TabPage</param>
        public void ShowTabPage(TabPage tp)
        {
            ShowTabPage(tp, this.TabPages.Count);
        }
        /// <summary>
        /// Shows the tab page.
        /// </summary>
        /// <param name="tp">The TabPage</param>
        /// <param name="index">The index.</param>
        public void ShowTabPage(TabPage tp, int index)
        {
            if (this.TabPages.Contains(tp)) return;
            InsertTabPage(tp, index);
        }
        /// <summary>
        /// Inserts the tab page.
        /// </summary>
        /// <param name="tabpage">The tabpage.</param>
        /// <param name="index">The index.</param>
        public void InsertTabPage(TabPage tabpage, int index)
        {
            if (index < 0 || index > this.TabCount)
                throw new ArgumentException("Index out of Range.");
            this.TabPages.Add(tabpage);
            if (index < this.TabCount - 1)
                do
                {
                    SwapTabPages(tabpage, (this.TabPages[this.TabPages.IndexOf(tabpage) - 1]));
                }
                while (this.TabPages.IndexOf(tabpage) != index);
            this.SelectedTab = tabpage;
        }
        /// <summary>
        /// Swaps the tab pages.
        /// </summary>
        /// <param name="tp1">The TabPage1.</param>
        /// <param name="tp2">The TabPage2.</param>
        public void SwapTabPages(TabPage tp1, TabPage tp2)
        {
            if (this.TabPages.Contains(tp1) == false || this.TabPages.Contains(tp2) == false)
                throw new ArgumentException("TabPages must be in the TabControls TabPageCollection.");

            int Index1 = this.TabPages.IndexOf(tp1);
            int Index2 = this.TabPages.IndexOf(tp2);
            this.TabPages[Index1] = tp2;
            this.TabPages[Index2] = tp1;

            //Uncomment the following section to overcome bugs in the Compact Framework
            //this.SelectedIndex = this.SelectedIndex;
            //string tp1Text, tp2Text;
            //tp1Text = tp1.Text;
            //tp2Text = tp2.Text;
            //tp1.Text=tp2Text;
            //tp2.Text=tp1Text;

        }
    }

Who.I.am

Certified Umbraco Master, Part of Umbraco Certified partner comm-it, .Net and Azure developer, seo lover. Magician in my spare time.

Month List