Esempio n. 1
0
 private void btnOk_Click(object sender, EventArgs e)
 {
     if (isChanged)
     {
         CustomFilterOptionSettings customFilterOptionSettings = config.LoadCustomFilterOptionSettings();
         if (customFilterOptionSettings != null)
         {
             customFilterOptionSettings.ShowWCFTraces           = chkShowWCFTraces.Checked;
             customFilterOptionSettings.ShowMessageSentReceived = chkMessageSentReceived.Checked;
             customFilterOptionSettings.ShowTransfer            = chkTransfer.Checked;
             customFilterOptionSettings.ShowSecurityMessage     = chkShowSMs.Checked;
             customFilterOptionSettings.ShowReliableMessage     = chkShowRMs.Checked;
             customFilterOptionSettings.ShowTransactionMessage  = chkShowTMs.Checked;
             if (!config.UpdateConfigFile())
             {
                 return;
             }
             if (promptUser)
             {
                 if (MessageBox.Show(this, SR.GetString("FO_MSG1"), SR.GetString("FO_Title"), MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, (MessageBoxOptions)0) == DialogResult.Yes)
                 {
                     base.DialogResult = DialogResult.Yes;
                 }
                 else
                 {
                     base.DialogResult = DialogResult.No;
                 }
             }
         }
     }
     Close();
 }
Esempio n. 2
0
 static FilterEngine()
 {
     filterEngineLock                       = new object();
     currentFilterCriteria                  = null;
     searchOptionNames                      = new Dictionary <string, SearchOptions>();
     traceLevelNames                        = new Dictionary <string, SourceLevels>();
     filterOptionSettings                   = null;
     securityMessageActionIndex             = new Dictionary <string, int>();
     reliableMessageActionIndex             = new Dictionary <string, int>();
     transactionMessageActionIndex          = new Dictionary <string, int>();
     securityMessageTraceIdentifierIndex    = new Dictionary <string, int>();
     reliableMessageTraceIdentifierIndex    = new Dictionary <string, int>();
     transactionMessageTraceIdentifierIndex = new Dictionary <string, int>();
     searchOptionNames.Add(SR.GetString("AppFilterItem1"), SearchOptions.None);
     searchOptionNames.Add(SR.GetString("AppFilterItem2"), SearchOptions.EventID);
     searchOptionNames.Add(SR.GetString("AppFilterItem3"), SearchOptions.SourceName);
     searchOptionNames.Add(SR.GetString("AppFilterItem4"), SearchOptions.ProcessName);
     searchOptionNames.Add(SR.GetString("AppFilterItem5"), SearchOptions.TraceCode);
     searchOptionNames.Add(SR.GetString("AppFilterItem6"), SearchOptions.Description);
     searchOptionNames.Add(SR.GetString("AppFilterItem7"), SearchOptions.StartTime);
     searchOptionNames.Add(SR.GetString("AppFilterItem8"), SearchOptions.StopTime);
     searchOptionNames.Add(SR.GetString("AppFilterItem9"), SearchOptions.TimeRange);
     searchOptionNames.Add(SR.GetString("AppFilterItem10"), SearchOptions.EndpointAddress);
     searchOptionNames.Add(SR.GetString("AppFilterItem17"), SearchOptions.AppDataSection);
     searchOptionNames.Add(SR.GetString("AppFilterItem18"), SearchOptions.EntireRawData);
     searchOptionNames.Add(SR.GetString("AppFilterItem11"), SearchOptions.CustomFilter);
     traceLevelNames.Add(SR.GetString("AppFilterItem12"), SourceLevels.All);
     traceLevelNames.Add(SR.GetString("AppFilterItem13"), SourceLevels.Critical);
     traceLevelNames.Add(SR.GetString("AppFilterItem14"), SourceLevels.Error);
     traceLevelNames.Add(SR.GetString("AppFilterItem15"), SourceLevels.Warning);
     traceLevelNames.Add(SR.GetString("AppFilterItem16"), SourceLevels.Information);
     securityMessageActionIndex.Add("http://schemas.xmlsoap.org/ws/2005/02/trust", 0);
     securityMessageActionIndex.Add("http://schemas.xmlsoap.org/ws/2004/04/trust", 0);
     securityMessageActionIndex.Add("http://schemas.xmlsoap.org/ws/2005/02/sc", 0);
     securityMessageActionIndex.Add("http://schemas.xmlsoap.org/ws/2004/04/sc", 0);
     securityMessageActionIndex.Add("http://schemas.microsoft.com/ws/2004/04/addressingidentityextension", 0);
     securityMessageActionIndex.Add("http://schemas.microsoft.com/mb/2004/01/security", 0);
     reliableMessageActionIndex.Add("http://schemas.xmlsoap.org/ws/2005/02/rm", 0);
     reliableMessageActionIndex.Add("http://schemas.microsoft.com/net/2005/02/rm", 0);
     transactionMessageActionIndex.Add("http://schemas.microsoft.com/ws/2006/02/transactions", 0);
     transactionMessageActionIndex.Add("http://schemas.xmlsoap.org/ws/2004/10/wscoor", 0);
     transactionMessageActionIndex.Add("http://schemas.xmlsoap.org/ws/2004/10/wsat", 0);
     securityMessageTraceIdentifierIndex.Add("System.ServiceModel.Security", 0);
     securityMessageTraceIdentifierIndex.Add("System.IdentityModel", 0);
     reliableMessageTraceIdentifierIndex.Add("System.ServiceModel.Channels.RM", 0);
     transactionMessageTraceIdentifierIndex.Add("Microsoft.Transactions.TransactionBridge", 0);
     transactionMessageTraceIdentifierIndex.Add("http://msdn.microsoft.com/en-US/library/System.ServiceModel.Transactions.", 0);
 }
 private AppConfigManager(IErrorReport errorReport, IUserInterfaceProvider userIP)
 {
     try
     {
         this.errorReport = errorReport;
         this.userIP      = userIP;
         XmlNode xmlNode = InternalLoadSettingNodeFromAppConfigFile("filterOptions");
         if (xmlNode == null)
         {
             customFilterOptionSettings = new CustomFilterOptionSettings();
         }
         else
         {
             customFilterOptionSettings = new CustomFilterOptionSettings(xmlNode);
         }
     }
     catch (LogFileException)
     {
         customFilterOptionSettings = new CustomFilterOptionSettings();
     }
 }
Esempio n. 4
0
        public void Initialize(AppConfigManager config, bool promptUser)
        {
            this.config     = config;
            this.promptUser = promptUser;
            CustomFilterOptionSettings customFilterOptionSettings = config.LoadCustomFilterOptionSettings();

            if (customFilterOptionSettings != null)
            {
                if (customFilterOptionSettings.ShowWCFTraces)
                {
                    chkShowWCFTraces.Checked = true;
                }
                if (customFilterOptionSettings.ShowTransfer)
                {
                    chkTransfer.Checked = true;
                }
                if (customFilterOptionSettings.ShowMessageSentReceived)
                {
                    chkMessageSentReceived.Checked = true;
                }
                if (customFilterOptionSettings.ShowSecurityMessage)
                {
                    chkShowSMs.Checked = true;
                }
                if (customFilterOptionSettings.ShowReliableMessage)
                {
                    chkShowRMs.Checked = true;
                }
                if (customFilterOptionSettings.ShowTransactionMessage)
                {
                    chkShowTMs.Checked = true;
                }
                UpdateEnabledStatusForWCFOptions(chkShowWCFTraces.Checked);
            }
            isInitializing = false;
        }
Esempio n. 5
0
 public static void SetCustomFilterOptionSettingsReference(CustomFilterOptionSettings filterOptions)
 {
     filterOptionSettings = filterOptions;
 }