//member methods
 public /*async*/ void SetNotification(object sender, RecordChangeEventArgs args)
 {
     if (args.NewChart.ChartId == this.ChartId)
     {
         this.NotificationStyle = "display: inline-flex;";
     }
 }
Ejemplo n.º 2
0
        /// <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;
        }
Ejemplo n.º 3
0
 /// <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;
     }
 }
Ejemplo n.º 4
0
 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);
     }
 }
Ejemplo n.º 5
0
        //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);
                });
            }
        }
Ejemplo n.º 6
0
 private void BaseRecord_RecordDeleted(object sender, RecordChangeEventArgs e)
 {
     _historyHandler.Remove(e.Record);
 }
Ejemplo n.º 7
0
 private void BaseRecord_RecordDescChanged(object sender, RecordChangeEventArgs e)
 {
     PluginTree.RefreshObject(e.Record);
 }
Ejemplo n.º 8
0
 private void BaseRecord_RecordDeleted(object sender, RecordChangeEventArgs e)
 {
     _historyHandler.Remove(e.Record);
 }
Ejemplo n.º 9
0
 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);
     }
 }
Ejemplo n.º 10
0
 private void BaseRecord_RecordDescChanged(object sender, RecordChangeEventArgs e)
 {
     PluginTree.RefreshObject(e.Record);
 }