public PublisherForm( ServiceMessageContext context, ApplicationInstance application, PublisherForm masterForm, ApplicationConfiguration configuration) { InitializeComponent(); this.Icon = ClientUtils.GetAppIcon(); m_masterForm = masterForm; m_context = context; m_application = application; m_server = application.Server as Opc.Ua.Server.StandardServer; if (m_masterForm == null) { m_forms = new List<PublisherForm>(); } SessionsCTRL.Configuration = m_configuration = configuration; SessionsCTRL.MessageContext = context; // get list of cached endpoints. m_endpoints = m_configuration.LoadCachedEndpoints(true); m_endpoints.DiscoveryUrls = configuration.ClientConfiguration.WellKnownDiscoveryUrls; EndpointSelectorCTRL.Initialize(m_endpoints, m_configuration); // initialize control state. Disconnect(); //lth: initial MassTransit Publisher m_massTransitPublisher = new MassTransitPublisher(); this.NotificationsCTRL.ItemsAdded += NotificationsCTRL_ItemsAdded; }
public PublisherForm( ServiceMessageContext context, ApplicationInstance application, PublisherForm masterForm, ApplicationConfiguration configuration) { InitializeComponent(); this.Icon = ClientUtils.GetAppIcon(); m_masterForm = masterForm; m_context = context; m_application = application; m_server = application.Server as Opc.Ua.Server.StandardServer; if (m_masterForm == null) { m_forms = new List <PublisherForm>(); } SessionsCTRL.Configuration = m_configuration = configuration; SessionsCTRL.MessageContext = context; // get list of cached endpoints. m_endpoints = m_configuration.LoadCachedEndpoints(true); m_endpoints.DiscoveryUrls = configuration.ClientConfiguration.WellKnownDiscoveryUrls; EndpointSelectorCTRL.Initialize(m_endpoints, m_configuration); // initialize control state. Disconnect(); //lth: initial MassTransit Publisher m_massTransitPublisher = new MassTransitPublisher(); this.NotificationsCTRL.ItemsAdded += NotificationsCTRL_ItemsAdded; }
/// <summary> /// Opens a new form. /// </summary> public void OpenForm() { if (m_masterForm == null) { PublisherForm form = new PublisherForm(m_context, m_application, this, m_configuration); m_forms.Add(form); form.FormClosing += new FormClosingEventHandler(Window_FormClosing); form.Show(); } else { m_masterForm.OpenForm(); } }