public void Stop() { if (impact_loader != null) { impact_loader.Dispose(); impact_loader = null; } }
void OnImpactUpdate(object sender, ImpactLoader.CommitEventArgs e) { var commit = e.Commit; lock (_dataLock) { // UPDATE IMPACT // If week does not exist yet in the impact dictionary if (!_impact.ContainsKey(commit.week)) { // Create it _impact.Add(commit.week, new Dictionary <string, ImpactLoader.DataPoint>()); } // If author does not exist yet for this week in the impact dictionary if (!_impact[commit.week].ContainsKey(commit.author)) { // Create it _impact[commit.week].Add(commit.author, commit.data); } else { // Otherwise just add the changes _impact[commit.week][commit.author] += commit.data; } // UPDATE AUTHORS // If author does not exist yet in the authors dictionary if (!_authors.ContainsKey(commit.author)) { // Create it _authors.Add(commit.author, commit.data); } else { // Otherwise just add the changes _authors[commit.author] += commit.data; } // Add authors to intermediate weeks where they didn't create commits ImpactLoader.AddIntermediateEmptyWeeks(ref _impact, _authors); // UPDATE AUTHORSTACK // If author does not exist yet in the author_stack if (!_authorStack.Contains(commit.author)) { // Add it to the front (drawn first) _authorStack.Insert(0, commit.author); } } UpdatePathsAndLabels(); Invalidate(); }
public void Init(IGitModule module) { _impactLoader = new ImpactLoader(module) { // respect the .mailmap file RespectMailmap = true }; _impactLoader.Updated += OnImpactUpdate; }
public ImpactControl() { impact_loader = new ImpactLoader(); impact_loader.RespectMailmap = true; // respect the .mailmap file impact_loader.Updated += OnImpactUpdate; Clear(); InitializeComponent(); Translate(); // Set DoubleBuffer flag for flicker-free drawing this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.DoubleBuffer, true); MouseWheel += ImpactControl_MouseWheel; }
public ImpactControl() { impact_loader = new ImpactLoader(); impact_loader.Updated += new ImpactLoader.UpdateEventHandler(OnImpactUpdate); authors = new Dictionary <string, ImpactLoader.DataPoint>(); impact = new SortedDictionary <DateTime, Dictionary <string, ImpactLoader.DataPoint> >(); author_stack = new List <string>(); paths = new Dictionary <string, GraphicsPath>(); brushes = new Dictionary <string, SolidBrush>(); line_labels = new Dictionary <string, List <Tuple <PointF, int> > >(); week_labels = new List <Tuple <PointF, DateTime> >(); InitializeComponent(); // Set DoubleBuffer flag for flicker-free drawing this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.DoubleBuffer, true); MouseWheel += new MouseEventHandler(ImpactControl_MouseWheel); }
public void Init(IGitModule Module) { _impactLoader = new ImpactLoader(Module); _impactLoader.RespectMailmap = true; // respect the .mailmap file _impactLoader.Updated += OnImpactUpdate; }