Data Loader Error form
This commit is contained in:
47
PROMS/DataLoader/frmErrors.cs
Normal file
47
PROMS/DataLoader/frmErrors.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user