private void LoadTree() { try { this.Cursor = Cursors.WaitCursor; tvLeft.AllowDrop = true; tvLeft.Nodes.Clear(); tvLeft.ImageList = Util.GetImageList(); dalProductTypeList dal = new dalProductTypeList(); BindingCollection <modProductTypeList> list = dal.GetIList(true, out Util.emsg); if (list != null) { foreach (modProductTypeList mod in list) { tvLeft.Nodes.Add(mod.ProductType, mod.ProductType, 0, 1); } if (tvLeft.Nodes.Count > 0) { tvLeft.SelectedNode = tvLeft.Nodes[0]; } } } catch (Exception ex) { MessageBox.Show(ex.Message, clsTranslate.TranslateString("Information"), MessageBoxButtons.OK, MessageBoxIcon.Information); return; } finally { this.Cursor = Cursors.Default; } }