//_________________________________________________________________________ private void BGetErr_Click(object sender, EventArgs e) { CBErrors.Items.Clear(); TErrors Err = Global.Errors; //AXONIM.ScanParamOfDevicves. int iNumErr = 0; if (Err == null) { CBErrors.Items.Add("Модуль ошибок не создан."); } else { List <Exception> ErrDRV = Err.Get(); iNumErr = ErrDRV.Count; for (int i = 0; i < iNumErr; i++) { try { CBErrors.Items.Add(ErrDRV[i].Message); } catch (Exception) { } } } LNumErr.Text = iNumErr.ToString(); if (CBErrors.Items.Count > 0) { CBErrors.SelectedIndex = 0; } }
//_________________________________________________________________________ private void BClrErr_Click(object sender, EventArgs e) { TErrors Err = Tdrv.Errors; Err.Clear(); LNumErr.Text = "0"; }
/// <summary> /// Initialize program & debug objects /// </summary> /// <param name="Program"></param> public void NewProgram(String Program) { ProgramErrors = new TErrors(Globals, Program); ProgramErrors.cleanProcess(); ProgramDebug = new TDebug(Globals, Program); ProgramDebug.cleanProcess(); }
//_________________________________________________________________________ private void BClrErr_Click(object sender, EventArgs e) { //DRV.Init (null); TErrors Err = Global.Errors; Err.Clear(); LNumErr.Text = "0"; }
public Result(TErrors errors) { if (errors == null) { throw new ArgumentException("errors was null"); } Errors = errors; }