Skip to content

Warnings fix and Azure API switch #82

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 52 additions & 52 deletions CS/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,58 +3,58 @@
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="DevExpress.Blazor.PdfViewer" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.Document.Processor" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.Drawing.Skia" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.Api.EFCore.All" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.Blazor" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.Chart" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.Chart.Win" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.CodeAnalysis" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.ConditionalAppearance" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.Dashboards" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.Dashboards.Blazor" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.Dashboards.Win" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.EFCore" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.FileAttachment.Blazor" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.FileAttachment.Win" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.MultiTenancy.AspNetCore.EFCore" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.MultiTenancy.Blazor.EFCore" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.MultiTenancy.EFCore" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.MultiTenancy.Win.EFCore" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.Notifications" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.Notifications.Win" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.Objects" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.Office" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.Office.Blazor" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.Office.Win" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.PivotChart" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.PivotChart.Win" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.PivotGrid" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.PivotGrid.Win" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.ReportsV2" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.ReportsV2.Blazor" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.ReportsV2.Win" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.Scheduler" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.Scheduler.Blazor" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.Scheduler.Win" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.Security.AspNetCore.EFCore" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.Security.EFCore.Extensions.Win" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.TreeListEditors" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.TreeListEditors.Win" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.Validation" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.Validation.Blazor" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.Validation.Win" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.ViewVariantsModule" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.Win" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.ExpressApp.Win.Design" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.Persistent.Base" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.Persistent.BaseImpl.EFCore" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.RichEdit.Export" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.Win.Design" Version="25.1.2-beta-25150" />
<PackageVersion Include="DevExpress.Win.Map" Version="25.1.2-beta-25150" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.10" />
<PackageVersion Include="DevExpress.Blazor.PdfViewer" Version="25.1.3" />
<PackageVersion Include="DevExpress.Document.Processor" Version="25.1.3" />
<PackageVersion Include="DevExpress.Drawing.Skia" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.Api.EFCore.All" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.Blazor" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.Chart" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.Chart.Win" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.CodeAnalysis" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.ConditionalAppearance" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.Dashboards" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.Dashboards.Blazor" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.Dashboards.Win" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.EFCore" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.FileAttachment.Blazor" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.FileAttachment.Win" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.MultiTenancy.AspNetCore.EFCore" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.MultiTenancy.Blazor.EFCore" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.MultiTenancy.EFCore" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.MultiTenancy.Win.EFCore" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.Notifications" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.Notifications.Win" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.Objects" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.Office" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.Office.Blazor" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.Office.Win" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.PivotChart" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.PivotChart.Win" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.PivotGrid" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.PivotGrid.Win" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.ReportsV2" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.ReportsV2.Blazor" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.ReportsV2.Win" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.Scheduler" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.Scheduler.Blazor" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.Scheduler.Win" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.Security.AspNetCore.EFCore" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.Security.EFCore.Extensions.Win" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.TreeListEditors" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.TreeListEditors.Win" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.Validation" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.Validation.Blazor" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.Validation.Win" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.ViewVariantsModule" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.Win" Version="25.1.3" />
<PackageVersion Include="DevExpress.ExpressApp.Win.Design" Version="25.1.3" />
<PackageVersion Include="DevExpress.Persistent.Base" Version="25.1.3" />
<PackageVersion Include="DevExpress.Persistent.BaseImpl.EFCore" Version="25.1.3" />
<PackageVersion Include="DevExpress.RichEdit.Export" Version="25.1.3" />
<PackageVersion Include="DevExpress.Win.Design" Version="25.1.3" />
<PackageVersion Include="DevExpress.Win.Map" Version="25.1.3" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.17" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebView.WindowsForms" Version="8.0.91" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.0" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.InMemory" Version="9.0.0" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
@using DevExpress.Persistent.Base
@using OutlookInspired.Module.Features.Maps
@inject IMapApiKeyProvider ApiKeyProvider
<DxMap Provider="MapProvider.Bing" Width="100%" Height="550px" Zoom="16">
<DxMap Provider="MapProvider.Azure" Width="100%" Height="550px" Zoom="16">
<DxMapCenter GeoPosition="@GetLocation(Center)" />
<DxMapApiKeys Bing="@ApiKeyProvider.Key"></DxMapApiKeys>
<DxMapApiKeys Azure="@ApiKeyProvider.Key"></DxMapApiKeys>
<DxMapMarkers>
@foreach (var entity in Markers){
<DxMapMarker MarkerId="@entity.Key">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
<Configurations>Debug;Release;EasyTest</Configurations>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<NoWarn>1701;1702;NU1507</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<NoWarn>1701;1702;NU1507</NoWarn>
</PropertyGroup>
<ItemGroup>
<!-- Essential DevExpress Package References -->
<PackageReference Include="DevExpress.ExpressApp.Blazor" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
<Configurations>Debug;Release;EasyTest</Configurations>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<NoWarn>1701;1702;NU1507</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<NoWarn>1701;1702;NU1507</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="DevExpress.Drawing.Skia" />
<PackageReference Include="DevExpress.ExpressApp" />
Expand Down
3 changes: 0 additions & 3 deletions CS/OutlookInspired.Module/BusinessObjects/Employee.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ public class Employee :OutlookInspiredBaseObject,IViewFilter,IObjectSpaceLink,IR
public const string ChildDetailView = "Employee_DetailView_Child";
public const string LayoutViewListView = "EmployeeLayoutView_ListView";

[NotMapped][Browsable(false)]
public new IObjectSpace ObjectSpace{ get; set; }

object IResource.Id => ID;

[EditorAlias(EditorAliases.MapHomeOfficePropertyEditor)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@


using System.ComponentModel;
using System.ComponentModel.DataAnnotations.Schema;
using DevExpress.ExpressApp;
using DevExpress.Persistent.BaseImpl.EF;
using OutlookInspired.Module.Attributes.Appearance;

Expand All @@ -18,11 +16,6 @@ public abstract class OutlookInspiredBaseObject:BaseObject{
[Browsable(false)]
public virtual long IdInt64{ get; set; }

[NotMapped][Browsable(false)]
public new IObjectSpace ObjectSpace{
get => base.ObjectSpace;
set => base.ObjectSpace=value;
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ static RichEditDocumentServer CreateDocumentServer(byte[] bytes, params object[]
};

public static byte[] MailMergeInvoice( Order order){
var template = MailMergeData(order.ObjectSpace,"Order").Template;
var template = MailMergeData(((IObjectSpaceLink)order).ObjectSpace,"Order").Template;
var richEditDocumentServer = CreateDocumentServer(template,order);
return MailMergeInvoice(richEditDocumentServer, order);
}
Expand All @@ -45,7 +45,7 @@ static void MailMerge<T>( IRichEditDocumentServer documentServer,IRichTextMailMe
static void CalculateDocumentVariable(CalculateDocumentVariableEventArgs e,Order order, IRichEditDocumentServer richEditDocumentServer){
switch (e.VariableName){
case nameof(Order.OrderItems):
MailMerge(richEditDocumentServer,MailMergeData(order.ObjectSpace,"OrderItem"),MergeMode.JoinTables, order.OrderItems.ToArray());
MailMerge(richEditDocumentServer,MailMergeData(((IObjectSpaceLink)order).ObjectSpace,"OrderItem"),MergeMode.JoinTables, order.OrderItems.ToArray());
e.PreserveInsertedContentFormatting = true;
e.KeepLastParagraph = false;
e.Value = richEditDocumentServer;
Expand Down
4 changes: 2 additions & 2 deletions CS/OutlookInspired.Module/OutlookInspired.Module.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
<Platforms>AnyCPU</Platforms>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<NoWarn>1701;1702;CA1416</NoWarn>
<NoWarn>1701;1702;CA1416;NU1507</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<NoWarn>1701;1702;CA1416</NoWarn>
<NoWarn>1701;1702;CA1416;NU1507</NoWarn>
</PropertyGroup>
<ItemGroup>
<None Remove="Images\_Completed.png" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,33 +15,38 @@ namespace OutlookInspired.Win.Editors.Maps{
public class MapControlHomeOfficePropertyEditor(Type objectType, IModelMemberViewItem model)
: WinPropertyEditor(objectType, model){
private ImageLayer _imageLayer;
private BingRouteDataProvider _routeDataProvider;
private AzureRouteDataProvider _routeDataProvider;
private GeoPoint _homeOfficePoint;
private MapControl _mapControl;

protected override object CreateControlCore(){
var bingKey = ServiceProvider.GetService<IMapApiKeyProvider>().Key;
var azureKey = ServiceProvider.GetService<IMapApiKeyProvider>().Key;
_mapControl = new MapControl();
_imageLayer = new ImageLayer{ DataProvider =new BingMapDataProvider(){ BingKey = bingKey,Kind = BingMapKind.Road} };
_imageLayer = new ImageLayer{ DataProvider =new AzureMapDataProvider(){ AzureKey = azureKey
// ,Kind = AzureMapKind.Road
}
};
_imageLayer.Error+=ImageLayerOnError;
_mapControl.Layers.Add(_imageLayer);
_mapControl.Layers.AddRange(new LayerBase[]{
new InformationLayer{ DataProvider = new BingGeocodeDataProvider(){BingKey =bingKey } },
new InformationLayer{ DataProvider = new BingSearchDataProvider(){BingKey = bingKey} },
new InformationLayer{ DataProvider = new AzureGeocodeDataProvider(){AzureKey =azureKey } },
new InformationLayer{ DataProvider = new AzureSearchDataProvider(){AzureKey = azureKey} },

});
var modelHomeOffice = (((IModelOptionsHomeOffice)View.Model.Application.Options).HomeOffice);
_homeOfficePoint = new GeoPoint(modelHomeOffice.Latitude,modelHomeOffice.Longitude);
_routeDataProvider = new BingRouteDataProvider(){ BingKey = bingKey,RouteOptions = { DistanceUnit = DistanceMeasureUnit.Mile} };
_routeDataProvider = new AzureRouteDataProvider(){ AzureKey = azureKey,
// RouteOptions = { DistanceUnit = DistanceMeasureUnit.Mile}
};
var routeLayer = RouteLayer();
AddRoutePoints(routeLayer);
_mapControl.Layers.Add(routeLayer);
_routeDataProvider.RouteCalculated+=RouteDataProviderOnRouteCalculated;
CalculateRoute(BingTravelMode.Driving);
CalculateRoute(AzureTravelMode.Car);
return _mapControl;
}

private void RouteDataProviderOnRouteCalculated(object sender, BingRouteCalculatedEventArgs e){
private void RouteDataProviderOnRouteCalculated(object sender, AzureRouteCalculatedEventArgs e){
var mapsMarker = ((IMapsMarker)View.CurrentObject);
var zoomToRegionService = (IZoomToRegionService)((IServiceProvider)_mapControl).GetService(typeof(IZoomToRegionService));
ZoomTo(zoomToRegionService,_homeOfficePoint, new GeoPoint(mapsMarker.Latitude,mapsMarker.Longitude));
Expand All @@ -59,12 +64,11 @@ void ZoomTo(IZoomToRegionService zoomService, GeoPoint pointA, GeoPoint pointB,
static double CalculatePadding(double margin,double delta)
=> delta > 0 ? Math.Max(0.1, delta * margin) : delta < 0 ? Math.Min(-0.1, delta * margin) : 0;

public void CalculateRoute(BingTravelMode bingTravelMode){
_routeDataProvider.RouteOptions.Mode=bingTravelMode;
public void CalculateRoute(AzureTravelMode travelMode){
var mapsMarker = (IMapsMarker)View.CurrentObject;
_routeDataProvider.CalculateRoute(new[]
{ new RouteWaypoint("Home Office", _homeOfficePoint), new RouteWaypoint(mapsMarker.Title,
new GeoPoint(mapsMarker.Latitude, mapsMarker.Longitude)) }.ToList());
new GeoPoint(mapsMarker.Latitude, mapsMarker.Longitude)) }.ToList(),new AzureRouteOptions(){TravelMode = travelMode,});
}

public void AddRoutePoints(InformationLayer routeLayer){
Expand Down
4 changes: 2 additions & 2 deletions CS/OutlookInspired.Win/Editors/Maps/MapItemListEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ protected override object CreateControlsCore(){
var bingKey = ServiceProvider.GetService<IMapApiKeyProvider>().Key;
var mapControl = new MapControl();
_zoomToRegionService = (IZoomToRegionService)((IServiceProvider)mapControl).GetService(typeof(IZoomToRegionService));
_imageLayer = new ImageLayer{ DataProvider =new BingMapDataProvider(){ BingKey = bingKey,Kind = BingMapKind.Road} };
_imageLayer = new ImageLayer{ DataProvider =new AzureMapDataProvider(){ AzureKey = bingKey} };
_imageLayer.Error+=ImageLayerOnError;
mapControl.Layers.Add(_imageLayer);
mapControl.Layers.AddRange(new LayerBase[]{
new InformationLayer{ DataProvider = new BingSearchDataProvider(){BingKey = bingKey} },
new InformationLayer{ DataProvider = new AzureSearchDataProvider(){AzureKey = bingKey} },
});
mapControl.ZoomLevel = 8;
mapControl.Dock=DockStyle.Fill;
Expand Down
Loading