private void RaiseEventObj(EcasEvent e, EcasPropertyDictionary props)
        {
            // if(e == null) throw new ArgumentNullException("e");
            // if(!m_bEnabled) return;

            if (this.RaisingEvent != null)
            {
                EcasRaisingEventArgs args = new EcasRaisingEventArgs(e, props);
                this.RaisingEvent(this, args);
                if (args.Cancel)
                {
                    return;
                }
            }

            try
            {
                foreach (EcasTrigger t in m_vTriggers)
                {
                    t.RunIfMatching(e, props);
                }
            }
            catch (Exception ex)
            {
                if (!VistaTaskDialog.ShowMessageBox(ex.Message, KPRes.TriggerExecutionFailed,
                                                    PwDefs.ShortProductName, VtdIcon.Warning, null))
                {
                    MessageService.ShowWarning(KPRes.TriggerExecutionFailed + ".", ex);
                }
            }
        }
Beispiel #2
0
        private void RaiseEventObj(EcasEvent e)
        {
            // if(e == null) throw new ArgumentNullException("e");
            // if(m_bEnabled == false) return;

            if (this.RaisingEvent != null)
            {
                EcasRaisingEventArgs args = new EcasRaisingEventArgs(e);
                this.RaisingEvent(this, args);
                if (args.Cancel)
                {
                    return;
                }
            }

            try
            {
                foreach (EcasTrigger t in m_vTriggers)
                {
                    t.RunIfMatching(e);
                }
            }
            catch (Exception ex)
            {
                if (VistaTaskDialog.ShowMessageBox(ex.Message, KPRes.TriggerExecutionFailed,
                                                   PwDefs.ShortProductName, VtdIcon.Warning,
                                                   Program.GetSafeMainWindowHandle()) == false)
                {
                    MessageService.ShowWarning(KPRes.TriggerExecutionFailed + ".", ex);
                }
            }
        }
 private void OnEcasEvent(object sender, EcasRaisingEventArgs e)
 {
     if(e.Event.Type.EqualsValue(EcasAppLoadPost))
         m_bMainFormLoading = false;
 }