SourceCode/PROMS/DataLoader/frmErrors.cs
2009-11-04 17:13:27 +00:00

47 lines
993 B
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace DataLoader
{
public partial class frmErrors : Form
{
private Form _MyParent;
public frmErrors(Form myParent)
{
InitializeComponent();
_MyParent = myParent;
}
private List<string> _MyErrors = new List<string>();
public List<string> MyErrors
{
get { return _MyErrors; }
}
string sep = "";
public void Add(string err)
{
_MyErrors.Add(err);
tbErrors.Text += sep + err;
tbErrors.SelectionStart = tbErrors.TextLength;
sep = "\r\n";
Show();
Application.DoEvents();
}
public void Clear()
{
tbErrors.Text = "";
sep = "";
Hide();
}
private void frmErrors_Load(object sender, EventArgs e)
{
Rectangle rec = Screen.GetWorkingArea(this);
Top = _MyParent.Top;
Left = _MyParent.Right + Width > rec.Right ? rec.Right - Width : _MyParent.Right;
}
}
}