private void EventViewerMenuItem_Click(object sender, EventArgs e)
{
if (evtDialog == null || evtDialog.IsDisposed)
{
evtDialog = null;
evtDialog = new EventViewerDialog();
evtDialog.Owner = this;
//親の中央に表示
Point pos = evtDialog.Location;
pos.X = Convert.ToInt32(this.Location.X + this.Size.Width / 2 - evtDialog.Size.Width / 2);
pos.Y = Convert.ToInt32(this.Location.Y + this.Size.Height / 2 - evtDialog.Size.Height / 2);
evtDialog.Location = pos;
}
evtDialog.EventSource = tw.StoredEvent;
if (!evtDialog.Visible)
{
evtDialog.Show(this);
}
else
{
evtDialog.Activate();
}
this.TopMost = this._cfgCommon.AlwaysTop;
}
#endregion