Exemple #1
0
        /******************************************************************************/

        public void updateOptType(oadrCreateOptType createOpt)
        {
            MethodInvoker mi = new MethodInvoker(delegate
            {
                lock (this)
                {
                    string eventID = createOpt.qualifiedEventID.eventID;

                    if (!m_idToLvi.ContainsKey(eventID))
                    {
                        return;
                    }

                    ListViewItem lvi = m_idToLvi[eventID];

                    lvi.SubItems[IND_OPTSTATE].Text = createOpt.optType.ToString();
                }
            });

            // 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();
            }
        }
Exemple #2
0
        /**********************************************************/

        private void initOpt(string requestID, string optID, OptTypeType optType, OptReasonEnumeratedType optReason, string venID, string marketContext = null)
        {
            request = new oadrCreateOptType();

            request.schemaVersion = "2.0b";
            request.requestID     = requestID;
            request.optID         = optID;
            request.optType       = optType;
            request.optReason     = (optReason == OptReasonEnumeratedType.xschedule ? "x-schedule" : optReason.ToString());

            if (marketContext != null)
            {
                request.marketContext = marketContext;
            }

            request.venID = venID;

            request.createdDateTime = DateTime.UtcNow;
        }