Skip to content

Commit

Permalink
Retrieving URL protocol nicer
Browse files Browse the repository at this point in the history
  • Loading branch information
rappen committed Jan 10, 2023
1 parent 59274f4 commit 998618a
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 2 deletions.
12 changes: 10 additions & 2 deletions FetchXmlBuilder/FXBInterfaces.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ namespace Rappen.XTB.FetchXmlBuilder
public partial class FetchXmlBuilder : IGitHubPlugin, IPayPalPlugin, IMessageBusHost, IHelpPlugin, IStatusBarMessenger, IShortcutReceiver, IAboutPlugin, IDuplicatableTool, ISettingsPlugin
{
private MessageBusEventArgs callerArgs = null;
private const string URLcaller = "URL Protocol";

#region Public Events

Expand Down Expand Up @@ -65,8 +66,10 @@ public void OnIncomingMessage(MessageBusEventArgs message)
}
dockControlBuilder.ParseXML(fetchXml, false);
UpdateLiveXML();
tsbReturnToCaller.Image = callerArgs.SourcePlugin == "Bulk Data Updater" ?
Cinteros.Xrm.FetchXmlBuilder.Properties.Resources.BDU_2019_032_tsp :
tsbReturnToCaller.Text = callerArgs.SourcePlugin == URLcaller ? "FetchXML from an URL" : "Return FetchXML";
tsbReturnToCaller.Image =
callerArgs.SourcePlugin == "Bulk Data Updater" ? Cinteros.Xrm.FetchXmlBuilder.Properties.Resources.BDU_2019_032_tsp :
callerArgs.SourcePlugin == URLcaller ? Cinteros.Xrm.FetchXmlBuilder.Properties.Resources.icon_web :
Cinteros.Xrm.FetchXmlBuilder.Properties.Resources.icon_return;
tsbReturnToCaller.ToolTipText = "Return " + requestedType + " to " + callerArgs.SourcePlugin;
dockControlBuilder.RecordHistory("called from " + message.SourcePlugin);
Expand Down Expand Up @@ -209,6 +212,11 @@ private void ReturnToCaller()
return;
}
LogUse("ReturnTo." + callerArgs.SourcePlugin);
if (callerArgs.SourcePlugin == URLcaller)
{
OpenURL("https://fetchxmlbuilder.com/sharing-queries/");
return;
}
var fetch = dockControlBuilder.GetFetchString(true, true);
if (string.IsNullOrWhiteSpace(fetch))
{
Expand Down
4 changes: 4 additions & 0 deletions FetchXmlBuilder/FetchXmlBuilder.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,7 @@
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Resources\fetch.xsd">
<SubType>Designer</SubType>
Expand Down Expand Up @@ -614,6 +615,9 @@
<ItemGroup>
<None Include="Resources\icons8-options-32.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\icons8-internet-32.png" />
</ItemGroup>
<Import Project="..\MarkMpn.FetchXmlToWebAPI\MarkMpn.FetchXmlToWebAPI\MarkMpn.FetchXmlToWebAPI.projitems" Label="Shared" />
<Import Project="..\FXBEditorUtils\FXBEditorUtils.projitems" Label="Shared" />
<Import Project="..\MarkMpn.XmlSchemaAutocomplete\MarkMpn.XmlSchemaAutoComplete\MarkMpn.XmlSchemaAutoComplete.projitems" Label="Shared" />
Expand Down
10 changes: 10 additions & 0 deletions FetchXmlBuilder/Properties/Resources.Designer.cs

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

3 changes: 3 additions & 0 deletions FetchXmlBuilder/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -199,4 +199,7 @@
<data name="icon-releasenotes" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-announcement-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icon-web" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icons8-internet-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
Binary file added FetchXmlBuilder/Resources/icons8-internet-32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 998618a

Please sign in to comment.