상속: System.Windows.Forms.Form
예제 #1
0
        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;
        }
예제 #2
0
        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;
        }
예제 #3
0
 /// <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();
     }
 }
예제 #4
0
 /// <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();
     }
 }