Selaa lähdekoodia

Tweaked Mobile App Launcher to check that executable exists
Added Diagnostic utils for RoslynPadEditor
Tweaked class includes for Calendar

frogsoftware 1 kuukausi sitten
vanhempi
commit
7ce1159e9e

+ 2 - 2
prs.desktop/Components/Calendar/Calendar.xaml

@@ -4,11 +4,11 @@
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
              xmlns:local="clr-namespace:PRSDesktop"
-             xmlns:classes="clr-namespace:Comal.Classes"
              xmlns:wpf="clr-namespace:InABox.Wpf;assembly=InABox.Wpf"
              xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
              xmlns:dynamicGrid="clr-namespace:InABox.DynamicGrid;assembly=InABox.Wpf"
              xmlns:system="clr-namespace:System;assembly=System.Runtime.InteropServices"
+             xmlns:classes="clr-namespace:Comal.Classes;assembly=PRSClasses"
              mc:Ignorable="d"
              d:DesignHeight="600" d:DesignWidth="800"
              x:Name="Main">
@@ -110,7 +110,7 @@
                             </DataTemplate>
                         </wpf:CalendarControl.DateTemplate>
                         <wpf:CalendarControl.HeaderTemplate>
-                            <DataTemplate DataType="classes:Employee">
+                            <DataTemplate DataType="{x:Type classes:Employee}">
                                 <Border Background="White"
                                         Height="50">
                                     <TextBlock VerticalAlignment="Center"

+ 5 - 2
prs.desktop/MainWindow.xaml.cs

@@ -2124,8 +2124,11 @@ public partial class MainWindow : IPanelHostControl
     {
         var _baseDirectory = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) ?? "";
         var _mobileApp = System.IO.Path.Combine(_baseDirectory, "PRSAvalonia", "PRS.Avalonia.Desktop.exe");
-        var _info = new ProcessStartInfo(_mobileApp);
-        Process.Start(_info);
+        if (File.Exists(_mobileApp))
+        {
+            var _info = new ProcessStartInfo(_mobileApp);
+            Process.Start(_info);
+        }
     }
 
     private void StartForm<TEntityForm, TEntity, TEntityLink>(DigitalForm form)

+ 27 - 0
prs.desktop/Utils/RoslynUtils.cs

@@ -0,0 +1,27 @@
+using System;
+using System.Linq;
+using System.Reflection;
+
+namespace PRSDesktop.Utils;
+
+public static class RoslynUtils
+{
+    
+    public static void DumpRoslynPadVersions()
+    {
+        // You can add more types you know you reference from RoslynPad assemblies.
+        var _assemblies = new[]
+        {
+            typeof(RoslynPad.Editor.RoslynCodeEditor).Assembly,
+            typeof(RoslynPad.Roslyn.RoslynHost).Assembly,
+        };
+
+        foreach (var _asm in _assemblies.Distinct())
+        {
+            var _name = _asm.GetName();
+            var _info = _asm.GetCustomAttribute<AssemblyInformationalVersionAttribute>()?.InformationalVersion;
+            Console.WriteLine($@"{_name.Name}  AssemblyVersion={_name.Version}  InformationalVersion={_info}");
+        }
+    }
+
+}