private bool UpdateDataEx(EcasEvent e, bool bGuiToInternal, bool bDxTypeInfo) { m_bBlockTypeSelectionHandler = true; bool bResult = EcasUtil.UpdateDialog(EcasObjectType.Event, m_cmbEvents, m_dgvParams, e, bGuiToInternal, bDxTypeInfo); m_bBlockTypeSelectionHandler = false; return bResult; }
private static bool IsMatchCustomTbButton(EcasEvent e, EcasContext ctx) { string strIdRef = EcasUtil.GetParamString(e.Parameters, 0, true); if(string.IsNullOrEmpty(strIdRef)) return true; string strIdCur = EcasUtil.GetParamString(ctx.Event.Parameters, 0); if(string.IsNullOrEmpty(strIdCur)) return false; return strIdRef.Equals(strIdCur, StrUtil.CaseIgnoreCmp); }
public EcasContext(EcasTriggerSystem coll, EcasTrigger trigger, EcasEvent e) { if(coll == null) throw new ArgumentNullException("coll"); if(trigger == null) throw new ArgumentNullException("trigger"); if(e == null) throw new ArgumentNullException("e"); m_coll = coll; m_trigger = trigger; m_eOccured = e; }
public EcasContext(EcasTriggerSystem coll, EcasTrigger trigger, EcasEvent e, EcasPropertyDictionary props) { if(coll == null) throw new ArgumentNullException("coll"); if(trigger == null) throw new ArgumentNullException("trigger"); if(e == null) throw new ArgumentNullException("e"); if(props == null) throw new ArgumentNullException("props"); m_coll = coll; m_trigger = trigger; m_eOccured = e; m_props = props; }
public bool Compare(EcasEvent e, EcasContext ctx) { if(e == null) throw new ArgumentNullException("e"); if(ctx == null) throw new ArgumentNullException("ctx"); Debug.Assert(e.Type.Equals(ctx.Event.Type)); foreach(EcasEventType t in m_events) { if(t.Type.Equals(e.Type)) return t.CompareMethod(e, ctx); } throw new NotSupportedException(); }
public EcasRaisingEventArgs(EcasEvent evt, EcasPropertyDictionary props) { m_evt = evt; m_props = props; }
public EcasRaisingEventArgs(EcasEvent evt) { m_evt = evt; }
private static bool IsMatchTextEvent(EcasEvent e, EcasContext ctx) { uint uCompareType = EcasUtil.GetParamEnum(e.Parameters, 0, EcasUtil.StdStringCompareEquals, EcasUtil.StdStringCompare); string strFilter = EcasUtil.GetParamString(e.Parameters, 1, true); if(string.IsNullOrEmpty(strFilter)) return true; string strCurFile = EcasUtil.GetParamString(ctx.Event.Parameters, 0); if(string.IsNullOrEmpty(strCurFile)) return false; return EcasUtil.CompareStrings(strCurFile, strFilter, uCompareType); }
public void InitEx(EcasEvent e) { m_eventInOut = e; m_event = e.CloneDeep(); }
private void OnEventAdd(object sender, EventArgs e) { EcasEvent eNew = new EcasEvent(); eNew.Type = EcasEventIDs.AppLoadPost; EcasEventForm dlg = new EcasEventForm(); dlg.InitEx(eNew); if(UIUtil.ShowDialogAndDestroy(dlg) == DialogResult.OK) { m_trigger.EventCollection.Add(eNew); UpdateEventListEx(false); } }
private static bool EcasEventCompareTrue(EcasEvent e, EcasContext ctx) { return true; }
private static bool IsMatchIdEvent(EcasEvent e, EcasContext ctx) { string strIdRef = EcasUtil.GetParamString(e.Parameters, 0, true); if(string.IsNullOrEmpty(strIdRef)) return true; string strIdCur = ctx.Properties.Get<string>(EcasProperty.CommandID); if(string.IsNullOrEmpty(strIdCur)) return false; return strIdRef.Equals(strIdCur, StrUtil.CaseIgnoreCmp); }
private static bool IsMatchTextEvent(EcasEvent e, EcasContext ctx) { uint uCompareType = EcasUtil.GetParamEnum(e.Parameters, 0, EcasUtil.StdStringCompareEquals, EcasUtil.StdStringCompare); string strFilter = EcasUtil.GetParamString(e.Parameters, 1, true); if(string.IsNullOrEmpty(strFilter)) return true; string str = ctx.Properties.Get<string>(EcasProperty.Text); if(str == null) { Debug.Assert(false); return false; } return EcasUtil.CompareStrings(str, strFilter, uCompareType); }
private static bool IsMatchIocDbEvent(EcasEvent e, EcasContext ctx) { uint uCompareType = EcasUtil.GetParamEnum(e.Parameters, 0, EcasUtil.StdStringCompareEquals, EcasUtil.StdStringCompare); string strFilter = EcasUtil.GetParamString(e.Parameters, 1, true); if(string.IsNullOrEmpty(strFilter)) return true; // Must prefer IOC (e.g. for SavingDatabaseFile) IOConnectionInfo ioc = ctx.Properties.Get<IOConnectionInfo>( EcasProperty.IOConnectionInfo); if(ioc == null) { PwDatabase pd = ctx.Properties.Get<PwDatabase>(EcasProperty.Database); if(pd == null) { Debug.Assert(false); return false; } ioc = pd.IOConnectionInfo; } if(ioc == null) { Debug.Assert(false); return false; } string strCurFile = ioc.Path; if(string.IsNullOrEmpty(strCurFile)) return false; return EcasUtil.CompareStrings(strCurFile, strFilter, uCompareType); }
public bool CompareEvents(EcasEvent e, EcasContext ctx) { if(e == null) throw new ArgumentNullException("e"); if(ctx == null) throw new ArgumentNullException("ctx"); if(e.Type.EqualsValue(ctx.Event.Type) == false) return false; foreach(EcasEventProvider p in m_vEventProviders) { if(p.IsSupported(e.Type)) return p.Compare(e, ctx); } throw new Exception(KPRes.TriggerEventTypeUnknown + " " + KPRes.TypeUnknownHint + MessageService.NewParagraph + e.TypeString); }