Esempio n. 1
0
 //public struct BuildImagesInformation
 //{
 //public int HorizonLength;
 //public int UprightLength;
 //}
 //private Thickness CalculateMargins(BuildImagesInformation buildImagesInformation)
 //{
 //return null;
 //}
 private string GetLiveRoomInformation()
 {
     try
     {
         Get.Get        get = new Get.Get();
         var            LiveRoomInformation = get.PageInformation(1);//接口设计失误,先执行以获得总页数
         var            TotalPages          = LiveRoomInformation.TotalPage;
         var            PageSize            = LiveRoomInformation.PageSize;
         BrushConverter brushConverter      = new BrushConverter();
         Brush          brush        = (Brush)brushConverter.ConvertFromString(COLORARGB);
         CornerRadius   cornerRadius = new CornerRadius(CORNERRADIUS);
         //Brush brush = new SolidColorBrush(Color.FromArgb(1, 1, 1, 1));
         Pagination pagination = new Pagination()
         {
             Height       = 28,
             HoverBrush   = brush,
             CornerRadius = cornerRadius,
             Spacing      = SPACING,
             TotalIndex   = TotalPages
         };
     }
     catch (Exception e)
     {
         MessageBox.Show("在构建分页时,遇到错误:" + e.Message);
         return(null);
     }
 }
Esempio n. 2
0
 private bool BuildPaginition()
 {
     try
     {
         Get.Get        get = new Get.Get();
         var            LiveRoomInformation = get.PageInformation(1);//接口设计失误,先执行以获得总页数
         var            TotalPages          = LiveRoomInformation.TotalPage;
         var            PageSize            = LiveRoomInformation.PageSize;
         BrushConverter brushConverter      = new BrushConverter();
         Brush          brush        = (Brush)brushConverter.ConvertFromString(COLORARGB);
         CornerRadius   cornerRadius = new CornerRadius(CORNERRADIUS);
         //Brush brush = new SolidColorBrush(Color.FromArgb(1, 1, 1, 1));
         Pagination pagination = new Pagination()
         {
             Height       = 28,
             HoverBrush   = brush,
             CornerRadius = cornerRadius,
             Spacing      = SPACING,
             TotalIndex   = TotalPages
         };
     }
 }