public DefaultColumnDef(string sNameIn, AzLogEntry.LogColumn lcIn, int nWidthDefaultIn, bool fVisibleDefIn = true) { sName = sNameIn; lc = lcIn; nWidthDefault = nWidthDefaultIn; fVisibleDefault = fVisibleDefIn; }
public AzLogViewColumn(string sName, string sTitle, int nWidth, AzLogEntry.LogColumn azlvc, bool fVisible) { m_sName = sName; m_nWidth = nWidth; m_azlvc = azlvc; m_fVisible = fVisible; m_sTitle = sTitle; }
/* L O A D */ /*---------------------------------------------------------------------------- * %%Function: Load * %%Qualified: AzLog.AzLogViewSettings.Load * %%Contact: rlittle * * ----------------------------------------------------------------------------*/ public void Load() { RegistryKey rk = Registry.CurrentUser.OpenSubKey(KeySettings()); if (rk == null) { SetDefault(); return; } string[] rgs = rk.GetSubKeyNames(); Settings ste; SortedList <int, Settings> mpnste = new SortedList <int, Settings>(); foreach (string sColumn in rgs) { string sKey = String.Format("{0}\\{1}", KeySettings(), sColumn); ste = new Settings(_rgsteeColumn, sKey, sColumn); ste.Load(); int nTabOrder = ste.NValue("TabOrder"); if (mpnste.ContainsKey(nTabOrder)) { // duplicate tab order. just find the next unused item int nNewTabOrder = 0; while (mpnste.ContainsKey(nNewTabOrder)) { nNewTabOrder++; } nTabOrder = nNewTabOrder; } mpnste.Add(nTabOrder, ste); } foreach (int nKey in mpnste.Keys) { ste = mpnste[nKey]; int nWidth = ste.NValue("Width"); AzLogEntry.LogColumn azlc = (AzLogEntry.LogColumn)ste.NValue("DataLogColumn"); bool fVisible = ste.FValue("Visible"); string sTitle = ste.SValue("Title"); if (sTitle == "") { sTitle = (string)ste.Tag; } AddLogViewColumn((string)ste.Tag, sTitle, nWidth, azlc, fVisible); } rk.Close(); m_fDirty = false; }
/* A Z L O G F I L T E R V A L U E */ /*---------------------------------------------------------------------------- %%Function: AzLogFilterValue %%Qualified: AzLog.AzLogFilter.AzLogFilterValue.AzLogFilterValue %%Contact: rlittle Create a value that is backed by the data source ----------------------------------------------------------------------------*/ public AzLogFilterValue(ValueType vt, DataSource ds, AzLogEntry.LogColumn lc) { m_vt = vt; m_ds = ds; m_lc = lc; }
public TextLogColumn() { m_lcCopy = m_lc = AzLogEntry.LogColumn.Nil; }
/* A Z L O G F I L T E R C O N D I T I O N */ /*---------------------------------------------------------------------------- * %%Function: AzLogFilterCondition * %%Qualified: AzLog.AzLogFilter.AzLogFilterCondition.AzLogFilterCondition * %%Contact: rlittle * * ----------------------------------------------------------------------------*/ public AzLogFilterCondition(AzLogFilterValue.ValueType vt, AzLogFilterValue.DataSource dsLeft, AzLogEntry.LogColumn lc, CmpOp cmpop, DateTime dttmValueRight) { _Init(vt, dsLeft, lc, cmpop, dttmValueRight); }
/* _ I N I T */ /*---------------------------------------------------------------------------- * %%Function: _Init * %%Qualified: AzLog.AzLogFilter.AzLogFilterCondition._Init * %%Contact: rlittle * * ----------------------------------------------------------------------------*/ private void _Init(AzLogFilterValue.ValueType vt, AzLogFilterValue.DataSource dsLeft, AzLogEntry.LogColumn lc, CmpOp cmpop, DateTime dttmValueRight) { m_azlfvLHS = new AzLogFilterValue(vt, dsLeft, lc); m_azlfvRHS = new AzLogFilterValue(dttmValueRight); m_cmpop = cmpop; }
} // for unit test only /* A Z L O G F I L T E R V A L U E */ /*---------------------------------------------------------------------------- * %%Function: AzLogFilterValue * %%Qualified: AzLog.AzLogFilter.AzLogFilterValue.AzLogFilterValue * %%Contact: rlittle * * Create a value that is backed by the data source * ----------------------------------------------------------------------------*/ public AzLogFilterValue(ValueType vt, DataSource ds, AzLogEntry.LogColumn lc) { m_vt = vt; m_ds = ds; m_lc = lc; }
public object OGetValue(AzLogFilterValue.ValueType vt, AzLogFilterValue.DataSource ds, AzLogEntry.LogColumn lc) { switch (ds) { case AzLogFilterValue.DataSource.Column: return(m_mpColumnValue[lc]); case AzLogFilterValue.DataSource.DttmStart: return(m_dttmStart); case AzLogFilterValue.DataSource.DttmEnd: return(m_dttmEnd); case AzLogFilterValue.DataSource.DttmRow: return(m_dttmRow); } return(null); }
/* A D D L O G V I E W C O L U M N */ /*---------------------------------------------------------------------------- * %%Function: AddLogViewColumn * %%Qualified: AzLog.AzLogViewSettings.AddLogViewColumn * %%Contact: rlittle * * ----------------------------------------------------------------------------*/ public void AddLogViewColumn(string sName, string sTitle, int nWidth, AzLogEntry.LogColumn azlc, bool fVisible) { AddColumn(new AzLogViewColumn(sName, sTitle, nWidth, azlc, fVisible)); m_fDirty = true; }
public static string GetColumnName(AzLogEntry.LogColumn lc) { switch (lc) { case AzLogEntry.LogColumn.Partition: return("PartitionKey"); case AzLogEntry.LogColumn.RowKey: return("RowKey"); case AzLogEntry.LogColumn.EventTickCount: return("EventTickCount"); case AzLogEntry.LogColumn.AppName: return("AppName"); case AzLogEntry.LogColumn.Level: return("Level"); case AzLogEntry.LogColumn.EventID: return("EventID"); case AzLogEntry.LogColumn.InstanceID: return("InstanceID"); case AzLogEntry.LogColumn.Pid: return("Pid"); case AzLogEntry.LogColumn.Tid: return("Tid"); case AzLogEntry.LogColumn.Message: return("sMessage"); case AzLogEntry.LogColumn.Message0: return("sMessage0"); case AzLogEntry.LogColumn.Message1: return("sMessage1"); case AzLogEntry.LogColumn.Message2: return("sMessage2"); case AzLogEntry.LogColumn.Message3: return("sMessage3"); case AzLogEntry.LogColumn.Message4: return("sMessage4"); case AzLogEntry.LogColumn.Message5: return("sMessage5"); case AzLogEntry.LogColumn.Message6: return("sMessage6"); case AzLogEntry.LogColumn.Message7: return("sMessage7"); case AzLogEntry.LogColumn.Message8: return("sMessage8"); case AzLogEntry.LogColumn.Message9: return("sMessage9"); default: return(""); } }