Пример #1
0
        private string StartContextHandler(string[] startTagComponents)
        {
            foreach (string startTagComponent in startTagComponents)
            {
                bool   useIfExists = (startTagComponent.Length > 0 && startTagComponent[0] == '!');
                string context     = useIfExists ? startTagComponent.Substring(1) : startTagComponent;

                try
                {
                    if (!useIfExists)
                    {
                        _helpComponents.settings.CheckContextExists(context, _helpComponents.preprocessor);
                    }
                }

                catch (Exception exception)
                {
                    if (_topicCompilerSettings.MainFormForIssuingCollaboratorModeWarning == null)
                    {
                        throw exception;
                    }

                    else
                    {
                        _topicCompilerSettings.MainFormForIssuingCollaboratorModeWarning.AddCollaboratorModeWarningMissingContext();
                    }
                }

                _topicCompilerSettings.AddContextSensitiveHelp(_preprocessedTopic, context);
            }

            return("");
        }