Skip to content

Commit

Permalink
#10 Working on deleting multiple records
Browse files Browse the repository at this point in the history
  • Loading branch information
shytikov committed Nov 7, 2016
1 parent c40af6a commit 32987ea
Showing 1 changed file with 21 additions and 13 deletions.
34 changes: 21 additions & 13 deletions Cinteros.XTB.PluginTraceViewer/PluginTraceViewer.cs
Expand Up @@ -551,22 +551,17 @@ private void deleteSelectedToolStripMenuItem_Click(object sender, EventArgs e)
else
{
// Use 'Execute Multiple' request
if (entities?.Count < 1000)
{
// Only one batch will be needed
}
else
{
// Several batches need to be run
}
}
}

private void NotifyUser()
{
NotifyUser(string.Empty);
}

private void NotifyUser(string text)
{
Invoke(new Action(() =>
{
SendMessageToStatusBar(this, new StatusBarMessageEventArgs(text));
}));
}

private void contextStripMain_Opening(object sender, System.ComponentModel.CancelEventArgs e)
{
var menu = (ContextMenuStrip)sender;
Expand All @@ -584,5 +579,18 @@ private void contextStripMain_Opening(object sender, System.ComponentModel.Cance
deleteSelectedToolStripMenuItem.Enabled = false;
}
}

private void NotifyUser()
{
NotifyUser(string.Empty);
}

private void NotifyUser(string text)
{
Invoke(new Action(() =>
{
SendMessageToStatusBar(this, new StatusBarMessageEventArgs(text));
}));
}
}
}

0 comments on commit 32987ea

Please sign in to comment.