/**********************************************************************************/

        private void setPollinterval(oadrCreatedPartyRegistrationType partyRegistration)
        {
            try
            {
                int totalSeconds = (int)System.Xml.XmlConvert.ToTimeSpan(partyRegistration.oadrRequestedOadrPollFreq.duration).TotalSeconds;

                m_timeout = new TimeSpan(0, 0, totalSeconds);
            }
            catch
            {
                m_timeout = new TimeSpan(0, 0, 10);
            }
        }
Beispiel #2
0
        /**********************************************************/

        public void updateRegistrationInfo(oadrCreatedPartyRegistrationType registration)
        {
            if (registration == null)
            {
                return;
            }

            MethodInvoker mi = new MethodInvoker(delegate
            {
                try
                {
                    clear();
                    ucRegistrationID.TextBoxText = registration.registrationID;
                    ucVENID.TextBoxText          = registration.venID;
                    ucVTNID.TextBoxText          = registration.vtnID;

                    ucPollFrequency.TextBoxText = registration.oadrRequestedOadrPollFreq.duration;


                    foreach (oadrProfilesOadrProfile profile in registration.oadrProfiles)
                    {
                        TreeNode treeNode = new TreeNode("Profile: " + profile.oadrProfileName.ToString().Substring(4));
                        tvOadrProfiles.Nodes.Add(treeNode);

                        foreach (oadrTransportsOadrTransport transport in profile.oadrTransports)
                        {
                            treeNode.Nodes.Add("Transport: " + transport.oadrTransportName.ToString());
                        }
                    }
                }
                catch (Exception ex)
                {
                    Logger.logException(ex);
                }
            });

            // BeginInvoke only needs to be called if we're tyring to update the UI from
            // a thread that did not create it
            if (this.InvokeRequired)
            {
                this.BeginInvoke(mi);
            }
            else
            {
                mi.Invoke();
            }
        }
Beispiel #3
0
        /**********************************************************/

        private void setPollInterval(oadrCreatedPartyRegistrationType createdPartyRegistration)
        {
            MethodInvoker mi = new MethodInvoker(delegate
            {
                try
                {
                    tbPollInterval.TextBoxText = createdPartyRegistration.oadrRequestedOadrPollFreq.duration;
                }
                catch
                {
                }
            });

            // BeginInvoke only needs to be called if we're tyring to update the UI from
            // a thread that did not create it
            if (this.InvokeRequired)
            {
                this.BeginInvoke(mi);
            }
            else
            {
                mi.Invoke();
            }
        }