Ext.Net.GroupTab.IPostBackDataHandler C# (CSharp) Method

IPostBackDataHandler() private method

private IPostBackDataHandler ( string postDataKey, NameValueCollection postCollection ) : bool
postDataKey string
postCollection System.Collections.Specialized.NameValueCollection
return bool
        bool IPostBackDataHandler.LoadPostData(string postDataKey, NameValueCollection postCollection)
        {
            string val = postCollection[this.ConfigID.ConcatWith("_ActiveTab")];

            if (val.IsNotEmpty())
            {
                int activeTabNum;
                string[] at = val.Split(':');

                if (int.TryParse(at.Length > 1 ? at[1] : at[0], out activeTabNum))
                {
                    int index = this.Items.FindIndex(delegate(Component tab)
                    {
                        return tab.ClientID == at[0];
                    });

                    if (index >= 0)
                    {
                        activeTabNum = index;
                    }
                    else
                    {
                        if (this.Visible)
                        {
                            for (int i = 0; i <= activeTabNum; i++)
                            {
                                if (i < this.Items.Count && !this.Items[i].Visible)
                                {
                                    activeTabNum++;
                                }
                            }
                        }
                    }

                    if (activeTabNum > -1 && this.ActiveTabIndex != activeTabNum)
                    {
                        this.ViewState.Suspend();
                        this.ActiveTabIndex = activeTabNum;
                        this.ViewState.Resume();
                        return true;
                    }
                }
            }

            return false;
        }