private void newToolStripMenuItem_Click(object sender, EventArgs e)
{
TracePropertiesForm tpf = new TracePropertiesForm();
tpf.StartPosition = FormStartPosition.CenterScreen;
if(tpf.ShowDialog() == DialogResult.OK)
{
if (!permission(tpf))
System.Windows.Forms.MessageBox.Show(string.Format("'{0}' has no correct permission.", tpf.Username),
"Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
else
{
Trace trace = _traceManager.RunProfiler(tpf.ServerName, tpf.Username, tpf.Password, tpf.TraceName, tpf.RawConn, tpf.EventProperties, tpf.FilterProperties);
TraceViewControl tvc = new TraceViewControl();
tvc.Name = "TraceViewControl";
tvc.Trace = trace;
tvc.Dock = DockStyle.Fill;
FATabStripItem item = new FATabStripItem(tvc);
item.Title = tpf.TraceName;
tabStrip.AddTab(item, true);
tabStrip.Enabled = true;
}
}
}