Exemplo n.º 1
0
 public void DetailNav()
 {
     try
     {
         int  num  = 0;
         bool flag = true;
         int  i    = 1;
         foreach (Node node in this.data)
         {
             num++;
             if (flag)
             {
                 i             = num;
                 this.NodeName = node.Name_c;
             }
             BACAClient.Template.HisDetail.Nav element = new BACAClient.Template.HisDetail.Nav
             {
                 Index   = num,
                 BgColor = this.typeretrieve.BgColor,
                 First   = flag,
                 Title   = node.Name_c,
                 TypeId  = this.model.TypeId
             };
             element.Click += new BACAClient.Template.HisDetail.Nav.ChangedEventHandler(this.Nav_Click);
             this.Nav.Children.Add(element);
             flag = false;
         }
         this.BindFrame(0, i);
     }
     catch
     {
     }
 }
Exemplo n.º 2
0
 public void ChangNavStyle(int i, int type)
 {
     try
     {
         foreach (UIElement element in this.Nav.Children)
         {
             if (element is BACAClient.Template.HisDetail.Nav)
             {
                 BACAClient.Template.HisDetail.Nav nav = (BACAClient.Template.HisDetail.Nav)element;
                 if (nav.enter == 1)
                 {
                     nav.Arrow.Visibility   = Visibility.Hidden;
                     nav.Name.Foreground    = new BrushConverter().ConvertFromInvariantString("#333333") as Brush;
                     nav.Bg.Background      = Brushes.White;
                     nav.Bg.BorderThickness = new Thickness(0.0, 0.0, 0.0, 2.0);
                     nav.enter = 0;
                 }
                 if (nav.Index == i)
                 {
                     this.NodeName = nav.Title;
                     nav.ChangeStyle();
                     this.BindFrame(0, i);
                 }
             }
         }
     }
     catch
     {
     }
 }
Exemplo n.º 3
0
 private void _SizeChanged(object sender, SizeChangedEventArgs e)
 {
     try
     {
         double num = (((((base.ActualHeight - this.row1.ActualHeight) - this.row2.ActualHeight) - this.ActualHeight) - 36.0) - 10.0) - 30.0;
         if (num < 200.0)
         {
             num = 200.0;
         }
         this.Scroll.MaxHeight = num;
         double num2 = (((base.ActualWidth - 210.0) - 5.0) - (2 * this.count)) / ((double)this.count);
         foreach (UIElement element in this.Nav.Children)
         {
             if (element is BACAClient.Template.HisDetail.Nav)
             {
                 BACAClient.Template.HisDetail.Nav nav = (BACAClient.Template.HisDetail.Nav)element;
                 nav.Width = num2;
             }
         }
     }
     catch
     {
     }
 }