File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed
Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ private async Task<BluetoothLEDevice> FindDeviceAsync()
2727 if ( device == null )
2828 continue ;
2929
30- Console . WriteLine ( $ "Device found! { device . Name } { device . Id } ") ;
30+ Console . WriteLine ( $ "Device found! Name: { device . Name } ID: { device . Id } ") ;
3131
3232 if ( await OpenDevice ( device . Name ) != 0 )
3333 {
@@ -110,7 +110,7 @@ async Task<int> OpenDevice(string deviceName)
110110
111111 _selectedDevice = await BluetoothLEDevice . FromIdAsync ( foundId ) . AsTask ( ) . TimeoutAfter ( _timeout ) ;
112112 if ( ! Console . IsInputRedirected )
113- Console . WriteLine ( $ "Connecting to { _selectedDevice . Name } .") ;
113+ Console . WriteLine ( $ "Connecting to { _selectedDevice . Name } .. .") ;
114114 }
115115 catch
116116 {
Original file line number Diff line number Diff line change 33 <PropertyGroup >
44 <OutputType >Exe</OutputType >
55 <TargetFramework >net6.0-windows10.0.17763.0</TargetFramework >
6+ <Version >0.1.0-alpha</Version >
7+ <PublishSingleFile >true</PublishSingleFile >
8+ <SelfContained >true</SelfContained >
9+ <RuntimeIdentifier >win-x64</RuntimeIdentifier >
10+ <PublishReadyToRun >true</PublishReadyToRun >
611 <ImplicitUsings >enable</ImplicitUsings >
712 <Nullable >enable</Nullable >
813 </PropertyGroup >
Original file line number Diff line number Diff line change 1- using Windows . Devices . Enumeration ;
1+ using System . Reflection ;
2+ using Windows . Devices . Enumeration ;
23using InfiniWindows ;
34
45class Program
@@ -17,7 +18,13 @@ private static async Task Main(string[] args)
1718 // Start endless BLE device watcher
1819 var watcher = CreateDeviceWatcher ( ) ;
1920
21+ var version = Assembly . GetEntryAssembly ( )
22+ . GetCustomAttribute < AssemblyInformationalVersionAttribute > ( )
23+ . InformationalVersion ;
24+
25+ Console . WriteLine ( $ "InfiniWindows v{ version } ") ;
2026 Console . WriteLine ( "Scanning for InfiniTime device..." ) ;
27+
2128 var deviceManager = new DeviceManager ( ) ;
2229 while ( await deviceManager . FindDeviceAsync ( _deviceList ) == null )
2330 {
You can’t perform that action at this time.
0 commit comments