public LogDialog(MessageLog log) { InitializeComponent(); ImageButtonCell status_btn = new ImageButtonCell(); status_btn.FlatStyle = FlatStyle.Flat; logListView.Columns["severity"].CellTemplate = status_btn; logListView.DataSource = log.List; }
public void Parse(IEngineeringCompositionOrObject top, MessageLog log = null, Options options = 0) { ParseCtxt parse = new ParseCtxt(OnHandleTag, options); parse.Log = log; lock (portal) { if (top is PlcBlockGroup) { parse.HandleBlockFolder((PlcBlockGroup)top); } else { parse.HandleDataBlock((PlcBlock)top); } } }
public void ParseAsync(IEngineeringCompositionOrObject top, MessageLog log = null, Options options = 0) { if (worker != null && worker.IsBusy) { return; } worker = new BackgroundWorker(); worker.WorkerSupportsCancellation = true; worker.DoWork += DoWork; worker.RunWorkerCompleted += RunWorkerCompleted; callback_ctxt = SynchronizationContext.Current; ParseCtxt parse = new ParseCtxt(HandleTagAsync, options); parse.Log = log; WorkerArg arg = new WorkerArg(portal, top, parse); worker.RunWorkerAsync(arg); }