Introduced new models (`SignatureDto`, `SignatureCaptureDto`, `EnvelopeReceiverDto`) to support a signature-based workflow. Added services for handling API interactions (`SignatureService`, `AuthService`, `DocumentService`, `EnvelopeReceiverService`, `SignatureCacheService`). Enhanced configuration with `ApiOptions` and `PdfViewerOptions`. Integrated DevExpress features with custom data connection providers, in-memory report storage, and font loading utilities. Marked `AnnotationDto` and `AnnotationService` as `[Obsolete]` in favor of newer implementations. Added detailed documentation for coordinate systems, unit conversions, and usage scenarios.
41 lines
1.7 KiB
C#
41 lines
1.7 KiB
C#
using DevExpress.DataAccess.Json;
|
|
using DevExpress.DataAccess.Web;
|
|
using DevExpress.DataAccess.Wizard.Services;
|
|
|
|
namespace EnvelopeGenerator.WebUI.Client.Services
|
|
{
|
|
public class CustomDataSourceWizardJsonDataConnectionStorage : IDataSourceWizardJsonConnectionStorage
|
|
{
|
|
public static JsonDataConnection GetDefaultConnection() {
|
|
var uriJsonSource = new UriJsonSource() {
|
|
Uri = new Uri(@"https://raw.githubusercontent.com/DevExpress-Examples/DataSources/master/JSON/customers.json"),
|
|
};
|
|
return new JsonDataConnection(uriJsonSource) { StoreConnectionNameOnly = true, Name = "NWindProductsJson" };
|
|
}
|
|
public static List<JsonDataConnection> GetConnections() {
|
|
var connections = new List<JsonDataConnection> {
|
|
GetDefaultConnection()
|
|
};
|
|
return connections;
|
|
}
|
|
|
|
bool IJsonConnectionStorageService.CanSaveConnection => false;
|
|
bool IJsonConnectionStorageService.ContainsConnection(string connectionName) {
|
|
return GetConnections().Any(x => x.Name == connectionName);
|
|
}
|
|
|
|
IEnumerable<JsonDataConnection> IJsonConnectionStorageService.GetConnections() {
|
|
return GetConnections();
|
|
}
|
|
|
|
JsonDataConnection IJsonDataConnectionProviderService.GetJsonDataConnection(string name) {
|
|
var connection = GetConnections().FirstOrDefault(x => x.Name == name);
|
|
if(connection == null)
|
|
throw new InvalidOperationException();
|
|
return connection;
|
|
}
|
|
|
|
void IJsonConnectionStorageService.SaveConnection(string connectionName, JsonDataConnection connection, bool saveCredentials) { }
|
|
}
|
|
}
|