Fix repository clone strategy
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
using StructureHelperCommon.Models.Calculators;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace StructureHelper.Windows.CalculationWindows.CalculatorsViews
|
||||
{
|
||||
public class SelectResultSettings
|
||||
{
|
||||
public string Filename { get; set; } = string.Empty;
|
||||
public bool ExportValidResults { get; set; }
|
||||
public bool ExportInValidResults { get; set; }
|
||||
public IEnumerable<IResult>? Results { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<Window x:Class="StructureHelper.Windows.CalculationWindows.CalculatorsViews.SelectResultsForExportView"
|
||||
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"
|
||||
xmlns:local="clr-namespace:StructureHelper.Windows.CalculationWindows.CalculatorsViews"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance local:SelectResultsForExportViewModel}"
|
||||
Title="Select results for export" Height="200" Width="300" WindowStartupLocation="CenterScreen" ResizeMode="NoResize">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="40"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Margin="10,0,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="120"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="25"/>
|
||||
<RowDefinition Height="25"/>
|
||||
<RowDefinition Height="25"/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="25"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="File name"/>
|
||||
<TextBox Grid.Column="1" IsEnabled="False" Text="{Binding Filename}"/>
|
||||
<CheckBox Grid.Row="1" Content="Valid results"/>
|
||||
<CheckBox Grid.Row="2" Content="Invalid results"/>
|
||||
<ContentControl Grid.Row="4" Grid.ColumnSpan="2" Margin="-10,0,0,0" ContentTemplate="{StaticResource ResultValidness}" Content="{Binding ValidResultCounter}"/>
|
||||
</Grid>
|
||||
<ContentControl Grid.Row="1" ContentTemplate="{StaticResource OkCancelButtons}" Content="{Binding}"/>
|
||||
</Grid>
|
||||
</Window>
|
||||
@@ -0,0 +1,18 @@
|
||||
using System.Windows;
|
||||
|
||||
namespace StructureHelper.Windows.CalculationWindows.CalculatorsViews
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for SelectResultsForExportView.xaml
|
||||
/// </summary>
|
||||
public partial class SelectResultsForExportView : Window
|
||||
{
|
||||
private SelectResultsForExportViewModel viewModel;
|
||||
public SelectResultsForExportView(SelectResultsForExportViewModel viewModel)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.viewModel = viewModel;
|
||||
this.DataContext = this.viewModel;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
using StructureHelper.Windows.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelper.Windows.CalculationWindows.CalculatorsViews
|
||||
{
|
||||
public class SelectResultsForExportViewModel : OkCancelViewModelBase
|
||||
{
|
||||
private readonly SelectResultSettings resultSettings;
|
||||
|
||||
public string Filename
|
||||
{
|
||||
get => resultSettings.Filename;
|
||||
set
|
||||
{
|
||||
resultSettings.Filename = value;
|
||||
OnPropertyChanged(nameof(Filename));
|
||||
}
|
||||
}
|
||||
|
||||
public bool ExportValidResults
|
||||
{
|
||||
get => resultSettings.ExportValidResults;
|
||||
set
|
||||
{
|
||||
resultSettings.ExportValidResults = value;
|
||||
OnPropertyChanged(nameof(ExportValidResults));
|
||||
}
|
||||
}
|
||||
public bool ExportInValidResults
|
||||
{
|
||||
get => resultSettings.ExportInValidResults;
|
||||
set
|
||||
{
|
||||
resultSettings.ExportInValidResults = value;
|
||||
OnPropertyChanged(nameof(ExportInValidResults));
|
||||
}
|
||||
}
|
||||
public ValidResultCounterVM ValidResultCounter {get;}
|
||||
|
||||
public SelectResultsForExportViewModel(SelectResultSettings resultSettings)
|
||||
{
|
||||
this.resultSettings = resultSettings;
|
||||
ValidResultCounter = new(this.resultSettings.Results);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user