-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into version-bump
- Loading branch information
Showing
8 changed files
with
176 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
src/client/DCSInsight/Windows/WindowAskReloadAPIDialog.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<Window x:Class="DCSInsight.Windows.WindowAskReloadAPIDialog" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
mc:Ignorable="d" | ||
Title="Reload APIs from server?" | ||
Height="200" | ||
Width="410" | ||
WindowStartupLocation="CenterOwner" | ||
Loaded="Window_Loaded"> | ||
<Grid> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="1*" /> | ||
</Grid.ColumnDefinitions> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="5*" /> | ||
<RowDefinition Height="2*" /> | ||
</Grid.RowDefinitions> | ||
<StackPanel Grid.Row="0"> | ||
<TextBlock FontSize="12" Margin="5,5,5,5"> | ||
<LineBreak/> | ||
Do you want to reload all APIs from the server? | ||
<LineBreak/> | ||
All APIs will lose any information you may have entered. | ||
<LineBreak/> | ||
APIs can also be reloaded by restarting the client. | ||
<LineBreak/> | ||
If you restart missions frequently it is recommended to not reload APIs. | ||
</TextBlock> | ||
</StackPanel> | ||
<DockPanel Grid.Row="1"> | ||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right"> | ||
<CheckBox Name="CheckBoxDoNotAskAgain" IsChecked="False" VerticalAlignment="Bottom" Margin="10,10,10,10" HorizontalAlignment="Right" Content="Do not ask again" /> | ||
<Button Name="ButtonYes" Content="Yes" Width="40" VerticalAlignment="Bottom" Margin="10,10,0,10" HorizontalAlignment="Right" Click="ButtonYes_OnClick" /> | ||
<Button Name="ButtonNo" Content="No" Width="40" VerticalAlignment="Bottom" Margin="10,10,10,10" HorizontalAlignment="Right" Click="ButtonNo_OnClick" /> | ||
</StackPanel> | ||
</DockPanel> | ||
</Grid> | ||
</Window> |
65 changes: 65 additions & 0 deletions
65
src/client/DCSInsight/Windows/WindowAskReloadAPIDialog.xaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
using DCSInsight.Communication; | ||
using DCSInsight.Misc; | ||
using System; | ||
using System.Windows; | ||
using System.Windows.Forms; | ||
using DCSInsight.Properties; | ||
|
||
namespace DCSInsight.Windows | ||
{ | ||
/// <summary> | ||
/// Interaction logic for WindowAskReloadAPIDialog.xaml | ||
/// </summary> | ||
public partial class WindowAskReloadAPIDialog | ||
{ | ||
public DialogResult DialogResult { get; set; } | ||
|
||
public WindowAskReloadAPIDialog() | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
private void Window_Loaded(object sender, RoutedEventArgs e) | ||
{ | ||
try | ||
{ | ||
} | ||
catch (Exception ex) | ||
{ | ||
Common.ShowErrorMessageBox(ex); | ||
} | ||
} | ||
|
||
private void ButtonYes_OnClick(object sender, RoutedEventArgs e) | ||
{ | ||
try | ||
{ | ||
Settings.Default.AskForReloadAPIList = !CheckBoxDoNotAskAgain.IsChecked == true; | ||
Settings.Default.ReloadAPIList = true; | ||
Settings.Default.Save(); | ||
DialogResult = DialogResult.Yes; | ||
Close(); | ||
} | ||
catch (Exception ex) | ||
{ | ||
Common.ShowErrorMessageBox(ex); | ||
} | ||
} | ||
|
||
private void ButtonNo_OnClick(object sender, RoutedEventArgs e) | ||
{ | ||
try | ||
{ | ||
Settings.Default.AskForReloadAPIList = !CheckBoxDoNotAskAgain.IsChecked == true; | ||
Settings.Default.ReloadAPIList = false; | ||
Settings.Default.Save(); | ||
DialogResult = DialogResult.No; | ||
Close(); | ||
} | ||
catch (Exception ex) | ||
{ | ||
Common.ShowErrorMessageBox(ex); | ||
} | ||
} | ||
} | ||
} |