using System; using System.Collections.Generic; using System.Diagnostics; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace AgraV2 { public class Effect { private string _name; private Panel _toolBox; private List _processingDuration; private Stopwatch _chrono; public string Name { get => _name; set => _name = value; } public Panel ToolBox { get => _toolBox; set => _toolBox = value; } public List ProcessingDuration { get => _processingDuration; set => _processingDuration = value; } public Stopwatch Chrono { get => _chrono; set => _chrono = value; } public Effect(string name, Panel toolBox) { Name = name; ToolBox = toolBox; ProcessingDuration = new List(); Chrono = new Stopwatch(); //I start and stop it so the child can just always use Restart() Chrono.Start();Chrono.Stop(); } public virtual void populatePannel() { //For the childs to explore ToolBox.Controls.Clear(); } public virtual Bitmap[] apply(Bitmap inputBmp) { return new Bitmap[] { inputBmp }; } public override string ToString() { return Name; } } }