44using System . Linq ;
55using System . Reflection ;
66using Autofac ;
7- using Avalonia ;
8- using Avalonia . Platform ;
97using Core2D . Configuration . Windows ;
108using Core2D . Json ;
119using Core2D . Model ;
@@ -123,21 +121,11 @@ private void InitializeEditor()
123121 Editor . CurrentPathTool = Editor . PathTools . FirstOrDefault ( t => t . Title == "Line" ) ;
124122 Editor . IsToolIdle = true ;
125123
126- var runtimePlatform = AvaloniaLocator . Current . GetService < IRuntimePlatform > ( ) ;
127- var windowingPlatform = AvaloniaLocator . Current . GetService < IWindowingPlatform > ( ) ;
128- var platformRenderInterface = AvaloniaLocator . Current . GetService < IPlatformRenderInterface > ( ) ;
129- if ( windowingPlatform is { } && platformRenderInterface is { } && runtimePlatform is { } )
130- {
131- var windowingSubsystemName = windowingPlatform . GetType ( ) . Assembly . GetName ( ) . Name ;
132- var renderingSubsystemName = platformRenderInterface . GetType ( ) . Assembly . GetName ( ) . Name ;
133- var runtimeInfo = runtimePlatform . GetRuntimeInfo ( ) ;
134- var aboutInfo = CreateAboutInfo ( ServiceProvider , runtimeInfo , windowingSubsystemName , renderingSubsystemName ) ;
124+ Editor . AboutInfo = CreateAboutInfo ( ServiceProvider ) ;
135125
136- Editor . AboutInfo = aboutInfo ;
137- }
138126 }
139127
140- private AboutInfoViewModel CreateAboutInfo ( IServiceProvider ? serviceProvider , RuntimePlatformInfo runtimeInfo , string ? windowingSubsystem , string ? renderingSubsystem )
128+ private AboutInfoViewModel CreateAboutInfo ( IServiceProvider ? serviceProvider )
141129 {
142130 return new AboutInfoViewModel ( serviceProvider )
143131 {
@@ -146,10 +134,6 @@ private AboutInfoViewModel CreateAboutInfo(IServiceProvider? serviceProvider, Ru
146134 Description = "A multi-platform data driven 2D diagram editor." ,
147135 Copyright = "Copyright (c) Wiesław Šoltés. All rights reserved." ,
148136 License = "Licensed under the MIT License. See LICENSE file in the project root for full license information." ,
149- IsDesktop = runtimeInfo . IsDesktop ,
150- IsMobile = runtimeInfo . IsMobile ,
151- WindowingSubsystemName = windowingSubsystem ,
152- RenderingSubsystemName = renderingSubsystem
153137 } ;
154138 }
155139
0 commit comments