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); }
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); }
private string FormatInfoString(string _Input, FormattingHelper.FormattingContext _FormattingContext) { return(FormattingHelper.Format(_Input, _FormattingContext)); }
private string GetTitleString( FormattingHelper.FormattingContext _FormattingContext ) { return FormatInfoString(textBoxTitleFormat.Text, _FormattingContext); }
private string GetDescriptionString(FormattingHelper.FormattingContext _FormattingContext) { return FormatInfoString(textBoxDescriptionFormat.Text, _FormattingContext); }
private string FormatInfoString( string _Input, FormattingHelper.FormattingContext _FormattingContext ) { return FormattingHelper.Format(_Input, _FormattingContext); }