|
5 | 5 | using Rappen.XTB.FetchXmlBuilder.AppCode; |
6 | 6 | using Rappen.XTB.FetchXmlBuilder.Extensions; |
7 | 7 | using Rappen.XTB.FetchXmlBuilder.Views; |
| 8 | +using Rappen.XTB.Helpers; |
8 | 9 | using System; |
9 | 10 | using System.Linq; |
10 | 11 | using System.Windows.Forms; |
@@ -223,15 +224,15 @@ private void crmGridView1_RecordDoubleClick(object sender, Rappen.XTB.Helpers.Co |
223 | 224 | { |
224 | 225 | return; |
225 | 226 | } |
226 | | - if (e.Value is EntityReference entref && form.ConnectionDetail.GetEntityReferenceUrl(entref) is string urlref && !string.IsNullOrEmpty(urlref)) |
| 227 | + if (e.Value is EntityReference entref) |
227 | 228 | { |
228 | 229 | form.LogUse("OpenParentRecord"); |
229 | | - form.OpenURLProfile(urlref, false); |
| 230 | + UrlUtils.OpenUrl(entref, form.ConnectionDetail); |
230 | 231 | } |
231 | | - else if (e.Entity != null && form.ConnectionDetail.GetEntityUrl(e.Entity) is string urlentity && !string.IsNullOrEmpty(urlentity)) |
| 232 | + else if (e.Entity != null) |
232 | 233 | { |
233 | 234 | form.LogUse("OpenRecord"); |
234 | | - form.OpenURLProfile(urlentity, false); |
| 235 | + UrlUtils.OpenUrl(e.Entity); |
235 | 236 | } |
236 | 237 | } |
237 | 238 |
|
@@ -321,18 +322,17 @@ private void ctxFind_Click(object sender, EventArgs e) |
321 | 322 |
|
322 | 323 | private void crmGridView1_RecordEnter(object sender, Rappen.XTB.Helpers.Controls.XRMRecordEventArgs e) |
323 | 324 | { |
324 | | - ctxRecordOpen.Tag = form.ConnectionDetail.GetEntityUrl(e.Entity); |
| 325 | + ctxRecordOpen.Tag = UrlUtils.GetEntityUrl(e.Entity, form.ConnectionDetail); |
325 | 326 | ctxRecordCopy.Tag = ctxRecordOpen.Tag; |
326 | | - ctxColumnOpen.Tag = form.ConnectionDetail.GetEntityReferenceUrl(e.Value as EntityReference); |
| 327 | + ctxColumnOpen.Tag = UrlUtils.GetEntityUrl(e.Value as EntityReference, form.ConnectionDetail); |
327 | 328 | ctxColumnCopy.Tag = ctxColumnOpen.Tag; |
328 | 329 | } |
329 | 330 |
|
330 | 331 | private void ctxOpen_Click(object sender, EventArgs e) |
331 | 332 | { |
332 | | - if (sender is ToolStripItem tool && tool.Tag is string url && !string.IsNullOrWhiteSpace(url)) |
| 333 | + if (UrlUtils.OpenUrl(sender)) |
333 | 334 | { |
334 | 335 | form.LogUse("OpenRecord"); |
335 | | - form.OpenURLProfile(url, false); |
336 | 336 | } |
337 | 337 | } |
338 | 338 |
|
|
0 commit comments