我使用C#做了一个监控系统,使用文件来存储系统报警信息,一产生报警立刻写入文件,报警条数一定,所以文件是固定大小的,平时运行挺正常,但是报警多了而且很频繁的时候,就会出错,程序崩溃,弹出错误信息,请高手帮忙解决,非常感激!
报警信息如下:
System.IO._WinIOError(Int32 erroCode,String str)
System.IO.FilrStream.WriteCore(Byte[]buffer,Int32 offset,Int 32 court)
System.IO.File Stream.Flush Write()
System.IO.File Stream.WriteByte(Byte value)
System.IO.Binary Writer .Write(Byte value)
batt.CData. writeAlarm File()
batt.CData. writeAlarm DB(Byte type,Byet id,Single value)
batt.MainForm.lbTimer Timer_Tick(object sender ,EventArgs e)
system.Windows.Forms.Timer._WnPro_(WM wm,Int32 wParam,Int32 IParam)
system.Windows.Forms.Application ThreadContext._Internal Context Messages(WM wm,Int32 wParam,Int32 IParam)
Microsoft.AGL.Form.EVL.Enter MainLoop(Intptr hwnMain)
System.windows.Form.Application.Run(Form frm)
Batt.Program.Main()