中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁 > news >正文

關(guān)于網(wǎng)站建設(shè)相關(guān)文章武漢 網(wǎng)絡(luò) 推廣

關(guān)于網(wǎng)站建設(shè)相關(guān)文章,武漢 網(wǎng)絡(luò) 推廣,縣政府網(wǎng)站建設(shè)管理工作總結(jié),淮安建設(shè)局網(wǎng)站描述:C# winform軟件使用了chartcontrol控件,在使用Timer 動(dòng)態(tài)為圖表添加點(diǎn)時(shí),報(bào)錯(cuò)(有時(shí)報(bào)錯(cuò),有時(shí)不報(bào)錯(cuò)) 報(bào)錯(cuò)內(nèi)容如下: System.ArgumentOutOfRangeException:“指定的參數(shù)已超出有效值的范圍…

描述:C# winform軟件使用了chartcontrol控件,在使用Timer 動(dòng)態(tài)為圖表添加點(diǎn)時(shí),報(bào)錯(cuò)(有時(shí)報(bào)錯(cuò),有時(shí)不報(bào)錯(cuò))

報(bào)錯(cuò)內(nèi)容如下:

System.ArgumentOutOfRangeException:“指定的參數(shù)已超出有效值的范圍。

Arg_ParamName_Name”

System.ArgumentOutOfRangeException

? HResult=0x80131502

? Message=指定的參數(shù)已超出有效值的范圍。

Arg_ParamName_Name

? Source=DevExpress.Charts.v18.1.Core

? StackTrace:

? ?在 DevExpress.Charts.Native.RefinedPointCollection.InsertRange(Int32 index, ICollection`1 collection)

? ?在 DevExpress.Charts.Native.CollectionManager.InsertSeriesPoints(IPointProcessor processor, Int32 insertIndex, ICollection`1 insertPoints)

? ?在 DevExpress.Charts.Native.CollectionManager.UpdateCollections(IPointProcessor processor, SeriesPointsCollectionAction updateAction)

? ?在 DevExpress.Charts.Native.PointsProcessor.UpdatePoints(SeriesPointsCollectionAction updateAction)

? ?在 DevExpress.Charts.Native.SeriesController.ContextCalculator.ActionsExecutor.UpdateSeriesPointsCollection(SeriesPointsCollectionActionBase update)

? ?在 DevExpress.Charts.Native.SeriesController.ContextCalculator.ActionsExecutor.Execute()

? ?在 DevExpress.Charts.Native.SeriesController.ContextCalculator.CalculateContext(ChartUpdateAggregator updateAggregator)

? ?在 DevExpress.Charts.Native.SeriesController.UpdatesExecutor.Execute(ChartUpdateAggregator updateAggregator)

? ?在 DevExpress.Charts.Native.SeriesController.CommitTransaction(Boolean loading)

? ?在 DevExpress.XtraCharts.Native.ViewController.ApplyChangesCore()

? ?在 DevExpress.XtraCharts.Native.ViewController.ApplyChanges()

? ?在 DevExpress.XtraCharts.Native.ViewController.ApplyChangesBeforeRender()

? ?在 DevExpress.XtraCharts.Native.Chart.DrawContent(Graphics graphics, INativeGraphics nativeGraphics, Rectangle bounds, Rectangle windowsBounds, Boolean lockDrawingHelper, Boolean useImageCache, GraphicsQuality graphicsQuality)

? ?在 DevExpress.XtraCharts.Native.Chart.DrawContent(Graphics graphics, Rectangle bounds, Boolean useImageCache)

? ?在 DevExpress.XtraCharts.ChartControl.OnPaint(PaintEventArgs e)

? ?在 System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)

? ?在 System.Windows.Forms.Control.WmPaint(Message& m)

? ?在 System.Windows.Forms.Control.WndProc(Message& m)

? ?在 DevExpress.XtraCharts.ChartControl.WndProc(Message& m)

? ?在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

? ?在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

? ?在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

解決辦法:DevExpress 中ChartControl 在生成Chart 和動(dòng)態(tài)更新Chart 時(shí),只適用于同 一個(gè)主線程中.

將System.Timers.Timer 替換為?System.Windows.Forms.Timer 即可。

參考官方回答:ArgumentOutOfRangeException on chart repaint. | DevExpress SupportHi Support, I get an ArgumentOutOfRangeException for an invalid index when a chart repaints. The call stack?follows bellow. I know it is prahttps://supportcenter.devexpress.com/ticket/details/t733964/argumentoutofrangeexception-on-chart-repaint

ArgumentOutOfRangeException on chart repaint. | DevExpress Support

官方技術(shù)支持建議 綁定數(shù)據(jù)和圖形控件在同一線程。

解決:在訂閱事件方法中調(diào)用this.BeginInvoke()方法,在委托內(nèi)進(jìn)行數(shù)據(jù)和圖形處理。

引申:

1、System.Windows.Forms:

  System.Windows.Forms命名空間下的Timer控件,它直接繼承自Componet。Timer控件只有綁定了Tick事件和設(shè)置Enabled=True后才會(huì)自動(dòng)計(jì)時(shí),停止計(jì)時(shí)可以用Stop()方法控制,通過Stop()停止之后,如果想重新計(jì)時(shí),可以用Start()方法來啟動(dòng)計(jì)時(shí)器。Timer控件和它所在的Form屬于同一個(gè)線程;


2、System.Timers.Timer:

  System.Timers命名空間下的Timer類。System.Timers.Timer類:定義一個(gè)System.Timers.Timer對象,然后綁定Elapsed事件,通過Start()方法來啟動(dòng)計(jì)時(shí),通過Stop()方法或者Enable=false停止計(jì)時(shí)。AutoReset屬性設(shè)置是否重復(fù)計(jì)時(shí)(設(shè)置為false只執(zhí)行一次,設(shè)置為true可以多次執(zhí)行)。Elapsed事件綁定相當(dāng)于另開了一個(gè)線程,也就是說在Elapsed綁定的事件里不能訪問其它線程里的控件(需要定義委托,通過Invoke調(diào)用委托訪問其它線程里面的控件)。
?

http://www.risenshineclean.com/news/63937.html

相關(guān)文章:

  • 南京網(wǎng)站流量優(yōu)化輕松seo優(yōu)化排名 快排
  • 建設(shè)公司網(wǎng)站要注意哪些杭州網(wǎng)站排名提升
  • 化妝品網(wǎng)站建設(shè)項(xiàng)目計(jì)劃書今日新聞?lì)^條
  • wordpress建站速度提升免費(fèi)推廣途徑與原因
  • 深圳網(wǎng)站設(shè)計(jì)價(jià)格表優(yōu)化大師下載舊版本安裝
  • 山東德州如何網(wǎng)站建設(shè)教程qq群排名優(yōu)化
  • 廣州做和改版網(wǎng)站的公司網(wǎng)上賣貨的平臺有哪些
  • 好用的wordpress代碼編輯器河南seo外包
  • phpcms 做購物網(wǎng)站谷歌seo優(yōu)化公司
  • html京東頁面制作深圳seo優(yōu)化排名優(yōu)化
  • 貴陽 網(wǎng)站建設(shè)推廣百度百科
  • 廊坊哪些公司做網(wǎng)站百度商家版下載
  • 一線城市網(wǎng)站建設(shè)費(fèi)用高長春網(wǎng)站seo公司
  • 怎么快速開發(fā)一個(gè)網(wǎng)站典型的網(wǎng)絡(luò)營銷案例
  • 教做衣服的網(wǎng)站有哪些網(wǎng)頁搜索
  • 越城網(wǎng)站建設(shè)公司陜西網(wǎng)站建設(shè)網(wǎng)絡(luò)公司
  • 煙臺專業(yè)做網(wǎng)站公司有哪些微博推廣技巧
  • 純文本網(wǎng)站連接北京建站公司
  • 禁用wordpress插件更新網(wǎng)站關(guān)鍵詞優(yōu)化公司
  • 自個(gè)做網(wǎng)站教程濰坊快速網(wǎng)站排名
  • 上海專業(yè)網(wǎng)站推廣公司長春網(wǎng)站優(yōu)化咨詢
  • 滄州網(wǎng)站建設(shè)制作設(shè)計(jì)優(yōu)化百度瀏覽器電腦版
  • 網(wǎng)站設(shè)計(jì)建設(shè)公司廣州seo優(yōu)化排名公司
  • 在線做漢字頭像的網(wǎng)站合肥瑤海區(qū)
  • 風(fēng)水網(wǎng)站開發(fā)登錄注冊入口
  • 網(wǎng)站換空間 百度快照倒退一年多 怎么回事百度搜索指數(shù)排行榜
  • 做網(wǎng)站資源知乎seo關(guān)鍵詞挖掘工具
  • 網(wǎng)站開發(fā)主管待遇優(yōu)化大師安卓版
  • 建正建設(shè)官方網(wǎng)站友情鏈接有什么用
  • 湖南做網(wǎng)站問磐石網(wǎng)絡(luò)專業(yè)鞏義網(wǎng)絡(luò)推廣外包