Skip to content

Commit

Permalink
New flight submitting logic, whit error handling
Browse files Browse the repository at this point in the history
Moved messagebox and notification to simulator library so it can generate messageboxes and fire them via event
  • Loading branch information
sushiat committed Dec 13, 2023
1 parent 3994f56 commit 33cdc88
Show file tree
Hide file tree
Showing 30 changed files with 330 additions and 182 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

namespace OpenSky.Agent.Controls.Models
namespace OpenSky.Agent.Simulator.Controls.Models
{
using System;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

namespace OpenSky.Agent.Controls.Models
namespace OpenSky.Agent.Simulator.Controls.Models
{
/// -------------------------------------------------------------------------------------------------
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

namespace OpenSky.Agent.Controls.Models
namespace OpenSky.Agent.Simulator.Controls.Models
{
/// -------------------------------------------------------------------------------------------------
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
====================================================================================================================
-->

<UserControl x:Class="OpenSky.Agent.Controls.OpenSkyMessageBox"
<UserControl x:Class="OpenSky.Agent.Simulator.Controls.OpenSkyMessageBox"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:sf="http://schemas.syncfusion.com/wpf"
xmlns:tools="clr-namespace:OpenSky.Agent.Tools"
xmlns:tools="clr-namespace:OpenSky.Agent.Simulator.Tools"
mc:Ignorable="d" Foreground="White" tools:VisibilityAnimation.AnimationType="Fade" Visibility="Hidden"
d:DesignHeight="450" d:DesignWidth="800" Loaded="OpenSkyMessageBoxOnLoaded">
<Grid>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

namespace OpenSky.Agent.Controls
namespace OpenSky.Agent.Simulator.Controls
{
using System;
using System.Media;
Expand All @@ -13,7 +13,7 @@ namespace OpenSky.Agent.Controls
using System.Windows.Input;
using System.Windows.Media;

using OpenSky.Agent.Controls.Models;
using OpenSky.Agent.Simulator.Controls.Models;
using OpenSky.Agent.Simulator.Tools;

/// -------------------------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
====================================================================================================================
-->

<UserControl x:Class="OpenSky.Agent.Controls.OpenSkyNotification"
<UserControl x:Class="OpenSky.Agent.Simulator.Controls.OpenSkyNotification"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:sf="http://schemas.syncfusion.com/wpf"
xmlns:tools="clr-namespace:OpenSky.Agent.Tools"
xmlns:tools="clr-namespace:OpenSky.Agent.Simulator.Tools"
mc:Ignorable="d"
d:DesignWidth="300" Foreground="White" tools:VisibilityAnimation.AnimationType="SlideFromRight" Visibility="Hidden" Loaded="OpenSkyNotificationOnLoaded">
<Border Name="BackgroundBorder" Background="#023b31" CornerRadius="3" Width="300" Margin="0,0,5,5">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

namespace OpenSky.Agent.Controls
namespace OpenSky.Agent.Simulator.Controls
{
using System;
using System.Threading;
using System.Windows;
using System.Windows.Media;

using OpenSky.Agent.Controls.Models;
using OpenSky.Agent.Simulator.Controls.Models;
using OpenSky.Agent.Simulator.Tools;

/// -------------------------------------------------------------------------------------------------
Expand Down
22 changes: 22 additions & 0 deletions OpenSky.Agent.Simulator/OpenSky.Agent.Simulator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="Syncfusion.SfProgressBar.WPF, Version=23.2460.7.0, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">
<HintPath>..\packages\Syncfusion.SfProgressBar.WPF.23.2.7\lib\net46\Syncfusion.SfProgressBar.WPF.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Device" />
Expand All @@ -79,6 +82,15 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Controls\Models\ErrorDetails.cs" />
<Compile Include="Controls\Models\ExtendedMessageBoxImage.cs" />
<Compile Include="Controls\Models\ExtendedMessageBoxResult.cs" />
<Compile Include="Controls\OpenSkyMessageBox.xaml.cs">
<DependentUpon>OpenSkyMessageBox.xaml</DependentUpon>
</Compile>
<Compile Include="Controls\OpenSkyNotification.xaml.cs">
<DependentUpon>OpenSkyNotification.xaml</DependentUpon>
</Compile>
<Compile Include="Enums\FuelTank.cs" />
<Compile Include="Enums\Pushback.cs" />
<Compile Include="Enums\Requests.cs" />
Expand Down Expand Up @@ -137,6 +149,7 @@
<Compile Include="Tools\StringEnumExtension.cs" />
<Compile Include="Tools\StringValueAttribute.cs" />
<Compile Include="Tools\UpdateGUIDelegate.cs" />
<Compile Include="Tools\VisibilityAnimation.cs" />
</ItemGroup>
<ItemGroup>
<None Include="OpenAPIs\swagger.json">
Expand All @@ -149,6 +162,14 @@
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Page Include="Controls\OpenSkyMessageBox.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Controls\OpenSkyNotification.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="OpenSkyColors.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
Expand All @@ -161,5 +182,6 @@
<Analyzer Include="..\packages\Microsoft.CodeAnalysis.NetAnalyzers.8.0.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.CSharp.NetAnalyzers.dll" />
<Analyzer Include="..\packages\Microsoft.CodeAnalysis.NetAnalyzers.8.0.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.NetAnalyzers.dll" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
2 changes: 2 additions & 0 deletions OpenSky.Agent.Simulator/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// --------------------------------------------------------------------------------------------------------------------

using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

[assembly: AssemblyTitle("OpenSky.Agent.Simulator")]
Expand All @@ -19,3 +20,4 @@
[assembly: Guid("30c467e8-2eee-41e5-be01-0142a61ba171")]
[assembly: AssemblyVersion("0.5.9")]
[assembly: AssemblyFileVersion("0.5.9")]
[assembly: InternalsVisibleTo("OpenSky.Agent")]
Loading

0 comments on commit 33cdc88

Please sign in to comment.