Example #1
0
 public void GenerateUI(QCV.Base.IFilter instance)
 {
     _layouter.Controls.Clear();
       MethodInfo[] event_methods = QCV.Base.MethodInfoScanner.FindEventMethods(instance);
       foreach (MethodInfo mi in event_methods) {
     Button b = new Button();
     b.AutoSize = true;
     b.Text = mi.Name.Substring(2); // Remove On
     var lambda_mi = mi;
     var lambda_instance = instance;
     b.Click += new EventHandler((sender, ev) => {
       _cache.Add(lambda_instance, lambda_mi);
     });
     _layouter.Controls.Add(b);
       }
 }
Example #2
0
 public void ExecutePendingEvents(QCV.Base.IFilter instance, Dictionary<string, object> bundle)
 {
     _ev_cache.InvokeEvents(instance, bundle);
 }
Example #3
0
 public void CacheEvent(QCV.Base.IFilter instance, System.Reflection.MethodInfo mi)
 {
     _ev_cache.Add(instance, mi);
 }
Example #4
0
 /// <summary>
 /// Cache an event.
 /// </summary>
 /// <param name="instance">Target filter</param>
 /// <param name="mi">Reflected method info</param>
 public void Add(QCV.Base.IFilter instance, MethodInfo mi)
 {
     this.AddRange(instance, new MethodInfo[] { mi });
 }