private void LoadAdapterInfor(Type adapterType) { AdapterEntryAttributeBase a = AssemblyHelper.GetApdaterEntryAttribute <AdapterEntryAttributeBase>(adapterType); if (a == null) { MessageBox.Show("Cannot find information of type " + adapterType.ToString() + "\r\n\r\n" + AssemblyHelper.LastErrorInfor); return; } this.textBoxName.Text = a.Name; this.textBoxDesc.Text = a.Description; }
private void LoadAdapterInfor() { this.textBoxAFileName.Text = Program.ConfigMgt.Config.AdapterFileName; AdapterEntryAttributeBase a = null; switch (Program.ConfigMgt.Config.AdapterDirection) { case DirectionType.INBOUND: { if (Program.InAdapter != null) { a = Program.InAdapter.Attribute; } break; } case DirectionType.OUTBOUND: { if (Program.OutAdapter != null) { a = Program.OutAdapter.Attribute; } break; } case DirectionType.BIDIRECTIONAL: { if (Program.BiAdapter != null) { a = Program.BiAdapter.Attribute; } break; } } if (a != null) { this.textBoxAName.Text = a.Name; this.textBoxADirection.Text = a.Direction.ToString(); this.textBoxADescription.Text = a.Description; } }