Skip to content

Commit b132fc7

Browse files
authored
Merge pull request #33 from nelinory/development
Development To Main
2 parents 32e7c9a + 2bea10f commit b132fc7

2 files changed

Lines changed: 21 additions & 6 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ Supernote Desktop Client (SDC) is a desktop client for Supernote paper-like tabl
99
> SDC is a windows application build with .NET 6.
1010
1111
### Key Features
12-
- Automatically detects Supernote device connected with an USB cable
12+
- Automatically detects Supernote device connected with an USB cable (A5X/A6X/Nomad)
1313
- Shows basic information for connected Supernote device
1414
- Automatic sync: USB-C / Manual sync: USB-C / Manual sync: WIFI - Supernote storage backup to a local folder
1515
- Automatically archives last backup, supports archives retention policy
1616
- Supports multiple Supernote devices, each device have an unique local backup folder
1717
- Build-in offline mode, which allows most of the application features to be used without having Supernote device connected
18-
- Build-in explorer allows to view and open all Supernote files in the local backup folder (A5X/A6X: support provided by [SupernoteSharp](https://github.com/nelinory/SupernoteSharp) library)
18+
- Build-in explorer allows to view and open all Supernote files in the local backup folder (A5X/A6X/Nomad: support provided by [SupernoteSharp](https://github.com/nelinory/SupernoteSharp) library)
1919
- *.note files are converted to vectorized PDF (internal/web links supported)
2020
- *.mark files are converted to vectorized PDF (internal/web links supported)
2121
- Automatic/Manual check for new application version
@@ -30,7 +30,7 @@ Get the latest portable version from [Releases page](https://github.com/nelinory
3030
Extract the zip file to a desired location.
3131
Run `SupernoteDesktopClient.exe` from inside sdc folder.
3232
> If you get a [SmartScreen](https://user-images.githubusercontent.com/25006819/115977864-555d4300-a5ae-11eb-948b-c0139f606a2d.png) popup, click on "More info" and then "Run anyway".
33-
> The reason this popup appears is because the application is portable and it is not signed for distribution through Microsoft store..
33+
> The reason this popup appears is because the application is portable and it is not signed for distribution through Microsoft store.
3434
3535
### Wiki
3636
- [Frequently asked questions](https://github.com/nelinory/SupernoteDesktopClient/wiki/FAQ)
@@ -41,7 +41,7 @@ For release milestones, please check the project board: https://github.com/users
4141

4242
### How to build
4343
- Clone SDC repository
44-
- Open SupernoteDesktopClient solution in Visual Studio 2022 and build it
44+
- Open SupernoteDesktopClient solution in [Visual Studio Community 2022](https://visualstudio.microsoft.com/vs/community) and build it
4545

4646
### Screenshots
4747
##### Dashboard

Services/MediaDeviceService.cs

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@
44
using SupernoteDesktopClient.Models;
55
using SupernoteDesktopClient.Services.Contracts;
66
using System.Collections.Generic;
7+
using System.Diagnostics;
78
using System.Linq;
89

910
namespace SupernoteDesktopClient.Services
1011
{
1112
public class MediaDeviceService : IMediaDeviceService
1213
{
1314
private const string SUPERNOTE_DEVICE_ID = "VID_2207&PID_0011";
15+
private const string NOMAD_DEVICE_ID = "VID_2207&PID_0007";
16+
private const string SUPERNOTE_DESCRIPTION = "supernote";
17+
private const string NOMAD_DESCRIPTION = "nomad";
1418

1519
private MediaDriveInfo _driveInfo;
1620

@@ -39,7 +43,15 @@ public MediaDeviceService()
3943

4044
public void RefreshMediaDeviceInfo()
4145
{
42-
MediaDevice tmpDevice = MediaDevice.GetDevices().Where(p => p.DeviceId.Contains(SUPERNOTE_DEVICE_ID, System.StringComparison.InvariantCultureIgnoreCase)).FirstOrDefault();
46+
MediaDevice tmpDevice = MediaDevice.GetDevices().Where(p => p.DeviceId.Contains(SUPERNOTE_DEVICE_ID, System.StringComparison.InvariantCultureIgnoreCase)
47+
|| p.DeviceId.Contains(NOMAD_DEVICE_ID, System.StringComparison.InvariantCultureIgnoreCase)
48+
|| p.Description.Contains(SUPERNOTE_DESCRIPTION, System.StringComparison.InvariantCultureIgnoreCase)
49+
|| p.Description.Contains(NOMAD_DESCRIPTION, System.StringComparison.InvariantCultureIgnoreCase)).FirstOrDefault();
50+
51+
#if DEBUG
52+
if (tmpDevice != null)
53+
Debug.WriteLine($"Usb Device: {tmpDevice?.DeviceId ?? "N/A"}, Description: {tmpDevice?.Description ?? "N/A"}");
54+
#endif
4355

4456
if (_supernoteManager == null)
4557
_supernoteManager = tmpDevice;
@@ -106,7 +118,10 @@ public void RefreshMediaDeviceInfo()
106118
}
107119
}
108120

109-
DiagnosticLogger.Log($"Device: {(_supernoteManager == null ? "N/A" : _supernoteManager)}, DriveInfo: {(_driveInfo == null ? "N/A" : _driveInfo)}");
121+
DiagnosticLogger.Log($"Usb Device: {_supernoteManager?.DeviceId ?? "N/A"}, " +
122+
$"Description: {_supernoteManager?.Description ?? "N/A"}, " +
123+
$"Model: {_supernoteManager?.Model ?? "N/A"}, " +
124+
$"DriveInfo: {_driveInfo?.TotalSize.GetDataSizeAsString() ?? "N/A"}");
110125
}
111126
}
112127
}

0 commit comments

Comments
 (0)