Exemplo n.º 1
0
        /// <summary>
        /// Allows viewing and editing of a parsing profile
        /// </summary>
        /// <param name="profile"></param>
        public static void Edit(ParsingOptions profile)
        {
            lock (__instanceLock)
            {
                if (__instance == null)
                {
                    __instance = new ProfileEditor();
                }

                __instance._currentProfile           = profile;
                __instance._boxBeginThread.Text      = profile.BeginThreadRegex;
                __instance._boxDescription.Text      = profile.DescriptionRegex;
                __instance._boxEndThread.Text        = profile.EndThreadRegex;
                __instance._boxNonHttp.Text          = profile.NonHttpTrafficRegex;
                __instance._boxProxyConnection.Text  = profile.ProxyConnectionToSiteRegex;
                __instance._boxResponseReceived.Text = profile.ResponseReceivedMessageRegex;
                __instance._boxThreadId.Text         = profile.ThreadIdRegex;
                __instance._boxTimeFormat.Text       = profile.TimeFormat;

                __instance._exclusions.SetValues(profile.GetExclusions());

                profile.SetHighlightingDefinitions(profile.GetHighlightingDefinitions());
                __instance._highlightingDefs.SetValues((List <string>)profile.GetOption("HighlightingDefinitions"));

                profile.SetCustomFields(profile.GetCustomFields());
                __instance._customFields.SetValues((List <string>)profile.GetOption("CustomFields"));

                __instance.ShowDialog();
            }
        }
Exemplo n.º 2
0
 private void EditParserProfileClick(object sender, EventArgs e)
 {
     if (_currentProfile == null)
     {
         _currentProfile = new ParsingOptions();
         _currentProfile.Load(_availableProfiles[(string)_boxParserProfile.SelectedItem]);
     }
     ProfileEditor.Edit(_currentProfile);
 }
Exemplo n.º 3
0
 private void CurrentProfileClicked(object sender, EventArgs e)
 {
     ProfileEditor.Edit(TrafficViewer.Instance.TrafficViewerFile.Profile);
 }