private void ConfigureMI_Click(object sender, EventArgs e) { try { ConfiguredEndpoint endpoint = SelectedTag as ConfiguredEndpoint; if (endpoint == null) { return; } EndpointComIdentity comIdentity = new PseudoComServerDlg().ShowDialog(endpoint); if (comIdentity == null) { return; } endpoint.ComIdentity = comIdentity; PseudoComServer.Save(endpoint); UpdateItem(ItemsLV.SelectedItems[0], endpoint); AdjustColumns(); } catch (Exception exception) { GuiUtils.HandleException(this.Text, MethodBase.GetCurrentMethod(), exception); } }
private void NewMI_Click(object sender, EventArgs e) { try { ApplicationDescription server = new DiscoveredServerListDlg().ShowDialog(null, m_configuration); if (server == null) { return; } ConfiguredEndpoint endpoint = new ConfiguredEndpoint(server, null); endpoint.ComIdentity = new EndpointComIdentity(); endpoint.ComIdentity.Specification = ComSpecification.DA; endpoint = new ConfiguredServerDlg().ShowDialog(endpoint, m_configuration); if (endpoint == null) { return; } EndpointComIdentity comIdentity = new PseudoComServerDlg().ShowDialog(endpoint); if (comIdentity == null) { return; } endpoint.ComIdentity = comIdentity; PseudoComServer.Save(endpoint); AddItem(endpoint); AdjustColumns(); } catch (Exception exception) { GuiUtils.HandleException(this.Text, MethodBase.GetCurrentMethod(), exception); } }