mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 10:36:30 +00:00
clean postbuild script
clean warnings
This commit is contained in:
@@ -253,10 +253,10 @@ public partial class Annotator
|
||||
|
||||
ShowAnnotations(res.Annotation, showImage: true);
|
||||
}
|
||||
private async Task SaveUserSettings()
|
||||
private Task SaveUserSettings()
|
||||
{
|
||||
if (_suspendLayout)
|
||||
return;
|
||||
return Task.CompletedTask;
|
||||
|
||||
_appConfig.UIConfig.LeftPanelWidth = MainGrid.ColumnDefinitions.FirstOrDefault()!.Width.Value;
|
||||
_appConfig.UIConfig.RightPanelWidth = MainGrid.ColumnDefinitions.LastOrDefault()!.Width.Value;
|
||||
@@ -266,6 +266,7 @@ public partial class Annotator
|
||||
_configUpdater.Save(_appConfig);
|
||||
return Task.CompletedTask;
|
||||
}, SaveConfigTaskId, TimeSpan.FromSeconds(5));
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
private void ShowTimeAnnotations(TimeSpan time)
|
||||
|
||||
@@ -178,12 +178,13 @@ namespace Azaion.Annotator.Controls
|
||||
|
||||
void ForceUpdateText()
|
||||
{
|
||||
|
||||
_fText = new FormattedText(_text,
|
||||
CultureInfo.InvariantCulture,
|
||||
FlowDirection.LeftToRight,
|
||||
Font,
|
||||
FontSize,
|
||||
Foreground);
|
||||
Foreground, 1.0);
|
||||
IsChanged = true;
|
||||
}
|
||||
|
||||
@@ -207,7 +208,7 @@ namespace Azaion.Annotator.Controls
|
||||
|
||||
Visual _child = null!;
|
||||
|
||||
public virtual Visual Child
|
||||
public virtual Visual? Child
|
||||
{
|
||||
get => _child;
|
||||
set
|
||||
@@ -228,7 +229,7 @@ namespace Azaion.Annotator.Controls
|
||||
}
|
||||
|
||||
// cache the new child
|
||||
_child = value;
|
||||
_child = value!;
|
||||
|
||||
InvalidateVisual();
|
||||
}
|
||||
@@ -295,7 +296,7 @@ namespace Azaion.Annotator.Controls
|
||||
}
|
||||
}
|
||||
|
||||
protected override Visual GetVisualChild(int index)
|
||||
protected override Visual? GetVisualChild(int index)
|
||||
{
|
||||
return Child;
|
||||
}
|
||||
|
||||
@@ -46,8 +46,11 @@ public partial class MapMatcher : UserControl
|
||||
|
||||
private async Task OpenGpsLocation(int gpsFilesIndex)
|
||||
{
|
||||
var media = GpsFiles.Items[gpsFilesIndex] as MediaFileInfo;
|
||||
//var media = GpsFiles.Items[gpsFilesIndex] as MediaFileInfo;
|
||||
var ann = _annotations.GetValueOrDefault(gpsFilesIndex);
|
||||
if (ann == null)
|
||||
return;
|
||||
|
||||
GpsImageEditor.Background = new ImageBrush
|
||||
{
|
||||
ImageSource = await Path.Combine(_currentDir, ann.Name).OpenImage()
|
||||
@@ -110,9 +113,9 @@ public partial class MapMatcher : UserControl
|
||||
await _gpsMatcherService.RunGpsMatching(dir.FullName, initialLat, initialLon, async res => await SetMarker(res));
|
||||
}
|
||||
|
||||
private async Task SetMarker(GpsMatchResult result)
|
||||
private Task SetMarker(GpsMatchResult result)
|
||||
{
|
||||
await Dispatcher.Invoke(async () =>
|
||||
Dispatcher.Invoke(() =>
|
||||
{
|
||||
var marker = new GMapMarker(new PointLatLng(result.Latitude, result.Longitude));
|
||||
var ann = _annotations[result.Index];
|
||||
@@ -126,6 +129,7 @@ public partial class MapMatcher : UserControl
|
||||
SatelliteMap.Position = new PointLatLng(result.Latitude, result.Longitude);
|
||||
SatelliteMap.ZoomAndCenterMarkers(null);
|
||||
});
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
private async Task SetFromCsv(List<MediaFileInfo> mediaFiles)
|
||||
|
||||
Reference in New Issue
Block a user