|
@@ -50,9 +50,15 @@ public class IssuesGrid : DynamicGrid<Kanban>, ISpecificGrid
|
|
|
// PropertyType = typeof(string),
|
|
|
// ClassType = typeof(Kanban)
|
|
|
// };
|
|
|
+
|
|
|
+ private String _baseDirectory;
|
|
|
|
|
|
public IssuesGrid() : base()
|
|
|
{
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
var cols = LookupFactory.DefineColumns<Kanban>();
|
|
|
|
|
|
// Minimum Columns for Lookup values
|
|
@@ -68,6 +74,8 @@ public class IssuesGrid : DynamicGrid<Kanban>, ISpecificGrid
|
|
|
{
|
|
|
private IssuesGrid Grid;
|
|
|
|
|
|
+
|
|
|
+
|
|
|
public UIComponent(IssuesGrid grid)
|
|
|
{
|
|
|
Grid = grid;
|
|
@@ -100,8 +108,36 @@ public class IssuesGrid : DynamicGrid<Kanban>, ISpecificGrid
|
|
|
|
|
|
AddButton("Check for Updates", PRSDesktop.Resources.autoupdate.AsBitmapImage(), CheckForUpdates);
|
|
|
AddButton("Open Support Session", PRSDesktop.Resources.appicon.AsBitmapImage(), OpenSupportSession);
|
|
|
- }
|
|
|
+
|
|
|
+ _baseDirectory = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) ?? "";
|
|
|
+ if (File.Exists(Path.Combine(_baseDirectory, "PRSAvalonia", "net8.0-windows10.0.19041.0",
|
|
|
+ "PRS.Avalonia.Desktop.exe")))
|
|
|
+ {
|
|
|
+ var btn = AddButton("PRS Mobile App", PRSDesktop.Resources.map.AsBitmapImage(), LaunchPRSMobile);
|
|
|
+ btn.Margin = new Thickness(20, btn.Margin.Top, btn.Margin.Right, btn.Margin.Bottom);
|
|
|
+ }
|
|
|
|
|
|
+ if (File.Exists(Path.Combine(_baseDirectory, "PRSDigitalKey", "net8.0-windows10.0.19041.0", "PRS.DigitalKey.Desktop.exe")))
|
|
|
+ AddButton("PRS Digital Key App", PRSDesktop.Resources.key.AsBitmapImage(), LaunchPRSDigitalKey);
|
|
|
+ }
|
|
|
+
|
|
|
+ private bool LaunchPRSMobile(Button button, CoreRow[] rows)
|
|
|
+ {
|
|
|
+ var _mobileApp = System.IO.Path.Combine(_baseDirectory, "PRSAvalonia", "net8.0-windows10.0.19041.0", "PRS.Avalonia.Desktop.exe");
|
|
|
+ var _info = new ProcessStartInfo(_mobileApp);
|
|
|
+ Process.Start(_info);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ private bool LaunchPRSDigitalKey(Button button, CoreRow[] rows)
|
|
|
+ {
|
|
|
+
|
|
|
+ var _mobileApp = Path.Combine(_baseDirectory, "PRSDigitalKey", "net8.0-windows10.0.19041.0", "PRS.DigitalKey.Desktop.exe");
|
|
|
+ var _info = new ProcessStartInfo(_mobileApp);
|
|
|
+ Process.Start(_info);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
private bool OpenSupportSession(Button button, CoreRow[] rows)
|
|
|
{
|
|
|
SupportUtils.OpenSupportSession();
|