Exemplo n.º 1
0
        private void OnPluginEvent(object sender, OVRPlugin2MgrEventArgs e)
        {
            switch (e.Type)
            {
            case OVRPlugin2MgrEventType.emDataEntry:
            {
                OVRDataChangedNotifyArgs oArgs = e.Args as OVRDataChangedNotifyArgs;
                if (oArgs != null)
                {
                    m_pluginMgrModule.DataChangedNotify(oArgs.ChangedList);
                    bool bStatusChanged = false;
                    foreach (OVRDataChanged item in oArgs.ChangedList)
                    {
                        if (item.Type == OVRDataChangedType.emMatchStatus)
                        {
                            bStatusChanged = true;
                            break;
                        }
                    }
                    if (bStatusChanged)
                    {
                        UpdateMatchListThreadSafe();
                    }
                }

                break;
            }

            case OVRPlugin2MgrEventType.emUpdateMatchList:
            {
                UpdateMatchListThreadSafe();

                break;
            }

            case OVRPlugin2MgrEventType.emRptContextChanged:
            {
                OVRReportContextChangedArgs oArgs = e.Args as OVRReportContextChangedArgs;
                if (oArgs != null)
                {
                    m_pluginMgrModule.SetReportContext(oArgs.Name, oArgs.Value);
                }
                break;
            }

            case OVRPlugin2MgrEventType.emToMainFrame:
            {
                OVRModule2FrameEventArgs oArgs = e.Args as OVRModule2FrameEventArgs;
                if (oArgs != null)
                {
                    m_pluginMgrModule.NotifyMainFrame(oArgs.Type, oArgs.Args);
                }
                break;
            }
            }
        }
Exemplo n.º 2
0
        private void OnModuleEvent(object sender, OVRModule2FrameEventArgs e)
        {
            switch (e.Type)
            {
            case OVRModule2FrameEventType.emRptContextChanged:
            {
                OVRReportContextChangedArgs oArgs = e.Args as OVRReportContextChangedArgs;
                if (oArgs == null)
                {
                    break;
                }

                if (m_EventReportContextChanged != null)
                {
                    m_EventReportContextChanged(this, oArgs);
                }
                break;
            }

            case OVRModule2FrameEventType.emDataChanged:
            {
                OnDataChangedNotify(sender, e.Args as OVRDataChangedNotifyArgs);
                break;
            }

            case OVRModule2FrameEventType.emDoReport:
            {
                DoReport(e.Args as OVRDoReportArgs);
                break;
            }

            case OVRModule2FrameEventType.emReportInfoQuery:
            {
                QueryReportInfo(e.Args as OVRReportInfoQueryArgs);
                break;
            }

            case OVRModule2FrameEventType.emVenueChanged:
            {
                m_strVenueCode        = e.Args as string;
                m_xmlPacker.VenueCode = m_strVenueCode;
                ConfigurationManager.SetUserSettingString("Venue", m_strVenueCode);

                if (m_EventReportContextChanged != null)
                {
                    m_EventReportContextChanged(this, new OVRReportContextChangedArgs("VenueCode", m_strVenueCode));
                }

                break;
            }
            }
        }