Example #1
0
        public string GetHelpText()
        {
            StringBuilder msg = new StringBuilder("List of available properties" + Environment.NewLine);

            msg.AppendLine();
            msg.AppendLine("@this - Context info will be replaced.");
            msg.AppendLine();

            foreach (IChoPropertyReplacer propertyReplacer in PropertyReplacers)
            {
                if (propertyReplacer.AvailablePropeties == null)
                {
                    continue;
                }

                ChoStringMsgBuilder msg1 = new ChoStringMsgBuilder(propertyReplacer.Name);

                foreach (KeyValuePair <string, string> keyValue in propertyReplacer.AvailablePropeties)
                {
                    msg1.AppendFormatLine("{0} - {1}", keyValue.Key, keyValue.Value);
                }

                msg.AppendLine(msg1.ToString());
            }

            ChoStringMsgBuilder msg2 = new ChoStringMsgBuilder("Application Propeties");

            foreach (Dictionary <string, string> dict in ChoApplication.GetPropertyHelpTexts())
            {
                if (dict == null)
                {
                    continue;
                }

                foreach (KeyValuePair <string, string> keyValue in dict)
                {
                    msg2.AppendFormatLine("{0} - {1}", keyValue.Key, keyValue.Value);
                }
            }
            msg.AppendLine(msg2.ToString());

            return(msg.ToString());
        }