当前位置: 首页 > news >正文

wordpress网址变超链接深圳seo网络公司

wordpress网址变超链接,深圳seo网络公司,crm免费,桂林市防疫最新政策1.说明#xff1a;在WPF中#xff0c;文件下载时需要显示下载进度#xff0c;由于系统自带的条型进度条比较占用空间#xff0c;改用圆形的进度条,需要在DrawingVisual上呈现。 运行的效果如图#xff1a; private Point GetPointOnCir(Point CenterPoint, double r, doub…1.说明在WPF中文件下载时需要显示下载进度由于系统自带的条型进度条比较占用空间改用圆形的进度条,需要在DrawingVisual上呈现。 运行的效果如图 private Point GetPointOnCir(Point CenterPoint, double r, double angel){Point p new Point();p.X Math.Sin(angel * Math.PI / 180) * r CenterPoint.X;p.Y CenterPoint.Y - Math.Cos(angel * Math.PI / 180) * r;return p;}private Geometry drawingArc(Point bigCirclefirstPoint, Point bigCirclesecondPoint, Point smallCirclefirstPoint, Point smallCirclesecondPoint, double bigCircleRadius, double smallCircleRadius,bool isLargeArc){PathFigure pathFigure new PathFigure { IsClosed true };pathFigure.StartPoint bigCirclefirstPoint;pathFigure.Segments.Add(new ArcSegment{Point bigCirclesecondPoint,IsLargeArc isLargeArc,Size new Size(bigCircleRadius, bigCircleRadius),SweepDirection SweepDirection.Clockwise});pathFigure.Segments.Add(new LineSegment { Point smallCirclesecondPoint });pathFigure.Segments.Add(new ArcSegment{Point smallCirclefirstPoint,IsLargeArc isLargeArc,Size new Size(smallCircleRadius, smallCircleRadius),SweepDirection SweepDirection.Counterclockwise});PathGeometry pathGeometry new PathGeometry();pathGeometry.Figures.Add(pathFigure);return pathGeometry;}//根据已保存的大小和文件总大小来计算下载进度百分比private Geometry GetGeometry(){bool isLargeArc false;double percent double.Parse(Convert.ToString(savedSize)) / double.Parse(Convert.ToString(fileSize));PercentString string.Format({0}%,Math.Round(percent*100,0));double angel percent * 360D;if(angel180)isLargeArctrue;//double angel 45;double bigR 16;double smallR 13;Point centerPoint vl.StartPoint;//new Point(100, 300);Point firstpoint GetPointOnCir(centerPoint, bigR, 0);Point secondpoint GetPointOnCir(centerPoint, bigR, angel);Point thirdpoint GetPointOnCir(centerPoint, smallR, 0);Point fourpoint GetPointOnCir(centerPoint, smallR, angel);return drawingArc(firstp, secondpoint, thirdpoint, fourpoint, bigR, smallR, isLargeArc);}   画圆形的进度条实际上是动态画两个同心圆根据文件保存的百分比来计算画弧形的角度的大小需要7个参数大圆的半径bigR 、小圆的半径smallR 、同心圆的圆心centerPoint 、大圆的起始点firstpoint 、大圆的结束点secondpoint 、小圆的起始点thirdpoint、小圆的结束点fourpoint     最后需要使用DrawingContext把圆给画出来 public Visual drawShape(){DrawingVisual drawingWordsVisual new DrawingVisual();DrawingContext drawingContext drawingWordsVisual.RenderOpen();try{if (savedSize ! fileSize){drawingContext.DrawEllipse(null, new Pen(Brushes.Gray, 3), vl.StartPoint, 13, 13);drawingContext.DrawGeometry(vs.VisualBackgroundBrush, vs.VisualFramePen, GetGeometry());FormattedText formatWords new FormattedText(PercentString, System.Globalization.CultureInfo.CurrentCulture, FlowDirection.LeftToRight, new Typeface(vs.WordsFont.Name), vs.WordsFont.Size, currentStyle.VisualBackgroundBrush);formatWords.SetFontWeight(FontWeights.Bold);Point startPoint new Point(vl.StartPoint.X - formatWords.Width / 2, vl.StartPoint.Y - formatWords.Height / 2);drawingContext.DrawText(formatWords, startPoint);}else{drawingContext.DrawEllipse(null, new Pen(Brushes.Green, 3), vl.StartPoint, 16, 16);FormattedText formatWords new FormattedText(Open, System.Globalization.CultureInfo.CurrentCulture, FlowDirection.LeftToRight, new Typeface(vs.WordsFont.Name), vs.WordsFont.Size, Brushes.Red);formatWords.SetFontWeight(FontWeights.Bold);Point startPoint new Point(vl.StartPoint.X - formatWords.Width / 2, vl.StartPoint.Y - formatWords.Height / 2);drawingContext.DrawText(formatWords, startPoint);}}catch (Exception ex){new SaveExceptionInfo().SaveLogAsTXTInfoex(ex.Message);}finally{drawingContext.Close();}return drawingWordsVisual;} 转载于:https://www.cnblogs.com/goxmpx/p/3741915.html
http://www.yutouwan.com/news/142726/

相关文章:

  • php商城网站的要求与数据个人网站的基本风格有哪些
  • 怎样做二维码网站网站公司如何推广网站
  • 商城网站的搜索记录代码怎么做给建设单位造成损失的
  • 胶州企业网站建设滁州做网站价格
  • 宝安网站设计制作wordpress界面404
  • 外贸企业网站推广公司上海金融网站建设
  • 抖音网站开发南京市建设工程网站
  • 建设com网站Sage WordPress商城主题
  • 网站方案原则华为弹性云做网站
  • 双语版网站引导页长春市网络科技有限公司
  • 中小企业网站建设好么企业安全文化建设的内容
  • 利用qq 群做网站推广希爱力双效片用后感受
  • 合肥微信网站制作长春火车站什么时候通车
  • 网站建设的规划和流程jsp 网站开发教程
  • 青海建设信用信息服务网站网站收录查询入口
  • 网站公司简介模板免费下载电商培训基地
  • 如何做后台网站的教程网站添加视频
  • 网站建设中html网页个人导航网站怎么备案
  • 无锡网站制作公司网片加工机器
  • wordpress文章半透明福州seo建站
  • 淘宝搜索热词排名seo标题优化
  • dede网站logo怎么改锦州市网站建设
  • 免费建设论坛网站做招聘网站的需求分析
  • 热门搜索关键词怎样优化网站自然排名
  • 用asp做旅游网站建筑工程发布网站
  • 汕头网站开发定制大理住房和城乡建设局网站
  • dedecms确定网站风格网站建设 中企动力 常州
  • 建设招标项目常挂网站有哪些网站的简介怎么在后台炒做
  • xxx网站策划书线上引流的八种推广方式
  • 自己做网站写文章如何增加网站的权重