//member methods public /*async*/ void SetNotification(object sender, RecordChangeEventArgs args) { if (args.NewChart.ChartId == this.ChartId) { this.NotificationStyle = "display: inline-flex;"; } }
/// <summary> /// Handles the WillChangeRecord event of the underlying Recordset, triggering the control's WillChangeRecord event. /// </summary> /// <param name="eventSender">The object which rises the event.</param> /// <param name="e">The arguments of the event.</param> void Recordset_WillChangeRecord(object eventSender, RecordChangeEventArgs e) { EventStatusEnum status = e.Status; OnWillChangeRecord(e.Reason, ref status, e.NumberOfRecords); e.Status = status; }
/// <summary> /// The OnWillChangeRecord event is called before one or more records (rows) in the Recordset change. /// </summary> /// <param name="reason">The reason of the change.</param> /// <param name="status">A EventStatusEnum value that indicates the state of the ADORecordsetHelper in the moment that the event rose.</param> /// <param name="numRecords">Value indicating the number of records changed (affected).</param> protected void OnWillChangeRecord(EventReasonEnum reason, ref EventStatusEnum status, int numRecords) { if (WillChangeRecord != null) { RecordChangeEventArgs args = new RecordChangeEventArgs(reason, numRecords, status); WillChangeRecord(this, args); status = args.Status; } }
private void BaseRecord_ChildListChanged(object sender, RecordChangeEventArgs e) { if (e.Record == null || e.Record == PluginList.All) // use null record as hint to reset the roots { UpdateRoots(); //PluginTree.RebuildAll(true); GC.Collect(); // clean up memory after releasing plugins } else { PluginTree.RefreshObject(e.Record); } }
//member methods public async void ChangeChartRecord(object sender, RecordChangeEventArgs args) { if (args.NewChart != null) { chartToUpdate = await ChartService.GetChart(args.NewChart.ChartId); chartToUpdate.ChartOptions = args.NewChart.ChartOptions; await InvokeAsync(() => { ChartService.UpdateChart(chartToUpdate.ChartId, chartToUpdate.ChartOptions); }); } }
private void BaseRecord_RecordDeleted(object sender, RecordChangeEventArgs e) { _historyHandler.Remove(e.Record); }
private void BaseRecord_RecordDescChanged(object sender, RecordChangeEventArgs e) { PluginTree.RefreshObject(e.Record); }