Change events args
This commit is contained in:
@ -137,38 +137,38 @@
|
||||
Task.Run(RefreshCampaigns);
|
||||
}
|
||||
|
||||
void OnCampaignStarted(Campaign campaign)
|
||||
void OnCampaignStarted(int campaignId, DateTime startedAt)
|
||||
{
|
||||
InvokeAsync(() =>
|
||||
{
|
||||
var targetCampaign = campaigns?.FirstOrDefault(x => x.Id == campaign.Id);
|
||||
var targetCampaign = campaigns?.FirstOrDefault(x => x.Id == campaignId);
|
||||
if (targetCampaign != null)
|
||||
{
|
||||
targetCampaign.StartedAt = campaign.StartedAt;
|
||||
targetCampaign.StartedAt = startedAt;
|
||||
|
||||
campaignsDataGrid.Reload();
|
||||
}
|
||||
|
||||
if (expandedCampaign != null && expandedCampaign.Id == campaign.Id)
|
||||
if (expandedCampaign != null && expandedCampaign.Id == campaignId)
|
||||
{
|
||||
campaignsDataGrid.CollapseAll();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void OnCampaignProgressStep(Campaign campaign)
|
||||
void OnCampaignProgressStep(int campaignId, int step, int progress)
|
||||
{
|
||||
InvokeAsync(() =>
|
||||
{
|
||||
var targetCampaign = campaigns?.FirstOrDefault(x => x.Id == campaign.Id);
|
||||
var targetCampaign = campaigns?.FirstOrDefault(x => x.Id == campaignId);
|
||||
if (targetCampaign != null)
|
||||
{
|
||||
targetCampaign.Step = campaign.Step;
|
||||
targetCampaign.Progress = campaign.Progress;
|
||||
targetCampaign.Step = step;
|
||||
targetCampaign.Progress = progress;
|
||||
|
||||
campaignsDataGrid.Reload();
|
||||
|
||||
if (expandedCampaign != null && expandedCampaign.Id == campaign.Id)
|
||||
if (expandedCampaign != null && expandedCampaign.Id == campaignId)
|
||||
{
|
||||
campaignsDataGrid.CollapseAll();
|
||||
}
|
||||
@ -176,7 +176,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
void OnCampaignEnded(Campaign campaign)
|
||||
void OnCampaignEnded(int campaignId, Campaign.CampaignType type, DateTime endedAt, string failureReason)
|
||||
{
|
||||
Task.Run(RefreshCampaigns);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user