Skip to content

Commit

Permalink
Added Copy button to PP CLI #885
Browse files Browse the repository at this point in the history
  • Loading branch information
rappen committed Aug 1, 2023
1 parent 41c39de commit 2725037
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 4 deletions.
6 changes: 5 additions & 1 deletion FetchXmlBuilder/DockControls/XmlContentControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Web;
using System.Windows.Forms;
using System.Xml;
using XrmToolBox.Extensibility;

namespace Rappen.XTB.FetchXmlBuilder.DockControls
{
Expand Down Expand Up @@ -87,6 +89,7 @@ internal void SetContentType(ContentType contentType)
panQExOptions.Visible = contenttype == ContentType.CSharp_Code;
panSQL4CDS.Visible = allowsql;
panSQL4CDSInfo.Visible = allowsql;
panPowerPlatformCLIOptions.Visible = contenttype == ContentType.Power_Platform_CLI;

switch (contentType)
{
Expand Down Expand Up @@ -1032,9 +1035,10 @@ private void XmlContentControl_SizeChanged(object sender, EventArgs e)
}
}

private void btnCopyCsharp_Click(object sender, EventArgs e)
private void btnCopyText_Click(object sender, EventArgs e)
{
Clipboard.SetText(txtXML.Text);
fxb.WorkAsync(new WorkAsyncInfo { Message = "Copying!", Work = (w, a) => { Thread.Sleep(300); } });
}
}

Expand Down
31 changes: 29 additions & 2 deletions FetchXmlBuilder/DockControls/XmlContentControl.designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion FetchXmlBuilder/DockControls/XmlContentControl.resx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACC
DQAAAk1TRnQBSQFMAgEBBQEAARABAQEQAQEBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
DQAAAk1TRnQBSQFMAgEBBQEAASABAQEgAQEBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
Expand Down

0 comments on commit 2725037

Please sign in to comment.