Skip to content

Commit

Permalink
Update application settings
Browse files Browse the repository at this point in the history
In application settings, provide an option to disable proxy detection re: #12
  • Loading branch information
victor-david committed Mar 8, 2021
1 parent 2ab1ea9 commit ae85a9a
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Camera.App/Core/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ public bool IsCameraListVisible
get => GetItem(true);
set => SetItem(value);
}

/// <summary>
/// Gets or sets the camera wall grid layout.
/// </summary>
Expand All @@ -150,6 +151,19 @@ public WallGridLayout GridLayout

/************************************************************************/

#region Other
/// <summary>
/// Gets or sets whether proxy detection is disabled.
/// </summary>
public bool IsProxyDetectionDisabled
{
get => GetItem(false);
set => SetItem(value);
}
#endregion

/************************************************************************/

#region Private helper class
/// <summary>
/// Represents configuration values for a single window
Expand Down
3 changes: 3 additions & 0 deletions src/Camera.App/View/AppSettingsWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
Title="{Binding DisplayName}" Height="450" Width="800">

<Grid core:Property.ColumnWidths="*,*">
<StackPanel Margin="10">
<CheckBox Content="Proxy detection disabled" IsChecked="{Binding IsProxyDisabled}"/>
</StackPanel>
</Grid>
</core:AppWindow>
8 changes: 8 additions & 0 deletions src/Camera.App/ViewModel/AppSettingsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ public class AppSettingsViewModel : WindowViewModel
/************************************************************************/

#region Properties
/// <summary>
/// Gets a boolean value that determines if proxy detection is disabled.
/// </summary>
public bool IsProxyDisabled
{
get => Config.IsProxyDetectionDisabled;
set => Config.IsProxyDetectionDisabled = value;
}
#endregion

/************************************************************************/
Expand Down

0 comments on commit ae85a9a

Please sign in to comment.