/// <summary> /// Public method to paste and format clipboard text as stringbuilder the cursor /// location for the configured or active window's langage . /// </summary> /// <param name="application">application to insert</param> public void PasteAsStringBuilder(DTE2 application) { const string stringbuilder = "sb"; Paste(application, IsVb(application) ? SmartFormatter.StringbuilderizeInVb(SmartFormatter.LimparTexto(ClipboardText), stringbuilder) : SmartFormatter.StringbuilderizeInCs(SmartFormatter.LimparTexto(ClipboardText), stringbuilder)); }
/// <summary> /// Public method to paste format clipboard text into a specified region /// </summary> /// <param name="application">application to insert</param> public void PasteAsRegion(DTE2 application) { //get the region name const string region = "myRegion"; //it's so simple, we really don't need a function string csRegionized = "#region " + region + Environment.NewLine + SmartFormatter.LimparTexto(ClipboardText) + Environment.NewLine + "#endregion"; //and paste Paste(application, csRegionized); }
public void PasteAsLowerCamelCase(DTE2 application) { Paste(application, TranformaEmNotacaoCameloMinuscula(SmartFormatter.LimparTexto(RemoverAcentos(ClipboardText)))); }