Ejemplo n.º 1
0
 private void ShowXTabs(int x, double tabWidth)
 {
     for (int index = 0; index < x; ++index)
     {
         AppTabButton appTabButton1 = this.mDictTabs.Values.First <AppTabButton>();
         foreach (AppTabButton appTabButton2 in this.mDictTabs.Values)
         {
             if (this.mHiddenButtons.Children.Contains((UIElement)appTabButton2))
             {
                 appTabButton1 = appTabButton2;
                 break;
             }
         }
         appTabButton1.ResizeButton(tabWidth);
         appTabButton1.UpdateUIForDropDown(false);
         if (!this.mPanel.Children.Contains((UIElement)appTabButton1))
         {
             this.mHiddenButtons.Children.Remove((UIElement)appTabButton1);
             if (appTabButton1.mTabType == TabType.HomeTab)
             {
                 this.mPanel.Children.Insert(0, (UIElement)appTabButton1);
             }
             else
             {
                 this.mPanel.Children.Add((UIElement)appTabButton1);
             }
         }
     }
 }
Ejemplo n.º 2
0
 private void HideXTabs(int x)
 {
     for (int index1 = 0; index1 < x; ++index1)
     {
         AppTabButton appTabButton1 = this.mDictTabs.Values.Last <AppTabButton>();
         for (int index2 = this.mDictTabs.Count - 1; index2 >= 0; --index2)
         {
             AppTabButton appTabButton2 = this.mDictTabs.ElementAt <KeyValuePair <string, AppTabButton> >(index2).Value;
             if (this.mPanel.Children.Contains((UIElement)appTabButton2))
             {
                 appTabButton1 = appTabButton2;
                 break;
             }
         }
         appTabButton1.UpdateUIForDropDown(true);
         if (!this.mHiddenButtons.Children.Contains((UIElement)appTabButton1))
         {
             this.mPanel.Children.Remove((UIElement)appTabButton1);
             this.mHiddenButtons.Children.Add((UIElement)appTabButton1);
         }
     }
 }