Пример #1
0
        private void buttonFormatHelp_Click(object sender, EventArgs e)
        {
            var sb = new StringBuilder(
                "You can use strings consisting of either static characters or " +
                "the following dynamic symbols, or a combination of both:\n\n");

            foreach (FormattingHelper.FormattingScheme scheme in FormattingHelper.GetSchemes())
            {
                sb.Append(scheme.Symbol);
                sb.Append("  :  ");
                sb.Append(scheme.Description);
                sb.Append('\n');
            }

            const string exampleFormattedString = "Image_%date%_%time%";

            sb.Append("\n\nEx.: '");
            sb.Append(exampleFormattedString);
            sb.Append("' would become: '");
            sb.Append(FormattingHelper.Format(exampleFormattedString, null));

            Point loc = this.Location;

            loc.Offset(buttonFormatHelp.Location.X, buttonFormatHelp.Location.Y);
            Help.ShowPopup(this, sb.ToString(), loc);
        }
Пример #2
0
        private void buttonFormatHelp_Click(object sender, EventArgs e)
        {
            FormattingHelper.FormattingScheme[] formattingSchemes = FormattingHelper.GetSchemes();
            string helpString = "You can use strings consisting of either static characters or the following dynamic symbols, or a combination of both:\n\n";

            foreach (FormattingHelper.FormattingScheme scheme in formattingSchemes)
            {
                helpString += scheme.symbol + "  :  " + scheme.description + "\n";
            }
            string exampleFormattedString = "Image_%date%_%time%";

            helpString += "\n\nEx.: '" + exampleFormattedString + "' would become: '" + FormattingHelper.Format(exampleFormattedString, null);
            Point loc = this.Location;

            loc.Offset(buttonFormatHelp.Location.X, buttonFormatHelp.Location.Y);
            Help.ShowPopup(this, helpString, loc);
        }
Пример #3
0
 private string FormatInfoString(string _Input, FormattingHelper.FormattingContext _FormattingContext)
 {
     return(FormattingHelper.Format(_Input, _FormattingContext));
 }
Пример #4
0
 private string GetTitleString( FormattingHelper.FormattingContext _FormattingContext )
 {
     return FormatInfoString(textBoxTitleFormat.Text, _FormattingContext);
 }
Пример #5
0
 private string GetDescriptionString(FormattingHelper.FormattingContext _FormattingContext)
 {
     return FormatInfoString(textBoxDescriptionFormat.Text, _FormattingContext);
 }
Пример #6
0
 private string FormatInfoString( string _Input, FormattingHelper.FormattingContext _FormattingContext )
 {
     return FormattingHelper.Format(_Input, _FormattingContext);
 }