private void NewMI_Click(object sender, EventArgs e)
        {
            try
            {
                ApplicationDescription server = new DiscoveredServerListDlg().ShowDialog(null, m_configuration);

                if (server == null)
                {
                    return;
                }

                ConfiguredEndpoint endpoint = new ConfiguredServerDlg().ShowDialog(server, m_configuration);

                if (endpoint == null)
                {
                    return;
                }

                AddItem(endpoint);
                AdjustColumns();
            }
            catch (Exception exception)
            {
                GuiUtils.HandleException(this.Text, MethodBase.GetCurrentMethod(), exception);
            }
        }
Beispiel #2
0
        /// <summary>
        /// Displays the dialog.
        /// </summary>
        public ConfiguredEndpoint ShowDialog(ApplicationConfiguration configuration, bool createNew)
        {
            m_configuration = configuration;
            m_endpoint      = null;

            // create a default collection if none provided.
            if (createNew)
            {
                ApplicationDescription server = new DiscoveredServerListDlg().ShowDialog(null, m_configuration);

                if (server != null)
                {
                    return(new ConfiguredEndpoint(server, EndpointConfiguration.Create(configuration)));
                }

                return(null);
            }

            ServersCTRL.Initialize(null, configuration);

            OkBTN.Enabled = false;

            if (ShowDialog() != DialogResult.OK)
            {
                return(null);
            }

            return(m_endpoint);
        }
Beispiel #3
0
        private async void NewMI_Click(object sender, EventArgs e)
        {
            try
            {
                ApplicationDescription server = new DiscoveredServerListDlg().ShowDialog(null, m_configuration);

                if (server == null)
                {
                    return;
                }

                ConfiguredEndpoint endpoint = await new ConfiguredServerDlg().ShowDialog(server, m_configuration);

                if (endpoint == null)
                {
                    return;
                }

                AddItem(endpoint);
            }
            catch (Exception exception)
            {
                GuiUtils.HandleException(String.Empty, GuiUtils.CallerName(), exception);
            }
        }
        /// <summary>
        /// Displays the dialog.
        /// </summary>
        public ConfiguredEndpoint ShowDialog(ApplicationConfiguration configuration, bool createNew)
        {
            m_configuration = configuration;
            m_endpoint = null;

            // create a default collection if none provided.
            if (createNew)
            {
                ApplicationDescription server = new DiscoveredServerListDlg().ShowDialog(null, m_configuration);

                if (server != null)
                {
                    return new ConfiguredEndpoint(server, EndpointConfiguration.Create(configuration));
                }

                return null;
            }
            
            ServersCTRL.Initialize(null, configuration);
            
            OkBTN.Enabled = false;

            if (ShowDialog() != DialogResult.OK)
            {
                return null;
            }
  
            return m_endpoint;
        }
        /// <summary>
        /// Displays the dialog.
        /// </summary>
        public ConfiguredEndpoint ShowDialog(ApplicationConfiguration configuration, bool createNew)
        {
            m_configuration = configuration;
            m_endpoint = null;

            // create a default collection if none provided.
            if (createNew)
            {
                ApplicationDescription server = new DiscoveredServerListDlg().ShowDialog(null, m_configuration);

                if (server != null)
                {
                    return new ConfiguredEndpoint(server, EndpointConfiguration.Create(configuration));
                }

                return null;
            }
            
            ServersCTRL.Initialize(null, configuration);
            
            OkBTN.IsEnabled = false;

            Popup myPopup = new Popup();
            myPopup.Child = this;
            myPopup.IsOpen = true;

            return m_endpoint;
        }
Beispiel #6
0
        /// <summary>
        /// Displays the dialog.
        /// </summary>
        public ConfiguredEndpoint ShowDialog(ApplicationConfiguration configuration, bool createNew)
        {
            m_configuration = configuration;
            m_endpoint      = null;

            // create a default collection if none provided.
            if (createNew)
            {
                ApplicationDescription server = new DiscoveredServerListDlg().ShowDialog(null, m_configuration);

                if (server != null)
                {
                    return(new ConfiguredEndpoint(server, EndpointConfiguration.Create(configuration)));
                }

                return(null);
            }

            ServersCTRL.Initialize(null, configuration);

            OkBTN.IsEnabled = false;

            Popup myPopup = new Popup();

            myPopup.Child  = this;
            myPopup.IsOpen = true;

            return(m_endpoint);
        }
Beispiel #7
0
        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);
            }
        }
        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);
            }
        }
        private void NewMI_Click(object sender, EventArgs e)
        {
            try
            {
                ApplicationDescription server = new DiscoveredServerListDlg().ShowDialog(null, m_configuration);

                if (server == null)
                {
                    return;
                }

                ConfiguredEndpoint endpoint = new ConfiguredServerDlg().ShowDialog(server, m_configuration);

                if (endpoint == null)
                {
                    return;
                }

                AddItem(endpoint);
                AdjustColumns();
            }
            catch (Exception exception)
            {
                GuiUtils.HandleException(this.Text, MethodBase.GetCurrentMethod(), exception);
            }
        }
        private async void NewMI_Click(object sender, EventArgs e)
        {
            try
            {
                ApplicationDescription server = new DiscoveredServerListDlg().ShowDialog(null, m_configuration);

                if (server == null)
                {
                    return;
                }

                ConfiguredEndpoint endpoint = await new ConfiguredServerDlg().ShowDialog(server, m_configuration);

                if (endpoint == null)
                {
                    return;
                }

                AddItem(endpoint);
            }
            catch (Exception exception)
            {
                GuiUtils.HandleException(String.Empty, GuiUtils.CallerName(), exception);
            }
        }