Jetzt mit Pop-out Karte via button über den Thumbnails
This commit is contained in:
parent
9ebc723c76
commit
d4677bbddf
@ -50,6 +50,7 @@
|
|||||||
<None Remove="Resources\trafficlight_yellow.png" />
|
<None Remove="Resources\trafficlight_yellow.png" />
|
||||||
<None Remove="Resources\umbrella_closed.png" />
|
<None Remove="Resources\umbrella_closed.png" />
|
||||||
<None Remove="Resources\umbrella_open.png" />
|
<None Remove="Resources\umbrella_open.png" />
|
||||||
|
<None Remove="Resources\window_size.png" />
|
||||||
<None Remove="Resources\worker2.png" />
|
<None Remove="Resources\worker2.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
@ -112,6 +113,7 @@
|
|||||||
<Resource Include="Resources\trafficlight_yellow.png" />
|
<Resource Include="Resources\trafficlight_yellow.png" />
|
||||||
<Resource Include="Resources\umbrella_closed.png" />
|
<Resource Include="Resources\umbrella_closed.png" />
|
||||||
<Resource Include="Resources\umbrella_open.png" />
|
<Resource Include="Resources\umbrella_open.png" />
|
||||||
|
<Resource Include="Resources\window_size.png" />
|
||||||
<Resource Include="Resources\worker2.png" />
|
<Resource Include="Resources\worker2.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
10
src/BreCalClient/Resources/Resources.Designer.cs
generated
10
src/BreCalClient/Resources/Resources.Designer.cs
generated
@ -1549,6 +1549,16 @@ namespace BreCalClient.Resources {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized resource of type System.Byte[].
|
||||||
|
/// </summary>
|
||||||
|
public static byte[] window_size {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("window_size", resourceCulture);
|
||||||
|
return ((byte[])(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized resource of type System.Byte[].
|
/// Looks up a localized resource of type System.Byte[].
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -607,4 +607,7 @@
|
|||||||
<data name="textPosition" xml:space="preserve">
|
<data name="textPosition" xml:space="preserve">
|
||||||
<value>Position</value>
|
<value>Position</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="window_size" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>window_size.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
BIN
src/BreCalClient/Resources/window_size.png
Normal file
BIN
src/BreCalClient/Resources/window_size.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 696 B |
@ -284,7 +284,14 @@
|
|||||||
</Border>
|
</Border>
|
||||||
<!-- TERMINAL -->
|
<!-- TERMINAL -->
|
||||||
<Border Grid.Row="0" Grid.RowSpan="3" Grid.Column="7" BorderThickness="1, 0, 0, 0" BorderBrush="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" Padding="3,0,0,0">
|
<Border Grid.Row="0" Grid.RowSpan="3" Grid.Column="7" BorderThickness="1, 0, 0, 0" BorderBrush="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" Padding="3,0,0,0">
|
||||||
<Grid x:Name="placeHolderMap" />
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="16" />
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid x:Name="buttonPanel" Grid.Row="0" />
|
||||||
|
<Grid x:Name="placeHolderMap" Grid.Row="1" />
|
||||||
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
|||||||
@ -6,6 +6,8 @@ using BreCalClient.misc.Model;
|
|||||||
using log4net;
|
using log4net;
|
||||||
using Microsoft.Web.WebView2.Wpf;
|
using Microsoft.Web.WebView2.Wpf;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Threading.Tasks;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
@ -521,11 +523,52 @@ namespace BreCalClient
|
|||||||
if(this._webView == null)
|
if(this._webView == null)
|
||||||
{
|
{
|
||||||
_webView = new WebView2();
|
_webView = new WebView2();
|
||||||
|
|
||||||
|
Button popOutButton = new()
|
||||||
|
{
|
||||||
|
Width = 16,
|
||||||
|
Height = 16,
|
||||||
|
Content = new Image
|
||||||
|
{
|
||||||
|
Source = new BitmapImage(new Uri("Resources/window_size.png", UriKind.Relative))
|
||||||
|
},
|
||||||
|
HorizontalAlignment = HorizontalAlignment.Left,
|
||||||
|
VerticalAlignment = VerticalAlignment.Top
|
||||||
|
};
|
||||||
|
popOutButton.Click += (o, e) =>
|
||||||
|
{
|
||||||
|
System.Diagnostics.Trace.WriteLine("Popout button clicked");
|
||||||
|
var pop = new Window
|
||||||
|
{
|
||||||
|
Title = "Detail map",
|
||||||
|
Width = 800,
|
||||||
|
Height = 600
|
||||||
|
};
|
||||||
|
|
||||||
|
this.placeHolderMap.Children.Remove(_webView);
|
||||||
|
pop.Content = _webView;
|
||||||
|
|
||||||
|
pop.Closing += (s, a) =>
|
||||||
|
{
|
||||||
|
pop.Content = null;
|
||||||
|
this.placeHolderMap.Children.Add(_webView);
|
||||||
|
popOutButton.IsEnabled = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
pop.Show();
|
||||||
|
|
||||||
|
popOutButton.IsEnabled = false;
|
||||||
|
};
|
||||||
|
|
||||||
string trenzUri = $"https://aismap.trenz.de/Live/StaticDemo.aspx?site=bsmd&Zoom=13&api=usgPcOPJnvTWUPTVbfVs&apikey=demo-H6cE4SG0FG&imo={this.ShipcallControlModel?.Ship?.Imo}";
|
string trenzUri = $"https://aismap.trenz.de/Live/StaticDemo.aspx?site=bsmd&Zoom=13&api=usgPcOPJnvTWUPTVbfVs&apikey=demo-H6cE4SG0FG&imo={this.ShipcallControlModel?.Ship?.Imo}";
|
||||||
await Dispatcher.InvokeAsync(() => {
|
await Dispatcher.InvokeAsync(() => {
|
||||||
this.placeHolderMap.Children.Add(_webView);
|
|
||||||
|
buttonPanel.Children.Add(popOutButton);
|
||||||
|
placeHolderMap.Children.Add(_webView);
|
||||||
|
|
||||||
_webView.EnsureCoreWebView2Async(null);
|
_webView.EnsureCoreWebView2Async(null);
|
||||||
_webView.Source = new Uri(trenzUri);
|
_webView.Source = new Uri(trenzUri);
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user