日期:2014-05-17 浏览次数:20907 次
private void bgw_DoWork(object sender, DoWorkEventArgs e)
{
if (bgw.CancellationPending)
{
return;
}
try
{
tray_Initform(tagasync.ToString());
}
catch (Exception ep)
{
Clogs log = new Clogs();
string path = Environment.CurrentDirectory.Replace("\\bin\\Debug", "") + "\\log\\";
log.LogError("错误追踪", ep, path);
this.Close();
}
}
private void tray_Initform(string info)
{
DataView dv = new DataView();
string pathxml = Environment.CurrentDirectory.Replace("\\bin\\Debug", "") + "\\Data\\gw.xml";
dv = xml.GetDataViewByXml(pathxml, "type=" + info, "type asc");
DataSet ds = new DataSet();
ds.Tables.Add(dv.ToTable());
int dvnum = ds.Tables[0].Rows.Count;
///获取类型名字显示
lblMsg.Text = ds.Tables[0].Rows[0]["typename"].ToString().Trim();
//string imgpathok = Environment.CurrentDirectory.Replace("\\bin\\Debug", "") + "\\img\\blue.jpg";
//string imgpathnotok = Environment.CurrentDirectory.Replace("\\bin\\Debug", "") + "\\img\\icon.ico";